/* Zheng Gao — homepage. White / blue / red, editorial minimalism.
   Tokens first; see DESIGN.md for rationale. */

:root {
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --w: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r-s: 6px;
  --r-m: 14px;
  --art-filter: none;
  --tile-ink: #A8372C;
}

/* ---------- palette tokens (generated from OKLCH values; see DESIGN.md) ---------- */
:root, :root[data-palette="a"] {
  color-scheme: light;
  --paper: #F8F6EE;
  --surface: #FDFCF7;
  --blue-soft: #E5EEF8;
  --tint-2: #D6E5F6;
  --rule: #DEDAD2;
  --rule-strong: #AAB2BE;
  --ink: #17223B;
  --ink-2: #2E3951;
  --muted: #5A6378;
  --blue: #2A4F96;
  --blue-solid: #264A8E;
  --red: #D15E49;
  --red-ink: #A8372C;
  --red-tint: #FBE1DC;
  --on-solid: #FDFCF7;
  --navy: #17233F;
  --on-navy: #F1EEE7;
  --focus: #A8372C;
  --selection: #C0DAF8;
  --shadow: 0 1px 2px rgba(23, 34, 59, .05), 0 10px 28px -14px rgba(23, 34, 59, .22);
  --tile-bg: #F8F6EE;
}
:root[data-palette="b"] {
  color-scheme: light;
  --paper: #F2F5F7;
  --surface: #FAFCFE;
  --blue-soft: #E6EEF4;
  --tint-2: #D6E5F0;
  --rule: #D7DBDF;
  --rule-strong: #AAB2BA;
  --ink: #192532;
  --ink-2: #303C49;
  --muted: #596571;
  --blue: #245A81;
  --blue-solid: #1E547A;
  --red: #C46A46;
  --red-ink: #9D4529;
  --red-tint: #FBE6DE;
  --on-solid: #FAFCFE;
  --navy: #172839;
  --on-navy: #EBEFF2;
  --focus: #9D4529;
  --selection: #C1DCF0;
  --shadow: 0 1px 2px rgba(23, 34, 59, .05), 0 10px 28px -14px rgba(23, 34, 59, .22);
  --tile-bg: #F8F6EE;
}
:root[data-palette="c"] {
  color-scheme: light;
  --paper: #FAFAF7;
  --surface: #FFFEFD;
  --blue-soft: #E6F1F7;
  --tint-2: #D4E8F2;
  --rule: #E2E1DE;
  --rule-strong: #B2B8BF;
  --ink: #101E39;
  --ink-2: #2A3852;
  --muted: #586478;
  --blue: #2A4A88;
  --blue-solid: #254582;
  --red: #DA726D;
  --red-ink: #AB413F;
  --red-tint: #FFE6E4;
  --on-solid: #FEFDFB;
  --navy: #101E39;
  --on-navy: #F3F2ED;
  --focus: #AB413F;
  --selection: #C0E1F0;
  --shadow: 0 1px 2px rgba(23, 34, 59, .05), 0 10px 28px -14px rgba(23, 34, 59, .22);
  --tile-bg: #F8F6EE;
}
:root[data-theme="dark"], :root[data-palette="a"][data-theme="dark"] {
  color-scheme: dark;
  --paper: #111725;
  --surface: #192031;
  --blue-soft: #162338;
  --tint-2: #1D2E49;
  --rule: #293040;
  --rule-strong: #434D63;
  --ink: #EEEBE2;
  --ink-2: #C5CBD5;
  --muted: #949FB2;
  --blue: #93BFF0;
  --blue-solid: #30599D;
  --red: #D36757;
  --red-ink: #EF9687;
  --red-tint: #44241F;
  --on-solid: #FDFCF7;
  --navy: #090F1D;
  --on-navy: #EBE8DF;
  --focus: #EF9687;
  --selection: #253D61;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --art-filter: brightness(.9) saturate(.95);
}
:root[data-palette="b"][data-theme="dark"] {
  color-scheme: dark;
  --paper: #131A22;
  --surface: #1C242C;
  --blue-soft: #192733;
  --tint-2: #1E3243;
  --rule: #2B343D;
  --rule-strong: #445160;
  --ink: #E8ECEF;
  --ink-2: #C5CBD1;
  --muted: #95A0AA;
  --blue: #93C5E6;
  --blue-solid: #2A6087;
  --red: #CF7855;
  --red-ink: #EB9F81;
  --red-tint: #41261B;
  --on-solid: #FAFCFE;
  --navy: #0B121A;
  --on-navy: #E4E8ED;
  --focus: #EB9F81;
  --selection: #21435D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --art-filter: brightness(.9) saturate(.95);
}
:root[data-palette="c"][data-theme="dark"] {
  color-scheme: dark;
  --paper: #0C1525;
  --surface: #141E31;
  --blue-soft: #112038;
  --tint-2: #172B49;
  --rule: #242E40;
  --rule-strong: #3D4B63;
  --ink: #F0EEE9;
  --ink-2: #C7CED8;
  --muted: #96A2B5;
  --blue: #92C4EE;
  --blue-solid: #2C5797;
  --red: #D87974;
  --red-ink: #F19E98;
  --red-tint: #442321;
  --on-solid: #FEFDFB;
  --navy: #060D1A;
  --on-navy: #EDEBE5;
  --focus: #F19E98;
  --selection: #1D3B61;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --art-filter: brightness(.9) saturate(.95);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]), :root[data-palette="a"]:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #111725;
    --surface: #192031;
    --blue-soft: #162338;
    --tint-2: #1D2E49;
    --rule: #293040;
    --rule-strong: #434D63;
    --ink: #EEEBE2;
    --ink-2: #C5CBD5;
    --muted: #949FB2;
    --blue: #93BFF0;
    --blue-solid: #30599D;
    --red: #D36757;
    --red-ink: #EF9687;
    --red-tint: #44241F;
    --on-solid: #FDFCF7;
    --navy: #090F1D;
    --on-navy: #EBE8DF;
    --focus: #EF9687;
    --selection: #253D61;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --art-filter: brightness(.9) saturate(.95);
  }
  :root[data-palette="b"]:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #131A22;
    --surface: #1C242C;
    --blue-soft: #192733;
    --tint-2: #1E3243;
    --rule: #2B343D;
    --rule-strong: #445160;
    --ink: #E8ECEF;
    --ink-2: #C5CBD1;
    --muted: #95A0AA;
    --blue: #93C5E6;
    --blue-solid: #2A6087;
    --red: #CF7855;
    --red-ink: #EB9F81;
    --red-tint: #41261B;
    --on-solid: #FAFCFE;
    --navy: #0B121A;
    --on-navy: #E4E8ED;
    --focus: #EB9F81;
    --selection: #21435D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --art-filter: brightness(.9) saturate(.95);
  }
  :root[data-palette="c"]:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0C1525;
    --surface: #141E31;
    --blue-soft: #112038;
    --tint-2: #172B49;
    --rule: #242E40;
    --rule-strong: #3D4B63;
    --ink: #F0EEE9;
    --ink-2: #C7CED8;
    --muted: #96A2B5;
    --blue: #92C4EE;
    --blue-solid: #2C5797;
    --red: #D87974;
    --red-ink: #F19E98;
    --red-tint: #442321;
    --on-solid: #FEFDFB;
    --navy: #060D1A;
    --on-navy: #EDEBE5;
    --focus: #F19E98;
    --selection: #1D3B61;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --art-filter: brightness(.9) saturate(.95);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--selection); color: var(--ink); }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
em { font-style: italic; }
strong { font-weight: 600; color: var(--ink); }

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .2s var(--ease), text-decoration-thickness .2s var(--ease);
}
a:hover { color: var(--red-ink); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  font: 500 13px var(--mono); text-decoration: none; border-radius: 2px;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.wrap { width: 100%; max-width: calc(var(--w) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- tricolour rule (slim, muted; blue and red never touch) ---------- */
.tri { display: flex; gap: 6px; height: 5px; }
.tri i { display: block; height: 100%; border-radius: 3px; }
.tri i:nth-child(1) { flex: 14; background: var(--blue-solid); }
.tri i:nth-child(2) { flex: 3; background: var(--rule-strong); }
.tri i:nth-child(3) { flex: 4; background: var(--red); }
.site-footer .tri { height: 5px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 28px; flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand .mark { width: 22px; height: 22px; flex: none; border-radius: 5px;
  background: linear-gradient(var(--blue-solid) 0 58%, transparent 58% 70%, var(--red) 70%); box-shadow: 0 0 0 1px var(--rule-strong); }
.site-nav { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.site-nav a {
  font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; padding: 6px 0;
  background: linear-gradient(var(--red), var(--red)) left bottom / 0 2px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); background-size: 100% 2px; }
.tools { display: flex; align-items: center; gap: 14px; }
.seg { display: none; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px; }
.js .seg { display: inline-flex; }
.seg button {
  font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 999px;
  cursor: pointer; min-height: 30px; transition: background .2s, color .2s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme-btn {
  display: none; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--rule-strong); border-radius: 50%; color: var(--ink);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.js .theme-btn { display: inline-flex; }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 16px; height: 16px; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); margin-bottom: 28px; }
.eyebrow i { width: 12px; height: 12px; background: var(--red); display: inline-block; border-radius: 50%; }
.hero h1 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(2.7rem, 7.2vw, 5.9rem); line-height: 1.0; letter-spacing: -.025em;
  text-wrap: balance;
}
.hero h1 em { color: var(--blue); }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.7rem); }
.hero h1 .dot { color: var(--red); font-style: normal; }
.band { background: var(--blue-soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pillar { padding: clamp(26px, 4vw, 44px) clamp(16px, 3vw, 40px) clamp(26px, 4vw, 44px) 0; border-right: 1px solid var(--rule-strong); }
.pillar + .pillar { padding-left: clamp(16px, 3vw, 40px); }
.pillar:last-child { border-right: 0; }
.pillar .mono { color: var(--blue); display: block; margin-bottom: 10px; font-weight: 500; }
.pillar .mono::before { content: ""; display: block; width: 28px; height: 3px; background: var(--red); border-radius: 2px; margin-bottom: 14px; }
.pillar p { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.22; color: var(--ink); }
.hero-art { position: relative; justify-self: end; width: 100%; max-width: 640px; }
.hero-art img { width: 100%; aspect-ratio: 126 / 61; object-fit: cover; border-radius: var(--r-m); background: var(--tile-bg); }
.hero-art::after { content: ""; position: absolute; left: 0; bottom: -16px; width: 56px; height: 3px; border-radius: 2px; background: var(--red); }
.contact { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: clamp(36px, 5vw, 60px); padding-top: 18px; border-top: 1px solid var(--rule); }
.contact a { font: 500 13px var(--mono); letter-spacing: .02em; text-decoration: none; color: var(--ink); display: inline-flex; gap: 8px; align-items: baseline; }
.contact a span { color: var(--blue); transition: transform .25s var(--ease); display: inline-block; }
.contact a:hover { color: var(--blue); }
.contact a:hover span { transform: translate(2px, -2px); }

/* ---------- sections ---------- */
.sec { border-top: 1px solid var(--rule-strong); padding: clamp(32px, 5vw, 56px) 0 clamp(40px, 6vw, 72px); }
.sec-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px clamp(24px, 5vw, 64px); }
.sec-head { align-self: start; position: sticky; top: 92px; }
.sec-head .mono { color: var(--muted); display: block; margin-bottom: 6px; }
.sec-head .mono b { color: var(--red-ink); font-weight: 500; }
.sec-head .mono { font-size: 12.5px; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--ink); letter-spacing: -.01em; }
.more button {
  background: none; border: 0; border-bottom: 1px solid currentColor; padding: 4px 0; color: var(--blue); cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; transition: color .2s;
}
.more button:hover { color: var(--ink); }

/* about */
.about { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 28px clamp(24px, 4vw, 48px); align-items: start; }
.portrait { position: relative; width: 148px; }
.portrait img { width: 148px; height: 148px; object-fit: cover; filter: saturate(.92); }
.portrait::before, .portrait::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--ink); pointer-events: none; }
.portrait::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.portrait::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; border-color: var(--red); }
.about p { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.about p em { font-family: var(--serif); font-size: 1.12em; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { font: 500 11.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--blue); border: 1px solid var(--rule-strong); padding: 5px 10px; border-radius: 2px; transition: border-color .2s, background .2s; }
.tag:hover { border-color: var(--blue); background: var(--blue-soft); }

/* news */
.news-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.news-list li:first-child { padding-top: 0; }
.news-date { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.news-list li > span:last-child { color: var(--ink-2); }

/* publications */
.pub-count { color: var(--ink); margin: 0 0 8px; padding: 10px 0; border-bottom: 1px solid var(--rule-strong); letter-spacing: .06em; }
.pub-year { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); display: flex; align-items: center; gap: 14px; margin: 38px 0 2px; }
.pub-year:first-of-type { margin-top: 26px; }
.pub-year::after { content: ""; height: 1px; flex: 1; background: var(--rule); }
.pubs { display: flex; flex-direction: column; }
.pub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 20px 0; border-bottom: 1px solid var(--rule); position: relative; }
.pub.has-thumb { grid-template-columns: 148px minmax(0, 1fr); gap: 22px; }
.pub::before { content: ""; position: absolute; left: -14px; top: 20px; bottom: 20px; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease); }
.pub:hover::before, .pub:focus-within::before { transform: scaleY(1); }
.pub-thumb { width: 148px; aspect-ratio: 16/10; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-s); overflow: hidden; }
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.pub-id { font: 500 11px var(--mono); color: var(--muted); letter-spacing: .06em; margin-right: 2px; }
.badge { display: inline-flex; align-items: center; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--blue); margin: 0; }
.badge-preprint { color: var(--muted); }
.badge-core { color: var(--blue); border: 1px solid var(--rule-strong); padding: 2px 7px; border-radius: var(--r-s); }
.badge-hot { background: var(--red-tint); color: var(--red-ink); padding: 3px 9px; border-radius: var(--r-s); font-weight: 600; }
.pub-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.22; letter-spacing: -.005em; }
.pub-title a { color: var(--ink); text-decoration-color: var(--rule-strong); }
.pub-title a:hover { color: var(--blue); text-decoration-color: var(--red-ink); }
.pub-authors { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pub-venue { margin-top: 2px; font-size: 14px; color: var(--muted); font-style: italic; }
.pub-note { margin-top: 4px; font: 500 11.5px var(--mono); letter-spacing: .04em; color: var(--red-ink); }
.pub-contrib { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 70ch; padding-left: 12px; border-left: 2px solid var(--rule); }
.pub-contrib .mono { display: block; color: var(--muted); font-size: 10.5px; margin-bottom: 2px; }
.pub-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pub-links a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 1px; }
.pub-links a:hover { border-color: var(--red-ink); }


/* about: research threads as illustrated tiles */
.about { grid-template-columns: 148px minmax(0, 1fr); }
.about-where { color: var(--muted); margin-top: 16px; font-size: 11.5px; line-height: 1.7; }
.about p.about-where { font-size: 11.5px; line-height: 1.8; max-width: none; letter-spacing: .08em; }
.about-where a { color: var(--blue); }
.threads-wrap { grid-column: 1 / -1; margin-top: 12px; }
.threads-h { color: var(--blue); font-size: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 22px; font-weight: 500; }
.threads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px clamp(18px, 2.4vw, 30px); }
.thread { display: flex; flex-direction: column; }
.thread-fig { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--tile-bg); box-shadow: 0 0 0 1px var(--rule); }
.thread-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .9s var(--ease); }
.thread:hover .thread-fig img { transform: scale(1.03); }
.thread-n { position: absolute; left: 10px; top: 10px; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--red-ink); background: color-mix(in srgb, #F8F6EE 88%, transparent); padding: 3px 8px; border-radius: 99px; }
.thread-t { margin-top: 12px; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.2; color: var(--ink); letter-spacing: -.005em; }
.about .thread-d { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: none; }

/* projects: case-study cards */
.marquee { overflow: hidden; margin: 0 0 clamp(20px, 3vw, 32px); border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 0; width: max-content; }
.marquee-track span { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding: 12px 22px; white-space: nowrap; }
.marquee-track span::after { content: "●"; color: var(--red); margin-left: 44px; font-size: 7px; vertical-align: 2px; }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.proj { position: relative; display: flex; flex-direction: column; background: var(--surface); color: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow);
  transform-style: preserve-3d; will-change: transform; transition: transform .25s var(--ease), box-shadow .35s var(--ease), border-color .25s; }
.proj:hover, .proj:focus-within { border-color: var(--rule-strong); box-shadow: 0 1px 2px rgba(23, 34, 59, .06), 0 22px 44px -20px rgba(23, 34, 59, .34); }
.proj--lead { grid-column: 1 / -1; flex-direction: row; }
.p-media { position: relative; overflow: hidden; background: var(--tile-bg); aspect-ratio: 3 / 2; }
.proj--lead .p-media { flex: 0 0 52%; aspect-ratio: auto; min-height: 340px; }
.p-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.proj:hover .p-media > img { transform: scale(1.04); }
.p-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 60%); mix-blend-mode: soft-light; }
.proj:hover .p-glow { opacity: 1; }
.mock { position: absolute; right: 6%; bottom: 8%; width: 62%; background: var(--navy); border-radius: 8px; overflow: hidden; box-shadow: 0 16px 36px -14px rgba(23, 34, 59, .5); transform: translateZ(30px) rotate(-1.5deg); transition: transform .5s var(--ease); }
.proj:hover .mock { transform: translateZ(30px) rotate(0) translateY(-4px); }
.mock-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--surface); }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); }
.mock-bar i:first-child { background: var(--red); }
.mock-bar span { margin-left: 8px; font: 500 9px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock img { display: block; width: 100%; height: auto; }
.p-body { padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; flex: 1; }
.p-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--muted); margin-bottom: 10px; }
.p-n { font-family: var(--serif); font-size: 2.6rem; line-height: .9; letter-spacing: -.02em; color: var(--red-ink); text-transform: none; }
.p-tag { color: var(--blue); }
.p-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.p-pitch { margin-top: 8px; font-size: 16.5px; font-weight: 500; color: var(--ink); }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.p-chips li { font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--blue); border: 1px solid var(--blue); padding: 3px 8px; border-radius: 99px; }
.p-more { margin-top: 16px; }
.p-more summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--blue); }
.p-more summary::-webkit-details-marker { display: none; }
.p-more summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; line-height: 1; transition: transform .3s var(--ease), background .2s, color .2s; }
.p-more[open] summary::before { transform: rotate(45deg); background: var(--red-tint); border-color: var(--red-ink); color: var(--red-ink); }
.p-sum-open, .p-more[open] .p-sum-closed { display: none; }
.p-more[open] .p-sum-open { display: inline; }
.p-points { margin-top: 12px; display: grid; gap: 10px; }
.p-points li { font-size: 15px; line-height: 1.55; padding-left: 16px; position: relative; }
.p-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--red); border-radius: 50%; }
.p-links { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 500 12.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--on-solid); background: var(--blue-solid); padding: 11px 16px; border: 1px solid var(--blue-solid); border-radius: var(--r-s); transition: background .2s, border-color .2s, color .2s; }
.btn .arr { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--rule-strong); }
.btn--ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.p-rel { margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.p-rel a { color: var(--blue); }
.proj a:focus-visible, .proj summary:focus-visible { outline-color: var(--focus); }

@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
  .js .proj.rv { transition-delay: calc(var(--i, 0) * 120ms); }
  .js .proj.rv .p-media { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease) calc(var(--i, 0) * 120ms + 150ms); }
  .js .proj.rv.in .p-media { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) { .proj, .p-media > img, .mock { transition: none !important; transform: none !important; } .marquee-track { width: auto; flex-wrap: wrap; } }
@media (hover: none), (pointer: coarse) { .proj { transform: none !important; } }

/* timeline */
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.timeline li:first-child { padding-top: 0; }
.timeline-date { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 5px; }
.timeline-role { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; color: var(--ink); }
.timeline-org { font-weight: 500; font-size: 15px; color: var(--blue); margin-top: 2px; }
.timeline-desc { font-size: 15.5px; margin-top: 6px; max-width: 62ch; }
.sub-h { color: var(--blue); font-weight: 500; font-size: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); margin: 40px 0 18px; }
.sub-h:first-child { margin-top: 0; }
.bullets { margin-top: 8px; display: grid; gap: 6px; max-width: 66ch; }
.bullets li { font-size: 15px; line-height: 1.55; padding-left: 16px; position: relative; display: block; border: 0; padding-top: 0; padding-bottom: 0; }
.bullets li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
.timeline .bullets li { grid-template-columns: none; }
/* banner + blue section */
.banner { margin-top: clamp(32px, 5vw, 56px); }
.banner img { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; }
.on-tint { position: relative; border-top: 1px solid var(--rule-strong); background: var(--blue-soft); box-shadow: 0 0 0 100vmax var(--blue-soft); clip-path: inset(0 -100vmax); margin-top: clamp(32px, 5vw, 56px); }

/* footer */
.site-footer { padding: 28px 0 44px; font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer a { color: var(--muted); }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .rv.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; max-width: 460px; }
  .sec-grid { grid-template-columns: minmax(0, 1fr); }
  .sec-head { position: static; }
  .site-header { position: static; }
  html { scroll-padding-top: 12px; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillar, .pillar + .pillar { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--rule-strong); }
  .pillar:last-child { border-bottom: 0; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about p { font-size: 17.5px; }
  .pub.has-thumb { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
  .pub-thumb { width: 112px; }
  .threads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .proj--lead { flex-direction: column; }
  .proj--lead .p-media { flex: none; aspect-ratio: 3 / 2; min-height: 0; }
  .proj { transform: none !important; }
  .news-list li, .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .news-date, .timeline-date { padding-top: 0; }
  .pub::before { display: none; }
}
@media (max-width: 440px) {
  .pub.has-thumb { grid-template-columns: minmax(0, 1fr); }
  .pub-thumb { width: 100%; max-width: 220px; margin-bottom: 12px; }
  .brand { font-size: 23px; }
  .site-nav { gap: 4px 16px; }
}

.affil { margin-top: 44px; color: var(--muted); }

@media (max-width: 440px) {
  .hero-art { max-width: none; }
  .hero { padding-top: 28px; }
}

/* projects span the full width; the heading sits above */
.on-tint .sec-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.on-tint .sec-head { position: static; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.on-tint .sec-head .mono { margin-bottom: 0; }
.on-tint .sec-head h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.site-footer .tri { margin-top: 18px; }
@media (min-width: 721px) { .proj--lead .p-media { flex-basis: 56%; min-height: 380px; } }
ol { margin: 0; padding: 0; list-style: none; }
.about p.about-where { font-size: 11.5px; line-height: 1.8; max-width: none; letter-spacing: .08em; }

/* generated art: calm the brightness a touch in the dark themes */
.hero-art img, .thread-fig img, .p-media > img { filter: var(--art-filter); }
.thread-n { color: var(--tile-ink); }

/* =====================================================================
   Round 5: structural Minimal / Expanded split
   ===================================================================== */
.view-minimal, .view-expanded { display: block; }
html[data-view="minimal"] .view-expanded { display: none; }
html[data-view="expanded"] .view-minimal, html:not([data-view]) .view-minimal { display: none; }
html[data-view="minimal"] .site-nav, html[data-view="minimal"] .tri { display: none; }
html[data-view="minimal"] .site-header { position: static; background: none; border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-view="minimal"] .site-header .wrap { max-width: calc(800px + var(--gutter) * 2); min-height: 0; padding-top: 34px; padding-bottom: 8px; }
.brand { font-size: 22px; font-weight: 400; letter-spacing: 0; }
.seg { border: 0; padding: 0; gap: 4px; }
.seg button { font: 400 14px var(--sans); letter-spacing: 0; text-transform: none; padding: 4px 6px; min-height: 0; border-radius: 0; border-bottom: 1px solid transparent; }
.seg button[aria-pressed="true"] { background: none; color: var(--ink); border-bottom-color: var(--ink); }
.site-nav a { font: 400 14px var(--sans); letter-spacing: 0; text-transform: none; }
.theme-btn { width: 28px; height: 28px; border: 0; }
.site-footer .tri { display: none; }

/* ---- Minimal page: text only ---- */
.view-minimal { max-width: calc(800px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.view-minimal h1, .view-minimal h2, .view-minimal h3 { font-weight: 400; }
.m-hero { padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 52px); }
.m-hero h1 { font-family: var(--serif); font-size: clamp(2.1rem, 4.6vw, 3.1rem); line-height: 1.15; letter-spacing: -.012em; color: var(--ink); max-width: 15em; text-wrap: balance; }
.m-hero h1 em { color: var(--blue); font-style: italic; }
.m-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(20px, 3.4vw, 40px); margin-top: clamp(32px, 5vw, 48px); }
.m-cols h2 { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); line-height: 1.3; }
.m-cols p { margin-top: 8px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.m-sec { border-top: 1px solid var(--rule); padding: clamp(28px, 4vw, 40px) 0 clamp(8px, 2vw, 16px); }
.m-h { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin-bottom: 16px; line-height: 1.3; }
.m-news { border-top: 1px solid var(--rule); }
.m-news li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.55; }
.m-date { font-size: 13px; color: var(--muted); padding-top: 2px; }
.m-more { margin: 18px 0 8px; font-size: 14.5px; }
.m-more a { text-decoration: none; border-bottom: 1px solid currentColor; }
.m-more a:hover { color: var(--red-ink); }
.m-work > li { padding: 20px 0; border-top: 1px solid var(--rule); }
.m-work > li:first-child { border-top: 0; padding-top: 4px; }
.m-tag { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; letter-spacing: .01em; }
.m-title { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.32; }
.m-title a { color: var(--blue); }
.m-title a:hover { color: var(--red-ink); }
.m-blurb { margin-top: 6px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.m-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; }
.m-about summary { cursor: pointer; font-size: 16px; color: var(--blue); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; list-style: none; padding: 4px 0; }
.m-about summary::-webkit-details-marker { display: none; }
.m-about summary::before { content: "▸"; display: inline-block; margin-right: 8px; font-size: 11px; transition: transform .2s var(--ease); }
.m-about details[open] summary::before { transform: rotate(90deg); }
.m-about-body { padding: 14px 0 6px; max-width: 62ch; }
.m-about-body p { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.m-about-body p + p { margin-top: 12px; }
.m-about-body .m-aside { font-size: 14.5px; color: var(--muted); }
.m-footer { border-top: 1px solid var(--rule); margin-top: 28px; padding: 26px 0 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13.5px; color: var(--muted); }
.m-flinks { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.m-footer a { color: var(--blue); }

/* ---- Expanded page ---- */
.hello { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 28px clamp(24px, 4vw, 48px); align-items: start; padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 44px); }
.hello .portrait { position: relative; }
.hello h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.15; color: var(--ink); letter-spacing: -.01em; }
.hello-sub { color: var(--muted); margin: 6px 0 14px; font-size: 11.5px; }
.hello-body p:not(.mono) { font-size: 17.5px; line-height: 1.65; max-width: 66ch; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 18px; font-size: 12.5px; letter-spacing: .02em; text-transform: none; }
.contact-row a { color: var(--blue); }
.r-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.r-lead h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.12; letter-spacing: -.012em; color: var(--ink); }
.r-lead h2 em { color: var(--blue); }
.r-lead p { margin-top: 16px; font-size: 17px; max-width: 46ch; }
.r-hero img, .contact-art img { width: 100%; height: auto; border-radius: var(--r-m); background: var(--tile-bg); box-shadow: 0 0 0 1px var(--rule); filter: var(--art-filter); }
.r-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(18px, 2.6vw, 34px); margin-top: clamp(32px, 5vw, 52px); padding-top: 26px; border-top: 1px solid var(--rule-strong); }
.r-three h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.25; color: var(--ink); margin: 6px 0 8px; }
.r-three p { font-size: 15px; line-height: 1.6; }
.r-three .mono { color: var(--muted); font-size: 11.5px; }
.r-three .mono b { color: var(--red-ink); font-weight: 500; margin-right: 6px; }
.r-three .r-kw { margin-top: 10px; font-size: 13px; color: var(--muted); }
.sec { padding: clamp(36px, 5vw, 60px) 0 clamp(40px, 6vw, 72px); }
.sec-head .mono { display: block; }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.6rem); color: var(--ink); line-height: 1.15; }
.contact-line { margin-top: 12px; font-size: 17.5px; max-width: 52ch; }
.contact-art { margin-top: 34px; }

/* ---- Playground ---- */
.play-sub { font-size: 17px; color: var(--ink-2); margin-bottom: 22px; }
.play-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.play-filter[hidden] { display: none; }
.play-filter button { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: none; border: 1px solid var(--rule-strong); border-radius: 99px; padding: 6px 14px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.play-filter button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.play-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.play-soon, .play-item { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.play-fig, .play-poster { position: relative; margin: 0; }
.play-fig img, .play-poster img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; filter: var(--art-filter); }
.play-meta { padding: 18px 22px 24px; }
.play-meta h3 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; color: var(--ink); line-height: 1.15; margin: 6px 0; }
.play-meta p:not(.play-tag) { font-size: 15.5px; line-height: 1.55; }
.play-tag { color: var(--blue); font-size: 11px; display: inline-flex; align-items: center; gap: 8px; }
.play-soon .play-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.play-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.play-tags li { font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--blue); border: 1px solid var(--rule-strong); padding: 3px 8px; border-radius: 99px; }
.play-item video, .play-item iframe { width: 100%; height: auto; max-height: min(80vh, 760px); display: block; border: 0; background: var(--navy); object-fit: contain; }
.play-item iframe { aspect-ratio: 16 / 9; }
.play-item[hidden], .play-soon[hidden] { display: none; }

/* ---- view switch transition ---- */
@media (prefers-reduced-motion: no-preference) {
  .view-minimal, .view-expanded { animation: viewIn .45s var(--ease) both; }
  @keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 960px) {
  .r-lead, .r-three, .hello, .play-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .m-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .m-news li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  html[data-view="minimal"] .site-header .wrap { padding-top: 22px; }
}
.threads-wrap { margin-top: clamp(36px, 5vw, 56px); }
.thread-t { margin-top: 12px; }
.thread-d { margin-top: 8px; }

/* =====================================================================
   Round 6: sub-pages, archive, slim Expanded
   ===================================================================== */
/* ---- sub-page chrome ---- */
.site-header.sub { position: static; background: none; border-bottom: 1px solid var(--rule); -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.sub .wrap { max-width: calc(840px + var(--gutter) * 2); min-height: 0; padding-top: 22px; padding-bottom: 14px; }
.site-header.sub .site-nav a[aria-current="page"] { color: var(--ink); background-size: 100% 1px; }
.site-footer.sub .wrap { max-width: calc(840px + var(--gutter) * 2); }
.page, .paper-page { max-width: calc(840px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.page-head { padding: clamp(36px, 6vw, 64px) 0 clamp(16px, 3vw, 28px); }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.15; letter-spacing: -.012em; color: var(--ink); }
.page-sub { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.page-news { margin-top: 8px; }
.page-news li { grid-template-columns: 110px minmax(0, 1fr); }

/* ---- archive ---- */
.a-jump { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; font-size: 14.5px; }
.a-n { font: 500 11px var(--mono); color: var(--muted); margin-left: 4px; letter-spacing: .04em; }
.a-controls { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 18px 0; margin-bottom: 10px; display: grid; gap: 14px; }
.a-controls[hidden] { display: none; }
.a-search input { width: 100%; font: 400 16px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-s); padding: 11px 14px; }
.a-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.a-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.a-chips-l { color: var(--muted); font-size: 11px; margin-right: 6px; }
.a-chips button { font: 500 12.5px var(--sans); color: var(--blue); background: none; border: 1px solid var(--rule-strong); border-radius: 99px; padding: 5px 12px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.a-chips button:hover { border-color: var(--blue); }
.a-chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.a-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.a-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); }
.a-toggle input { accent-color: var(--blue-solid); width: 16px; height: 16px; }
.a-count { font-size: 13.5px; }
.a-section { padding-top: 26px; }
.a-section[hidden], .a-group[hidden], .a-item[hidden], .a-empty[hidden] { display: none; }
.a-h { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; color: var(--ink); line-height: 1.2; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); }
.a-sub { margin: 26px 0 0; color: var(--blue); font-size: 12px; font-weight: 500; letter-spacing: .1em; }
.a-item { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.a-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.3; }
.a-title a { color: var(--ink); text-decoration-color: var(--rule-strong); }
.a-title a:hover { color: var(--blue); text-decoration-color: var(--red-ink); }
.a-item .pub-authors { margin-top: 6px; font-size: 15px; }
.a-item .pub-venue { font-size: 14px; }
.a-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.a-tags li { font: 500 11.5px var(--sans); color: var(--muted); background: var(--blue-soft); padding: 2px 9px; border-radius: 99px; }
.a-sum { display: block; margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 70ch; padding-left: 12px; border-left: 2px solid var(--rule); }
.a-sum .mono { display: block; color: var(--muted); font-size: 10.5px; margin-bottom: 2px; }
.js .a-sum { display: none; }
.js.show-sum .a-sum { display: block; }
.a-empty { padding: 36px 0; color: var(--muted); }
.pub-id { font: 500 11px var(--mono); color: var(--muted); letter-spacing: .06em; margin-right: 2px; }

/* ---- playground page ---- */
.play-page .page-head { text-align: left; }
.play-page .play-grid { margin-top: 8px; }
.play-page .play-meta h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; color: var(--ink); line-height: 1.15; margin: 6px 0; }
.play-page .play-fig img { aspect-ratio: 3 / 2; }
.play-back { margin-top: 34px; font-size: 14.5px; }
@media (prefers-reduced-motion: no-preference) {
  .play-soon .play-fig img { animation: drift 9s ease-in-out infinite alternate; }
  .play-soon:nth-child(2) .play-fig img { animation-delay: -4s; }
  @keyframes drift { from { transform: scale(1) translateY(0); } to { transform: scale(1.04) translateY(-4px); } }
  .play-fig { overflow: hidden; }
}

/* ---- paper detail pages ---- */
.paper-page { max-width: calc(760px + var(--gutter) * 2); }
.paper-back { margin: 28px 0 18px; font-size: 14px; }
.paper-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.22; color: var(--ink); margin: 8px 0 10px; letter-spacing: -.01em; }
.paper-page .pub-authors { font-size: 16px; margin-top: 6px; }
.paper-page .pub-venue { font-size: 14.5px; }
.paper-page .pub-links { margin-top: 12px; }
.paper-page h2 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; color: var(--ink); margin: 30px 0 8px; padding-top: 18px; border-top: 1px solid var(--rule); }
.paper-fig { margin: 22px 0 0; }
.paper-fig img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--r-s); background: #fff; }
.paper-abstract { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.paper-bibtex { font: 400 13px/1.6 var(--mono); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-s); padding: 14px 16px; overflow-x: auto; color: var(--ink-2); }

/* ---- slim Expanded ---- */
.hello { padding: clamp(28px, 4vw, 44px) 0 clamp(20px, 3vw, 30px); }
.hello-body p:not(.mono) { font-size: 17px; max-width: 62ch; }
.sec { padding: clamp(28px, 4vw, 44px) 0 clamp(30px, 4vw, 48px); }
.sec-grid { grid-template-columns: 150px minmax(0, 1fr); gap: 12px clamp(20px, 4vw, 48px); }
.s-h { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.2; color: var(--ink); margin-bottom: 18px; }
.r-lead { align-items: center; gap: clamp(16px, 3vw, 36px); }
.r-lead h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.r-lead p { margin-top: 12px; font-size: 16px; }
.threads { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px clamp(14px, 2vw, 24px); margin-top: clamp(24px, 3vw, 34px); }
.thread-t { font-size: 1.08rem; margin-top: 10px; }
.thread-d { font-size: 14px; line-height: 1.5; margin-top: 4px; color: var(--ink-2); }
.thread-fig img { aspect-ratio: 3 / 2; }
.sel-pubs > li { padding: 14px 0; border-top: 1px solid var(--rule); }
.sel-pubs > li:first-child { border-top: 0; padding-top: 0; }
.sp-tag { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.sp-title { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.3; }
.sp-title a { color: var(--blue); }
.sp-title a:hover { color: var(--red-ink); }
.sp-auth { font-size: 14px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.sel-pubs .m-links { margin-top: 6px; }
.sel-more { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; font-size: 14.5px; }
.projects2 { display: grid; gap: 18px; }
.proj2 { display: grid; grid-template-columns: 250px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); }
.p2-media { margin: 0; position: relative; background: var(--tile-bg); min-height: 100%; }
.p2-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--art-filter); }
.p2-body { padding: 18px 22px 20px; min-width: 0; }
.proj2 .p-meta { margin-bottom: 6px; }
.proj2 .p-n { font-size: 1.6rem; }
.proj2 .p-title { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.proj2 .p-pitch { font-size: 15.5px; margin-top: 4px; }
.proj2 .p-chips { margin-top: 10px; }
.proj2 .p-more { margin-top: 10px; }
.proj2 .p-links { padding-top: 14px; margin-top: 0; }
.proj2 .btn { padding: 8px 13px; font-size: 12px; }
.proj2 .p-rel { margin-top: 10px; }
.e-list > li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--rule); }
.e-list > li:first-child { border-top: 0; padding-top: 4px; }
.e-date { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding-top: 4px; }
.e-role { font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; color: var(--ink); }
.e-org { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.e-muted { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.e-more { margin-top: 4px; }
.e-more summary { cursor: pointer; list-style: none; font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue); display: inline-block; }
.e-more summary::-webkit-details-marker { display: none; }
.e-more summary::before { content: "+ "; }
.e-more[open] summary::before { content: "– "; }
.e-o, .e-more[open] .e-c { display: none; }
.e-more[open] .e-o { display: inline; }
.e-desc { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.e-more .bullets { margin-top: 6px; }
.contact .s-h { margin-bottom: 8px; }
.contact-line { margin-top: 0; font-size: 16.5px; }
.sub-h { margin: 24px 0 8px; padding-bottom: 8px; }
.sub-h:first-of-type { margin-top: 0; }
@media (max-width: 960px) {
  .sec-grid { grid-template-columns: minmax(0, 1fr); }
  .threads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj2 { grid-template-columns: minmax(0, 1fr); }
  .p2-media { aspect-ratio: 16 / 7; min-height: 0; }
}
@media (max-width: 560px) {
  .threads { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .e-list > li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .page-news li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .site-header.sub .wrap { padding-top: 16px; }
  .site-header.sub .site-nav { gap: 4px 16px; }
}

/* ---- Playground: videos intro + credits (round 7) ---- */
.vid-intro { margin: 4px 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.vid-intro h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ink); line-height: 1.2; }
.vid-lead { margin-top: 8px; font-size: 17px; max-width: 62ch; color: var(--ink-2); }
.credits { margin-top: 16px; max-width: 62ch; border-top: 1px solid var(--rule); }
.credits > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 18px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.credits dt { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue); padding-top: 3px; }
.credits dd { margin: 0; color: var(--ink-2); }
.play-credit { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .credits > div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
/* no-JS safe: a "coming soon" tile never shows after a real item of the same kind */
.play-item[data-kind="video"] ~ .play-soon[data-kind="video"], .play-item[data-kind="game"] ~ .play-soon[data-kind="game"] { display: none; }
