@charset "UTF-8";
/* =============================================================================
   Soumyadeep Dhar: personal academic site
   Design: a warm "paper & ink" editorial system with a Stanford-cardinal accent.
   Signature motif: the arch, borrowed from the sandstone arcades of the Main Quad.
   Themes: light ("paper") and dark ("ink"), switchable, defaulting to the OS.
   ========================================================================== */


/* ---------------------------------------------------------------- Tokens -- */
:root {
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* light: paper */
  --bg: #F5F1E8;
  --bg-soft: #EDE7DB;
  --surface: #FBF8F2;
  --ink: #1C1915;
  --ink-2: #4A443C;
  --muted: #6B6359;
  --line: #DFD6C7;
  --line-strong: #CABFAD;
  --accent: #8C1515;
  --cardinal: #8C1515;
  --seq-lo: #EBCBBE;
  --seq-hi: #7A1414;
  --deemph: #BDB3A6;
  --deemph-mark: #958B7E;
  --accent-ink: #FFF8F0;
  --accent-soft: rgba(140, 21, 21, .07);
  --ok: #276C44;
  --warn: #8A5A00;
  --header-bg: rgba(245, 241, 232, .8);
  --shadow-sm: 0 1px 2px rgba(40, 30, 20, .06);
  --shadow: 0 1px 2px rgba(40, 30, 20, .05), 0 12px 32px -14px rgba(40, 30, 20, .22);
  --shadow-lg: 0 2px 8px rgba(40, 30, 20, .06), 0 32px 64px -24px rgba(40, 30, 20, .34);
  --grain: .075;
  --grain-blend: multiply;
  --img-dim: 1;
  --stage-border: transparent;
  --sheet-dim: 1;

  /* fixed palettes (same in both themes) */
  --stage: #0E0C0B;
  --stage-ink: #EFE9DE;
  --stage-muted: #A39A8E;
  --stage-line: rgba(239, 233, 222, .12);
  --stage-red: #E2483C;
  --blau: #0B2D66;
  --blau-2: #004D98;
  --grana: #A50044;
  --grana-2: #6E0F36;
  --gold: #EDBB00;

  /* layout + motion */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --radius: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #12110F;
  --bg-soft: #1A1816;
  --surface: #1D1B18;
  --ink: #EFE9DE;
  --ink-2: #C9C0B3;
  --muted: #978E82;
  --line: #2C2925;
  --line-strong: #3E3934;
  --accent: #EF7C70;
  --cardinal: #E5484D;
  --seq-lo: #452D27;
  --seq-hi: #F28D80;
  --deemph: #5E5750;
  --deemph-mark: #746C63;
  --accent-ink: #1A0907;
  --accent-soft: rgba(239, 124, 112, .1);
  --ok: #7FD1A0;
  --warn: #E9B95C;
  --header-bg: rgba(18, 17, 15, .74);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -14px rgba(0, 0, 0, .75);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .45), 0 34px 70px -24px rgba(0, 0, 0, .85);
  --grain: .045;
  --grain-blend: screen;
  --img-dim: .93;
  --stage: #0A0908;
  --stage-border: rgba(239, 233, 222, .1);
  --sheet-dim: .9;
  color-scheme: dark;
}

/* No JS (or before it runs): follow the OS preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110F;
    --bg-soft: #1A1816;
    --surface: #1D1B18;
    --ink: #EFE9DE;
    --ink-2: #C9C0B3;
    --muted: #978E82;
    --line: #2C2925;
    --line-strong: #3E3934;
    --accent: #EF7C70;
    --cardinal: #E5484D;
    --seq-lo: #452D27;
    --seq-hi: #F28D80;
    --deemph: #5E5750;
    --deemph-mark: #746C63;
    --accent-ink: #1A0907;
    --accent-soft: rgba(239, 124, 112, .1);
    --ok: #7FD1A0;
    --warn: #E9B95C;
    --header-bg: rgba(18, 17, 15, .74);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -14px rgba(0, 0, 0, .75);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, .45), 0 34px 70px -24px rgba(0, 0, 0, .85);
    --grain: .045;
    --grain-blend: screen;
    --img-dim: .93;
    --stage: #0A0908;
    --stage-border: rgba(239, 233, 222, .1);
    --sheet-dim: .9;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ Base -- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: calc(var(--header-h) + 24px);
  transition: background-color .45s var(--ease);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: color .45s var(--ease);
}

/* paper grain: sits behind all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { flex: 1 0 auto; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.ico { width: 18px; height: 18px; flex: none; }
.ico-sm { width: 15px; height: 15px; flex: none; }

/* ---------------------------------------------------------------- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .45s var(--ease);
}
.site-header.is-scrolled::before { border-bottom-color: var(--line); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo {
  width: auto;
  height: 38px;
  flex: none;
  transition: transform .4s var(--ease);
}
.brand:hover .brand-logo { transform: translateY(-2px); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}
.site-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 450;
  line-height: 1.2;
  white-space: nowrap;
  transition: color .2s, background-color .25s;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--bg); background: var(--ink); }
.nav-idx { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .02em; opacity: .55; }

/* theme switch */
.theme-switch {
  --w: 60px;
  --h: 32px;
  position: relative;
  justify-self: end;
  width: var(--w);
  height: var(--h);
  padding: 0;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .35s, border-color .35s;
}
.theme-switch:hover { border-color: var(--muted); }
.ts-icon {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  color: var(--muted);
}
.ts-sun { left: 8px; }
.ts-moon { right: 8px; }
.ts-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
  transition: transform .5s var(--ease), background-color .35s;
}
.ts-thumb svg {
  grid-area: 1 / 1;
  width: 14px;
  height: 14px;
  color: var(--accent);
  transition: opacity .3s, transform .5s var(--ease);
}
.ts-thumb .ts-thumb-moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme="dark"] .ts-thumb { transform: translateX(28px); }
[data-theme="dark"] .ts-thumb .ts-thumb-sun { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-theme="dark"] .ts-thumb .ts-thumb-moon { opacity: 1; transform: none; }
html:not(.js) .theme-switch { visibility: hidden; }

/* ------------------------------------------------------------ Typography -- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--plain::before { display: none; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.6rem, 1.4rem + 7.2vw, 8rem);
  line-height: .9;
  letter-spacing: -.03em;
  margin: 0 0 22px;
}
.display .l2 { display: block; padding-left: .5em; font-style: italic; }
.display .dot, .display-2 .dot, .h2 .dot { color: var(--accent); font-style: normal; }

.display-2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 1.6rem + 6vw, 6.6rem);
  line-height: .95;
  letter-spacing: -.028em;
  margin: 0;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 1.5rem + 3vw, 4rem);
  line-height: 1;
  letter-spacing: -.022em;
  margin: 0;
}
.display-2 em, .h2 em { font-style: italic; }

.lead {
  max-width: 60ch;
  margin: 26px 0 0;
  font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.prose { max-width: 64ch; color: var(--ink-2); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose .first { font-size: 1.12em; line-height: 1.62; color: var(--ink); }
.stanford { color: var(--cardinal); font-weight: 500; }
.prose a, .text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .2s, text-decoration-thickness .2s;
}
.prose a:hover, .text-link:hover { color: var(--accent); text-decoration-thickness: 2px; }
.hl {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.22em;
  line-height: 1;
  color: var(--ink);
}

/* --------------------------------------------------------------- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:hover .go-ur { transform: translate(2px, -2px); }
.btn:hover .go-r { transform: translateX(3px); }
.btn:hover .go-d { transform: translateY(2px); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--sm { min-height: 38px; padding: 0 15px; font-size: .84rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s, border-color .2s, gap .3s var(--ease);
}
.link-arrow svg { width: 16px; height: 16px; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); gap: 12px; }

/* connect chips (LinkedIn / Email / Scholar / Maps) */
.connect {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.chip .ico { color: var(--accent); transition: color .25s; }
.chip:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); transform: translateY(-2px); box-shadow: var(--shadow); }
.chip:hover .ico { color: var(--bg); }

/* ------------------------------------------------------------------ Arch -- */
/* The site's signature frame: a semicircular head over straight jambs. */
.arch {
  position: relative;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1000px 1000px 6px 6px;
  background: var(--bg-soft);
}
.arch > img, .arch > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--img-dim));
}
.arch--frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 248, 238, .55);
  border-radius: inherit;
  pointer-events: none;
}

/* ---------------------------------------------------------- Landing hero -- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(40px, 7vw, 112px);
  padding-block: clamp(28px, 6vw, 88px) clamp(64px, 9vw, 120px);
}
.hero-media {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  width: min(100%, 440px);
  justify-self: center;
  isolation: isolate;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 4 / 5; /* the portrait only, not the caption below it */
  z-index: -1;
  transform: translate(20px, -20px);
  border: 1px solid var(--line-strong);
  border-radius: 1000px 1000px 6px 6px;
}
.portrait { aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg); }
.portrait img { object-position: 50% 30%; }

@keyframes spin { to { transform: rotate(360deg); } }

.hero-text { padding-top: clamp(0px, 2vw, 24px); }
.hero-role {
  margin: 0 0 30px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem);
  line-height: 1.25;
  color: var(--ink-2);
}

/* ------------------------------------------ Hero field (loss landscape) -- */
/* A topographic map of a non-convex objective sits behind the hero; clicks
   drop a start point for a Newton vs SGD race (assets/js/field.js). */
.hero-wrap { position: relative; isolation: isolate; cursor: crosshair; }
.hero-wrap :is(p, h1, .connect, .portrait, .field-note) { cursor: auto; }
.field {
  position: absolute;
  inset: calc(var(--header-h) * -1) 0 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 220px), transparent);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 220px), transparent);
}
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.field-note {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: .68rem;
  line-height: 1.55;
  letter-spacing: .02em;
  color: var(--muted);
}
.field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 4px;
}
.field-title {
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field-cap { margin: 0 0 10px; }
.field-legend { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.field-legend li { display: grid; grid-template-columns: 24px 6ch minmax(0, 1fr); align-items: center; gap: 10px; }
.fl-key { width: 24px; height: 10px; }
.fl-key--newton { color: var(--accent); fill: currentColor; }
.fl-key--sgd { color: var(--ink-2); }
.fl-name { color: var(--ink); font-weight: 500; }
.fl-val { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.field-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 1.55em;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.field-status svg { width: 13px; height: 13px; flex: none; }
.field-status.is-warn { color: var(--warn); }
.field-status.is-ok { color: var(--ok); }
.field-run {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  cursor: pointer;
}
.field-run:hover { text-decoration-thickness: 2px; }
html:not(.js) .field, html:not(.js) .field-note { display: none; }

/* --------------------------------------------------------------- Section -- */
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tight-top { padding-top: clamp(16px, 3vw, 40px); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head .eyebrow { margin-bottom: 16px; }

/* the arcade (landing) */
.arcade {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
}
.arcade figure { margin: 0; }
.arcade .arch { aspect-ratio: 3 / 4; box-shadow: var(--shadow); }
.arcade .arch img { transition: transform 1.4s var(--ease); }
.arcade figure:hover .arch img { transform: scale(1.05); }
.arcade figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* second row: wide, shallow arches, like the broad arcades of the Main Quad */
.arcade--wide { margin-top: clamp(22px, 3vw, 38px); }
.arcade--wide .arch { aspect-ratio: 3 / 2; }
.arch--wide { border-radius: 50% 50% 6px 6px / 30% 30% 6px 6px; }

.place {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  margin-top: clamp(24px, 3vw, 36px);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.place-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.place-icon .ico { width: 22px; height: 22px; }
.place-name { margin: 0; font-family: var(--font-display); font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); line-height: 1.1; }
.place-addr { margin: 6px 0 0; font-size: .95rem; color: var(--muted); }
.place-meta {
  display: grid;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.place-meta time { color: var(--ink); }

/* ---------------------------------------------------------------- Footer -- */
.site-footer {
  margin-top: auto;
  padding-block: clamp(56px, 8vw, 104px) 34px;
  border-top: 1px solid var(--line);
}
.footer-cta {
  display: grid;
  gap: 20px;
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.footer-cta .eyebrow { margin: 0; }
.footer-big {
  width: fit-content;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.1rem + 6.2vw, 6.2rem);
  line-height: .95;
  letter-spacing: -.03em;
  text-decoration: none;
}
.footer-big em { color: var(--accent); }
.footer-big .arr { display: inline-block; font-style: normal; transition: transform .4s var(--ease); }
.footer-big:hover .arr { transform: translateX(12px); }
.footer-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--ink-2);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
.copy-btn.is-copied { color: var(--ok); border-color: currentColor; }

.footer-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 40px;
  padding-top: 32px;
}
.footer-logos { display: flex; align-items: center; gap: 22px; }
.logo-mask {
  display: block;
  background-color: var(--muted);
  transition: background-color .3s;
}
.logo-s {
  width: 26px;
  height: 38px;
  -webkit-mask: url("../img/stanford-s-mask.png") center / contain no-repeat;
  mask: url("../img/stanford-s-mask.png") center / contain no-repeat;
}
.logo-gsb {
  width: 118px;
  height: 42px;
  -webkit-mask: url("../img/gsb-mask.png") center / contain no-repeat;
  mask: url("../img/gsb-mask.png") center / contain no-repeat;
}
.footer-logos:hover .logo-mask { background-color: var(--accent); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a { color: var(--ink-2); font-size: .9rem; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--muted);
  text-align: right;
}

/* ------------------------------------------------------------ Page heads -- */
.page-head { padding-block: clamp(36px, 7vw, 96px) clamp(28px, 4vw, 56px); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* -------------------------------------------------------------- Research -- */

.themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  padding-block: clamp(40px, 6vw, 80px) clamp(16px, 3vw, 32px);
}
.theme { padding-top: 22px; border-top: 1px solid var(--ink); }
.theme-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; }
.theme-num { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.theme-glyph { width: 84px; height: 52px; color: var(--accent); }
.theme h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.3rem + .8vw, 1.95rem);
  line-height: 1.05;
  letter-spacing: -.015em;
}
.theme p { margin: 0; font-size: .98rem; color: var(--ink-2); }

.pubs { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 120px); }
.pub-group + .pub-group { margin-top: clamp(52px, 7vw, 88px); }
.pub-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.pub-group-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem);
  line-height: 1;
  letter-spacing: -.02em;
}
.pub-count { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pub {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.pub-index { padding-top: 8px; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.pub-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.95rem);
  line-height: 1.16;
  letter-spacing: -.012em;
}
.pub-title a {
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease), color .25s;
}
.pub-title a:hover { color: var(--accent); background-size: 100% 1px; }
.pub-authors { margin: 0 0 12px; font-size: .98rem; color: var(--ink-2); }
.me {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .22em;
}
.pub-venue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; font-size: .92rem; color: var(--muted); }
.venue { font-family: var(--font-display); font-style: italic; font-size: 1.22rem; line-height: 1.2; color: var(--ink); }
.pub-links { align-self: center; }
.pub-note { margin: 12px 0 0; font-size: .92rem; color: var(--muted); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .66rem;
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--published { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 38%, transparent); }
.tag--working { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, transparent); }
.tag--service { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }

/* venue metrics (quartile, Impact Factor, CiteScore, CORE rank) */
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: .64rem;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.metric-v { font-size: .86rem; font-weight: 500; letter-spacing: .01em; color: var(--ink); }
.metric--rank {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
}
.metrics-note {
  max-width: 72ch;
  margin: 32px 0 0;
  font-family: var(--font-mono);
  font-size: .7rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--muted);
}

.scholar-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.scholar-cta p { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.15; }

/* ------------------------------------------- Featured paper: figure -- */
.paperfig {
  position: relative;
  padding: clamp(20px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.pf-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px 40px;
}
.pf-head .eyebrow { margin-bottom: 14px; }
.pf-title {
  max-width: 24ch;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 1.25rem + 1.9vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -.02em;
}
.pf-title em { font-style: italic; }
.pf-sub { max-width: 72ch; margin: 14px 0 0; font-size: .98rem; line-height: 1.6; color: var(--ink-2); }
.pf-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* method strip: four steps, each with its headline number */
.pf-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  counter-reset: pfstep;
}
.pf-step { position: relative; padding: 20px 22px 22px; border-left: 1px solid var(--line); }
.pf-step:first-child { padding-left: 0; border-left: 0; }
.pf-step + .pf-step::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  background: var(--surface);
  transform: translateY(-50%) rotate(45deg);
}
.pf-step-k {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pf-step-k::before { counter-increment: pfstep; content: "0" counter(pfstep); color: var(--accent); }
.pf-step-v {
  display: block;
  margin: 12px 0 8px;
  font-family: var(--font-sans);
  font-size: clamp(1.55rem, 1.15rem + 1vw, 2.05rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.025em;
  color: var(--ink);
}
.pf-step p { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--ink-2); }

/* the forecasting identity, typeset with MathML */
.pf-eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  margin: 22px 0 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--bg-soft);
  overflow-x: auto;
}
.pf-eq-label, .pf-eq-note {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.pf-eq-note { flex-basis: 100%; text-align: center; letter-spacing: .04em; text-transform: none; }
.pf-eq math {
  margin: 0;
  font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math;
  font-size: 1.3rem;
  color: var(--ink);
}

/* tabs */
.pf-tabs {
  display: flex;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin: 32px 0 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  scrollbar-width: none;
}
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
  flex: none;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: .86rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.pf-tab:hover { color: var(--ink); background: var(--bg-soft); }
.pf-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.pf-tab .k { margin-right: 7px; font-family: var(--font-mono); font-size: .66rem; opacity: .6; }

.pf-panel { margin-top: 24px; }
.pf-panel[hidden] { display: none; }
.pf-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: clamp(22px, 3.4vw, 44px); }
.pf-col { min-width: 0; }
.pf-ctl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-height: 34px;
  margin-bottom: 14px;
}
.pf-ctl-title { font-size: .92rem; font-weight: 600; color: var(--ink); }
.pf-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pf-seg button {
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: .8rem;
  cursor: pointer;
}
.pf-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pf-chip {
  min-width: 42px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .7rem;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.pf-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.pf-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

/* chart marks (text always in ink tokens; only marks carry color) */
.pf-chart { position: relative; width: 100%; }
.pf-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.pf-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.pf-grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.pf-tick, .pf-lab, .pf-note, .pf-val, .pf-endlab, .pf-ptlab, .pf-axis { font-family: var(--font-mono); font-size: 11px; }
.pf-tick, .pf-lab, .pf-note, .pf-axis { fill: var(--muted); }
.pf-lab.is-on { fill: var(--ink); font-weight: 600; }
.pf-val, .pf-endlab, .pf-ptlab { fill: var(--ink); }
.pf-endlab { font-weight: 600; }
.pf-axis { font-size: 10.5px; letter-spacing: .04em; }
.pf-note { font-size: 10px; letter-spacing: .06em; }
.pf-rowlab { font-family: var(--font-sans); font-size: 13px; fill: var(--ink-2); }
.pf-rowlab.is-ours { fill: var(--ink); font-weight: 600; }
.pf-daymark { fill: var(--accent); }
.pf-cell { cursor: pointer; }
.pf-cell.is-hover { stroke: var(--ink); stroke-width: 1.5; }
.pf-ctx { fill: none; stroke: var(--deemph); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.pf-main { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pf-band { fill: var(--accent); opacity: .13; }
.pf-cross line { stroke: var(--ink-2); stroke-width: 1; opacity: .45; }
.pf-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.pf-bar-main { fill: var(--accent); }
.pf-bar-ctx { fill: var(--deemph-mark); }
.pf-break { fill: none; stroke: var(--surface); stroke-width: 2.5; }
.pf-covid { fill: var(--bg-soft); }
.pf-region { fill: var(--accent-soft); }
.pf-thresh { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.pf-group, .pf-pt { transition: opacity .2s; }
.pf-dim { opacity: .4; }
.pf-hit { fill: transparent; cursor: pointer; }
.pf-hit:focus { outline: none; }
.pf-hit:focus-visible { stroke: var(--accent); stroke-width: 1.5; }

/* legends + sequential scale */
.pf-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--ink-2); }
.pf-legend--inline { margin: 0; }
.pf-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pf-key { display: inline-block; flex: none; }
.pf-key--line { width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
.pf-key--ctx { height: 1.5px; background: var(--deemph); }
.pf-key--band { width: 14px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pf-key--bar { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.pf-key--bar-ctx { background: var(--deemph-mark); }
.pf-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }
.pf-scale-bar {
  width: 110px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--seq-lo), var(--seq-hi));
  background: linear-gradient(to right in oklab, var(--seq-lo), var(--seq-hi));
}
.pf-scale-label { margin-left: 4px; }
.pf-scale-hint { margin-left: auto; }

/* caption, data-table toggle, table view */
.pf-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pf-cap { max-width: 80ch; margin: 0; font-size: .86rem; line-height: 1.6; color: var(--ink-2); }
.pf-cap b { font-weight: 600; color: var(--ink); }
.pf-datatoggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.pf-datatoggle:hover { border-color: var(--ink); color: var(--ink); }
.pf-datatoggle[aria-expanded="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.pf-tablewrap { max-height: 420px; margin-top: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.pf-tablewrap[hidden] { display: none; }
.pf-table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.pf-table th, .pf-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.pf-table th:first-child { text-align: left; }
.pf-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pf-table tbody th { font-weight: 500; color: var(--ink); }
.pf-table tbody tr:last-child > * { border-bottom: 0; }
.pf-table .is-ours > * { font-weight: 700; color: var(--ink); }

/* tooltip: value leads, label follows */
.pf-tip {
  position: absolute;
  z-index: 6;
  min-width: 160px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: .8rem;
  line-height: 1.45;
}
.pf-tip[hidden] { display: none; }
.pf-tip-h { margin-bottom: 6px; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pf-tip-r { display: flex; align-items: baseline; gap: 8px; }
.pf-tip-r b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-tip-r span { color: var(--ink-2); }
.pf-tip-k { flex: none; align-self: center; width: 12px; height: 2px; border-radius: 2px; }
.pf-tip-k.is-main { background: var(--accent); }
.pf-tip-k.is-ctx { background: var(--deemph-mark); }
.pf-tip-k.is-band { height: 8px; background: color-mix(in srgb, var(--accent) 22%, transparent); }

@media (max-width: 1023px) {
  .pf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-step:nth-child(3) { padding-left: 0; border-left: 0; }
  .pf-step:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .pf-step + .pf-step::before { display: none; }
  .pf-row { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
  .pf-head { grid-template-columns: 1fr; align-items: start; }
  .pf-step { padding: 16px 12px 18px 14px; }
  .pf-step:nth-child(odd) { padding-left: 0; border-left: 0; }
  .pf-step:nth-child(even) { border-left: 1px solid var(--line); }
  .pf-step p { font-size: .8rem; }
  .pf-eq { justify-content: flex-start; padding: 14px; }
  .pf-eq math { font-size: 1.02rem; }
  .pf-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 18px; overflow: visible; }
  .pf-tab { padding: 10px 8px; border-radius: 14px; font-size: .84rem; text-align: center; }
  .pf-scale-hint { margin-left: 0; flex-basis: 100%; }
}

/* ---------------------------------------------------------------- Resume -- */
.resume-layout { padding-bottom: clamp(64px, 9vw, 120px); }

.resume-viewer { display: grid; gap: clamp(22px, 3vw, 40px); max-width: 880px; min-width: 0; margin-inline: auto; }
.sheet-wrap { margin: 0; }
.sheet {
  position: relative;
  overflow: hidden;
  aspect-ratio: 612 / 792;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  filter: brightness(var(--sheet-dim));
}
.sheet canvas { width: 100%; height: 100%; }
.sheet-link { position: absolute; border-radius: 3px; transition: background-color .2s, box-shadow .2s; }
.sheet-link:hover, .sheet-link:focus-visible { outline: none; background: rgba(140, 21, 21, .1); box-shadow: 0 0 0 1px rgba(140, 21, 21, .45); }
.sheet--loading {
  background: linear-gradient(100deg, #fff 30%, #f2ede4 50%, #fff 70%) 0 0 / 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.sheet-cap { margin: 12px 0 0; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; }
.pdf-fallback iframe { width: 100%; height: 85vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pdf-fallback p { margin-top: 12px; color: var(--muted); }

/* --------------------------------------------------------------- Hobbies -- */
.sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.side {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
}
.side:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.side-label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.side-title { display: block; margin: 4px 0 2px; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; letter-spacing: -.02em; }
.side-meta { display: block; font-size: .86rem; color: var(--muted); }
.side-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color .3s, color .3s, border-color .3s, transform .4s var(--ease);
}
.side-arrow svg { width: 16px; height: 16px; }
.side:hover .side-arrow { background: var(--ink); border-color: var(--ink); color: var(--bg); transform: translateY(3px); }

.vinyl {
  position: relative;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, transparent 0 9%, rgba(255, 255, 255, .16) 13%, transparent 18% 58%, rgba(255, 255, 255, .1) 62%, transparent 67%),
    repeating-radial-gradient(circle at center, #171717 0 1.4px, #252525 1.4px 2.8px);
  box-shadow: inset 0 0 0 2px #0c0c0c, 0 8px 16px -8px rgba(0, 0, 0, .55);
}
.vinyl::before {
  content: "";
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background: var(--label, var(--stage-red));
  box-shadow: 0 0 0 2px #0c0c0c;
}
.vinyl::after {
  content: "";
  position: absolute;
  inset: 47%;
  border-radius: 50%;
  background: var(--surface);
}
.side--a .vinyl { --label: radial-gradient(circle, #E2483C 0 55%, #B3271D 56%); }
.side--b .vinyl { --label: linear-gradient(90deg, var(--blau-2) 0 25%, var(--grana) 25% 50%, var(--blau-2) 50% 75%, var(--grana) 75%); }
.side:hover .vinyl { animation: spin 1.8s linear infinite; }

/* Side A: the stage (always dark) */
.stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 72px);
  border: 1px solid var(--stage-border);
  border-radius: clamp(22px, 3vw, 34px);
  background:
    radial-gradient(70% 60% at 88% -12%, rgba(214, 48, 36, .42), transparent 62%),
    radial-gradient(55% 55% at -6% 112%, rgba(140, 21, 21, .32), transparent 62%),
    var(--stage);
  color: var(--stage-ink);
  box-shadow: var(--shadow-lg);
}
.stage .eyebrow { color: var(--stage-muted); }
.stage .h2 { color: var(--stage-ink); }
.stage .prose { color: rgba(239, 233, 222, .8); }
.stage-sub, .pitch-sub {
  margin: 12px 0 26px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + .6vw, 1.45rem);
  line-height: 1.3;
}
.stage-sub { color: var(--stage-muted); }
.pitch-sub { color: var(--ink-2); }

.marquee {
  margin: 0 calc(clamp(20px, 5vw, 72px) * -1) 4px;
  padding-block: 8px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 48s linear infinite;
}
/* hovering or tabbing into the strip stops it, so a name can be clicked */
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-track li {
  padding-inline: .32em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.6rem, 1.3rem + 5vw, 6rem);
  line-height: 1.12;
  white-space: nowrap;
  color: var(--stage-ink);
}
.marquee-track a {
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: color .25s, -webkit-text-stroke-color .25s;
}
.marquee-track li:nth-child(4n + 3) a { color: transparent; -webkit-text-stroke: 1px rgba(239, 233, 222, .55); }
.marquee-track a::after {
  content: "↗";
  display: inline-block;
  margin-left: .1em;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: .3em;
  vertical-align: super;
  color: var(--stage-red);
  -webkit-text-stroke: 0;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .25s, transform .3s var(--ease);
}
.marquee-track a:hover,
.marquee-track a:focus-visible,
.marquee-track li:nth-child(4n + 3) a:hover,
.marquee-track li:nth-child(4n + 3) a:focus-visible { color: var(--stage-red); -webkit-text-stroke-color: transparent; }
.marquee-track a:hover::after,
.marquee-track a:focus-visible::after { opacity: 1; transform: none; }
.marquee-track a:focus-visible { outline: 2px solid var(--stage-red); outline-offset: 2px; }
.marquee-track .sep { font-style: normal; font-size: clamp(1.2rem, .8rem + 1.6vw, 2.2rem); color: var(--stage-red); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 clamp(28px, 4.5vw, 52px);
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stage-muted);
}
.marquee-hint svg { width: 9px; height: 9px; color: var(--stage-red); }
@media (prefers-reduced-motion: reduce) {
  /* no scrolling: show the six names once, as a wrapped list */
  .marquee { margin-inline: 0; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; width: auto; animation: none; }
  .marquee-track .dup { display: none; }
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
}
.stage .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn--stage { background: var(--stage-ink); border-color: var(--stage-ink); color: var(--stage); }
.btn--stage:hover { background: var(--stage-red); border-color: var(--stage-red); color: #fff; box-shadow: 0 12px 30px -12px rgba(226, 72, 60, .7); }
.btn--ghost-stage { background: transparent; border-color: rgba(239, 233, 222, .28); color: var(--stage-ink); }
.btn--ghost-stage:hover { background: rgba(239, 233, 222, .08); border-color: var(--stage-ink); box-shadow: none; }
.stage .dot { color: var(--stage-red); }
.stage :focus-visible { outline-color: var(--stage-red); }
.arch--guitar {
  width: min(100%, 400px);
  aspect-ratio: 4 / 5;
  justify-self: center;
  background: #000;
  box-shadow: 0 40px 90px -40px rgba(226, 72, 60, .6);
}

.videos {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(0, 1.18fr);
  gap: clamp(14px, 2vw, 24px);
  margin-top: clamp(44px, 6vw, 80px);
}
.video-card { margin: 0; }
.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar, 16 / 9);
  border-radius: 16px;
  background: #000;
  box-shadow: 0 0 0 1px var(--stage-line);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .55));
  color: #fff;
  cursor: pointer;
  transition: opacity .35s;
}
.video-play .disc {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .4s var(--ease), background-color .3s, border-color .3s;
}
.video-play svg { width: 26px; height: 26px; margin-left: 4px; }
.video-play:hover .disc, .video-play:focus-visible .disc { transform: scale(1.08); background: var(--stage-red); border-color: var(--stage-red); }
.video-play[hidden] { display: none; }
.video-card.is-playing .video-play { opacity: 0; pointer-events: none; }
.video-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stage-muted);
}

/* Side B: football */
.pitch { padding-block: clamp(72px, 10vw, 136px) clamp(64px, 9vw, 120px); }
.pitch-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
}
.crest { width: 62px; height: auto; margin-bottom: 26px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .18)); }
.visca {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}
.visca::before {
  content: "";
  width: 30px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blau-2) 0 25%, var(--grana) 25% 50%, var(--blau-2) 50% 75%, var(--grana) 75%);
}

.henry {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0;
  padding: clamp(34px, 5vw, 68px) clamp(26px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 46px, transparent 46px 92px),
    linear-gradient(135deg, var(--blau) 0%, #102F6E 42%, var(--grana-2) 100%);
  color: #F7F1E6;
  box-shadow: var(--shadow-lg);
}
.henry::before {
  content: "\201C";
  position: absolute;
  top: .02em;
  left: .14em;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(7rem, 11vw, 10rem);
  line-height: 1;
  color: rgba(237, 187, 0, .28);
}
.henry .crest-wm {
  position: absolute;
  right: -46px;
  bottom: -54px;
  z-index: -1;
  width: clamp(180px, 22vw, 260px);
  opacity: .1;
  transform: rotate(-12deg);
}
.henry p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.65rem, 1.1rem + 2.1vw, 2.75rem);
  line-height: 1.16;
  letter-spacing: -.01em;
}
.henry footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.henry footer::before { content: ""; width: 34px; height: 1px; background: currentColor; }

.bento {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  height: clamp(440px, 52vw, 660px);
  margin-top: clamp(44px, 6vw, 80px);
}
.bento figure {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0;
  border-radius: 18px;
  background: var(--bg-soft);
}
.bento img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--img-dim));
  transition: transform 1.4s var(--ease);
}
.bento figure:hover img { transform: scale(1.045); }
.b-flag { grid-column: 1; grid-row: 1 / 3; }
.b-msn { grid-column: 2; grid-row: 1; }
.b-wc { grid-column: 2; grid-row: 2; }
.b-messi { grid-column: 3; grid-row: 1 / 3; border-radius: 1000px 1000px 18px 18px !important; }
.b-flag img { object-position: 50% 42%; }
.b-msn img { object-position: 50% 30%; }
.b-wc img { object-position: 50% 28%; }
.b-messi img { object-position: 42% 40%; }
.bento figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(12, 10, 9, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #F7F1E6;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- 404 -- */
.notfound {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 8vw, 120px);
}
.notfound .arch { width: min(100%, 400px); aspect-ratio: 3 / 4; justify-self: center; box-shadow: var(--shadow-lg); }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------------------------------------------------------------- Motion -- */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-arch {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.5s var(--ease-in-out);
  transition-delay: var(--d, 0s);
}
.js .reveal-arch.is-in { clip-path: inset(0 0 0 0); }
.js .reveal-arch > img { transform: scale(1.16); transition: transform 2s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal-arch.is-in > img { transform: none; }
.reveal-fallback .reveal,
.reveal-fallback .reveal-arch,
.reveal-fallback .reveal-arch > img { opacity: 1 !important; transform: none !important; clip-path: none !important; }

/* theme switch: circular reveal handled in JS; neutralise default fade */
:root.theme-vt::view-transition-old(root),
:root.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.theme-vt::view-transition-new(root) { z-index: 2; }
.theme-vt *, .theme-vt *::before, .theme-vt *::after { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal, .js .reveal-arch, .js .reveal-arch > img { opacity: 1; transform: none; clip-path: none; }
}

/* ------------------------------------------------------------ Responsive -- */
@media (max-width: 1023px) {
  .nav-idx { display: none; }
  .site-nav a { padding: 8px 13px; }
  .themes { grid-template-columns: 1fr; gap: 0; }
  .theme { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 28px; padding-block: 24px; }
  .theme-top { grid-row: span 2; flex-direction: column; gap: 14px; margin: 0; }
  .stage-grid, .pitch-grid { grid-template-columns: 1fr; }
  .arch--guitar { width: min(100%, 360px); }
  .place { grid-template-columns: auto minmax(0, 1fr); }
  .place-meta { grid-column: 2; text-align: left; }
  .place .btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 759px) {
  :root { --header-h: 62px; }
  body { font-size: 1rem; }

  .brand-name { font-size: 1.28rem; }
  .brand-logo { height: 33px; }
  .header-inner { grid-template-columns: 1fr auto; }

  /* primary nav becomes a floating dock */
  .site-nav {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 60;
    transform: translateX(-50%);
    gap: 2px;
    padding: 5px;
    border-color: var(--line-strong);
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.5) blur(18px);
    backdrop-filter: saturate(1.5) blur(18px);
    box-shadow: var(--shadow-lg);
  }
  .site-nav a { padding: 10px 14px; font-size: .86rem; }

  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 28px; }
  .hero-media { position: relative; top: 0; width: min(74vw, 320px); }
  .hero-media::before { transform: translate(14px, -14px); }
  .field-note { position: relative; left: 50%; width: min(calc(100vw - var(--gutter) * 2), 520px); transform: translateX(-50%); }
  .connect { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chip { width: 100%; justify-content: center; padding: 12px 10px; font-size: .88rem; }
  .chip .long { display: none; }

  .arcade {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 10px;
    scrollbar-width: none;
  }
  .arcade::-webkit-scrollbar { display: none; }
  .arcade figure { scroll-snap-align: center; }
  .arcade--wide { grid-auto-columns: 86%; }
  .place { grid-template-columns: 1fr; text-align: left; }
  .place-icon { display: none; }
  .place-meta { grid-column: auto; }
  .place .btn { grid-column: auto; justify-self: stretch; }

  .site-footer { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .footer-grid { grid-template-columns: 1fr; justify-items: start; gap: 22px; }
  .footer-links { justify-content: flex-start; }
  .footer-meta { justify-items: start; text-align: left; }

  .theme { grid-template-columns: 1fr; }
  .theme-top { grid-row: auto; flex-direction: row; align-items: center; margin-bottom: 14px; }
  .pub { grid-template-columns: 1fr; gap: 6px; padding: 26px 0; }
  .pub-index { padding-top: 0; }
  .pub-links { justify-self: start; margin-top: 8px; }
  .scholar-cta { flex-direction: column; align-items: flex-start; }

  .sides { grid-template-columns: 1fr; gap: 12px; }
  .side { gap: 16px; padding: 16px 18px; }
  .vinyl { width: 56px; }
  .side-title { font-size: 2rem; }
  .videos { grid-template-columns: 1fr; }
  .stage .actions .btn { flex: 1 1 auto; }

  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; height: auto; }
  .b-flag { grid-column: 1; grid-row: 1; aspect-ratio: 3 / 5; }
  .b-messi { grid-column: 2; grid-row: 1; aspect-ratio: 3 / 5; }
  .b-msn { grid-column: 1 / -1; grid-row: 2; aspect-ratio: 16 / 10; }
  .b-wc { grid-column: 1 / -1; grid-row: 3; aspect-ratio: 16 / 9; }

  .notfound { grid-template-columns: 1fr; }
  .notfound .arch { width: min(70vw, 300px); }
}

@media (max-width: 379px) {
  .site-nav a { padding: 10px 11px; font-size: .82rem; }
  .brand-name { font-size: 1.15rem; }
}

/* ----------------------------------------------------------------- Print -- */
@media print {
  .site-header, .site-nav, .theme-switch, .footer-cta, .marquee, .video-play, .field, .field-note { display: none !important; }
  body::before { display: none; }
  .js .reveal, .js .reveal-arch { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
