/* ==========================================================================
   Mohammad Ghazi Vakili — academic site, v2 "editorial + quantum"
   Display: Instrument Serif · Text: Newsreader · UI: Inter
   Tokens → base → header → hero → sections → components → responsive → print
   ========================================================================== */

:root {
  --bg: #f7f4ed;
  --surface: #fffdf8;
  --surface-2: #efebe0;
  --ink: #101524;
  --ink-2: #394058;
  --muted: #5b6377;
  --rule: #ddd7c8;
  --accent: #2740d8;
  --accent-ink: #1a2fa8;
  --accent-soft: #e6e9fb;
  --mark: #c0401c;
  --focus: #2740d8;
  --logo-accent: #9fb0ff;

  --panel: #0d1226;
  --panel-ink: #eceaf4;
  --panel-muted: #a7aec9;
  --panel-rule: rgba(255, 255, 255, .14);
  --panel-accent: #a3b2ff;

  --display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --serif: "Newsreader", "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
  --gutter: 32px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 21, 36, .05), 0 10px 30px rgba(16, 21, 36, .06);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #090d19;
  --surface: #101626;
  --surface-2: #161d31;
  --ink: #ecebe4;
  --ink-2: #c3c6d4;
  --muted: #8f98ae;
  --rule: #232b42;
  --accent: #8ea0ff;
  --accent-ink: #b9c4ff;
  --accent-soft: #1a2142;
  --mark: #ff8e66;
  --focus: #8ea0ff;
  --logo-accent: #2740d8;
  --panel: #0f1530;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090d19; --surface: #101626; --surface-2: #161d31; --ink: #ecebe4; --ink-2: #c3c6d4;
    --muted: #8f98ae; --rule: #232b42; --accent: #8ea0ff; --accent-ink: #b9c4ff; --accent-soft: #1a2142;
    --mark: #ff8e66; --focus: #8ea0ff; --logo-accent: #2740d8; --panel: #0f1530;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.65; font-optical-sizing: auto;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent); transition: color .15s, text-decoration-color .15s, background-color .15s; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
/* prose links get a soft highlight on hover */
.about-text p a:hover, .block-lead a:hover, .page-lead a:hover, .aff-line a:hover, .tl-note a:hover { background: var(--accent-soft); border-radius: 3px; box-shadow: 0 0 0 3px var(--accent-soft); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.ui { font-family: var(--sans); }
.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: -56px; z-index: 200; background: var(--ink); color: var(--bg); padding: 9px 15px; border-radius: 8px; font: 500 .9rem var(--sans); text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--bg); }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* scroll-reveal (only when JS is running; content is always visible otherwise) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.topbar.scrolled { border-bottom-color: var(--rule); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font: 500 .95rem var(--sans); letter-spacing: -.005em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { display: block; width: 36px; height: 36px; flex: none; }
.lg-bg { fill: var(--ink); }
.lg-fg, .lg-ac { fill: none; stroke-width: 5.6; stroke-linecap: round; stroke-linejoin: round; }
.lg-fg { stroke: var(--bg); }
.lg-ac { stroke: var(--logo-accent); }
.topnav { margin-left: auto; }
.topnav ul { display: flex; gap: 2px; font: 500 .84rem var(--sans); }
.topnav a { position: relative; display: block; padding: 8px 11px; color: var(--muted); text-decoration: none; transition: color .15s; }
.topnav a::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.2, .7, .2, 1), background .15s; }
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { transform: scaleX(1); background: color-mix(in srgb, var(--ink) 28%, transparent); }
.topnav a[aria-current="page"] { color: var(--ink); }
.topnav a[aria-current="page"]::after { transform: scaleX(1); background: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; background: transparent; border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; color: var(--ink-2); transition: border-color .15s, color .15s; }
.theme-toggle:hover, .menu-btn:hover { border-color: var(--muted); color: var(--ink); }
.theme-toggle svg, .menu-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }
.nav-cv { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px; font: 500 .9rem var(--sans); text-decoration: none; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .15s, background .15s, color .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary:hover { color: #0a0e1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary:hover { color: #0a0e1a; } }
.btn.sm { padding: 8px 14px; font-size: .82rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 168px; border-bottom: 1px solid var(--rule); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 13%, transparent) 1px, transparent 0);
  background-size: 28px 28px; mask-image: radial-gradient(ellipse 70% 80% at 72% 40%, #000, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 40%, #000, transparent 75%); }
.hero::after { content: ""; position: absolute; width: 760px; height: 760px; right: -180px; top: -140px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 66%); }
.circuit { position: absolute; left: 0; right: 0; bottom: 12px; width: 100%; height: 130px; pointer-events: none; color: var(--ink); opacity: .17; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 40px; align-items: center; }
.eyebrow { font: 500 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.eyebrow b { color: var(--accent); font-weight: 600; }
.display { font-family: var(--display); font-weight: 400; font-size: clamp(3.4rem, 8.2vw, 7rem); line-height: .93; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.display em { font-style: italic; color: var(--accent); }
.hero-sub { max-width: 34em; margin: 26px 0 30px; font-size: 1.32rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; font: 500 .82rem var(--sans); }
.hero-links a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; background: color-mix(in srgb, var(--surface) 65%, transparent); transition: border-color .15s, color .15s, transform .15s; }
.hero-links a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.hero-links svg { width: 16px; height: 16px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); }
.stat dt { font: 500 .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); order: 2; margin-top: 2px; }
.stat dd { margin: 0; font: 400 2.7rem/1 var(--display); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.stat { display: flex; flex-direction: column; }
.hero-figure { position: relative; margin: 0; justify-self: end; width: 100%; max-width: 540px; }
#bloch { width: 100%; aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
#bloch:active { cursor: grabbing; }
.readout { margin-top: 6px; text-align: center; font: 400 .8rem var(--sans); letter-spacing: .01em; color: var(--muted); min-height: 1.4em; }
.readout code { font: 400 .78rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink-2); }

/* ---------- section scaffolding ---------- */
.block { padding: 104px 0 0; }
.block:last-of-type { padding-bottom: 40px; }
.block-head { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 4px 32px; align-items: baseline; margin-bottom: 44px; }
.kicker { font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.kicker span { color: var(--muted); margin-right: 10px; font-weight: 500; }
.block-title { font: 400 clamp(2.4rem, 4.4vw, 3.5rem)/1.02 var(--display); letter-spacing: -.02em; color: var(--ink); }
.block-title .count { font: 500 .85rem var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 12px; vertical-align: middle; }
.block-lead { grid-column: 2; max-width: 40em; color: var(--ink-2); margin: 14px 0 0; font-size: 1.12rem; }
.sub { font: 600 .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 38px 0 14px; }
.sub:first-child { margin-top: 0; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 32px; }
.portrait { margin: 0; }
.portrait > img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: 16px; background: var(--surface-2); box-shadow: var(--shadow); }
.portrait figcaption { margin-top: 12px; font: 400 .78rem/1.5 var(--sans); color: var(--ink-2); }
.portrait figcaption a { color: inherit; }
.portrait figcaption .prev { display: block; color: var(--muted); }
.affil-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.affil-logos a { display: inline-flex; align-items: center; padding: 6px; border-radius: 8px; background: #f4f2ec; border: 1px solid var(--rule); }
.affil-logos a { flex: none; }
.affil-logos img { height: 34px; width: auto; max-width: none; }
.affil-logos .matter img { height: 27px; }
.about-text .lead-p { font-size: 1.5rem; line-height: 1.42; color: var(--ink); margin-bottom: 1em; text-wrap: pretty; letter-spacing: -.005em; }
.about-text p { max-width: 38em; color: var(--ink-2); text-wrap: pretty; }
.about-text .lead-p + p { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 .82rem var(--sans); padding: 6px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.chip.plain { background: transparent; border: 1px solid var(--rule); color: var(--ink-2); }

/* ---------- research index ---------- */
.themes { border-top: 1px solid var(--ink); }
.theme { display: grid; grid-template-columns: 4.5rem minmax(0, 1.1fr) minmax(0, 1fr); gap: 6px 36px; padding: 30px 0 32px; border-bottom: 1px solid var(--rule); transition: background .25s; }
.theme-num { font: 400 1.05rem var(--display); color: var(--muted); padding-top: 6px; font-variant-numeric: lining-nums; }
.theme h3 { font: 400 clamp(1.7rem, 2.6vw, 2.2rem)/1.1 var(--display); letter-spacing: -.012em; margin-bottom: 10px; transition: color .2s; }
.theme:hover h3 { color: var(--accent); }
.theme p { color: var(--ink-2); margin: 0 0 14px; font-size: 1.04rem; line-height: 1.6; max-width: 34em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font: 500 .72rem var(--sans); color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; }
.theme-papers { padding-top: 6px; }
.theme-papers h4 { font: 600 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.theme-papers li { margin-bottom: 9px; font-size: .96rem; line-height: 1.4; }
.theme-papers a { color: var(--ink); text-decoration: none; }
.theme-papers a:hover { color: var(--accent); text-decoration: underline; }
.theme-papers .yr { font: 500 .72rem var(--sans); color: var(--muted); margin-left: 6px; }

/* ---------- flagship spotlight ---------- */
.spotlight { position: relative; overflow: hidden; background: var(--panel); color: var(--panel-ink); border-radius: 24px; padding: 56px 56px 48px; border: 1px solid var(--panel-rule); }
.spotlight::before { content: ""; position: absolute; width: 640px; height: 640px; right: -200px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(130, 150, 255, .28), transparent 66%); pointer-events: none; }
.spotlight > * { position: relative; }
.spot-label { display: inline-flex; align-items: center; gap: 10px; font: 600 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--panel-accent); margin-bottom: 22px; }
.spot-label::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.spot-title { font: 400 clamp(2rem, 3.8vw, 3.1rem)/1.06 var(--display); letter-spacing: -.015em; max-width: 21em; text-wrap: balance; }
.spot-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 24px; font: 500 .84rem var(--sans); color: var(--panel-muted); }
.spot-meta b { color: var(--panel-ink); font-weight: 600; }
.spot-lead { max-width: 40em; font-size: 1.14rem; color: #d3d6e6; line-height: 1.6; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 38px 0 34px; counter-reset: s; }
.step { position: relative; padding: 18px 22px 18px 0; border-top: 1px solid var(--panel-rule); counter-increment: s; }
.step::before { content: "0" counter(s); display: block; font: 400 1.1rem var(--display); color: var(--panel-accent); margin-bottom: 8px; }
.step b { display: block; font: 600 .95rem/1.3 var(--sans); color: var(--panel-ink); margin-bottom: 4px; }
.step span { font: 400 .86rem/1.5 var(--sans); color: var(--panel-muted); }
.step + .step { padding-left: 22px; border-left: 1px solid var(--panel-rule); }
.spot-facts { display: flex; flex-wrap: wrap; gap: 10px 48px; margin-bottom: 34px; }
.fact { display: flex; flex-direction: column; }
.fact b { font: 400 3rem/1 var(--display); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.fact span { font: 500 .78rem var(--sans); color: var(--panel-muted); margin-top: 4px; max-width: 12em; line-height: 1.35; }
.spot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spotlight .btn { background: transparent; color: var(--panel-ink); border-color: var(--panel-rule); }
.spotlight .btn:hover { border-color: var(--panel-accent); color: var(--panel-accent); }
.spotlight .btn.primary { background: var(--panel-ink); color: var(--panel); border-color: var(--panel-ink); }
.spotlight .btn.primary:hover { background: var(--panel-accent); border-color: var(--panel-accent); color: var(--panel); }
.spot-press { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--panel-rule); font: 400 .84rem/1.6 var(--sans); color: var(--panel-muted); }
.spot-press a { color: var(--panel-ink); text-decoration-color: var(--panel-rule); }
.spot-press a:hover { color: var(--panel-accent); }
.spot-press .pr-label { margin-right: 6px; font-weight: 600; color: var(--panel-ink); }
.spot-press.tight { margin-top: 10px; padding-top: 0; border-top: 0; }
.spot-top { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 28px 52px; align-items: start; }
.spot-cover { margin: 0; }
.spot-cover a { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 22px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1); transition: transform .3s, box-shadow .3s; }
.spot-cover a:hover { transform: translateY(-4px); box-shadow: 0 28px 56px rgba(0, 0, 0, .55), 0 0 0 1px rgba(163, 178, 255, .5); }
.spot-cover img { display: block; width: 100%; height: auto; }
.spot-cover figcaption { margin-top: 14px; font: 400 .78rem/1.45 var(--sans); color: var(--panel-muted); }
.spot-cover figcaption b { display: block; margin-bottom: 3px; font: 600 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--panel-accent); }
.spot-cover figcaption span { display: block; margin-top: 4px; font-size: .7rem; opacity: .7; }
.spot-partners { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 34px 0 0; padding-top: 26px; border-top: 1px solid var(--panel-rule); }
.sp-label { font: 600 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--panel-accent); }
.spot-partners ul { display: flex; flex-wrap: wrap; gap: 12px; }
.spot-partners a { display: flex; align-items: center; justify-content: center; height: 86px; padding: 0 26px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); transition: transform .2s, box-shadow .2s; }
.spot-partners a:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .4), 0 0 0 1px rgba(163, 178, 255, .6); }
.spot-partners img { display: block; width: 156px; height: 58px; object-fit: contain; }

/* ---------- selected work ---------- */
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.pick { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 18px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.pick:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--rule)); transform: translateY(-3px); box-shadow: var(--shadow); }
.pick-meta { font: 600 .68rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mark); margin-bottom: 12px; }
.pick h3 { font: 400 1.42rem/1.14 var(--display); letter-spacing: -.005em; margin-bottom: 10px; }
.pick h3 a { color: var(--ink); text-decoration: none; }
.pick h3 a:hover { color: var(--accent); }
.pick p { font-size: .96rem; line-height: 1.55; color: var(--ink-2); margin-bottom: 14px; }
.pick-foot { margin-top: auto; font: 500 .76rem var(--sans); color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }

/* ---------- metrics & chart ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.metric { background: var(--surface); padding: 20px 22px; }
.metric .n { font: 400 2.8rem/1 var(--display); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.metric .l { font: 500 .76rem var(--sans); color: var(--muted); margin-top: 6px; }
.metric .r { font: 400 .72rem var(--sans); color: var(--muted); }
.chart-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 22px 8px; margin-bottom: 14px; }
.chart-wrap h3 { font: 600 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--accent); opacity: .85; transition: opacity .15s; }
.chart .bar:hover { opacity: 1; }
.chart text { font: 500 10px var(--sans); fill: var(--muted); }
.chart .val { fill: var(--ink-2); }
.sync-note { font: 400 .78rem var(--sans); color: var(--muted); margin: 0 0 28px; }
.sync-note a { color: inherit; }

/* ---------- publications ---------- */
.dotline { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px 12px; margin-bottom: 18px; }
.dotline-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-bottom: 8px; font: 600 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dotline-legend { display: flex; gap: 14px; font: 500 .72rem var(--sans); letter-spacing: 0; text-transform: none; }
.dotline-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }
.dot-cols { display: flex; align-items: flex-end; gap: 2px; min-height: 96px; }
.dot-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding: 4px 0 0; background: transparent; border: 0; border-radius: 8px; cursor: pointer; font: 500 .68rem var(--sans); color: var(--muted); }
.dot-col:hover { background: var(--surface-2); color: var(--ink); }
.dot-col[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.dot-col .dots { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.dot-col .d { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.dot-col .d.conference { background: var(--ink-2); opacity: .75; }
.dot-col .d.preprint { background: var(--mark); }
.dot-col .d.thesis, .dot-col .d.dataset { background: var(--muted); opacity: .6; }
.dot-col .yl { padding: 4px 0 3px; }
.pub-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 4px 0 6px; font-family: var(--sans); }
.search { position: relative; flex: 1 1 240px; min-width: 190px; }
.search input { width: 100%; font: 400 .9rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px 10px 36px; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 9px 13px; font: 500 .8rem var(--sans); color: var(--muted); cursor: pointer; border-right: 1px solid var(--rule); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--ink); background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pub-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 400 .78rem var(--sans); color: var(--muted); margin: 12px 0 0; min-height: 1.6em; }
.pub-meta button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.year-head { font: 400 1.9rem/1 var(--display); color: var(--ink); margin: 40px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: lining-nums; }
.year-head span { font: 500 .74rem var(--sans); color: var(--muted); }
.pub { padding: 20px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 24px; }
.pub:last-child { border-bottom: 0; }
.pub-title { grid-column: 1; font: 500 1.14rem/1.35 var(--serif); margin: 0; letter-spacing: -.005em; text-wrap: balance; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.pub-title .star { color: var(--mark); margin-right: 7px; font-size: .85em; }
.pub-authors { grid-column: 1; font-size: .97rem; color: var(--muted); line-height: 1.55; }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-venue { grid-column: 1; font-size: .97rem; color: var(--ink-2); font-style: italic; }
.pub-venue .pv { font-style: normal; color: var(--muted); }
.pub-side { grid-column: 2; grid-row: 1 / span 3; text-align: right; font: 500 .75rem var(--sans); color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 3px; }
.badge { font: 600 .64rem var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); }
.badge.preprint { background: color-mix(in srgb, var(--mark) 13%, transparent); color: var(--mark); }
.badge.journal { background: var(--accent-soft); color: var(--accent-ink); }
.cites a { color: inherit; text-decoration: none; }
.cites a:hover { color: var(--accent); text-decoration: underline; }
.pub-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-family: var(--sans); }
.pub-links a, .pub-links button { font: 500 .74rem var(--sans); color: var(--ink-2); background: transparent; text-decoration: none; cursor: pointer; border: 1px solid var(--rule); border-radius: 7px; padding: 3px 10px; line-height: 1.5; transition: border-color .15s, color .15s; }
.pub-links a:hover, .pub-links button:hover { border-color: var(--accent); color: var(--accent); }
.pub-links button[aria-expanded="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.pub-panel { grid-column: 1 / -1; margin-top: 10px; font-size: .96rem; line-height: 1.65; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 18px; }
.pub-panel pre { margin: 0; font: 400 .78rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.pub-panel .copy { margin-top: 10px; font: 500 .74rem var(--sans); border: 1px solid var(--rule); background: var(--surface-2); border-radius: 7px; padding: 4px 11px; cursor: pointer; }
.pub-panel .copy:hover { border-color: var(--accent); color: var(--accent); }
.more-authors { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); font: 400 .92rem var(--sans); }
.pub-skeleton { color: var(--muted); font: 400 .9rem var(--sans); padding: 20px 0; }

/* ---------- collaboration network ---------- */
.net { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.net-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding: 14px 18px; border-bottom: 1px solid var(--rule); font: 500 .78rem var(--sans); color: var(--muted); }
.net-legend { display: inline-flex; align-items: center; gap: 10px; }
.net-legend i { display: inline-block; width: 120px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--mark), var(--accent)); }
#net-svg { width: 100%; height: auto; touch-action: manipulation; }
#net-svg .edge { stroke: var(--ink); fill: none; transition: opacity .2s; }
#net-svg .edge.on { stroke: var(--accent); stroke-opacity: .7; }
#net-svg .spoke { transition: opacity .2s; }
#net-svg.dim .spoke { opacity: .3; }
#net-svg .node { cursor: pointer; transition: opacity .2s; }
#net-svg .node circle { stroke: var(--surface); stroke-width: 2; transition: r .15s; }
#net-svg .node text { font: 500 11px var(--sans); fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
#net-svg .node:focus-visible { outline: none; }
#net-svg .node:focus-visible circle { stroke: var(--focus); stroke-width: 3; }
#net-svg.dim .node:not(.on), #net-svg.dim .edge:not(.on) { opacity: .12; }
#net-svg.dim .node.on text { fill: var(--ink); font-weight: 600; }
#net-svg .hub circle { fill: var(--ink); }
#net-svg .hub text { fill: var(--ink); font-weight: 600; font-size: 12px; }
.net-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); font: 500 .78rem/1.4 var(--sans); padding: 7px 11px; border-radius: 8px; transform: translate(-50%, -125%); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.net-tip.on { opacity: 1; }
.top-collab { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-family: var(--sans); }
.top-collab button { font: 500 .8rem var(--sans); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 13px; color: var(--ink-2); cursor: pointer; transition: border-color .15s, color .15s; }
.top-collab button:hover { border-color: var(--accent); color: var(--accent); }
.top-collab b { color: var(--muted); font-weight: 500; margin-left: 6px; }
.net-note { font: 400 .78rem/1.5 var(--sans); color: var(--muted); margin-top: 14px; max-width: 46em; }

/* ---------- experience timeline ---------- */
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 56px; }
.tl { position: relative; border-left: 1px solid var(--rule); margin-left: 5px; }
.tl-item { position: relative; padding: 0 0 30px 26px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before { content: ""; position: absolute; left: -5.5px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-item.now::before { background: var(--accent); }
.tl-when { font: 600 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.tl-role { font: 400 1.4rem/1.2 var(--display); letter-spacing: -.005em; }
.tl-org { font: 500 .9rem var(--sans); color: var(--ink-2); margin-top: 3px; }
.tl-org a { color: inherit; }
.tl-note { font-size: .98rem; color: var(--ink-2); margin: 8px 0 0; max-width: 32em; line-height: 1.55; }
.tl-note ul { list-style: disc; padding-left: 1.1em; }
.tl-note li + li { margin-top: 2px; }

/* ---------- news / teaching / writing ---------- */
.timeline li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.timeline li:first-child { border-top: 1px solid var(--ink); }
.timeline time { font: 600 .74rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.timeline .t { font: 400 1.4rem/1.2 var(--display); letter-spacing: -.005em; }
.timeline .t a { color: var(--ink); text-decoration: none; }
.timeline .t a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.timeline .src { font: 500 .8rem var(--sans); color: var(--muted); margin-top: 4px; }
.course { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; }
.course h3 { font: 400 1.5rem/1.2 var(--display); }
.course p { margin: 6px 0 0; font-size: 1rem; color: var(--ink-2); }
.course .meta { font: 500 .78rem var(--sans); color: var(--muted); margin-top: 10px; }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.video { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.video:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--rule)); box-shadow: var(--shadow); }
.video .play { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; transition: background .2s, color .2s; }
.video .play svg { width: 13px; height: 13px; margin-left: 2px; }
.video:hover .play { background: var(--accent); color: var(--bg); }
.video .cap { font: 500 .86rem/1.4 var(--sans); color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; }
.post-list li, .book-list li { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.post-list li { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; }
.post-list li:first-child, .book-list li:first-child { border-top: 1px solid var(--ink); }
.post-list a, .book-list a { text-decoration: none; color: var(--ink); line-height: 1.4; }
.post-list a:hover, .book-list a:hover { color: var(--accent); text-decoration: underline; }
.timeline .t a::after, .post-list a::after, .book-list a::after { content: "↗"; display: inline-block; margin-left: .4em; font: 500 .62em var(--sans); color: var(--accent); opacity: 0; transform: translate(-3px, 3px); transition: opacity .15s, transform .15s; text-decoration: none; }
.timeline .t a:hover::after, .post-list a:hover::after, .book-list a:hover::after { opacity: 1; transform: none; }
.post-list time { font: 400 .76rem var(--sans); color: var(--muted); white-space: nowrap; }
.book-list .by { display: block; font: 400 .8rem var(--sans); color: var(--muted); margin-top: 2px; }
.more { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 2px 0; font: 500 .9rem/1.3 var(--sans); color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.more svg { width: 15px; height: 15px; flex: none; transition: transform .2s; }
.more:hover { color: var(--accent-ink); border-bottom-color: currentColor; }
.more:hover svg { transform: translateX(3px); }
.more[href^="http"]:hover svg { transform: translate(2px, -2px); }
.link-arrow { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent); white-space: normal; }
.link-arrow svg { display: inline-block; width: .9em; height: .9em; margin-left: .3em; vertical-align: -.1em; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- contact / footer ---------- */
.contact-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: 24px; padding: 48px; }
.contact-card h3 { font: 400 clamp(1.9rem, 3.2vw, 2.6rem)/1.08 var(--display); letter-spacing: -.015em; margin-bottom: 12px; }
.contact-card p { color: var(--ink-2); margin: 0; max-width: 28em; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
/* ---------- inner-page header ---------- */
.page-head { position: relative; overflow: hidden; padding: 68px 0 132px; border-bottom: 1px solid var(--rule); }
.page-head::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 11%, transparent) 1px, transparent 0);
  background-size: 28px 28px; mask-image: radial-gradient(ellipse 60% 90% at 78% 30%, #000, transparent 72%); -webkit-mask-image: radial-gradient(ellipse 60% 90% at 78% 30%, #000, transparent 72%); }
.page-head::after { content: ""; position: absolute; width: 560px; height: 560px; right: -160px; top: -240px; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 9%, transparent), transparent 66%); }
.circuit-mini { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 88px; pointer-events: none; color: var(--ink); opacity: .17; }
.page-head > .wrap { position: relative; z-index: 1; }
.page-title { font: 400 clamp(2.7rem, 5.8vw, 4.9rem)/.98 var(--display); letter-spacing: -.025em; margin: 16px 0 0; max-width: 15em; color: var(--ink); text-wrap: balance; }
.page-title em { font-style: italic; color: var(--accent); }
.page-title .count { font: 500 .9rem var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 14px; vertical-align: middle; }
.page-lead { max-width: 40em; margin: 24px 0 0; font-size: 1.22rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.page-head .kicker { margin: 0; }
.block.tight { padding-top: 52px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.more-row { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 26px 0 0; }
.more-row .more { margin-top: 0; }
.aff-line { max-width: 38em; color: var(--ink-2); }

/* ---------- home: explore cards ---------- */
.explore { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ex-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 210px; padding: 26px 26px 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, box-shadow .2s; }
.ex-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.ex-label { font: 600 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mark); }
.ex-fig { font: 400 1.75rem/1.12 var(--display); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.ex-text { font-size: .98rem; line-height: 1.5; color: var(--ink-2); margin-bottom: 18px; }
.ex-arrow { position: absolute; right: 22px; bottom: 20px; width: 20px; height: 20px; color: var(--muted); transition: transform .2s, color .2s; }
.ex-card:hover .ex-arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- research page extras ---------- */
.theme-papers a.more { margin-top: 6px; font-size: .84rem; color: var(--accent); text-decoration: none; }
.theme-papers a.more:hover { color: var(--accent-ink); }
.picks.wide { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 0; }

/* ---------- news ---------- */
.news-filter { margin-bottom: 26px; }
.kind { display: inline-block; font: 600 .62rem var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); margin-right: 4px; }
.kind.update { background: var(--accent-soft); color: var(--accent-ink); }
.empty-li { padding: 24px 0; color: var(--muted); font: 400 .92rem var(--sans); }

/* ---------- network page extras ---------- */
.net-panel { margin-top: 26px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 26px; }
.net-hint { margin: 0; color: var(--muted); font: 400 .92rem var(--sans); }
.np-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 14px; }
.np-head h3 { font: 400 1.7rem/1.1 var(--display); letter-spacing: -.01em; }
.np-head p { margin: 0; font: 500 .82rem var(--sans); color: var(--muted); }
.np-head .btn { margin-left: auto; }
.np-list li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--rule); line-height: 1.4; }
.np-list .yr { font: 600 .74rem var(--sans); color: var(--muted); padding-top: 4px; }
.np-list a { color: var(--ink); text-decoration: none; }
.np-list a:hover { color: var(--accent); text-decoration: underline; }
.np-list em { font-size: .9rem; color: var(--muted); }
.net-note { max-width: 52em; }
.net-note code { font: 400 .92em ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.net-tiles-gap { margin-bottom: 16px; }
#net-tiles { margin-bottom: 18px; }

/* ---------- contact page ---------- */
.profiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.profile { display: flex; flex-direction: column; gap: 4px; padding: 26px 26px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, box-shadow .2s; }
.profile:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.profile { position: relative; }
.profile > svg:not(.p-go) { width: 26px; height: 26px; color: var(--accent); margin-bottom: 14px; }
.p-go { position: absolute; right: 22px; top: 22px; width: 18px; height: 18px; color: var(--muted); transition: transform .2s, color .2s; }
.profile:hover .p-go { color: var(--accent); transform: translate(2px, -2px); }
.profile:not([href^="http"]):hover .p-go { transform: translateX(3px); }
.p-name { font: 400 1.6rem/1.1 var(--display); letter-spacing: -.01em; }
.p-handle { font: 500 .82rem var(--sans); color: var(--muted); word-break: break-all; }
.p-desc { margin-top: 8px; font-size: .98rem; line-height: 1.5; color: var(--ink-2); }

/* ---------- articles ---------- */
.wrap.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.article-head { padding: 52px 0 22px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 22px; font: 500 .78rem var(--sans); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span { opacity: .5; }
.article-title { font: 400 clamp(2.4rem, 5.2vw, 4rem)/1.03 var(--display); letter-spacing: -.024em; margin: 0 0 20px; text-wrap: balance; }
.article-meta { margin: 0 0 18px; font: 500 .84rem var(--sans); color: var(--muted); }
.article-head .chips { gap: 8px; }
.chips a.chip { text-decoration: none; transition: background .15s, color .15s; }
.chips a.chip:hover { background: var(--accent); color: var(--bg); }
.article-hero { margin: 14px auto 6px; padding: 0 var(--gutter); max-width: calc(760px + 2 * var(--gutter)); }
.article-hero img { display: block; margin: 0 auto; max-width: 100%; height: auto; max-height: 380px; object-fit: contain; border-radius: 14px; background: var(--surface-2); }
.article-layout { display: grid; grid-template-columns: minmax(0, 720px); justify-content: center; gap: 28px 56px; margin-top: 30px; }
.toc { padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; font-family: var(--sans); }
.toc-title { margin: 0 0 8px; font: 600 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--rule); color: var(--ink-2); font-size: .84rem; line-height: 1.35; text-decoration: none; transition: color .15s, border-color .15s; }
.toc li.l3 a { padding-left: 24px; font-size: .8rem; color: var(--muted); }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }
@media (min-width: 1100px) {
  .article-layout:has(.toc) { grid-template-columns: 220px minmax(0, 720px); }
  .toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; background: transparent; border: 0; padding: 0; }
}

.prose { font-size: 1.16rem; line-height: 1.75; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; text-wrap: pretty; }
.prose h2 { font: 400 clamp(1.8rem, 3vw, 2.3rem)/1.12 var(--display); letter-spacing: -.015em; margin: 2.2em 0 .6em; scroll-margin-top: 90px; }
.prose h3 { font: 400 1.5rem/1.2 var(--display); letter-spacing: -.01em; margin: 1.9em 0 .5em; scroll-margin-top: 90px; }
.prose h4 { font: 600 1rem var(--sans); margin: 1.6em 0 .4em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: .3em 0; padding-left: .2em; }
.prose li::marker { color: var(--muted); }
.prose li > ul, .prose li > ol { margin: .4em 0 .4em; }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.3em; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font: 400 .86em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface-2); padding: .12em .4em; border-radius: 5px; word-break: break-word; }
.prose pre { margin: 1.5em 0; padding: 18px 20px; background: var(--panel); color: var(--panel-ink); border-radius: 12px; overflow-x: auto; font: 400 .86rem/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.prose pre code { background: none; padding: 0; color: inherit; word-break: normal; }
.prose figure { margin: 1.9em 0; }
.prose figure img { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 10px; }
.prose figcaption { margin-top: 10px; font: 400 .82rem/1.5 var(--sans); color: var(--muted); text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font: 400 .92rem/1.5 var(--sans); display: block; overflow-x: auto; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface-2); }
.prose a { text-decoration-thickness: 1.5px; }
.prose .callout { margin: 1.8em 0; padding: 16px 20px; background: var(--accent-soft); border-radius: 12px; font-size: 1.02rem; line-height: 1.6; color: var(--ink); }
.prose .callout p:last-child { margin-bottom: 0; }
.prose .callout b:first-child { font: 600 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); display: block; margin-bottom: 4px; }
.prose .diagram { margin: 2em -24px; padding: 18px 12px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.prose .diagram svg { display: block; width: 100%; height: auto; }
.prose .diagram figcaption { padding: 0 12px 4px; }
.diagram text { font: 500 13px var(--sans); fill: var(--ink-2); }
.diagram .t-strong { fill: var(--ink); font-weight: 600; }
.diagram .t-muted { fill: var(--muted); font-size: 11.5px; }
.diagram .d-box { fill: var(--bg); stroke: var(--ink-2); stroke-width: 1.2; }
.diagram .d-acc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.diagram .d-mark { fill: color-mix(in srgb, var(--mark) 12%, transparent); stroke: var(--mark); stroke-width: 1.4; }
.diagram .d-line { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.diagram .d-dash { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.diagram .d-arrow { fill: var(--ink-2); stroke: none; }

.article-foot { margin-top: 44px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 26px; font: 500 .82rem var(--sans); }
.article-tags a { color: var(--muted); text-decoration: none; }
.article-tags a:hover { color: var(--accent); }
.author-box { display: flex; gap: 20px; align-items: flex-start; padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex: none; }
.author-name { margin: 0 0 2px; font: 400 1.5rem/1.1 var(--display); }
.author-bio { margin: 0 0 10px; font-size: .98rem; line-height: 1.55; color: var(--ink-2); }
.author-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font: 500 .82rem var(--sans); }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.pn:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); transform: translateY(-2px); color: var(--ink); }
.pn span { font: 600 .66rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pn b { font: 400 1.2rem/1.2 var(--display); }
.pn.next { text-align: right; grid-column: 2; }
.pn.prev { grid-column: 1; }
.related { margin-top: 24px; }
.related-title { margin: 56px 0 22px; font: 400 2rem/1.1 var(--display); letter-spacing: -.015em; }

/* ---------- article cards, topic chips, hub ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--rule)); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { display: block; background: var(--surface-2); }
.card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 18px; }
.card-cats { min-height: 1em; }
.card-cats a { position: relative; z-index: 2; margin-right: 12px; font: 600 .66rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mark); text-decoration: none; }
.card-cats a:hover { text-decoration: underline; }
.card-title { margin: 0; font: 400 1.45rem/1.15 var(--display); letter-spacing: -.005em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card-title a { color: var(--accent); }
.card-text { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: auto 0 0; padding-top: 6px; font: 500 .74rem var(--sans); color: var(--muted); }
.chipbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; }
.chipbar .chip { background: var(--surface); border: 1px solid var(--rule); color: var(--ink-2); text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.chipbar .chip b { margin-left: 4px; font-weight: 500; opacity: .55; }
.chipbar .chip:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.chipbar .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hub-section { margin-top: 56px; }
.hub-section:first-of-type { margin-top: 12px; }
.hub-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.hub-head h2 { font: 400 2.1rem/1.1 var(--display); letter-spacing: -.015em; }
.hub-head p { flex: 1 1 18em; margin: 0; color: var(--muted); font-size: 1rem; }
.hub-head .more { margin: 0 0 0 auto; }

/* ---------- lectures & books ---------- */
.lectures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 28px; }
.lecture { margin: 0; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #0b0f1d; border-radius: 14px; overflow: hidden; }
.yt-link { display: block; width: 100%; height: 100%; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, opacity .2s; }
.yt-link:hover img { transform: scale(1.03); opacity: .9; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.yt-play svg { width: 62px; height: 62px; padding: 19px 17px 19px 21px; border-radius: 50%; background: rgba(11, 15, 29, .78); color: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lecture figcaption { margin-top: 12px; font: 500 .92rem/1.45 var(--sans); color: var(--ink-2); }
.books { display: grid; gap: 22px; }
.book { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; padding: 26px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.book-cover img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 8px 26px rgba(16, 21, 36, .18); }
.book h2 { font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1.12 var(--display); letter-spacing: -.01em; }
.book h2 a { color: var(--ink); text-decoration: none; }
.book h2 a:hover { color: var(--accent); }
.book .by { margin: 6px 0 12px; font: 500 .84rem var(--sans); color: var(--muted); }
.book p { margin: 0 0 8px; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-foot { margin-top: 112px; border-top: 1px solid var(--rule); font: 400 .88rem/1.6 var(--sans); color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, .8fr); gap: 32px 56px; padding-top: 52px; padding-bottom: 40px; }
.foot-id p { max-width: 27em; margin: 14px 0 0; }
.site-foot h2 { font: 600 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.site-foot li { margin-bottom: 7px; break-inside: avoid; }
.site-foot .two-cols { columns: 2; column-gap: 28px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.site-foot .brand { color: var(--ink); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 20px 0 40px; border-top: 1px solid var(--rule); font-size: .8rem; }
.foot-base a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topnav a { padding: 8px 8px; }
}
@media (max-width: 920px) {
  :root { --gutter: 22px; }
  .menu-btn { display: inline-grid; }
  .topnav { position: absolute; left: 0; right: 0; top: 64px; margin: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 16px; display: none; }
  .topnav.open { display: block; }
  .topnav ul { flex-direction: column; gap: 0; font-size: .95rem; }
  .topnav a { padding: 12px 4px; border-bottom: 1px solid var(--rule); }
  .topnav a::after { display: none; }
  .topnav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  .top-actions { margin-left: auto; }
  .nav-cv { display: list-item; }
  .hero { padding: 36px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-figure { justify-self: center; max-width: 440px; order: -1; }
  .circuit { display: none; }
  .block { padding-top: 80px; }
  .block-head, .about-grid { grid-template-columns: 1fr; gap: 6px; }
  .block-lead { grid-column: 1; }
  .about-grid { gap: 28px; }
  .portrait { display: grid; grid-template-columns: 120px 1fr; gap: 6px 18px; align-items: center; max-width: 440px; }
  .portrait > img { aspect-ratio: 1; grid-row: 1 / span 2; }
  .portrait figcaption { margin: 0; }
  .affil-logos { margin-top: 0; }
  .theme { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .theme-papers { grid-column: 2; }
  .spotlight { padding: 38px 28px 34px; border-radius: 20px; }
  .spot-top { grid-template-columns: 1fr; gap: 22px; }
  .spot-partners a { height: 70px; padding: 0 16px; }
  .spot-partners img { width: 118px; height: 46px; }
  .spot-cover { max-width: 230px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .cols-2, .two-col, .contact-card { grid-template-columns: 1fr; }
  .contact-card { padding: 32px 26px; }
  .contact-grid { justify-content: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .hero-sub { font-size: 1.14rem; }
  .hero-stats { gap: 6px 28px; }
  .stat dd { font-size: 2.2rem; }
  .picks, .videos { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: 0; }
  .pub { grid-template-columns: 1fr; }
  .pub-side { grid-column: 1; grid-row: auto; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; margin-top: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .timeline time { padding: 0 0 2px; }
  .post-list li { flex-direction: column; gap: 2px; }
  .dot-col .d { width: 7px; height: 7px; }
  .dot-col .yl { font-size: .6rem; }
  .dot-col .yl span { display: none; }
}
/* ---------- multi-page responsive additions ---------- */
@media (max-width: 1060px) {
  .topnav a { padding: 8px 7px; }
  .topbar-inner { gap: 16px; }
}
@media (max-width: 920px) {
  .page-head { padding: 48px 0 56px; }
  .circuit-mini { display: none; }
  .explore, .profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-id { grid-column: 1 / -1; }
  .np-head .btn { margin-left: 0; }
}
@media (max-width: 600px) {
  .top-actions .btn.sm { display: none; }
  .metric { padding: 16px 16px; }
  .metric .n { font-size: 2.1rem; white-space: nowrap; }
  .page-lead { font-size: 1.1rem; }
  .explore, .profiles, .picks.wide, .foot-grid { grid-template-columns: 1fr; }
  .ex-card { min-height: 0; }
  .net-panel { padding: 18px; }
  .np-list li { grid-template-columns: 1fr; gap: 0; }
}
/* ---------- articles: responsive ---------- */
@media (max-width: 1099px) {
  .toc li.l3 { display: none; }
}
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lectures { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .prose .diagram { margin-left: 0; margin-right: 0; }
}
@media (max-width: 620px) {
  .cards, .prevnext { grid-template-columns: 1fr; }
  .spot-partners ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 10px; }
  .spot-partners li:last-child { grid-column: 1 / -1; }
  .spot-partners a { width: 100%; }
  .pn.next, .pn.prev { grid-column: 1; text-align: left; }
  .article-head { padding-top: 34px; }
  .prose { font-size: 1.08rem; }
  .author-box { flex-direction: column; padding: 20px; }
  .book { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .hub-head .more { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --muted: #555; --rule: #ccc; --accent: #000; }
  .topbar, .circuit, .circuit-mini, .toc, .author-box, .prevnext, .related, .yt, #bloch, .readout, .pub-controls, .pub-links, .dotline, .net, .top-collab, .menu-btn { display: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .block { padding-top: 28px; break-inside: auto; }
  .spotlight { background: #fff; color: #000; border-color: #bbb; }
  a { color: inherit; text-decoration: none; }
}
