/* ------------------------------------------------------------------
   Palette: viridis, the colour scale of every attention map and heatmap.
   Dark (violet end) is the default; light flips to a pale lavender page.
   ------------------------------------------------------------------ */
:root {
  --violet: #440154;
  --blue: #3b528b;
  --teal: #21918c;
  --green: #5ec962;
  --yellow: #fde725;

  --bg: #f5f2fa;
  --bg-2: #ebe4f4;
  --bg-code: #efe9f7;
  --ink: #1e0b33;
  --ink-2: #4f4366;
  --ink-3: #7a6e92;
  --rule: rgba(30, 11, 51, 0.14);
  --link-line: var(--teal);
  --link-hover: var(--blue);
  --focus: var(--blue);
  --accent: var(--ink);
  --on-hot: #1a0b2e;

  --t-interpretability: #c4a000;
  --t-reasoning: #2e9e4a;
  --t-models: #1b7f79;
  --t-generative: #9b3fb0;
  --t-systems: #3b528b;

  --ui: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --read: "Newsreader", "Iowan Old Style", Georgia, serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

/* Dark: the violet end of viridis. Only when the reader picks it. */
:root[data-theme="dark"] {
  --bg: #1a0b2e;
  --bg-2: #24133d;
  --bg-code: #12061f;
  --ink: #ece6f5;
  --ink-2: #b9aecf;
  --ink-3: #8b7fa6;
  --rule: rgba(236, 230, 245, 0.13);
  --link-line: var(--green);
  --link-hover: var(--yellow);
  --focus: var(--yellow);
  --accent: var(--yellow);
  --t-interpretability: #fde725;
  --t-reasoning: #5ec962;
  --t-models: #2fb8aa;
  --t-generative: #d17ce0;
  --t-systems: #7c9bea;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--ui); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--yellow); color: #1a0b2e; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: var(--gutter); top: -3rem; background: var(--yellow); color: #1a0b2e; padding: .5rem .8rem; border-radius: 6px; z-index: 10; }
.skip-link:focus { top: .75rem; }
.sep { margin: 0 .45em; color: var(--ink-3); }

.topic-dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--ink-3); flex: none; }
[data-topic="interpretability"].topic-dot { background: var(--t-interpretability); }
[data-topic="reasoning"].topic-dot { background: var(--t-reasoning); }
[data-topic="models"].topic-dot { background: var(--t-models); }
[data-topic="generative"].topic-dot { background: var(--t-generative); }
[data-topic="systems"].topic-dot { background: var(--t-systems); }

.link-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.link-row a { font-weight: 500; }

/* ------------------------------------------------------------------ masthead + footer */
.masthead {
  max-width: var(--wrap); margin: 0 auto; padding: 1.4rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.masthead-name { font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: -0.01em; }
.masthead-nav { display: flex; align-items: center; gap: .25rem 1.25rem; flex-wrap: wrap; }
.masthead-nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.masthead-nav a:hover, .masthead-nav a[aria-current] { color: var(--ink); }
.theme-toggle {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: transparent; border: 1px solid var(--rule); color: var(--ink-2); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }

.colophon { border-top: 1px solid var(--rule); margin-top: 6rem; }
.colophon-inner { max-width: var(--wrap); margin: 0 auto; padding: 3.5rem var(--gutter) 4rem; display: grid; gap: 1.75rem; }
.colophon-ask { font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.3; max-width: 32ch; font-weight: 500; letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ hero: statement + album covers in CLIP space */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) 1rem;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.hero-text { padding-top: clamp(0rem, 3vw, 2.5rem); }
.hero-line { font-size: clamp(2.1rem, 3.7vw, 3.2rem); font-weight: 750; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.hero-bio { font-family: var(--read); font-size: 1.22rem; line-height: 1.5; color: var(--ink-2); margin: 1.6rem 0 1.5rem; max-width: 34em; }
.hero-bio a { color: var(--ink); }

.covers { margin: 0; background: var(--bg-2); border-radius: 18px; padding: 1rem 1rem 1.15rem; }
.covers-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .15rem .25rem .85rem; }
.covers-h { font-size: 1rem; font-weight: 650; letter-spacing: -0.005em; }
.covers-tools { display: flex; gap: .5rem; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 99px; padding: 2px; }
.seg button, .covers-shuffle {
  border: 0; background: transparent; padding: .32rem .75rem; border-radius: 99px; font-size: .85rem; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.covers-shuffle { border: 1px solid var(--rule); color: var(--ink); }
.covers-shuffle:hover, .seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"]:hover { color: var(--bg); }

.covers-body { position: relative; }
.covers-stage { position: relative; height: clamp(320px, 42vw, 470px); border-radius: 12px; overflow: hidden;
  background-image: radial-gradient(circle, var(--rule) 1px, transparent 1.2px); background-size: 22px 22px; }
.covers-edges { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--ink-3); pointer-events: none; }
.cover {
  position: absolute; left: 0; top: 0; width: var(--tile, 96px); height: var(--tile, 96px); padding: 0; border: 0;
  border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--bg);
  box-shadow: 0 1px 2px rgba(30, 11, 51, .18), 0 6px 18px -8px rgba(30, 11, 51, .45);
  transition: transform .75s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, filter .3s ease, box-shadow .2s ease;
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover:hover, .cover.is-peek { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--ink); z-index: 2; }
.cover.is-query { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 6px var(--ink); z-index: 3; }
.has-query .cover:not(.is-query) { opacity: calc(.25 + .75 * var(--sim, 1)); filter: saturate(calc(.2 + .8 * var(--sim, 1))); }
.has-query .cover[data-sim]::after {
  content: attr(data-sim); position: absolute; right: 4px; bottom: 4px; padding: .05rem .35rem; border-radius: 5px;
  background: rgba(20, 8, 36, .78); color: #fff; font: 600 .72rem/1.4 var(--ui); font-variant-numeric: tabular-nums;
}

.covers-matrix { display: none; }
.is-matrix .covers-stage { visibility: hidden; }
.is-matrix .covers-matrix { display: grid; place-items: center; position: absolute; inset: 0; }
.mx { display: grid; grid-template-columns: repeat(calc(var(--k) + 1), 1fr); gap: 2px; width: min(100%, 470px); aspect-ratio: 1; }
.mx-head { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.mx-cell { border-radius: 3px; cursor: pointer; }
.mx-cell.is-self { opacity: .35; }
.has-query .mx-cell:not(.is-on) { opacity: .28; }
.mx-cell:hover { outline: 2px solid var(--ink); outline-offset: 1px; }

.covers-panel { min-height: 9.5rem; padding: 1rem .35rem 0; font-size: .92rem; }
.covers-lede { color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.covers-title { font-weight: 650; font-size: 1.05rem; }
.covers-artist { color: var(--ink-2); }
.covers-sees { color: var(--ink-3); margin-top: .3rem; }
.covers-q { display: grid; grid-template-columns: 3.4rem 1fr; gap: .85rem; align-items: center; }
.covers-q img { width: 3.4rem; height: 3.4rem; border-radius: 6px; object-fit: cover; }
.covers-sub { color: var(--ink-3); margin: .9rem 0 .45rem; }
.covers-nn { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.covers-nn li { display: grid; grid-template-columns: 1.6rem minmax(0, 11em) 1fr 2.4em; gap: .6rem; align-items: center; }
.covers-nn img { width: 1.6rem; height: 1.6rem; border-radius: 3px; object-fit: cover; }
.nn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-bar { height: .45rem; background: var(--rule); border-radius: 99px; overflow: hidden; }
.nn-bar span { display: block; height: 100%; border-radius: 99px; }
.nn-s { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.covers-foot { margin-top: .8rem; font-weight: 500; }

/* ------------------------------------------------------------------ section bands */
.band { max-width: var(--wrap); margin: 0 auto; padding: 5.5rem var(--gutter) 0; }
.band-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem 3rem; align-items: baseline; padding-top: 1.25rem; border-top: 1px solid var(--rule); margin-bottom: 2.5rem; }
.band-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 750; letter-spacing: -0.025em; }
.band-head p { color: var(--ink-2); max-width: 54ch; font-size: 1.05rem; }

/* ------------------------------------------------------------------ writing: post map + list */
.writing { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.post-map { margin: 0; position: sticky; top: 1.5rem; background: var(--bg-2); border-radius: 16px; padding: 1rem; }
.post-map-svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-grid line { stroke: var(--rule); stroke-width: .6; }
.map-blob { opacity: .08; transition: opacity .2s; }
.map-edges line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 4; opacity: .55; }
.map-label { font: 600 15px var(--ui); letter-spacing: .01em; transition: opacity .2s; }
.map-dot { stroke: var(--bg-2); stroke-width: 2; cursor: pointer; transition: opacity .2s, stroke .15s; }
.map-dot.is-lit { stroke: var(--ink); stroke-width: 2.5; }
.map-blob[data-topic="interpretability"], .map-dot[data-topic="interpretability"] { fill: var(--t-interpretability); }
.map-blob[data-topic="reasoning"], .map-dot[data-topic="reasoning"] { fill: var(--t-reasoning); }
.map-blob[data-topic="models"], .map-dot[data-topic="models"] { fill: var(--t-models); }
.map-blob[data-topic="generative"], .map-dot[data-topic="generative"] { fill: var(--t-generative); }
.map-blob[data-topic="systems"], .map-dot[data-topic="systems"] { fill: var(--t-systems); }
.map-label[data-topic="interpretability"] { fill: var(--t-interpretability); }
.map-label[data-topic="reasoning"] { fill: var(--t-reasoning); }
.map-label[data-topic="models"] { fill: var(--t-models); }
.map-label[data-topic="generative"] { fill: var(--t-generative); }
.map-label[data-topic="systems"] { fill: var(--t-systems); }
.map-dot.is-dim, .map-label.is-dim { opacity: .18; }
.map-blob.is-dim { opacity: .03; }
.map-tag rect { fill: var(--ink); }
.map-tag text { fill: var(--bg); font: 600 15px var(--ui); }
.post-map:has(.topic-key[aria-pressed="true"]) .map-edges { opacity: .3; }

.topic-keys { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.topic-key {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; font-size: .85rem; font-weight: 500;
  border: 1px solid var(--rule); border-radius: 99px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.topic-key:hover { color: var(--ink); border-color: var(--ink-3); }
.topic-key[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.post-row { border-bottom: 1px solid var(--rule); }
.post-row a { display: grid; gap: .3rem; padding: 1.1rem .9rem 1.2rem; text-decoration: none; border-radius: 10px; margin: 2px -.9rem; transition: background-color .15s; }
.post-row.is-lit a, .post-row a:hover { background: var(--bg-2); color: inherit; box-shadow: inset 3px 0 0 var(--tc, var(--ink-3)); }
.post-row[data-topic="interpretability"] { --tc: var(--t-interpretability); }
.post-row[data-topic="reasoning"] { --tc: var(--t-reasoning); }
.post-row[data-topic="models"] { --tc: var(--t-models); }
.post-row[data-topic="generative"] { --tc: var(--t-generative); }
.post-row[data-topic="systems"] { --tc: var(--t-systems); }
.post-row-meta { display: flex; align-items: center; gap: .5rem; color: var(--ink-3); font-size: .85rem; }
.post-row-meta .sep { margin: 0 .05em; }
.post-row-title { font-size: 1.2rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.post-row-dek { color: var(--ink-2); font-family: var(--read); font-size: 1.05rem; line-height: 1.45; }

/* ------------------------------------------------------------------ research */
.paper { max-width: 48rem; }
.paper-venue { color: var(--ink-3); font-size: .9rem; margin-bottom: .6rem; }
.paper-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: .6rem; }
.paper-title a { text-decoration: none; }
.paper-title a:hover { text-decoration: underline; text-decoration-color: var(--link-line); }
.paper-authors { color: var(--ink-2); margin-bottom: 1.25rem; }
.paper-authors strong { color: var(--ink); font-weight: 650; }
.paper-summary { font-family: var(--read); font-size: 1.2rem; line-height: 1.55; margin-bottom: 1.5rem; }
.paper-shift { display: grid; gap: .5rem; margin-bottom: 1.5rem; max-width: 34rem; font-size: .9rem; }
.shift-row { display: grid; grid-template-columns: 5.5rem 1fr 3.5rem; gap: .9rem; align-items: center; color: var(--ink-2); }
.shift-bar { height: .7rem; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.shift-bar span { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--teal); border-radius: 99px; }
.shift-row + .shift-row .shift-bar span { background: var(--t-interpretability); }
.shift-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.paper-links { display: flex; gap: 1.25rem; font-weight: 500; }

/* ------------------------------------------------------------------ work: training run */
.run-svg { display: block; width: 100%; height: auto; overflow: visible; }
.run-axis line { stroke: var(--rule); stroke-width: 1; }
.run-axis text { fill: var(--ink-3); font: 500 14px var(--ui); font-variant-numeric: tabular-nums; }
.run-ylabel { font-style: italic; }
.run-axis .run-year-now { fill: var(--ink); font-weight: 600; }
.run-area { fill: var(--ink); opacity: .035; }
.run-curve { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.run-guide { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; }
.run-hit { fill: transparent; cursor: pointer; }
.run-dot { fill: var(--ink); stroke: var(--bg); stroke-width: 2.5; pointer-events: none; transition: r .15s; }
.run-mark.is-study .run-dot { fill: var(--bg); stroke: var(--ink); stroke-width: 2; }
.run-mark.is-on .run-dot { r: 8.5px; fill: var(--accent); stroke: var(--bg); stroke-width: 3; }

.run-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: .4rem; }
.run-steps button {
  width: 100%; height: 100%; text-align: left; display: grid; gap: .15rem; align-content: start;
  padding: .7rem .8rem; border: 0; border-top: 2px solid var(--rule); background: transparent; cursor: pointer; border-radius: 0 0 8px 8px;
}
.run-steps button:hover { background: var(--bg-2); }
.run-steps button[aria-selected="true"] { border-top-color: var(--accent); background: var(--bg-2); }
.run-step-org { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.run-step-when { color: var(--ink-3); font-size: .8rem; }

.run-panel { margin-top: 1.75rem; max-width: 48rem; border-radius: 8px; }
.run-log h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; }
.run-log-org { color: var(--ink-2); margin: .25rem 0 1rem; }
.run-log ul { margin: 0; padding-left: 1.1rem; font-family: var(--read); font-size: 1.15rem; line-height: 1.5; display: grid; gap: .35rem; }
.run-log li::marker { color: var(--ink-3); }

/* ------------------------------------------------------------------ post page */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 20; pointer-events: none; }
.read-progress span { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--blue), var(--teal), var(--green), var(--yellow)); }

.essay { max-width: var(--wrap); margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 0; }
.essay-head, .essay-foot { max-width: 44rem; margin-left: calc(220px + 4rem); }
.essay-meta { display: flex; align-items: center; gap: .5rem; color: var(--ink-3); font-size: .9rem; margin-bottom: 1rem; }
.essay-meta .sep { margin: 0 .1em; }
.essay-title { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.essay-dek { margin-top: 1.1rem; font-family: var(--read); font-style: italic; font-size: 1.35rem; line-height: 1.45; color: var(--ink-2); }
.essay-grid { display: grid; grid-template-columns: 220px minmax(0, 44rem); gap: 4rem; margin-top: 3rem; }
.essay-toc { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow: auto; font-size: .85rem; padding-right: .25rem; }
.essay-toc-label { color: var(--ink-3); margin-bottom: .6rem; font-weight: 500; }
.essay-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.essay-toc li a { display: block; padding: .3rem 0 .3rem .85rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.35; }
.essay-toc li.toc-d1 a { padding-left: 1.6rem; }
.essay-toc li.toc-d2 a { padding-left: 2.3rem; }
.essay-toc li a:hover { color: var(--ink); }
.essay-toc li a[aria-current] { color: var(--ink); border-left-color: var(--accent); }

.prose { font-family: var(--read); font-size: 1.2rem; line-height: 1.68; min-width: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--ui); letter-spacing: -0.015em; scroll-margin-top: 1.5rem; }
.prose h1 { font-size: 1.75rem; font-weight: 750; margin-top: 2.4em; }
.prose h2 { font-size: 1.45rem; font-weight: 700; margin-top: 2.1em; }
.prose h3 { font-size: 1.2rem; font-weight: 650; margin-top: 1.8em; }
.prose h1 + *, .prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { font-weight: 600; }
.prose img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
.prose p:has(> img) em, .prose center + em, .prose p > img + em, .prose figcaption { display: block; margin-top: .6rem; text-align: center; font-family: var(--ui); font-style: normal; font-size: .85rem; color: var(--ink-3); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin-left: 0; padding-left: 1.2rem; border-left: 3px solid var(--green); color: var(--ink-2); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3em 0; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82em; background: var(--bg-2); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--bg-code); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.15rem; overflow-x: auto; font-size: .95rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: .82em; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: .9rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--rule); }
.prose mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; padding: .25rem 0; }

/* Rouge syntax colours, drawn from the same palette */
.highlight .c, .highlight .c1, .highlight .cm { color: var(--ink-3); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kc, .highlight .ow { color: var(--t-generative); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sd { color: var(--t-reasoning); }
.highlight .m, .highlight .mi, .highlight .mf { color: var(--t-interpretability); }
.highlight .nf, .highlight .fm, .highlight .nc { color: var(--t-systems); }
.highlight .nb, .highlight .bp { color: var(--t-models); }

.essay-foot { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--ink-2); }
.essay-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.essay-pager a { display: grid; gap: .25rem; text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.3; }
.essay-pager a span { color: var(--ink-3); font-weight: 400; font-size: .85rem; }
.essay-pager a:hover { color: var(--link-hover); }
.pager-next { grid-column: 2; text-align: right; }

/* ------------------------------------------------------------------ plain pages (about, archive, resume) */
.plain-page { max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 0; }
.plain-title { font-size: clamp(2.1rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1.5rem; }
.plain-page .lede { font-family: var(--read); font-size: 1.3rem; line-height: 1.55; color: var(--ink-2); }
.plain-page .lede + .lede { margin-top: 1rem; }
.plain-page h2 { font-size: 1.35rem; font-weight: 700; margin: 3rem 0 1rem; }

.likes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.likes li { margin: 0; }
.likes figure { margin: 0; }
.likes img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.likes figcaption { font-size: .85rem; color: var(--ink-3); margin-top: .35rem; }

.archive-year { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.archive-year h2 { margin: 0; font-size: 1rem; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.archive-year ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.archive-year a { text-decoration: none; font-weight: 600; font-size: 1.1rem; line-height: 1.3; display: inline-flex; gap: .55rem; align-items: baseline; }
.archive-year a:hover { text-decoration: underline; text-decoration-color: var(--link-line); }
.archive-year time { display: block; color: var(--ink-3); font-size: .85rem; margin-top: .15rem; }

.resume-actions { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; font-weight: 500; }
.resume-frame { width: 100%; height: min(1100px, 85vh); border: 1px solid var(--rule); border-radius: 10px; background: #fff; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .essay-head, .essay-foot { margin-left: 0; }
  .essay-grid { grid-template-columns: minmax(0, 44rem); }
  .essay-toc { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .writing { grid-template-columns: minmax(0, 1fr); }
  .post-map { position: static; }
  .band-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .masthead-nav { gap: .25rem 1rem; font-size: .95rem; }
  .hero-bio { font-size: 1.15rem; }
  .covers { margin: 0 calc(var(--gutter) * -0.5); padding: .75rem .6rem 1rem; }
  .covers-stage { height: 360px; }
  .prose { font-size: 1.12rem; }
  .likes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .essay-pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; text-align: left; }
  .run-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-axis text { font-size: 30px; }
  .run-axis .run-year-odd { display: none; }
  .archive-year { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ------------------------------------------------------------------ 404 */
.unk-token {
  display: inline-block; margin-bottom: 1.25rem; padding: .1em .35em; border-radius: .12em;
  font-size: clamp(3.5rem, 12vw, 7rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
  background: var(--yellow); color: #1a0b2e; box-shadow: inset 0 -0.06em 0 rgba(26, 11, 46, .25);
}
