:root {
  --accent: #7a1f2b;
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: #e6e3de;
  --bg: #fdfcfa;
  --card: #ffffff;
  --chip: #f3efe9;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece9e4; --muted: #a6a29b; --line: #2e2c29;
    --bg: #161514; --card: #1d1c1a; --chip: #2a2825;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--accent); }
nav.main { display: flex; gap: 22px; flex-wrap: wrap; }
nav.main a { color: var(--muted); font-size: .95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--ink); text-decoration: none; }
nav.main a.active { color: var(--ink); border-bottom-color: var(--accent); }

/* Typography */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.3rem; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; margin: 48px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.12rem; margin: 0 0 6px; }
.muted { color: var(--muted); }
main.wrap { padding-top: 48px; padding-bottom: 72px; }

/* Hero */
.hero { display: grid; grid-template-columns: 180px 1fr; gap: 36px; align-items: start; }
.hero .photo { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; background: var(--chip); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 2.5rem; letter-spacing: .02em; color: var(--accent); }
.hero .position { font-size: 1.05rem; margin: 0; }
.hero .inst { color: var(--muted); margin: 0 0 14px; }
.hero .tagline { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--muted); margin: 0 0 18px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 8px; }
.links a { font-size: .88rem; border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; color: var(--ink); background: var(--card); }
.links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.links a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.bio p { margin: 0 0 14px; }

/* Lists */
ul.plain { list-style: none; padding: 0; margin: 0; }
.interests { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; background: var(--chip); color: var(--ink); font-size: .85rem; padding: 3px 11px; border-radius: 999px; }
.chip.status { background: transparent; border: 1px solid var(--accent); color: var(--accent); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: 1px 9px; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }

/* Publications */
.pub { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub .t { font-weight: 600; color: var(--ink); }
.pub .a { color: var(--muted); font-size: .94rem; }
.pub .a b { color: var(--ink); font-weight: 600; }
.pub .v { font-style: italic; font-size: .94rem; }
.pub .x { font-size: .85rem; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.year { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); margin: 28px 0 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 8px; }
.toolbar input { flex: 1 1 220px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--card); color: var(--ink); }
.toolbar button { font: inherit; font-size: .88rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.toolbar button.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Projects */
.cards { display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.card img { width: 100%; border-radius: 8px; margin-bottom: 14px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.card p { margin: 6px 0 10px; }
.card .methods { font-size: .9rem; color: var(--muted); }

footer.site { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .88rem; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.empty { color: var(--muted); font-style: italic; }

@media (max-width: 640px) {
  h1 { font-size: 1.85rem; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero .photo { width: 120px; height: 120px; font-size: 1.7rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  nav.main { gap: 16px; }
}

/* Research profile links */
.profiles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 24px; }
a.card.profile { color: var(--ink); transition: border-color .15s, transform .15s; }
a.card.profile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
a.card.profile h3 { color: var(--accent); }
a.card.profile p { margin: 4px 0 0; font-size: .92rem; }
/* Coming soon */
.cards.soon { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards.soon .card { background: transparent; border-style: dashed; padding: 16px 18px; }
.cards.soon .card .chip.status { border-color: var(--muted); color: var(--muted); }

/* Project button */
.card .btn { display: inline-block; margin-top: 12px; background: var(--accent); color: #fff; font-size: .9rem; font-weight: 500; padding: 7px 16px; border-radius: 999px; }
.card .btn:hover { text-decoration: none; opacity: .9; }
