/* 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: #161715;
  --ground-2: #1d1f1c;
  --line: #2b2e2a;
  --ink: #eeefea;
  --text: #d8dbd3;
  --muted: #8f968d;

  --lime: #cfe98f;
  --citron: #e7f19c;
  --mint: #a9dfc3;
  --teal: #2f7066;
  --teal-deep: #1d4c44;

  --f-display: "Rubik", "Arial Black", "Helvetica Neue", sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-label: "Barlow Condensed", "Arial Narrow", "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.125rem/1.7 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: .075;
  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(50% 40% at 50% 34%, rgba(169, 223, 195, .09), transparent 70%),
    radial-gradient(35% 28% at 30% 28%, rgba(207, 233, 143, .06), transparent 70%);
}

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

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

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

.label {
  font: 500 .95rem/1.2 var(--f-label);
  letter-spacing: .08em;
  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: 900 1.05rem/1 var(--f-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: 0 -.12em .4em rgba(207, 233, 143, .45), 0 .14em .45em rgba(47, 112, 102, .8);
}
.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); text-shadow: 0 0 .8em rgba(207, 233, 143, .5); }

@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: grid; gap: .35rem; margin: 0; }
.hero-kicker .serif {
  font: 400 clamp(1.9rem, 4.4vw, 3rem)/1 var(--f-serif);
  color: var(--ink);
  letter-spacing: -.01em;
}
.hero-kicker .label { color: var(--text); }

.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: var(--lime); 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-display);
  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(207, 233, 143, .85),
    0 .08em .1em rgba(47, 112, 102, .95),
    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; }
}

/* ─── category filters (the template's bottom labels) ── */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 1.4rem;
  width: 100%;
  max-width: 1040px;
  margin-top: clamp(.5rem, 3vw, 2rem);
}
.filters button {
  appearance: none;
  border: 0;
  background: none;
  padding: .45rem .1rem;
  color: var(--muted);
  font: 400 clamp(1rem, 1.8vw, 1.35rem)/1 var(--f-label);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .4s var(--ease), text-shadow .4s var(--ease);
}
.filters button b { font-weight: 700; color: var(--ink); transition: inherit; }
.filters button:hover,
.filters button[aria-pressed="true"] {
  color: var(--ink);
  text-shadow: 0 -.1em .6em rgba(207, 233, 143, .45), 0 .12em .6em rgba(47, 112, 102, .9);
}
.filters button[aria-pressed="true"] b { color: var(--lime); }

@media (max-width: 560px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; justify-items: center; }
  .filters button:first-child { grid-column: 1 / -1; }
}

/* ─── 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 .95rem/1.3 var(--f-label);
  letter-spacing: .07em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.meta .cat { color: var(--lime); font-weight: 700; }

.glow-title {
  transition: text-shadow .6s var(--ease), color .6s var(--ease);
}
a:hover .glow-title,
a:focus-visible .glow-title {
  color: var(--ink);
  text-shadow: 0 -.07em .35em rgba(207, 233, 143, .45), 0 .09em .4em rgba(47, 112, 102, .9);
}

/* 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: 400 clamp(2.3rem, 5.2vw, 4.2rem)/1.02 var(--f-serif);
  letter-spacing: -.015em;
  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: 700 1rem/1 var(--f-label);
  letter-spacing: .08em;
  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 1rem/1.3 var(--f-label);
  letter-spacing: .07em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.post-row h3 {
  margin: 0 0 .35rem;
  color: var(--ink);
  font: 400 clamp(1.6rem, 2.8vw, 2.2rem)/1.1 var(--f-serif);
  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(--lime); }

@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 -18px 60px -30px rgba(207, 233, 143, .35),
    0 30px 70px -20px rgba(47, 112, 102, .55),
    0 20px 50px rgba(0, 0, 0, .45);
}
.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(207, 233, 143, .22), inset 0 -1px 0 rgba(169, 223, 195, .18);
  background: linear-gradient(180deg, transparent 72%, rgba(22, 23, 21, .35));
}
.about h2 {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(2.2rem, 4.5vw, 3.4rem)/1.02 var(--f-serif);
  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: var(--lime); }

@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);
  box-shadow: 0 -3px 10px -4px rgba(207, 233, 143, .6), 0 4px 12px -4px rgba(47, 112, 102, .9);
}
.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(169, 223, 195, .07), 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-label);
  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: linear-gradient(90deg, var(--teal), var(--mint), var(--lime));
  box-shadow: 0 0 12px rgba(207, 233, 143, .6);
}

.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: 400 clamp(2.6rem, 6.4vw, 5.2rem)/1 var(--f-serif);
  letter-spacing: -.02em;
  text-wrap: balance;
  text-shadow: 0 -.06em .3em rgba(207, 233, 143, .26), 0 .08em .38em rgba(47, 112, 102, .6);
}
.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: 400 clamp(1.8rem, 3.2vw, 2.35rem)/1.1 var(--f-serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.prose h2 + * { margin-top: .7em; }
.prose h3 {
  margin-top: 1.8em;
  color: var(--ink);
  font: 700 1.1rem/1.3 var(--f-label);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(207, 233, 143, .55);
  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: var(--lime); text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--mint); font-family: var(--f-label); font-weight: 700; }

.prose blockquote {
  margin: 2em 0;
  padding: 0;
  color: var(--ink);
  font: italic 400 clamp(1.5rem, 2.8vw, 2rem)/1.25 var(--f-serif);
  text-wrap: balance;
}
.prose blockquote p { margin: 0; }

.prose code {
  font: .88em/1.5 var(--f-mono);
  color: var(--mint);
  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 .92rem/1.3 var(--f-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.prose td:first-child { color: var(--ink); }
.prose .good { color: var(--mint); }

.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: 400 clamp(1.3rem, 2.4vw, 1.7rem)/1.15 var(--f-serif); 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; }
}
