/* Jake Reid — field notes
   Look: the "Illusion" text effect (grainy black, white core, lime top glow, teal underglow).
   Single dark look on purpose. Every colour lives in the tokens below. */

:root {
  color-scheme: dark;

  --ground: #0a0a0a;
  --ground-2: #121212;
  --line: #232323;
  --ink: #fafafa;
  --text: #cfcfcf;
  --muted: #8a8a8a;

  /* monochrome: the old accent names now map to white and greys */
  --lime: #ffffff;
  --citron: #e8e8e8;
  --mint: #bdbdbd;
  --teal: #5c5c5c;
  --teal-deep: #2e2e2e;

  --f-display: "Geist", "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Geist", "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-sans: "Geist", "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-label: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-wordmark: "Rubik", "Arial Black", "Helvetica Neue", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 66ch;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

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

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-inline: var(--gutter);
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.75 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain over everything, like the template */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* soft ambient halo behind the top of the page */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 38% at 50% 30%, rgba(255, 255, 255, .06), transparent 70%);
}

img { max-width: 100%; height: auto; }
::selection { background: var(--ink); color: var(--ground); }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 3px;
}

.wrap { max-width: 1180px; margin-inline: auto; }

.label {
  font: 500 .72rem/1.3 var(--f-label);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.label b { font-weight: 700; }

/* ─── top bar ─────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font: 600 1.02rem/1 var(--f-display);
  letter-spacing: -.02em;
}
.brand-place { color: var(--muted); }
.nav { display: flex; gap: clamp(.9rem, 3vw, 2rem); }
.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color .35s var(--ease), text-shadow .35s var(--ease);
}
.nav a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .brand-place { display: none; }
}

/* ─── hero ────────────────────────────────────────── */

.hero {
  display: grid;
  justify-items: center;
  gap: clamp(1.5rem, 4vw, 2.8rem);
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}
.hero-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .35rem .7rem;
  margin: 0;
  padding: .45rem .95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
}
.hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
}
.hero-kicker .serif { font: 500 .9rem/1.2 var(--f-sans); color: var(--ink); letter-spacing: -.01em; }
.hero-kicker .label { color: var(--muted); }
.hero-kicker .label b { color: var(--text); font-weight: 500; }

.hero-dek {
  max-width: 34rem;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  text-wrap: balance;
}
.hero-dek a { text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: .2em; }

/* ─── the illusion wordmark ───────────────────────── */

.illusion {
  --mx: 0;
  --my: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .26em;
  margin: 0;
  padding-block: .2em;
  font: 900 clamp(2.6rem, 11.2vw, 10rem)/.88 var(--f-wordmark);
  letter-spacing: -.012em;
  text-transform: uppercase;
  color: var(--ink);
  user-select: none;
}
/* before JS splits the letters (or without JS): a static glow */
.illusion:not(.is-split) {
  text-shadow:
    0 -.07em .09em rgba(255, 255, 255, .75),
    0 .08em .1em rgba(120, 120, 120, .9),
    0 0 .02em var(--ink);
}
.il-word { display: inline-flex; white-space: nowrap; }
.il-l {
  --sk: 0deg;
  --z: 1;
  --d: 0s;
  position: relative;
  display: inline-block;
  isolation: isolate;
  transform: skewX(calc(var(--sk) * .22));
  text-shadow: 0 0 .015em var(--ink), 0 0 .035em rgba(238, 239, 234, .7), 0 0 .09em rgba(238, 239, 234, .22);
}
.il-l::before,
.il-l::after {
  content: attr(data-c);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  transform-origin: 50% 60%;
  translate: calc(var(--mx) * -.045em * var(--z)) calc(var(--my) * -.035em * var(--z));
  will-change: transform, translate;
}
.il-l::before {
  background-image: linear-gradient(180deg, var(--lime) 6%, var(--citron) 34%, var(--mint) 66%, var(--teal) 100%);
  filter: blur(.055em);
  transform: translateY(-.13em) scale(1.02, 1.12) skewX(var(--sk));
  animation: glow-top 6.5s ease-in-out var(--d) infinite alternate;
}
.il-l::after {
  background-image: linear-gradient(180deg, var(--mint) 0%, var(--teal) 55%, var(--teal-deep) 100%);
  filter: blur(.05em);
  opacity: .95;
  transform: translateY(.12em) scale(1.01, 1.06) skewX(calc(var(--sk) * -.6));
  animation: glow-bottom 7.5s ease-in-out var(--d) infinite alternate;
}
@keyframes glow-top {
  from { transform: translateY(-.11em) scale(1.02, 1.1) skewX(var(--sk)); }
  to   { transform: translateY(-.155em) scale(1.03, 1.16) skewX(calc(var(--sk) * 1.5)); }
}
@keyframes glow-bottom {
  from { transform: translateY(.1em) scale(1.01, 1.05) skewX(calc(var(--sk) * -.5)); }
  to   { transform: translateY(.145em) scale(1.02, 1.09) skewX(calc(var(--sk) * -1.1)); }
}

/* the load moment: the wordmark pulls into focus */
.illusion.is-split { animation: focus-pull 2s var(--ease) both; }
@keyframes focus-pull {
  from { filter: blur(22px); opacity: .45; letter-spacing: .1em; transform: scale(1.05); }
  to   { filter: blur(0); opacity: 1; letter-spacing: -.012em; transform: none; }
}

/* ─── topic filters: a pill bar with a glowing thumb that slides to the active topic ── */

.filters {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .25rem;
  max-width: 100%;
  margin-top: clamp(.25rem, 2vw, 1.25rem);
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(29, 31, 28, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 24px 60px -34px rgba(0, 0, 0, .9);
}
.filter-thumb {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 6px 20px -8px rgba(255, 255, 255, .35);
  pointer-events: none;
}
.filters.is-ready .filter-thumb {
  transition: transform .55s var(--ease), width .55s var(--ease), height .55s var(--ease);
}
.filters button {
  position: relative;
  z-index: 1;
  flex: none;
  appearance: none;
  border: 0;
  background: none;
  padding: .72rem 1.15rem .68rem;
  border-radius: 999px;
  color: var(--muted);
  font: 500 .74rem/1 var(--f-label);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color .35s var(--ease), background-color .35s var(--ease);
}
.filters button b { font-weight: 700; color: var(--text); transition: color .35s var(--ease); }
.filters button:hover { color: var(--ink); background-color: rgba(255, 255, 255, .04); }
.filters button:hover b { color: var(--ink); }
.filters button[aria-pressed="true"],
.filters button[aria-pressed="true"] b { color: var(--ground); background-color: transparent; }
.filters button:focus-visible { outline-offset: 1px; }
/* before the script places the thumb (or without scripts) the active pill still reads */
.filters:not(.is-ready) button[aria-pressed="true"] {
  background-color: var(--ink);
  color: var(--ground);
}

@media (max-width: 700px) {
  .filters { border-radius: 1.6rem; }
  .filters button { padding: .66rem .95rem .62rem; }
}

/* ─── post index ──────────────────────────────────── */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.section-head h2 { margin: 0; color: var(--ink); }
.section-head .count { color: var(--muted); font-variant-numeric: tabular-nums; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1rem;
  margin: 0;
  color: var(--muted);
  font: 500 .72rem/1.4 var(--f-label);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.meta .cat { color: var(--ink); font-weight: 600; }

.glow-title {
  transition: text-shadow .6s var(--ease), color .6s var(--ease);
}
a:hover .glow-title,
a:focus-visible .glow-title {
  color: #fff;
  opacity: .82;
}

/* featured (latest) post */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  text-decoration: none;
  color: inherit;
}
.feature-copy { display: grid; gap: 1rem; }
.feature h3 {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(2rem, 4.4vw, 3.3rem)/1.06 var(--f-serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.feature p.excerpt { margin: 0; max-width: 36rem; }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink);
  font: 500 .75rem/1 var(--f-label);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.read-more .arrow { transition: transform .5s var(--ease); }
a:hover .read-more .arrow { transform: translateX(.35rem); }

@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature .tag-stage { order: -1; }
}

/* list of older posts */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .5rem 2rem;
  padding-block: 1.6rem;
  text-decoration: none;
  color: inherit;
}
.post-row time {
  color: var(--muted);
  font: 500 .72rem/1.4 var(--f-label);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.post-row h3 {
  margin: 0 0 .35rem;
  color: var(--ink);
  font: 600 clamp(1.25rem, 2.1vw, 1.6rem)/1.2 var(--f-serif);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.post-row p { margin: 0; color: var(--text); max-width: 44rem; font-size: 1.02rem; }
.post-row .row-side { display: grid; justify-items: end; gap: .4rem; text-align: right; }
.post-row .arrow {
  color: var(--muted);
  font-size: 1.3rem;
  transition: transform .5s var(--ease), color .5s var(--ease);
}
.post-row:hover .arrow { transform: translateX(.35rem); color: var(--ink); }

@media (max-width: 720px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row .row-side { justify-items: start; text-align: left; grid-auto-flow: column; gap: 1rem; }
  .post-row .arrow { display: none; }
}

.empty { color: var(--muted); padding-block: 1.5rem; }

/* ─── about ───────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
}
.about-kicker { margin: 0; color: var(--muted); }

/* the photo: framed like the tag stage, with the wordmark's lime/teal glow on its edges */
.portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--ground-2);
  box-shadow:
    0 30px 80px -30px rgba(255, 255, 255, .12),
    0 20px 50px rgba(0, 0, 0, .6);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 1.4s var(--ease);
}
.portrait:hover img { transform: scale(1.025); }
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, transparent 72%, rgba(22, 23, 21, .35));
}
.about h2 {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(1.8rem, 3.4vw, 2.6rem)/1.1 var(--f-serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.about-body { display: grid; gap: 1.1rem; max-width: var(--measure); }
.about-body p { margin: 0; }
.links { display: grid; gap: 0; margin: .6rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.links li { border-bottom: 1px solid var(--line); }
.links a, .links span.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .8rem;
  text-decoration: none;
}
.links .k { color: var(--muted); }
.links .v { color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.links a:hover .v { color: #fff; text-decoration: underline; text-underline-offset: .25em; }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 26rem; }
}

/* author line under each post's intro */
.byline {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
  color: var(--muted);
}
.byline img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: grayscale(1);
}
.byline b { color: var(--ink); font-weight: 700; }

/* ─── footer ──────────────────────────────────────── */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem 2rem;
  padding-block: 2rem 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ─── lamacoid tag illustration ───────────────────── */

.tag-stage {
  display: grid;
  place-items: center;
  gap: 1.4rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1rem;
  border-radius: 14px;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(255, 255, 255, .05), transparent 70%),
    var(--ground-2);
  border: 1px solid var(--line);
}
.lamacoid {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .35em;
  width: min(100%, 22rem);
  padding: 1.1em 2.6em;
  border-radius: 7px;
  background: linear-gradient(180deg, #232422 0%, #121312 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    inset 0 -1px 0 rgba(0, 0, 0, .6),
    0 18px 40px rgba(0, 0, 0, .55),
    0 2px 4px rgba(0, 0, 0, .5);
  font-family: var(--f-sans);
  text-transform: uppercase;
  color: #f3f3ee;
  transform: rotate(-2deg);
  transition: transform .8s var(--ease);
}
.lamacoid.is-red { background: linear-gradient(180deg, #b3261e 0%, #8e1c16 100%); transform: rotate(1.5deg); }
a:hover .lamacoid, .tag-stage:hover .lamacoid { transform: rotate(0deg) translateY(-3px); }
.lamacoid::before,
.lamacoid::after {
  content: "";
  position: absolute;
  top: 50%;
  width: .62em;
  height: .62em;
  margin-top: -.31em;
  border-radius: 50%;
  background: var(--ground-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .06);
}
.lamacoid::before { left: .95em; }
.lamacoid::after { right: .95em; }
.engr {
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1;
  letter-spacing: .07em;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .75), 0 1px 0 rgba(255, 255, 255, .12);
}
.engr.small { font-weight: 500; font-size: clamp(.78rem, 1.4vw, .92rem); letter-spacing: .12em; }

/* the tired sticker for comparison */
.sticker {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .35em;
  width: min(100%, 22rem);
  padding: 1.1em 1.6em;
  background: linear-gradient(170deg, #e9e3cf 0%, #d8d0b6 100%);
  color: #6f6b60;
  font-family: var(--f-sans);
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 91% 100%, 0 100%);
  transform: rotate(2.5deg);
}
.sticker::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 9%;
  height: 28%;
  background: linear-gradient(225deg, #bdb599 0%, #f1ecd9 60%);
  clip-path: polygon(0 100%, 100% 0, 0 0);
  box-shadow: -2px -2px 6px rgba(0, 0, 0, .35);
}
.sticker span { filter: blur(.6px); opacity: .7; letter-spacing: .05em; font-weight: 600; }
.sticker .small { font-size: .8rem; opacity: .45; }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.compare figure,
.prose .compare figure { margin: 0; display: grid; justify-items: center; gap: .9rem; }
.compare figcaption { text-align: center; color: var(--muted); }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }

/* ─── article pages ───────────────────────────────── */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 2px;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--ink);
}

.post-head {
  display: grid;
  gap: 1.3rem;
  max-width: 58rem;
  margin-inline: auto;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.8rem, 4vw, 3rem);
}
.back {
  justify-self: start;
  color: var(--muted);
  text-decoration: none;
  transition: color .35s var(--ease);
}
.back:hover { color: var(--ink); }
.post-head h1 {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(2.2rem, 5.4vw, 4rem)/1.05 var(--f-serif);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.post-head .dek {
  margin: 0;
  max-width: 44rem;
  color: var(--text);
  font: 400 clamp(1.2rem, 2vw, 1.45rem)/1.45 var(--f-sans);
  text-wrap: pretty;
}

.prose {
  max-width: var(--measure);
  margin-inline: auto;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose li { text-wrap: pretty; }
.prose h2 {
  margin-top: 2.2em;
  color: var(--ink);
  font: 600 clamp(1.4rem, 2.5vw, 1.8rem)/1.2 var(--f-serif);
  letter-spacing: -.03em;
  text-wrap: balance;
}
.prose h2 + * { margin-top: .7em; }
.prose h3 {
  margin-top: 1.8em;
  color: var(--ink);
  font: 500 .78rem/1.4 var(--f-label);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .35);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: text-decoration-color .3s var(--ease), text-decoration-thickness .3s var(--ease);
}
.prose a:hover { text-decoration-color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--muted); font-family: var(--f-label); font-size: .85em; }

.prose blockquote {
  margin: 2em 0;
  padding: 0;
  color: var(--ink);
  font: 500 clamp(1.25rem, 2.3vw, 1.6rem)/1.4 var(--f-serif);
  letter-spacing: -.02em;
  padding-left: 1.2rem;
  border-left: 1px solid var(--line);
  text-wrap: balance;
}
.prose blockquote p { margin: 0; }

.prose code {
  font: .88em/1.5 var(--f-mono);
  color: #e6e6e6;
  background: var(--ground-2);
  padding: .1em .35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.prose pre {
  overflow-x: auto;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ground-2);
}
.prose pre code { padding: 0; background: none; color: var(--text); font-size: .88rem; overflow-wrap: normal; }
.prose .pre-label { margin-bottom: -.5em; color: var(--muted); }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
  padding: .7rem .8rem .7rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose th {
  color: var(--muted);
  font: 500 .7rem/1.3 var(--f-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.prose td:first-child { color: var(--ink); }
.prose .good { color: #fff; }

.prose figure { margin: 2em 0; }
.prose figure > figcaption,
.prose .tag-stage + figcaption { margin-top: .8rem; color: var(--muted); font-size: .95rem; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  max-width: 58rem;
  margin-inline: auto;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
}
.post-nav a { display: grid; gap: .4rem; text-decoration: none; }
.post-nav a.next { text-align: right; grid-column: 2; }
.post-nav .t { color: var(--ink); font: 600 clamp(1.05rem, 1.9vw, 1.3rem)/1.3 var(--f-serif); letter-spacing: -.02em; text-wrap: balance; }
.post-nav .label { color: var(--muted); }
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a.next { grid-column: 1; text-align: left; }
}

/* ─── motion: smooth page changes and scroll-linked focus ── */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .38s var(--ease) both defocus-out; }
::view-transition-new(root) { animation: .55s var(--ease) both defocus-in; }
@keyframes defocus-out { to { opacity: 0; filter: blur(10px); } }
@keyframes defocus-in { from { opacity: 0; filter: blur(10px); } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: focus-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    @keyframes focus-in {
      from { opacity: .2; filter: blur(8px); translate: 0 1.4rem; }
      to   { opacity: 1; filter: blur(0); translate: 0 0; }
    }
  }
}

/* filtering the index: keep the page still, let the rows glide */
:root.vt-filter::view-transition-old(root),
:root.vt-filter::view-transition-new(root) { animation: none; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ─── loading screen: initials pull into focus, an engraving pass draws, the curtain lifts ── */

html.no-loader .loader { display: none; }
html.is-loading { overflow: hidden; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 99;               /* under the film grain (100) so the grain shows on it */
  display: grid;
  place-items: center;
  background:
    radial-gradient(40% 35% at 50% 46%, rgba(255, 255, 255, .05), transparent 70%),
    var(--ground);
  /* safety net: if the script never runs, the loader still gets out of the way */
  animation: loader-failsafe .01s 4s forwards;
}
.loader::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7) 50%, transparent);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.loader-inner {
  display: grid;
  justify-items: center;
  gap: 1.4rem;
  transition: transform .8s var(--ease), opacity .5s var(--ease), filter .6s var(--ease);
}
.loader-mark {
  --mx: 0;
  --my: 0;
  display: flex;
  gap: .02em;
  padding-block: .2em;
  font: 900 clamp(5rem, 20vw, 10rem)/.88 var(--f-wordmark);
  color: var(--ink);
  animation: loader-focus 1.1s var(--ease) both;
}
.loader-line {
  position: relative;
  width: min(15rem, 60vw);
  height: 2px;
  border-radius: 2px;
  background: rgba(238, 239, 234, .08);
}
.loader-line span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, .25), #fff);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: loader-engrave 1s .15s cubic-bezier(.6, .05, .25, 1) forwards;
}
.loader-line::after {        /* the spark at the tip of the cut */
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, .7);
  animation: loader-spark 1s .15s cubic-bezier(.6, .05, .25, 1) forwards;
}
.loader-label {
  margin: 0;
  color: var(--muted);
  font: 500 .72rem/1 var(--f-label);
  letter-spacing: .28em;
  text-transform: uppercase;
  animation: loader-label .9s .35s var(--ease) both;
}

@keyframes loader-focus {
  from { filter: blur(26px); opacity: .25; transform: scale(1.12); letter-spacing: .12em; }
  to   { filter: blur(0); opacity: 1; transform: none; letter-spacing: 0; }
}
@keyframes loader-engrave { to { transform: scaleX(1); } }
@keyframes loader-spark {
  0%   { left: 0; opacity: 0; }
  10%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes loader-label {
  from { opacity: 0; letter-spacing: .6em; }
  to   { opacity: 1; letter-spacing: .32em; }
}
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* exit: the content drifts up and blurs out, then the whole curtain lifts with a glowing edge */
html.loader-exit .loader {
  animation: loader-lift .85s .12s cubic-bezier(.7, 0, .2, 1) forwards;
}
html.loader-exit .loader::after { opacity: 1; }
html.loader-exit .loader-inner { transform: translateY(-2.5rem); opacity: 0; filter: blur(10px); }
@keyframes loader-lift { to { transform: translateY(-101%); } }

/* faint dot grid behind the top of the page */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -6rem;
  bottom: -1rem;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(55% 60% at 50% 42%, #000 10%, transparent 75%);
  mask-image: radial-gradient(55% 60% at 50% 42%, #000 10%, transparent 75%);
  pointer-events: none;
}
@media (max-width: 560px) {
  .hero-kicker .label { display: none; }
}

/* photos in black and white; colour comes back on hover */
.portrait img { filter: grayscale(1) contrast(1.05); transition: transform 1.4s var(--ease), filter .8s var(--ease); }
.portrait:hover img { filter: grayscale(0) contrast(1); }

/* a white/black plate instead of the red one */
.lamacoid.is-white {
  background: linear-gradient(180deg, #f5f5f2 0%, #d9d9d4 100%);
  color: #111;
  transform: rotate(1.5deg);
}
.lamacoid.is-white .engr { text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .25); }
.sticker { background: linear-gradient(170deg, #d8d8d4 0%, #bdbdb8 100%); color: #6d6d68; }
.sticker::after { background: linear-gradient(225deg, #a9a9a4 0%, #e9e9e5 60%); }

/* engraved tag text stays on one line in the wider typeface */
.engr {
  white-space: nowrap;
  font-weight: 600;
  font-size: clamp(.92rem, 1.8vw, 1.15rem);
  letter-spacing: .04em;
}
.engr.small { font-size: clamp(.66rem, 1.1vw, .76rem); letter-spacing: .1em; }
.lamacoid { padding-inline: 2.4em; }
.prose .compare figcaption.label { font-size: .68rem; }

/* ─── colour where it belongs: photos, plates and screenshots stay in full colour ── */
.portrait img, .portrait:hover img, .byline img, .author img { filter: none; }
.sticker { background: linear-gradient(170deg, #e9e3cf 0%, #d8d0b6 100%); color: #6f6b60; }
.sticker::after { background: linear-gradient(225deg, #bdb599 0%, #f1ecd9 60%); }

/* ─── article pages ───────────────────────────────── */

.post { max-width: 72rem; margin-inline: auto; }
.post-hero {
  display: grid;
  gap: 1.2rem;
  max-width: 54rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.8rem, 4vw, 2.6rem);
}
.crumbs { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; transition: color .3s var(--ease); }
.crumbs a:hover { color: var(--ink); }
.crumbs span:last-child { color: var(--ink); }
.post-hero h1 {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(2.4rem, 5.6vw, 4.4rem)/1.03 var(--f-display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.post-hero .dek {
  margin: 0;
  max-width: 44rem;
  color: var(--text);
  font: 400 clamp(1.1rem, 1.8vw, 1.3rem)/1.55 var(--f-sans);
  text-wrap: pretty;
}
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.2rem;
  margin-top: .6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.author { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.author b { display: block; color: var(--ink); font: 600 .98rem/1.25 var(--f-sans); }
.author small { display: block; color: var(--muted); font-size: .85rem; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.8rem; margin: 0; padding: 0; list-style: none; color: var(--ink); }
.facts li { display: grid; gap: .3rem; }
.facts span { color: var(--muted); }
.copy-link {
  margin-left: auto;
  appearance: none;
  padding: .62rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.copy-link:hover { background: rgba(255, 255, 255, .06); border-color: #3a3a3a; }
.copy-link.is-done { background: var(--ink); color: var(--ground); border-color: var(--ink); }
@media (max-width: 640px) { .copy-link { margin-left: 0; } }

.post-cover {
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--ground-2);
}
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-cover figcaption {
  padding: .8rem 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 .72rem/1.4 var(--f-label);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.post-body {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 44rem);
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.toc { position: sticky; top: 2rem; align-self: start; }
.toc .label { margin: 0 0 .9rem; color: var(--muted); }
.toc ol { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: .38rem 0 .38rem 1rem;
  border-left: 1px solid transparent;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--ink); }
@media (max-width: 1000px) {
  .post-body { grid-template-columns: minmax(0, 44rem); }
  .toc { display: none; }
}

.post .prose { max-width: none; margin: 0; padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.prose h2 { scroll-margin-top: 1.5rem; }
.prose figure { margin: 2.2em 0; }
.prose figure img,
.prose figure video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose figure video { background: #000; }
.prose figure > figcaption {
  margin-top: .75rem;
  color: var(--muted);
  font: 500 .72rem/1.45 var(--f-label);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.browser { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #111; }
.prose .browser img { border: 0; border-radius: 0; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: #151515; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #333; }
.browser-bar span {
  margin-left: .6rem;
  padding: .2rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ground);
  color: var(--muted);
  font: 500 .7rem/1.3 var(--f-label);
}
.prose .site-link a {
  display: inline-block;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 .75rem/1 var(--f-label);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.prose .site-link a:hover { background: rgba(255, 255, 255, .06); border-color: #3a3a3a; }

.prose figure.sheet { padding: clamp(1rem, 3vw, 2rem); border-radius: 12px; background: #fff; }
.prose .sheet img { border: 0; border-radius: 0; }
.prose .sheet > figcaption { color: #6b6b6b; }

.pinmap { display: grid; gap: .55rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ground-2); }
.wire { display: grid; grid-template-columns: 2.8rem 3.6rem 1fr; align-items: center; gap: .9rem; font: 500 .85rem/1.2 var(--f-label); }
.wire i { height: 6px; border-radius: 999px; background: var(--c); box-shadow: 0 0 12px -2px var(--c); }
.wire b { color: var(--ink); font-weight: 600; }
.wire span { color: var(--muted); }
.prose .pinmap > figcaption { margin-top: .4rem; font-family: var(--f-sans); font-size: .9rem; letter-spacing: 0; text-transform: none; }

.author-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.6rem;
  max-width: 62rem;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
}
.author-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.author-card > div { display: grid; gap: .45rem; }
.author-card p { margin: 0; }
.author-card .label { color: var(--muted); }
.author-name { color: var(--ink); font: 600 1.35rem/1.2 var(--f-display); letter-spacing: -.02em; }
.author-links { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; margin-top: .35rem !important; }
.author-links a { color: var(--ink); text-decoration: none; }
.author-links a:hover { text-decoration: underline; text-underline-offset: .25em; }
@media (max-width: 560px) { .author-card { grid-template-columns: 1fr; } }

.more-posts { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); }
.more-posts .section-head a { color: var(--muted); text-decoration: none; transition: color .3s var(--ease); }
.more-posts .section-head a:hover { color: var(--ink); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.card { display: grid; align-content: start; gap: .75rem; color: inherit; text-decoration: none; }
.card-img { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--ground-2); }
.card-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card-img img { transform: scale(1.04); }
.card-title { color: var(--ink); font: 600 1.08rem/1.3 var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (max-width: 820px) { .more-grid { grid-template-columns: 1fr; } }

/* initials badge used in post bylines and the author box (no photo on posts) */
.avatar-mono {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ground);
  font: 700 .95rem/1 var(--f-display);
  letter-spacing: -.03em;
}
.avatar-mono.avatar-lg { width: 88px; height: 88px; font-size: 1.9rem; }
