/* ---------- Tokens (dark only) ---------- */
:root {
  --bg: #0e1116;
  --bg-alt: #141922;
  --surface: #171c26;
  --ink: #e7e9ee;
  --muted: #9aa3b2;
  --line: #262d3a;
  --accent: #7dbbf0;
  --accent-ink: #0e1116;
  --accent-soft: rgba(125, 187, 240, 0.1);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --max: 980px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 6px;
  color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--accent-soft); }
.nav-toggle { display: none; }


@media (max-width: 720px) {
  .nav-toggle {
    display: block; font: 500 0.94rem var(--sans); color: var(--ink);
    background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer;
  }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 44px; align-items: center;
  padding-top: 96px; padding-bottom: 96px;
}
.portrait {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--surface); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: -0.01em; margin-bottom: 14px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.lede a { color: var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 22px 0 0; }

.btn {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 0.92rem var(--sans); text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
  .portrait { width: 140px; height: 140px; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: 2rem; margin-bottom: 28px; }
.subhead { font-size: 1.3rem; margin: 48px 0 18px; }
@media (max-width: 600px) { .section { padding: 60px 0; } .section-title { font-size: 1.7rem; } }

.about p { font-size: 1.08rem; max-width: 44em; }

.feature {
  margin-top: 32px; padding: 28px 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
}
.feature-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.feature h3 { font-size: 1.45rem; margin-bottom: 12px; }
.feature-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-size: 0.95rem; }
@media (max-width: 600px) { .feature { padding: 22px 18px; } }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
.card {
  padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.card-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.card h4 { font-size: 1.12rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.card a { font-size: 0.92rem; font-weight: 500; margin-right: 16px; }

/* ---------- Publications ---------- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.pub:last-child { border-bottom: 1px solid var(--line); }
.pub-year { font-family: var(--serif); color: var(--muted); font-size: 1.05rem; padding-top: 1px; }
.pub-title { font-family: var(--serif); font-size: 1.13rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.35; }
.pub-title:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { color: var(--muted); font-size: 0.92rem; margin: 6px 0 2px; }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: 0.92rem; margin: 0; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 20px; }
@media (max-width: 600px) { .pub { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact p { color: var(--muted); }
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; gap: 8px; } }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 500; }
.contact-form input, .contact-form textarea {
  font: 400 1rem var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form textarea { resize: vertical; }
.contact-form button { justify-self: start; padding: 10px 24px; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-inner p { margin: 0; }
.site-footer a { color: var(--muted); }

/* ---------- Job-market status ---------- */
.status {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 0; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 0.92rem; font-weight: 500;
}
.status a { font-weight: 600; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2e9d5b;
  box-shadow: 0 0 0 3px rgba(46, 157, 91, 0.2);
}
.feature-links-label { flex-basis: 100%; color: var(--ink); }

/* ---------- Feature video ---------- */
.feature-media { margin: 4px 0 18px; }
.feature-media video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  border-radius: 8px; background: #000; border: 1px solid var(--line);
}
.feature-media figcaption { color: var(--muted); font-size: 0.86rem; line-height: 1.5; margin-top: 8px; }
