/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg: #fff;
  --bg-nav: rgba(255,255,255,.95);
  --bg-soft: #f0f6ff;
  --text: #222;
  --text-body: #333;
  --text-strong: #111;
  --text-muted: #666;
  --text-faint: #888;
  --link: #1772d0;
  --link-soft: #c0d8f0;
  --accent: #e07b39;
  --badge-bg: #e8f0fe;
  --badge-text: #1a56c4;
  --border: #e8e8e8;
  --border-soft: #f0f0f0;
  --border-card: #ebebeb;
  --border-card-hover: #b8d0ea;
  --btn-border: #d0d0d0;
  --shadow: 0 2px 12px rgba(0,0,0,.12);
  --photo-ring: #ddd;
  --photo-edge: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-nav: rgba(20,22,26,.95);
    --bg-soft: #1b2430;
    --text: #e6e8ec;
    --text-body: #d2d6dc;
    --text-strong: #f2f4f7;
    --text-muted: #9aa0a8;
    --text-faint: #858b93;
    --link: #6aa9f0;
    --link-soft: #2f4a6d;
    --accent: #f0a06a;
    --badge-bg: #1c2c48;
    --badge-text: #8fbcf5;
    --border: #262a30;
    --border-soft: #22262b;
    --border-card: #262a30;
    --border-card-hover: #3c536f;
    --btn-border: #343a42;
    --shadow: 0 2px 12px rgba(0,0,0,.5);
    --photo-ring: #2c3138;
    --photo-edge: #14161a;
  }
}

/* ─── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }

/* Visible only to screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--bg); color: var(--link);
  border: 1px solid var(--link); border-radius: 6px;
  padding: 8px 14px; font-size: .85rem; font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 10px; }

/* ─── Nav ───────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 52px;
}
.nav-brand { font-family: 'Lora', Georgia, serif; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: .85rem; letter-spacing: .05em;
  text-transform: uppercase; font-weight: 600; color: var(--text-muted);
}
.nav-links a:hover { color: var(--link); text-decoration: none; }

/* ─── Layout ────────────────────────────────────────────────── */
.page { max-width: 900px; margin: 0 auto; padding: 0 32px 80px; }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}
.hero-photo {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 3px solid var(--photo-edge); outline: 1px solid var(--photo-ring);
}
.hero-name { font-family: 'Lora', Georgia, serif; font-size: 2rem; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.hero-title { font-size: .95rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 300; }
.hero-affil { font-size: .9rem; color: var(--text-body); margin-bottom: 20px; }
.hero-affil a { color: var(--text-body); }

/* ─── Social buttons ────────────────────────────────────────── */
.social-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.social-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--btn-border); border-radius: 6px;
  padding: 6px 13px; transition: color .15s, border-color .15s, background .15s;
}
.social-btn svg { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }
.social-btn:hover { color: var(--link); border-color: var(--link); text-decoration: none; background: var(--bg-soft); }

/* ─── Sections ──────────────────────────────────────────────── */
section {
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 60px; /* clears the sticky nav on anchor jumps */
}
section:last-of-type { border-bottom: none; }
.section-title {
  font-family: 'Lora', Georgia, serif; font-size: 1.3rem; font-weight: 600;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px; color: var(--text);
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── About ─────────────────────────────────────────────────── */
.about-text { font-size: .95rem; color: var(--text-body); max-width: 720px; }
.about-text p + p { margin-top: .9em; }

/* ─── News ──────────────────────────────────────────────────── */
.news-list { list-style: none; }
.news-item {
  display: flex; gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: .9rem; align-items: baseline;
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: .78rem; color: var(--text-faint);
  white-space: nowrap; min-width: 72px;
  font-weight: 600; letter-spacing: .02em;
}
.news-text { color: var(--text-body); flex: 1; line-height: 1.5; }
.news-badge {
  display: inline-block;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--badge-bg); color: var(--badge-text);
  padding: 1px 7px; border-radius: 20px;
  vertical-align: middle; margin-right: 5px;
}
.news-hidden { display: none; }
.news-list.expanded .news-hidden { display: flex; }
#news-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; cursor: pointer;
  font-size: .83rem; font-weight: 600; color: var(--link);
  background: none; border: 1px solid var(--link-soft); border-radius: 6px;
  padding: 6px 14px; transition: background .15s;
  font-family: inherit;
}
#news-toggle:hover { background: var(--bg-soft); }
#news-toggle svg { width: 14px; height: 14px; transition: transform .25s; }
#news-toggle.open svg { transform: rotate(180deg); }

/* ─── Publications ──────────────────────────────────────────── */
.pub-list { display: flex; flex-direction: column; gap: 22px; }
.pub-item {
  display: flex; padding: 16px 18px;
  border-radius: 8px; border: 1px solid var(--border-card);
  transition: border-color .15s;
}
.pub-item:hover { border-color: var(--border-card-hover); }
.pub-year {
  font-size: .72rem; font-weight: 700; color: var(--text-faint); letter-spacing: .08em;
  text-transform: uppercase; min-width: 52px; padding-top: 3px;
}
.pub-body { flex: 1; min-width: 0; }
.pub-title { font-size: .95rem; font-weight: 600; line-height: 1.4; color: var(--text-strong); margin-bottom: 3px; }
.pub-venue {
  display: inline-block; font-size: .76rem; font-weight: 700;
  color: var(--accent); letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 5px;
}
.pub-authors { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.pub-authors strong { color: var(--text-body); font-weight: 600; }
.pub-links { display: flex; gap: 7px; flex-wrap: wrap; }
.pub-tag {
  font-size: .75rem; font-weight: 600;
  color: var(--link); border: 1px solid var(--link-soft);
  padding: 2px 10px; border-radius: 4px;
  transition: background .12s, color .12s;
}
.pub-tag:hover { background: var(--link); color: #fff; border-color: var(--link); text-decoration: none; }

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  text-align: center; padding: 28px 0;
  font-size: .8rem; color: var(--text-faint);
  border-top: 1px solid var(--border); margin-top: 8px;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 620px) {
  .hero { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .hero-photo { width: 140px; height: 140px; margin: 0 auto; }
  .social-row { justify-content: center; }
  nav { padding: 0 18px; }
  .nav-links { gap: 18px; }
  .page { padding: 0 18px 60px; }
  .pub-item { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ─── Print ─────────────────────────────────────────────────── */
@media print {
  nav, footer, #news-toggle, .skip-link { display: none; }
  .news-hidden { display: flex; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .page { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  .pub-item, section { break-inside: avoid; }
}
