/* ==========================================================================
   Anita Sarma — site styles
   Glass UI on a slow aurora background. Light + dark themes.
   ========================================================================== */

:root {
  --bg: #eef0f7;
  --bg-2: #e6e9f4;
  --ink: #0e1124;
  --ink-2: #2a2f4a;
  --muted: #5a607a;
  --faint: #8a90a8;
  --accent: #4f46e5;
  --accent-2: #0d9488;
  --accent-3: #e2557b;
  --accent-ink: #ffffff;
  --gold: #b7791f;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.75);
  --hairline: rgba(14, 17, 36, 0.08);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 40px -12px rgba(30, 38, 90, 0.18);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 30px 80px -30px rgba(30, 38, 90, 0.35);

  --blob-1: #7c74ff;
  --blob-2: #2dd4bf;
  --blob-3: #ff8fab;
  --blob-4: #ffd27a;

  --radius: 22px;
  --radius-sm: 14px;
  --font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070913;
    --bg-2: #0b0e1c;
    --ink: #eef0ff;
    --ink-2: #cfd3ee;
    --muted: #9ba2c2;
    --faint: #6d7392;
    --accent: #a9a5f2;
    --accent-2: #7cc4b8;
    --accent-3: #d79aae;
    --accent-ink: #0b0d1a;
    --gold: #f6c561;
    --glass: rgba(22, 26, 46, 0.55);
    --glass-strong: rgba(26, 30, 54, 0.78);
    --glass-soft: rgba(22, 26, 46, 0.35);
    --glass-border: rgba(255, 255, 255, 0.09);
    --hairline: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 40px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    --blob-1: #2e2a6b;
    --blob-2: #1d3b4f;
    --blob-3: #2a2440;
    --blob-4: #1f2a3a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070913;
  --bg-2: #0b0e1c;
  --ink: #eef0ff;
  --ink-2: #cfd3ee;
  --muted: #9ba2c2;
  --faint: #6d7392;
  --accent: #a9a5f2;
  --accent-2: #7cc4b8;
  --accent-3: #d79aae;
  --accent-ink: #0b0d1a;
  --gold: #f6c561;
  --glass: rgba(22, 26, 46, 0.55);
  --glass-strong: rgba(26, 30, 54, 0.78);
  --glass-soft: rgba(22, 26, 46, 0.35);
  --glass-border: rgba(255, 255, 255, 0.09);
  --hairline: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --blob-1: #2e2a6b;
  --blob-2: #1d3b4f;
  --blob-3: #2a2440;
  --blob-4: #1f2a3a;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0 0 1em; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.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; }

/* ---------- Aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background:
  radial-gradient(1200px 800px at 10% -10%, color-mix(in srgb, var(--blob-1) 18%, transparent), transparent 60%),
  linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.aurora span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; will-change: transform; }
:root[data-theme="dark"] .aurora span { opacity: 0.35; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .aurora span { opacity: 0.35; } }
.aurora .b1 { width: 52vw; height: 52vw; left: -12vw; top: -14vw; background: var(--blob-1); animation: drift1 28s ease-in-out infinite alternate; }
.aurora .b2 { width: 42vw; height: 42vw; right: -10vw; top: 8vh; background: var(--blob-2); animation: drift2 32s ease-in-out infinite alternate; }
.aurora .b3 { width: 38vw; height: 38vw; left: 28vw; bottom: -18vw; background: var(--blob-3); animation: drift3 36s ease-in-out infinite alternate; opacity: 0.4; }
.aurora .b4 { width: 26vw; height: 26vw; right: 18vw; bottom: 10vh; background: var(--blob-4); animation: drift1 40s ease-in-out infinite alternate-reverse; opacity: 0.35; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-10vw, 10vh, 0) scale(0.92); } }
@keyframes drift3 { to { transform: translate3d(6vw, -8vh, 0) scale(1.08); } }

/* ---------- Glass primitives ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
.glass-strong { background: var(--glass-strong); }
.lift { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border)); }

/* ---------- Layout ---------- */
.wrap { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
main { padding-top: 104px; padding-bottom: 40px; }
section { margin: 0 0 88px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } body { font-size: 16px; } main { padding-top: 92px; } section { margin-bottom: 64px; } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.015em; margin-top: 8px; }
.section-head p { color: var(--muted); max-width: 56ch; margin: 8px 0 0; }
.link-arrow { font-weight: 550; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.link-arrow::after { content: "→"; transition: transform .25s; }
.link-arrow:hover::after { transform: translateX(4px); }

.page-hero { padding: 36px 0 12px; margin-bottom: 40px; }
.page-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 84px); letter-spacing: -0.025em; line-height: 1; margin: 12px 0 16px; }
.page-hero h1 em { font-style: italic; background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.page-hero p { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--muted); max-width: 62ch; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 17px; color: #fff;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 60%, transparent); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 13px; border-radius: 999px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; white-space: nowrap; }
.nav-links a:hover { background: var(--glass-soft); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hairline); background: var(--glass-soft); color: var(--ink); cursor: pointer; transition: background .2s, transform .2s; flex: none; }
.icon-btn:hover { background: var(--glass-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 1020px) {
  .menu-btn { display: grid; }
  .nav-links { position: absolute; top: calc(100% + 10px); left: 16px; right: 16px; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 22px;
    background: color-mix(in srgb, var(--bg) 90%, transparent); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
    opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav-links a { padding: 12px 16px; font-size: 16px; }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
}

/* ---------- Buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 560; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .25s, background .2s; font-family: inherit; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { color: var(--accent-ink); background: var(--accent); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { transform: translateY(-1px); color: var(--accent-ink); box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-ghost { background: var(--glass); border-color: var(--glass-border); color: var(--ink); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn-ghost:hover { background: var(--glass-strong); color: var(--ink); transform: translateY(-1px); }

.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--glass-soft); color: var(--ink-2); font: 500 13.5px/1.2 var(--font); cursor: pointer; transition: all .2s; white-space: nowrap; }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .6; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 520; padding: 3px 10px; border-radius: 999px; color: var(--ink-2);
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); text-decoration: none; cursor: pointer; }
.tag:hover { background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; background: var(--ink); color: var(--bg); white-space: nowrap; }
.badge.soft { background: var(--glass-strong); color: var(--ink-2); border: 1px solid var(--hairline); }
.award { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gold); background: color-mix(in srgb, var(--gold) 13%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); padding: 3px 10px; border-radius: 999px; }
.award svg { width: 13px; height: 13px; }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: 1.25fr .85fr; gap: 48px; align-items: center; padding: 40px 0 24px; margin-bottom: 64px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 116px); line-height: .92; letter-spacing: -0.035em; margin: 18px 0 22px; }
.hero h1 em { font-style: italic; background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 55%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.hero .role { font-size: 17px; color: var(--ink-2); font-weight: 520; margin-bottom: 18px; }
.hero .lede { font-size: clamp(17.5px, 1.7vw, 20.5px); line-height: 1.55; color: var(--muted); max-width: 54ch; margin-bottom: 30px; }
.hero .lede strong { color: var(--ink); font-weight: 560; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.portrait { position: relative; justify-self: center; width: min(400px, 100%); }
.portrait-frame { padding: 12px; border-radius: 36px; transform: rotate(1.5deg); }
.portrait-frame img { height: auto; border-radius: 26px; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 20%; width: 100%; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: 18px; font-size: 13.5px; line-height: 1.25; animation: bob 7s ease-in-out infinite; text-decoration: none; }
.float-card b { display: block; font-size: 15px; }
.float-card .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.float-card.f1 { left: -38px; bottom: 64px; }
.float-card.f2 { right: -26px; top: 34px; animation-delay: -3.5s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 20px; }
  .portrait { order: -1; width: min(260px, 68%); }
  .portrait-frame { padding: 8px; border-radius: 28px; }
  .portrait-frame img { aspect-ratio: 1 / 1; border-radius: 22px; }
  .float-card { padding: 8px 12px; font-size: 12px; }
  .float-card b { font-size: 13px; }
  .float-card .ic { width: 28px; height: 28px; border-radius: 9px; }
  .float-card.f1 { left: -34px; bottom: 18px; } .float-card.f2 { right: -44px; top: 14px; }
  .hero h1 { margin: 12px 0 14px; }
}

.stats { display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px; }
.stat { padding: 18px 20px; text-align: left; }
.stat + .stat { border-left: 1px solid var(--hairline); }
.stat .n { font-family: var(--serif); font-size: clamp(34px, 4vw, 46px); line-height: 1; letter-spacing: -0.02em; }
.stat .l { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat + .stat { border-left: 0; } .stat { border-bottom: 1px solid var(--hairline); } .stat:last-child { border-bottom: 0; grid-column: span 2; } }

/* press strip */
.press { display: flex; align-items: center; gap: 14px 34px; flex-wrap: wrap; padding: 20px 26px; }
.press .label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-right: 6px; }
.press .outlet { font-family: var(--serif); font-size: 22px; color: var(--ink-2); text-decoration: none; opacity: .85; white-space: nowrap; transition: opacity .2s, color .2s; }
.press .outlet:hover { opacity: 1; color: var(--accent); }

/* theme cards */
.theme-card { padding: 26px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; min-height: 100%; position: relative; overflow: hidden; }
.theme-card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); box-shadow: 0 10px 24px -10px var(--c); }
.theme-card .ic svg { width: 22px; height: 22px; }
.theme-card h3 { font-size: 19px; letter-spacing: -0.015em; }
.theme-card p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.theme-card .more { font-size: 14px; font-weight: 560; color: var(--ink-2); }
.theme-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%; background: var(--c); opacity: .13; filter: blur(30px); transition: opacity .35s; }
.theme-card:hover::after { opacity: .28; }

/* quote / feature */
.feature { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 34px; align-items: center; }
.feature .mark { font-family: var(--serif); font-size: 96px; line-height: .8; color: var(--accent); }
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0 0 14px; }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; padding: 26px; gap: 14px; } .feature .mark { font-size: 46px; } }

/* news list (compact) */
.news-mini { display: flex; flex-direction: column; }
.news-mini a { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: baseline; padding: 18px 22px; text-decoration: none; border-top: 1px solid var(--hairline); transition: background .2s; }
.news-mini a:first-child { border-top: 0; }
.news-mini a:hover { background: var(--glass-soft); }
.news-mini .d { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.news-mini .t { font-weight: 540; color: var(--ink); }
.news-mini .o { font-size: 14px; color: var(--muted); display: block; font-weight: 400; margin-top: 2px; }
@media (max-width: 640px) { .news-mini a { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; } .news-mini .badge { justify-self: start; } }

/* paper card */
.paper-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.paper-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.paper-card h3 { font-size: 17.5px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 580; }
.paper-card .au { font-size: 14px; color: var(--muted); }

/* contact */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; overflow: hidden; }
.contact > div { padding: 34px; }
.contact > div + div { border-left: 1px solid var(--hairline); }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 44px); margin: 8px 0 12px; }
.contact dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; font-size: 15px; }
.contact dt { color: var(--faint); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding-top: 2px; }
.contact dd { margin: 0; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } .contact > div + div { border-left: 0; border-top: 1px solid var(--hairline); } .contact > div { padding: 26px; } }

/* ---------- Publications page ---------- */
.pub-shell { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
@media (max-width: 980px) { .pub-shell { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 92px; padding: 22px; display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; }
@media (max-width: 980px) { .filters { position: static; max-height: none; } .filters.collapsed .filter-body { display: none; } }
.filters h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 650; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.filters h4 button { font: inherit; letter-spacing: 0; text-transform: none; font-size: 12.5px; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; font-weight: 550; }
.filter-body { display: flex; flex-direction: column; gap: 22px; }
.filter-toggle { display: none; }
@media (max-width: 980px) { .filter-toggle { display: inline-flex; } }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips.stack { flex-direction: column; align-items: stretch; }
.chips.stack .chip { justify-content: flex-start; }
.chips.stack .chip .count { margin-left: auto; }
.search { position: relative; }
.search input { width: 100%; padding: 15px 18px 15px 48px; font: 500 16px var(--font); color: var(--ink); background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search svg { position: absolute; left: 17px; top: 50%; translate: 0 -50%; width: 19px; height: 19px; color: var(--faint); }
.search kbd { position: absolute; right: 14px; top: 50%; translate: 0 -50%; font: 600 11.5px var(--mono); color: var(--faint); border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 7px; background: var(--glass-soft); }
@media (max-width: 640px) { .search kbd { display: none; } }
.select, .range select { width: 100%; padding: 10px 12px; font: 500 14px var(--font); color: var(--ink); background: var(--glass-soft); border: 1px solid var(--hairline); border-radius: 12px; outline: none; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a90a8' stroke-width='2.5'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--faint); font-size: 13px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--hairline); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; border: 1px solid var(--hairline); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }

.hist { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.hist button { flex: 1; min-width: 2px; border: 0; padding: 0; border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--accent) 55%, transparent); cursor: pointer; transition: background .2s, opacity .2s; }
.hist button:hover { background: var(--accent); }
.hist button.off { opacity: .22; }
.hist-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }

.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 4px 14px; }
.results-bar .count { font-size: 14.5px; color: var(--muted); }
.results-bar .count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters .chip { padding: 5px 10px 5px 12px; font-size: 13px; background: var(--glass-strong); }
.active-filters .chip::after { content: "×"; font-size: 15px; line-height: 1; opacity: .55; }

.year-group { margin-bottom: 30px; }
.year-label { position: sticky; top: 84px; z-index: 2; display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-size: 30px; line-height: 1; margin: 0 0 12px 4px; padding: 8px 14px 6px; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.year-label small { font-family: var(--font); font-size: 12.5px; color: var(--faint); }
.pub { padding: 20px 22px; margin-bottom: 10px; display: grid; grid-template-columns: 92px 1fr; gap: 18px; }
.pub .venue { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding-top: 2px; }
.pub .venue .badge { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
.pub .type { font-size: 11.5px; color: var(--faint); font-weight: 550; }
.pub h3 { font-size: 17px; line-height: 1.38; font-weight: 580; letter-spacing: -0.008em; margin-bottom: 6px; }
.pub h3 a { text-decoration: none; }
.pub h3 a:hover { text-decoration: underline; }
.pub .au { font-size: 14.5px; color: var(--muted); margin-bottom: 4px; }
.pub .au b { color: var(--ink); font-weight: 620; }
.pub .vf { font-size: 13.5px; color: var(--faint); font-style: italic; margin-bottom: 10px; }
.pub .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pub .actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.pub .actions a, .pub .actions button { font: 560 12.5px var(--font); color: var(--ink-2); background: transparent; border: 1px solid var(--hairline); padding: 5px 11px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; transition: all .2s; }
.pub .actions a:hover, .pub .actions button:hover { border-color: var(--accent); color: var(--accent); }
.pub .actions svg { width: 13px; height: 13px; }
.pub .abstract { font-size: 14.5px; color: var(--ink-2); margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--glass-soft); border: 1px solid var(--hairline); line-height: 1.6; }
.pub .status { font-size: 11.5px; font-weight: 600; color: var(--accent-2); }
.pub mark { background: color-mix(in srgb, var(--accent-2) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; gap: 10px; padding: 18px; } .pub .venue { flex-direction: row; align-items: center; } }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--ink); margin-bottom: 8px; }

.toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 0; z-index: 80; padding: 12px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 550; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); transition: all .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

/* ---------- News page ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.feature-grid > * { grid-column: span 4; }
.feature-grid > *:first-child { grid-column: span 8; grid-row: span 2; }
@media (max-width: 960px) { .feature-grid > *, .feature-grid > *:first-child { grid-column: span 6; grid-row: auto; } }
@media (max-width: 640px) { .feature-grid > *, .feature-grid > *:first-child { grid-column: span 12; } }
.fcard { padding: 26px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; position: relative; overflow: hidden; min-height: 210px; }
.fcard .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fcard .d { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.fcard .outlet { font-family: var(--serif); font-size: 21px; color: var(--ink-2); }
.fcard h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.012em; font-weight: 600; }
.fcard p { color: var(--muted); font-size: 15px; margin: 0; }
.fcard .go { margin-top: auto; font-size: 14px; font-weight: 560; color: var(--ink-2); }
.feature-grid > *:first-child h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -0.015em; }
.feature-grid > *:first-child p { font-size: 17px; max-width: 58ch; }
.fcard::before { content: ""; position: absolute; inset: auto -60px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: var(--c, var(--accent)); opacity: .14; filter: blur(40px); }

.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; flex-wrap: wrap; }
.tabs button { font: 550 14px var(--font); padding: 9px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: all .2s; display: inline-flex; gap: 7px; align-items: center; }
.tabs button .count { font-size: 11.5px; opacity: .55; font-variant-numeric: tabular-nums; }
.tabs button:hover { background: var(--glass-soft); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.news-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 26px; }
.news-toolbar .search { flex: 1; min-width: 220px; max-width: 360px; }
.news-toolbar .search input { padding-top: 12px; padding-bottom: 12px; }

.timeline { position: relative; padding-left: 0; }
.tl-year { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-bottom: 28px; }
.tl-year > h3 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; position: sticky; top: 96px; align-self: start; color: var(--ink-2); }
.tl-items { display: flex; flex-direction: column; overflow: hidden; }
.tl-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 16px; align-items: start; padding: 16px 22px; border-top: 1px solid var(--hairline); text-decoration: none; transition: background .2s; }
.tl-item:first-child { border-top: 0; }
a.tl-item:hover { background: var(--glass-soft); }
.tl-item .d { font-size: 13px; color: var(--faint); padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl-item .t { font-weight: 560; line-height: 1.4; }
.tl-item .o { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tl-item .s { font-size: 14px; color: var(--muted); margin-top: 6px; }
.tl-item .ext { width: 16px; height: 16px; color: var(--faint); margin-top: 4px; }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 7px; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
@media (max-width: 720px) {
  .tl-year { grid-template-columns: 1fr; gap: 10px; }
  .tl-year > h3 { position: static; font-size: 32px; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .tl-item .ext { display: none; }
}

/* ---------- Generic content blocks ---------- */
.card { padding: 28px; }
.card h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: -0.012em; }
.card p:last-child { margin-bottom: 0; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 12px 0; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: 76px 1fr; gap: 14px; font-size: 15px; }
.list-clean li:first-child { border-top: 0; padding-top: 0; }
.list-clean .y { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 14px; padding-top: 1px; }
.list-clean .amt { color: var(--accent-2); font-weight: 600; white-space: nowrap; }

.theme-block { display: grid; grid-template-columns: 300px 1fr; gap: 0; overflow: hidden; margin-bottom: 20px; }
.theme-block .side { padding: 30px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 80%); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 14px; }
.theme-block .side .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }
.theme-block .side .ic svg { width: 24px; height: 24px; }
.theme-block .side h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -0.01em; }
.theme-block .main { padding: 30px; }
.theme-block .main > p { color: var(--ink-2); font-size: 16.5px; }
.theme-block .qs { margin: 14px 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.theme-block .qs li { padding-left: 22px; position: relative; color: var(--muted); font-size: 15px; }
.theme-block .qs li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.theme-block .reps { display: grid; gap: 8px; margin-top: 6px; }
.theme-block .reps a { font-size: 14.5px; text-decoration: none; display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--glass-soft); border: 1px solid var(--hairline); transition: border-color .2s; }
.theme-block .reps a:hover { border-color: var(--c); }
.theme-block .reps a span { color: var(--faint); font-size: 12.5px; white-space: nowrap; font-weight: 600; }
@media (max-width: 860px) { .theme-block { grid-template-columns: 1fr; } .theme-block .side { border-right: 0; border-bottom: 1px solid var(--hairline); padding: 24px; } .theme-block .main { padding: 24px; } }

.person { padding: 22px; display: flex; gap: 16px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 18px; color: #fff; flex: none; background: linear-gradient(135deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 50%, #000)); }
.person h3 { font-size: 16.5px; margin-bottom: 2px; }
.person p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.person a { text-decoration: none; }
.cols { columns: 3 220px; column-gap: 28px; font-size: 14.5px; }
.cols div { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 10px; }
.cols div span { color: var(--faint); font-size: 13px; white-space: nowrap; }

.course { padding: 22px 24px; display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.course .code { font: 600 13px var(--mono); color: var(--accent); padding-top: 3px; }
.course h3 { font-size: 17px; margin-bottom: 4px; }
.course p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .course { grid-template-columns: 1fr; gap: 6px; } }

.role-list { display: grid; gap: 0; }
.role-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.role-list > div:first-child { border-top: 0; padding-top: 0; }
.role-list .y { color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .role-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Footer ---------- */
footer { padding: 28px 0 40px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 26px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--accent); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Fallback when backdrop-filter is unavailable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}

@media print {
  .aurora, .grain, .nav, footer, .filters, .news-toolbar { display: none !important; }
  .glass { background: none; box-shadow: none; border-color: #ddd; backdrop-filter: none; }
  main { padding-top: 0; }
}

/* home: latest + selected split */
@media (max-width: 960px) { #latest-wrap { grid-template-columns: 1fr !important; } }

/* people: mark names that link out */
a.person { text-decoration: none; color: inherit; cursor: pointer; }
a.person:hover h3 { color: var(--accent); }
.person .ext-mark { color: var(--faint); font-size: .85em; }

/* source line under the stats panel */
.stats-src { margin: 10px 4px 0; font-size: 12.5px; color: var(--faint); text-align: right; }
.stats-src a { color: inherit; }

/* hero contact pills: email, office, LinkedIn, Scholar right under the intro */
.contact-row { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.contact-row a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--ink-2); text-decoration: none; background: var(--glass-soft); border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color .2s, color .2s, background .2s; }
.contact-row a:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); background: var(--glass); }
.contact-row svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
@media (max-width: 640px) { .contact-row a { font-size: 13px; } }
