/* =========================================================================
   Editorial layer — section patterns for Home, Projects, Notes and case pages.
   Structure only: colours, type and tokens come from styles.css.
   Layout rules (adapted, not copied): split rows, ruled lists, ledgers,
   one figure per project, scannable note index. See DESIGN.md.
   ========================================================================= */

/* ---------- shared: heading on the left, "see all" on the right --------- */
.split-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.split-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); max-width: 22ch; }
.split-head .text-link { white-space: nowrap; }
.mono-meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mono-meta .accent { color: var(--primary-ink); }
.section.tight { padding: 72px 0; }

/* ---------- home: affiliations strip ----------------------------------- */
.affiliations { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 26px 0; }
.affiliations .wrap { display: flex; align-items: baseline; gap: 14px 34px; flex-wrap: wrap; justify-content: center; }
.affiliations .mono-meta { margin-right: 6px; }
.affiliations span.place { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }

/* ---------- home: research questions as a ruled list -------------------- */
.questions { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.questions .q-intro h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
.questions .q-intro p { margin-top: 20px; max-width: 42ch; line-height: 1.7; }
.q-list { display: grid; }
.q-item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px 24px; padding: 26px 0 28px; border-top: 2px solid var(--ink); }
.q-item + .q-item { border-top-width: 1px; border-top-color: var(--hairline); }
.q-item h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; color: var(--ink); }
.q-item p { grid-column: 2; line-height: 1.68; max-width: 58ch; }
.q-item .text-link { grid-column: 2; justify-self: start; font-size: 0.95rem; }

/* ---------- home: method as four ruled steps (a real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; counter-reset: step; }
.step { border-top: 1px solid var(--hairline); padding-top: 18px; }
.step .mono-meta { color: var(--primary-ink); }
.step h3 { margin-top: 14px; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.2; color: var(--ink); }
.step p { margin-top: 10px; font-size: 0.97rem; line-height: 1.6; }

/* ---------- home: selected work as ruled rows ---------------------------- */
.work-rows { border-top: 1px solid var(--hairline); }
.work-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 24px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--hairline); position: relative; }
.work-row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; color: var(--ink); }
.work-row p { margin-top: 10px; line-height: 1.65; max-width: 60ch; }
.work-row .row-link { justify-self: end; color: var(--primary-ink); text-decoration: underline; text-underline-offset: 4px; }
.work-row .row-link::after { content: ""; position: absolute; inset: 0; }         /* whole row is the link target */
.work-row:hover h3 { color: var(--primary-ink); }
.work-row h3 { transition: color 160ms var(--ease-out); }

/* ---------- home: evidence ledger ---------------------------------------- */
.ledger { border-top: 2px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--hairline); align-items: baseline; }
.ledger-row h3 { font-family: var(--sans); font-weight: 500; font-size: 1.02rem; color: var(--ink); }
.ledger-row .ctx { margin-top: 6px; font-size: 0.95rem; color: var(--muted); line-height: 1.55; max-width: 52ch; }
.ledger-row .val { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.15; color: var(--ink); }
.ledger-row .val small { display: block; margin-top: 8px; font-family: var(--sans); font-size: 0.88rem; color: var(--muted); line-height: 1.55; max-width: 46ch; }   /* caveats are sentences: body face, readable size */
.ledger-note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); max-width: 70ch; }

/* ---------- home: closing row ------------------------------------------- */
.closing { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--hairline); padding-top: 40px; }
.closing h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.12; color: var(--ink); max-width: 22ch; }
.closing p { margin-top: 10px; color: var(--body); max-width: 52ch; }

/* ---------- projects: featured split rows -------------------------------- */
.proj-stack { display: grid; gap: clamp(72px, 9vw, 120px); }
.proj-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; scroll-margin-top: 110px; }
.proj-feature.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }   /* figure keeps the wide column */
.proj-feature.reverse .proj-text { order: 2; }
.proj-feature h2 { margin-top: 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.proj-feature .overview { margin-top: 18px; line-height: 1.72; max-width: 52ch; }
.proj-feature .figure-frame { margin: 0; }
.proj-feature .figure-frame a { display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 24px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: 6px; font-size: 0.95rem; line-height: 1.5; color: var(--ink); }
.proj-feature .boundary { margin-top: 18px; font-size: 0.9rem; line-height: 1.6; color: var(--muted); max-width: 54ch; }
.proj-feature .text-link { display: inline-block; margin-top: 20px; }

.earlier { border-top: 2px solid var(--ink); }
.earlier-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--hairline); scroll-margin-top: 110px; }
.earlier-row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; color: var(--ink); }
.earlier-row p { margin-top: 8px; line-height: 1.68; max-width: 64ch; }
.earlier-row .by { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }

/* ---------- notes: scannable index + essays ------------------------------ */
.note-index { border-top: 2px solid var(--ink); margin-bottom: 40px; }
.note-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 7fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--hairline); position: relative; align-items: baseline; }
.note-row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2.1vw, 1.65rem); line-height: 1.2; color: var(--ink); transition: color 160ms var(--ease-out); }
.note-row h3 a::after { content: ""; position: absolute; inset: 0; }             /* whole row clickable via the title link */
.note-row:hover h3 { color: var(--primary-ink); }
.note-row p { margin-top: 6px; line-height: 1.6; color: var(--body); max-width: 62ch; }
.note-essay .note-meta { display: flex; gap: 10px 22px; flex-wrap: wrap; }
.note-essay { max-width: 800px; }
.note-essay h2 { margin-top: 14px; }
.note-essay .back { display: inline-block; margin-left: 18px; color: var(--muted); font-size: 0.9rem; }

/* ---------- case pages: labelled facts under the title ------------------- */
.page-hero .facts { max-width: 820px; margin-top: 30px; }

/* ---------- responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .questions, .proj-feature { grid-template-columns: 1fr; }
  .proj-feature.reverse { grid-template-columns: 1fr; }
  .proj-feature.reverse .proj-text { order: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .work-row { grid-template-columns: 1fr; gap: 8px; }
  .work-row .row-link { justify-self: start; }
  .ledger-row, .earlier-row { grid-template-columns: 1fr; gap: 10px; }
  .note-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .q-item { grid-template-columns: 1fr; }
  .q-item p, .q-item .text-link { grid-column: 1; }
  .steps { grid-template-columns: 1fr; }
  .affiliations .wrap { justify-content: flex-start; }
}

/* =========================================================================
   Showcase — how the illustration is built: a tinted stage, a real UI window
   with browser chrome, an overlapping second window, and floating HTML cards
   that carry the facts (so numbers stay selectable, accurate and accessible).
   ========================================================================= */
.showcase {
  position: relative; aspect-ratio: 16 / 11; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: var(--sc-bg); border: 1px solid var(--hairline);
}
.showcase::after {                       /* paper grain over the stage, under nothing interactive */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.showcase--helix  { --sc-bg: radial-gradient(120% 90% at 85% 10%, #3b3f8f 0%, #1c1b33 42%, #121118 100%); --win-bar: #1d1c26; --win-ink: #b7b5c8; }
.showcase--kronos { --sc-bg: radial-gradient(120% 90% at 15% 0%, #f6e7dc 0%, #ecd3c2 55%, #e2c2ae 100%); --win-bar: #f4efe7; --win-ink: #65635d; }
.showcase--cfps   { --sc-bg: radial-gradient(120% 90% at 80% 0%, #e8f1ec 0%, #d4e6dd 55%, #c3dbcf 100%); --win-bar: #f4efe7; --win-ink: #65635d; }

.win {
  position: absolute; border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 24px 60px -24px rgba(10,10,20,0.55), 0 2px 8px rgba(10,10,20,0.12);
}
.win-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: var(--win-bar); font-family: var(--mono); font-size: 10.5px; color: var(--win-ink); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9d4cb; flex: none; }
.showcase--helix .win-bar i { background: #3a3947; }
.win-bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; }
.win img { display: block; width: 100%; height: calc(100% - 28px); object-fit: cover; object-position: top left; }
.win--main { left: 6%; top: 9%; width: 80%; height: 76%; }
.win--sub  { right: 4%; bottom: 7%; width: 42%; height: 42%; }
.win--doc img { object-fit: contain; object-position: center; background: #faf9f5; }

.float-card {
  position: absolute; z-index: 2; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--canvas) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); box-shadow: 0 18px 40px -20px rgba(10,10,20,0.45);
  font-size: 12.5px; line-height: 1.4; color: var(--body); max-width: 250px;
}
.float-card .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.float-card .v { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; color: var(--ink); }
.float-card.at-bl { left: 3.5%; bottom: 5%; }
.float-card.at-tr { right: 3.5%; top: 6%; }
.float-card.at-br { right: 3.5%; bottom: 5%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-s { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em; padding: 4px 8px; border-radius: 999px; border: 1px solid currentColor; }
.chip-s.pass { color: #2a6e4c; } .chip-s.fail { color: #a2402a; } .chip-s.note { color: var(--muted); }
.chip-s.ta { color: var(--primary-ink); } .chip-s.tb { color: #2a6e60; }
/* dark theme: the card turns dark, so the chip inks lighten (all ≥ 7:1 on the composited card) */
[data-theme="dark"] .chip-s.pass { color: #7cc9a0; }
[data-theme="dark"] .chip-s.fail { color: #ec907a; }
[data-theme="dark"] .chip-s.tb { color: #7cc6b4; }
.showcase-cap { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.showcase-cap a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; }
.proj-feature .showcase-wrap > a { display: block; border-radius: 22px; }
.showcase-wrap a:focus-visible { outline-offset: 4px; }

/* home: selected work as visual cards (image, then title, text, link) */
.work-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work-card { position: relative; display: flex; flex-direction: column; }
.work-card .showcase { aspect-ratio: 4 / 3; }
.work-card .showcase .win--main { left: 7%; top: 11%; width: 86%; height: 82%; }
.work-card .mono-meta { margin-top: 18px; }
.work-card h3 { margin-top: 8px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.15; color: var(--ink); transition: color 160ms var(--ease-out); }
.work-card p { margin-top: 8px; line-height: 1.6; font-size: 0.97rem; }
.work-card h3 a::after { content: ""; position: absolute; inset: 0; }           /* whole card clickable via the title */
.work-card:hover h3 { color: var(--primary-ink); }
.work-card .showcase .win { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .work-card:hover .showcase .win--main { transform: translateY(-4px); } }

/* projects: earlier research as square tiles */
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tile-card img { display: block; width: 100%; aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--hairline); }
.tile-card .mono-meta { display: block; margin-top: 16px; }
.tile-card h3 { margin-top: 8px; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.2; color: var(--ink); }
.tile-card p { margin-top: 8px; font-size: 0.95rem; line-height: 1.6; }
.tile-card .by { margin-top: 8px; font-size: 0.86rem; color: var(--muted); }

@media (max-width: 900px) {
  .work-cards { grid-template-columns: 1fr; gap: 44px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .showcase { aspect-ratio: 4 / 3.4; }
  .win--main { left: 5%; top: 7%; width: 90%; height: 70%; }
  .win--sub { display: none; }
  .float-card { display: none; }   /* phones: the figure stays readable; the same facts are in the text beside it */
  .tile-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   HOME — Harvey formula. Painterly textured stages; flat UI crops that bleed
   off the bottom-right edge (no window chrome, no chips); a ruled explorer
   list that swaps the image beside it; a dark band for the numbers.
   ========================================================================= */
.tex { position: relative; overflow: hidden; background-color: #1d201e; background-size: cover; background-position: center; isolation: isolate; }
.tex::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(160deg, rgba(8,9,8,0.42) 0%, rgba(8,9,8,0.04) 48%, rgba(8,9,8,0.18) 100%); }   /* scrim: legible copy top-left, texture shows elsewhere */
.tex--moss  { background-image: url("../../output/visualizations/texture_moss.svg"); }
.tex--stone { background-image: url("../../output/visualizations/texture_stone.svg"); background-color: #2a2622; }
.tex--ink   { background-image: url("../../output/visualizations/texture_ink.svg"); background-color: #15171c; }
.tex > * { position: relative; z-index: 1; }
.bleed { position: absolute; z-index: 1; display: block; border-radius: 10px 0 0 0; object-fit: cover; object-position: top left; background: #faf9f5; }

/* research-training wall */
.affil-wall { padding: 64px 0 56px; text-align: center; }
.affil-wall h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--ink); }
.affil-wall .names { margin-top: 30px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 24px; align-items: center; }
.affil-wall .names span { font-family: var(--serif); font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); }

/* explorer: ruled list left, textured stage right; one item open at a time */
.explorer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.explorer h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 36px; }
.ex-item { border-top: 1px solid var(--hairline); padding: 18px 0 20px; }
.ex-item.is-active { border-top: 2px solid var(--ink); }
.ex-item button { all: unset; cursor: pointer; display: flex; gap: 14px; align-items: baseline; width: 100%; font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; color: var(--muted); transition: color 160ms var(--ease-out); }
.ex-item button:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.ex-item button .mono-meta { flex: none; width: 7.5rem; }
.ex-item.is-active button, .ex-item button:hover { color: var(--ink); }
.ex-body { padding: 10px 0 0 calc(7.5rem + 14px); }
.ex-body p { line-height: 1.65; max-width: 48ch; }
.ex-body .text-link { display: inline-block; margin-top: 10px; font-size: 0.95rem; }
.js .ex-item:not(.is-active) .ex-body { display: none; }
.ex-stage { aspect-ratio: 4 / 3.1; border-radius: 16px; position: sticky; top: 110px; }
.ex-stage .bleed { left: 9%; top: 12%; width: 104%; height: 100%; opacity: 0; transition: opacity 220ms var(--ease-out); }
.ex-stage .bleed.is-active { opacity: 1; }
.ex-stage .bleed.fit { object-fit: contain; object-position: left top; }
.ex-cap { position: absolute; left: 22px; top: 16px; z-index: 2; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(250,249,245,0.8); }

/* selected work: textured cards, copy top-left, UI crop bleeding bottom-right */
.tcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tcard { border-radius: 16px; min-height: 560px; padding: clamp(24px, 3vw, 36px); color: rgba(250,249,245,0.82); }
.tcard.wide { grid-column: 1 / -1; min-height: 480px; }
.tcard .copy { max-width: 360px; }
.tcard h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; color: #faf9f5; }
.tcard p { margin-top: 12px; line-height: 1.6; font-size: 0.98rem; }
.tcard .mono-meta { color: rgba(250,249,245,0.7); }
.btn-outline { display: inline-flex; margin-top: 20px; padding: 9px 16px; border-radius: 6px; border: 1px solid rgba(250,249,245,0.7); color: #faf9f5; font-size: 0.9rem; transition: background-color 160ms var(--ease-out); }
.btn-outline:hover { background: rgba(250,249,245,0.12); }
.btn-outline:active { transform: scale(0.97); }
.tcard .bleed { left: 14%; top: 57%; width: 90%; height: 54%; }   /* below the copy, bleeding off the corner */
.tcard.wide .bleed { left: 40%; top: 14%; width: 64%; height: 96%; }
.tcard .bleed.fit { object-fit: contain; object-position: left top; }

/* evidence: a dark band with a large-number ledger */
.band-dark {
  --ink: #f3efe5; --body: #c8c3b8; --muted: #a39e92; --hairline: rgba(243,239,229,0.16); --primary-ink: #e0906f;
  background: #121110; color: var(--body); padding: 110px 0;
}
.band-dark .split-head h2 { color: var(--ink); }
.band-dark .ledger { border-top: 1px solid rgba(243,239,229,0.5); }
.band-dark .ledger-row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); padding: 34px 0; }
.band-dark .ledger-row .val { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.02em; }
.band-dark .ledger-row .val small { font-size: 0.9rem; margin-top: 14px; }
.band-dark .ledger-note { color: var(--muted); }
.band-dark + .footer { margin-top: 0; border-top: 1px solid rgba(243,239,229,0.1); }   /* dark band flows into the dark footer */

/* =========================================================================
   NOTES — ElevenLabs formula. Topic pills; one featured two-column card;
   a grid of square covers (blurred grainy colour + a thin white motif + a short
   wordmark) with title and "Topic · date" below. Note pages open with labelled
   facts, and the cover returns wide after the lead paragraph.
   ========================================================================= */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 34px; }
.pill { font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.pill:hover { color: var(--ink); }
.pill[aria-pressed="true"] { color: var(--ink); background: var(--canvas); border-color: var(--hairline); box-shadow: 0 1px 2px rgba(20,20,19,0.06); }
.pill .n { margin-left: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.cover { position: relative; overflow: hidden; isolation: isolate; border-radius: 12px; aspect-ratio: 1; background: var(--c0); }
.cover .blob { position: absolute; border-radius: 50%; filter: blur(42px); }
.cover .blob:nth-child(1) { width: 75%; height: 75%; left: -12%; top: -10%; background: var(--c1); }
.cover .blob:nth-child(2) { width: 70%; height: 70%; right: -15%; bottom: -18%; background: var(--c2); }
.cover .blob:nth-child(3) { width: 45%; height: 45%; left: 40%; top: 30%; background: var(--c3); opacity: 0.85; }
.cover::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.55; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cover .motif { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; fill: none; stroke: rgba(255,255,255,0.72); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.cover .word { position: absolute; z-index: 3; left: 0; right: 0; bottom: 9%; text-align: center; font-family: var(--sans); font-weight: 500; font-size: clamp(1rem, 1.8vw, 1.35rem); letter-spacing: -0.01em; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.18); }
.cover.wide { aspect-ratio: 21 / 9; margin: 28px 0 6px; }
.cover.wide .word { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }

.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 16px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.ncard { position: relative; }
.ncard h3 { margin: 18px 10px 0; font-family: var(--sans); font-weight: 500; font-size: 1.15rem; line-height: 1.35; color: var(--ink); transition: color 160ms var(--ease-out); }
.ncard h3 a::after { content: ""; position: absolute; inset: 0; }                /* whole card clickable via the title */
.ncard .meta { margin: 8px 10px 0; font-size: 13px; color: var(--muted); }
.ncard .meta b { font-weight: 500; color: var(--ink); margin-right: 8px; }
.ncard p { margin: 8px 10px 0; font-size: 0.93rem; line-height: 1.55; color: var(--body); }
.ncard:hover h3 { color: var(--primary-ink); }
.ncard .cover .blob { transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ncard:hover .cover .blob:nth-child(1) { transform: translate(6%, 4%) scale(1.05); } }
.ncard.featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; }
.ncard.featured .f-text { padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; }
.ncard.featured h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; }
.ncard.featured .meta, .ncard.featured p { margin-left: 0; margin-right: 0; }
.ncard.featured p { font-size: 1.02rem; margin-top: 14px; max-width: 44ch; }
.ncard.featured .cover { border-radius: 0; aspect-ratio: auto; min-height: 100%; }
.ncard[hidden] { display: none; }

.note-facts { display: flex; flex-wrap: wrap; gap: 14px 48px; margin-top: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
.note-facts div { display: grid; gap: 4px; }
.note-facts dt { font-size: 12px; color: var(--muted); }
.note-facts dd { font-size: 0.95rem; color: var(--ink); }

@media (max-width: 900px) {
  .explorer, .tcards { grid-template-columns: 1fr; }
  .ex-stage { position: relative; top: 0; }
  .tcard, .tcard.wide { min-height: 420px; }
  .tcard .bleed, .tcard.wide .bleed { left: 12%; top: 46%; width: 96%; height: 70%; }
  .affil-wall .names { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ncard.featured { grid-template-columns: 1fr; }
  .ncard.featured .cover { aspect-ratio: 16 / 10; }
  .band-dark .ledger-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .note-grid { grid-template-columns: 1fr; gap: 40px; }
  .affil-wall .names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-item button .mono-meta { display: none; }
  .ex-body { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ex-stage .bleed, .ncard .cover .blob { transition: none; }
}

/* =========================================================================
   RESEARCH — Harvey formula: split rows, textured stage with a bleeding figure,
   alternating sides; teaching in the dark band.
   ========================================================================= */
.rstack { display: grid; gap: clamp(72px, 9vw, 120px); }
.rrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; scroll-margin-top: 110px; }
.rrow.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.rrow.reverse .rtext { order: 2; }
.rrow h2 { margin-top: 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
.rrow .rtext > p { margin-top: 16px; line-height: 1.72; max-width: 54ch; }
.rrow .boundary { font-size: 0.9rem; color: var(--muted); }
.rrow .text-link { display: inline-block; margin-top: 18px; }
.rstage { aspect-ratio: 4 / 3.1; border-radius: 16px; }
.rstage .bleed { left: 9%; top: 15%; width: 100%; height: 100%; }
.rstage .bleed.fit { object-fit: contain; object-position: left top; background: transparent; }
.rstage img[src*="schematic_"] { width: 72%; height: auto; top: 16%; left: 14%; border-radius: 16px; }

/* =========================================================================
   ABOUT — ElevenLabs formula: bio with an at-a-glance aside; the path as a
   featured card plus square covers; training as labelled facts.
   ========================================================================= */
.about-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.about-intro .about-body p { margin-top: 0; margin-bottom: 18px; line-height: 1.75; max-width: 62ch; }
.interests { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 22px; }
.chip-i { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--ink); background: var(--surface-soft); }
.glance { position: sticky; top: 110px; padding: 22px 24px; border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface-soft); }
.glance .facts { grid-template-columns: 1fr; border-top: 0; margin-top: 12px; padding-top: 0; gap: 14px; }
.path-grid .ncard.static h3 { cursor: default; }
.path-grid .ncard.static:hover h3 { color: var(--ink); }

@media (max-width: 900px) {
  .rrow, .rrow.reverse, .about-intro { grid-template-columns: 1fr; }
  .rrow.reverse .rtext { order: 0; }
  .glance { position: static; }
}
