:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #15171a;
  --muted: #62666e;
  --line: #e3e1da;
  --accent: #2b50e8;
  --accent-soft: rgba(43, 80, 232, 0.08);
  --dot: 21, 23, 26;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e11; --surface: #14171c; --ink: #eceef1; --muted: #9aa0aa;
    --line: #23272e; --accent: #8aa4ff; --accent-soft: rgba(138, 164, 255, 0.1); --dot: 236, 238, 241;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0e11; --surface: #14171c; --ink: #eceef1; --muted: #9aa0aa;
  --line: #23272e; --accent: #8aa4ff; --accent-soft: rgba(138, 164, 255, 0.1); --dot: 236, 238, 241;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--accent); color: #fff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 18px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { font: 26px/1 var(--serif); text-decoration: none; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.theme {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.theme svg { width: 16px; height: 16px; fill: currentColor; }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: 78vh; display: flex; align-items: center; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 38%, transparent 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 72px 24px 96px; width: 100%; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
h1 { font: 400 clamp(56px, 10vw, 128px)/0.95 var(--serif); letter-spacing: -0.02em; margin: 0 0 28px; }
.lede { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.55; max-width: 640px; color: var(--muted); margin: 0 0 36px; }
.lede em { color: var(--ink); font-family: var(--serif); font-size: 1.12em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); text-decoration: none; background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Blocks */
.block {
  max-width: var(--max); margin: 0 auto; padding: 88px 24px;
  display: grid; grid-template-columns: 200px 1fr; gap: 40px;
  border-top: 1px solid var(--line);
}
.label { font: 500 12px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.label span { color: var(--accent); margin-right: 10px; }
.content > p { max-width: 680px; margin: 0 0 18px; }
.big { font-size: 22px; line-height: 1.5; }
.about .big { font-family: var(--serif); font-size: 30px; line-height: 1.3; }
.facts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts li { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.facts span { display: block; font: 500 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 18px 40px -24px rgba(0,0,0,.25); }
.tag { display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 7px 10px; border-radius: 999px; margin: 0 0 18px; }
.card h3 { font: 400 28px/1.15 var(--serif); margin: 0 0 10px; }
.card p:last-child { color: var(--muted); margin: 0; font-size: 15px; }

/* Publications */
.sub { font: 500 12px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.sub:not(:first-child) { margin-top: 44px; }
.pubs { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.pubs li { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.pubs li:first-child { border-top: 1px solid var(--line); }
.cite { margin: 0; font-size: 15px; max-width: 700px; }
.cite strong { font-weight: 600; }
.pill { flex: none; font: 500 12px/1 var(--mono); padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.pill:hover { background: var(--ink); color: var(--bg); }

/* Timeline */
.timeline { display: grid; gap: 0; }
.item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.item:first-child { border-top: 1px solid var(--line); }
.when { font: 500 13px/1.8 var(--mono); color: var(--muted); margin: 0; }
.item h3 { font: 600 17px/1.4 var(--sans); margin: 0 0 6px; }
.item h3 span { font-weight: 400; color: var(--muted); }
.item p:last-child { margin: 0; color: var(--muted); font-size: 15px; max-width: 680px; }

/* Teaching chips */
.chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font-size: 14px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* Contact */
.huge { font: 400 clamp(36px, 5vw, 60px)/1.08 var(--serif); margin: 0 0 32px; max-width: 760px; }
.huge em { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 28px; }
.links a { font-size: 16px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color .2s; }
.links a:hover { border-color: var(--ink); }

.foot { max-width: var(--max); margin: 0 auto; padding: 32px 24px 48px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot p { margin: 0; }
.foot a { text-decoration: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 820px) {
  .block { grid-template-columns: 1fr; gap: 20px; padding: 64px 16px; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; gap: 4px; }
  .nav { padding: 14px 16px; gap: 14px; }
  .nav nav { gap: 14px; }
  .nav nav a:not(:last-child) { display: none; }
  .hero-inner { padding: 48px 16px 72px; }
  .about .big { font-size: 24px; }
  .pubs li { flex-direction: column; gap: 10px; }
  .foot { padding: 28px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}
