/* Blog index and posts (owner: blog). Loads after styles.css and site.css on /blog and every post.
   The post card and the covers' base (lights, pings) live in site.css, because Home shows them too.
   This file: the covers' one-time entrance · founder photo · index hero [ink-deep] · index grid [cream] ·
   post hero [ink-deep] · post cover · article layout · On this page · share · prose · the What I build
   card · author and pager · Keep reading [sand] · phones · reduced motion.
   The markup is the final frame: p-blog.js arms a start state (.is-wait) only when it is about to animate,
   so no JS and reduced motion show the finished page. */

.page-blog { --bx-overlap: clamp(84px, 9vw, 132px); --pc-overlap: clamp(72px, 11vw, 168px); }

/* ---------- Covers: a short entrance, once, as a cover comes into view (p-blog.js) ----------
   Parts rise, fade or pop in order (--i); the lights and pings in site.css then run while it is live. */
.cover.is-wait .cv-in { opacity: 0; }
.cover.is-play .cv-in { animation: cvInFade .8s var(--ease) var(--i, 0s) both; }
.cover.is-play .cv-in--rise { animation-name: cvInRise; animation-duration: 1.1s; animation-timing-function: var(--ease-expo); }
.cover.is-play .cv-in--pop { transform-box: fill-box; transform-origin: center; animation-name: cvInPop; animation-duration: .8s; animation-timing-function: cubic-bezier(.3, 1.35, .4, 1); }
@keyframes cvInFade { from { opacity: 0; } }
@keyframes cvInRise { from { opacity: 0; transform: translateY(20px); } }
@keyframes cvInPop { from { opacity: 0; transform: scale(.4); } }

/* ---------- Founder photo: the square headshot, in a circle ---------- */
.face {
  position: relative; display: inline-block; flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 50%;
  background: radial-gradient(90% 80% at 50% 100%, #8a1f17, #3a0f0b 55%, #1f1a18); isolation: isolate;
}
.face img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 0; box-shadow: none;
  object-fit: cover; object-position: 50% 50%;
}

/* ---------- Index hero [ink-deep]: the title, one line on who the notes are for, the author ----------
   A hairline closes it, with a light that runs along it now and then; the first row of cards rises over
   its lower edge (--bx-overlap). */
.bhero {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  padding: calc(var(--hero-top) - 8px) var(--gutter) calc(var(--bx-overlap) + clamp(40px, 4vw, 60px)); background: var(--ink-deep); color: var(--cream);
}
.bhero__glow {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(48% 62% at 84% 18%, rgba(215, 55, 43, .24), rgba(215, 55, 43, .06) 55%, rgba(215, 55, 43, 0) 80%),
    radial-gradient(40% 55% at 6% 96%, rgba(138, 31, 23, .26), rgba(138, 31, 23, 0) 75%);
}
.js .bhero__glow { animation: bxGlow 1.6s var(--ease) both; }
@keyframes bxGlow { from { opacity: 0; } }
.bhero__wrap { position: relative; display: flex; flex-direction: column; }
.bhero .eyebrow { align-self: flex-start; }
.bhero__title {
  margin-top: clamp(20px, 2.2vw, 28px); max-width: 11.5em;
  font-size: clamp(50px, 6.7vw, 100px); font-weight: 500; line-height: .97; letter-spacing: -.05em; color: var(--cream);
}
.bhero__title .serif { display: block; color: var(--red-bright); letter-spacing: -.024em; }
.bhero__title .serif .w { padding-right: .06em; margin-right: -.06em; }
.bhero__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px clamp(40px, 6vw, 96px);
  margin-top: clamp(26px, 2.8vw, 40px);
}
.bhero__lede { max-width: 33em; font-size: clamp(17px, 1.42vw, 20px); line-height: 1.6; color: var(--muted-light); }
.bhero__by { display: flex; align-items: center; gap: 14px; }
.bhero__by > span:last-child { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.bhero__k { font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bhero__by strong { font-size: 17px; font-weight: 500; letter-spacing: -.015em; color: var(--cream); }
.bhero__face { width: 52px; height: 52px; box-shadow: 0 0 0 1px rgba(245, 239, 230, .22), 0 0 0 6px rgba(215, 55, 43, .12); }
.bhero__rule { position: relative; height: 1px; margin-top: clamp(28px, 3vw, 44px); background: var(--line-d2); overflow: hidden; transform-origin: left; }
.bhero__rule span {
  position: absolute; inset: 0; transform: translateX(-200px); opacity: 0;
  background: linear-gradient(90deg, rgba(255, 208, 201, 0), #ffd0c9 55%, rgba(255, 208, 201, 0)) 0 0 / 200px 100% no-repeat;
}
.bhero.is-live .bhero__rule span { opacity: 1; animation: bxTravel 6.5s cubic-bezier(.5, 0, .3, 1) 1.6s infinite; }
@keyframes bxTravel { 0% { transform: translateX(-200px); } 55%, 100% { transform: translateX(100%); } }
.bhero__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-top: 10px;
  font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.bhero__meta a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--cream);
  background: linear-gradient(var(--red-bright), var(--red-bright)) 0 calc(100% - 11px) / 0 1px no-repeat; transition: background-size .45s var(--ease-expo), color var(--dur-1);
}
.bhero__meta a:hover { color: #fff; background-size: 100% 1px; }
/* entrance: the words rise (main.js), then the line, the author, the hairline and the row under it */
.js .bhero__lede { animation: fadeUp 1s var(--ease) .45s both; }
.js .bhero__by { animation: fadeUp 1s var(--ease) .58s both; }
.js .bhero__rule { animation: bxRule 1.2s var(--ease-expo) .55s both; }
.js .bhero__meta { animation: fadeUp 1s var(--ease) .75s both; }
@keyframes bxRule { from { transform: scaleX(0); } }

/* ---------- Index grid [cream]: every post, newest first, 3 across on desktop ---------- */
.bindex {
  position: relative; z-index: 1; margin-top: calc(-1 * var(--bx-overlap));
  padding: 0 var(--gutter) var(--section-y);
  background: linear-gradient(180deg, rgba(245, 239, 230, 0) var(--bx-overlap), var(--cream) var(--bx-overlap));
}
.bindex .pcard__title { font-size: 22px; }

/* ---------- Post hero [ink-deep, lit by a blurred copy of its own cover] ---------- */
.page-post { background: var(--paper); }
.post-hero { position: relative; isolation: isolate; display: flow-root; padding: var(--hero-top) var(--gutter) 0; background: var(--ink-deep); color: var(--cream); }
.post-hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.post-hero__glow {
  position: absolute; inset: 0; opacity: .55;
  -webkit-mask-image: radial-gradient(75% 80% at 50% 46%, #000 35%, transparent 85%); mask-image: radial-gradient(75% 80% at 50% 46%, #000 35%, transparent 85%);
}
.post-hero__drift { position: absolute; left: 50%; top: 44%; width: min(1500px, 120%); aspect-ratio: 16 / 10; transform: translate(-50%, -50%); }
.post-hero__drift .cover { width: 100%; height: 100%; background: none; transform: scale(1.5); filter: blur(46px) saturate(1.35) brightness(1.8); will-change: transform; }
.post-hero__drift .cv-gate, .post-hero__drift .cover text { display: none; } /* the glow stays red and cream: no green, no letters */
.js .post-hero__drift { animation: glowDrift 22s ease-in-out infinite; }
@keyframes glowDrift { 0%, 100% { transform: translate(-50%, calc(-50% - 14px)); } 50% { transform: translate(-50%, calc(-50% + 14px)); } }
.post-hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 12, 11, .72) 0%, rgba(15, 12, 11, 0) 30%), radial-gradient(70% 60% at 50% 45%, transparent 40%, rgba(15, 12, 11, .55) 100%);
}
.post-hero__wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 960px; margin: 0 auto; text-align: center; }
.post-hero .crumbs { justify-content: center; }
.post-hero__title { max-width: 17em; font-size: clamp(40px, 5.3vw, 78px); font-weight: 500; line-height: 1.02; letter-spacing: -.046em; color: var(--cream); text-wrap: balance; }
.post-hero__lede { max-width: 35em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--muted-light); }
.post-hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 32px; width: 100%; max-width: 720px;
  margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--line-d2);
}
.byline { display: flex; align-items: center; gap: 12px; text-align: left; }
.byline__face { width: 44px; height: 44px; box-shadow: 0 0 0 1px rgba(245, 239, 230, .22), 0 0 0 5px rgba(215, 55, 43, .14); }
.byline > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.byline strong { font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--cream); }
.post-hero__facts { display: flex; align-items: center; gap: 12px; font: 500 11.5px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); }
.post-hero__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--red-bright); }
/* entrance: crumbs, the words of the title (main.js), the line, the byline */
.js .post-hero__glow { animation: phGlow 1.6s var(--ease) both; }
@keyframes phGlow { from { opacity: 0; } }
.js .post-hero .crumbs { animation: fadeUp .9s var(--ease) .05s both; }
.js .post-hero__lede { animation: fadeUp 1s var(--ease) .5s both; }
.js .post-hero__meta { animation: fadeUp 1s var(--ease) .62s both; }

/* ---------- Post cover: in a dark glass frame, overlapping the paper below ---------- */
.post-cover { position: relative; z-index: 3; max-width: 1080px; margin: clamp(40px, 5vw, 64px) auto calc(-1 * var(--pc-overlap)); }
.post-cover__frame {
  position: relative; padding: 7px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #2a221f, #161210); border: 1px solid rgba(245, 239, 230, .12);
  box-shadow: inset 0 1px 0 rgba(255, 246, 236, .08), var(--sh-float-d);
}
.post-cover .cover { aspect-ratio: 16 / 7; border-radius: calc(var(--r-lg) - 7px); box-shadow: inset 0 0 0 1px rgba(245, 239, 230, .06); }
.post-cover .cover__label { left: 20px; top: 20px; }
.js .post-cover__frame { animation: pcRise 1.3s var(--ease-expo) .35s both; }
@keyframes pcRise { from { opacity: 0; transform: translateY(48px) scale(.98); } }

/* ---------- Article [paper] ----------
   Phones and tablets: one column (On this page above the text; share, the What I build card, the author
   and the pager below it). From 1024px: On this page and share in a sticky rail on the left, the card under
   the text. From 1280px: the card moves into its own sticky rail on the right. */
.post-main { padding: calc(var(--pc-overlap) + clamp(52px, 6vw, 88px)) var(--gutter) clamp(80px, 9vw, 128px); background: var(--paper); color: var(--ink); }
.post-layout { display: flex; flex-direction: column; max-width: 680px; }
.toc-m { order: 1; }
.prose { order: 2; min-width: 0; }
.post-aside { order: 3; margin-top: 56px; min-width: 0; }
.post-side { order: 4; margin-top: 28px; min-width: 0; }
.post-end { order: 5; min-width: 0; }
.post-aside .toc { display: none; }
@media (min-width: 1024px) {
  .post-layout { display: grid; max-width: 1240px; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: clamp(40px, 5vw, 72px); }
  .toc-m { display: none; }
  .post-aside { grid-column: 1; grid-row: 1 / -1; margin: 0; }
  .post-aside .toc { display: block; }
  .post-aside__inner { position: sticky; top: 112px; }
  .prose { grid-column: 2; grid-row: 1; max-width: 680px; }
  .post-side { grid-column: 2; grid-row: 2; max-width: 680px; margin-top: 64px; }
  .post-end { grid-column: 2; grid-row: 3; max-width: 680px; }
}
@media (min-width: 1280px) {
  .post-layout { grid-template-columns: 220px minmax(0, 680px) 264px; grid-template-rows: auto 1fr; justify-content: space-between; column-gap: 40px; }
  .prose { max-width: none; }
  .post-side { grid-column: 3; grid-row: 1 / -1; margin: 0; max-width: none; }
  .post-side__inner { position: sticky; top: 112px; }
  .post-end { grid-row: 2; max-width: none; }
}
.post-label { font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--label-on-light); }

/* ---------- On this page: numbered, the part already read fills red, the current section gets the bar ---------- */
.toc { position: relative; }
.toc__list { position: relative; margin: 16px 0 0; padding: 0; list-style: none; border-left: 1px solid var(--line-l2); }
.toc__list a {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: baseline; padding: 7px 0 7px 16px;
  font-size: 14px; line-height: 1.4; color: var(--label-on-light); text-wrap: pretty; transition: color var(--dur-2) var(--ease);
}
.toc__n { font: 500 11px/1 'Geist Mono', ui-monospace, monospace; letter-spacing: .04em; color: rgba(107, 98, 90, .72); transition: color var(--dur-2) var(--ease); }
.toc__list a:hover, .toc__list a.is-read { color: var(--body-on-light); }
.toc__list a.is-active { color: var(--ink); }
.toc__list a.is-active .toc__n, .toc__list a.is-read .toc__n { color: var(--red-deep); }
.toc__rail { position: absolute; inset: 0; pointer-events: none; }
.toc__fill, .toc__bar { position: absolute; left: 0; top: 0; width: 1px; transform-origin: top; }
.toc__fill { height: var(--fh, 0); transform: translateY(var(--fy, 0)); background: rgba(215, 55, 43, .45); transition: height .5s var(--ease-out); }
.toc__bar {
  left: -.5px; width: 2px; height: var(--h, 0); border-radius: 2px; background: var(--red); opacity: 0;
  transform: translateY(var(--y, 0)); transition: transform .45s var(--ease-out), height .45s var(--ease-out), opacity .3s var(--ease);
}
.toc.has-active .toc__bar { opacity: 1; }
/* phones and tablets: a closed panel above the text */
.toc-m { margin-bottom: 36px; border: 1px solid var(--line-l2); border-radius: var(--r-md); background: var(--cream); }
.toc-m summary {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px; cursor: pointer; list-style: none;
  font: 500 11.5px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
}
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m__n { margin-left: auto; color: var(--label-on-light); letter-spacing: .08em; }
.toc-m__ic { position: relative; flex: none; width: 14px; height: 14px; }
.toc-m__ic::before, .toc-m__ic::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--red); transition: transform var(--dur-2) var(--ease); }
.toc-m__ic::after { transform: rotate(90deg); }
.toc-m[open] .toc-m__ic::after { transform: rotate(0); }
.toc-m .toc__list { margin: 0 20px 18px; }
.toc-m .toc__list a { padding: 12px 0 12px 16px; font-size: 15px; }

/* ---------- Share ---------- */
.share { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-l); }
.share__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-l2); color: var(--ink); transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.share-btn svg { width: 17px; height: 17px; }
.share-btn .share-ic rect { fill: transparent; }
.share-btn .share-ic path { fill: currentColor; }
.share-btn:hover { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.copy-link {
  min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line-l2); background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink); transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.copy-link:hover { border-color: var(--ink); }
.copy-link.is-done { background: var(--ink); border-color: var(--ink); color: var(--cream); }
@media (max-width: 1023px) { .share { margin-top: 0; } }

/* ---------- Prose: 18px / 1.75 on a measure of about 68 characters ---------- */
.prose { font-size: 18px; line-height: 1.75; color: var(--body-on-light); }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { margin-top: 2.5em; font-size: clamp(26px, 2.5vw, 32px); font-weight: 500; line-height: 1.18; letter-spacing: -.032em; color: var(--ink); text-wrap: balance; scroll-margin-top: 110px; }
.prose h3 { margin-top: 1.9em; font-size: 21px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a {
  color: var(--red-deep); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(184, 41, 31, .42);
  transition: text-decoration-color var(--dur-2) var(--ease), text-decoration-thickness var(--dur-2) var(--ease);
}
.prose a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul > li { position: relative; padding-left: 28px; }
.prose ul > li::before { content: ''; position: absolute; left: 3px; top: .72em; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--red); }
.prose ol { padding-left: 0; list-style: none; counter-reset: pl; }
.prose ol > li { position: relative; padding-left: 40px; counter-increment: pl; }
.prose ol > li::before { content: counter(pl, decimal-leading-zero); position: absolute; left: 0; top: .42em; font: 500 12px/1.4 'Geist Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--red-deep); }
.prose li + li { margin-top: .6em; }
.prose blockquote {
  margin: 1.8em 0; padding-left: 24px; border-left: 2px solid var(--red);
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 28px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink);
}
/* In short: the post in three points */
.prose .tldr { position: relative; margin-bottom: 2.2em; padding: 24px 28px 26px; border-radius: var(--r-md); background: var(--cream); border: 1px solid var(--line-l); }
.prose .tldr::before { content: ''; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px; background: linear-gradient(90deg, var(--red), rgba(215, 55, 43, 0)); }
.tldr__k { display: flex; align-items: center; gap: 10px; font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--red-deep); }
.prose .tldr ul { margin-top: 14px; font-size: 16.5px; line-height: 1.6; color: var(--ink); counter-reset: tl; }
.prose .tldr li { padding: 12px 0 0 40px; counter-increment: tl; }
.prose .tldr li + li { margin-top: 12px; border-top: 1px solid var(--line-l); }
.prose .tldr li::before {
  content: counter(tl, decimal-leading-zero); left: 0; top: 13px; width: auto; height: auto; border-radius: 0; box-shadow: none;
  font: 500 11.5px/1.6 'Geist Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--red-deep);
}
/* a figure: the agent's loop, four glass steps on one wire; each lights in turn while it is in view */
.prose .pfig { margin: 2.2em 0; }
.pfig figcaption { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--label-on-light); }
.pfig__loop {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 24px;
  border-radius: var(--r-md); background: radial-gradient(70% 120% at 50% 0%, rgba(215, 55, 43, .2), rgba(215, 55, 43, 0) 70%), var(--ink-deep);
  box-shadow: inset 0 0 0 1px rgba(245, 239, 230, .06);
}
.pfig__loop::before { content: ''; position: absolute; left: 40px; right: 40px; top: 50%; height: 1px; background: rgba(245, 239, 230, .3); }
.pfig__loop span {
  position: relative; padding: 15px 8px; border-radius: var(--r-sm); text-align: center; background-color: #241d1a;
  border: 1px solid rgba(245, 239, 230, .2); box-shadow: inset 0 1px 0 rgba(255, 250, 244, .1);
  font: 500 12px/1.2 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--cream);
}
.pfig.is-live .pfig__loop span { animation: pfigOn 4.8s ease-in-out infinite; }
.pfig.is-live .pfig__loop span:nth-child(2) { animation-delay: 1.2s; }
.pfig.is-live .pfig__loop span:nth-child(3) { animation-delay: 2.4s; }
.pfig.is-live .pfig__loop span:nth-child(4) { animation-delay: 3.6s; }
@keyframes pfigOn {
  0%, 26%, 100% { background-color: #241d1a; border-color: rgba(245, 239, 230, .2); box-shadow: inset 0 1px 0 rgba(255, 250, 244, .1); }
  8%, 18% { background-color: #6d1d15; border-color: #ef5a4c; box-shadow: inset 0 1px 0 rgba(255, 151, 139, .5), 0 10px 30px -10px rgba(215, 55, 43, .8); }
}
/* a table: three options, one per row */
.prose .ptable { margin-top: 1.4em; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--line-l2); background: rgba(255, 255, 255, .45); font-size: 15.5px; line-height: 1.55; }
.ptable__row { display: grid; grid-template-columns: 148px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 24px; padding: 18px 22px; border-top: 1px solid var(--line-l); transition: background var(--dur-2) var(--ease); }
.ptable__row--head { padding-block: 14px; border-top: 0; background: var(--cream); font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--label-on-light); }
.ptable__row:not(.ptable__row--head):hover { background: rgba(215, 55, 43, .035); }
.ptable__row > span:first-child { color: var(--ink); }
/* a list of definitions: five metrics */
.prose .pdl { display: flex; flex-direction: column; margin-top: 1.4em; border-top: 1px solid var(--line-l2); counter-reset: dl; }
.pdl > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 6px 28px; padding: 20px 0; border-bottom: 1px solid var(--line-l2); counter-increment: dl; }
.pdl dt { font-weight: 600; line-height: 1.45; color: var(--ink); }
.pdl dt::before { content: counter(dl, decimal-leading-zero); display: block; margin-bottom: 4px; font: 500 11px/1.4 'Geist Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--red-deep); }
.pdl dd { margin: 0; font-size: 16.5px; line-height: 1.65; }

/* ---------- The What I build card [ink-deep]: the 3-Layer Infrastructure, small, then one line and the button ---------- */
.pside {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 14px 22px 24px;
  border-radius: var(--r-lg); color: var(--cream);
  background: radial-gradient(120% 70% at 60% 0%, rgba(215, 55, 43, .2), rgba(215, 55, 43, 0) 65%), var(--ink-deep);
  box-shadow: inset 0 0 0 1px rgba(245, 239, 230, .08), 0 34px 60px -38px rgba(20, 17, 16, .65);
  transition: transform .6s var(--ease-expo), box-shadow .6s var(--ease);
}
.pside::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(239, 90, 76, .75), transparent); }
.pside__art { display: block; margin: 0 -8px 2px; }
.pside__svg { display: block; width: 100%; height: auto; overflow: visible; }
.pside__k { font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--red-bright); }
.pside__t { font-size: 20px; font-weight: 500; line-height: 1.18; letter-spacing: -.022em; text-wrap: balance; }
.pside__d { font-size: 14px; line-height: 1.55; color: var(--muted-light); text-wrap: pretty; }
.pside__go {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--red); color: #fff; font-size: 14px; font-weight: 600; transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.pside:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 4px; }
@media (hover: hover) {
  .pside:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(239, 90, 76, .3), 0 40px 70px -38px rgba(20, 17, 16, .7); }
  .pside:hover .pside__go { box-shadow: 0 14px 30px -10px rgba(215, 55, 43, .85); transform: translateX(2px); }
}
/* below 1280px the card sits under the text, wide: the picture on the left */
@media (max-width: 1279px) {
  .pside { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 28px; padding: 22px 28px 26px 16px; }
  .pside__art { grid-row: 1 / -1; align-self: center; margin: 0; }
  .pside__k { margin-top: 8px; }
  .pside__go { align-self: end; justify-self: start; }
}
@media (max-width: 599px) {
  .pside { display: flex; padding: 12px 20px 24px; }
  .pside__art { margin: 0 auto; width: min(100%, 300px); }
  .pside__go { align-self: flex-start; }
}
@media (min-width: 1280px) and (max-height: 760px) { .pside__art { display: none; } .pside { padding-top: 24px; } }

/* ---------- After the article: the author, then the older and newer posts ---------- */
.post-end { display: flex; flex-direction: column; gap: 20px; margin-top: 56px; }
.author { display: flex; align-items: flex-start; gap: 22px; padding: 26px 28px; border-radius: var(--r-lg); background: var(--cream); border: 1px solid var(--line-l); }
.author__face { width: 68px; height: 68px; box-shadow: 0 0 0 1px var(--line-l2), 0 0 0 6px rgba(215, 55, 43, .07); }
.author__txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.author__name { font-size: 20px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.author__bio { font-size: 15.5px; line-height: 1.6; color: var(--body-on-light); }
.author .link-arrow { margin-top: 8px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.pager__a {
  display: flex; align-items: center; gap: 16px; min-width: 0; padding: 10px 18px 10px 10px; border-radius: var(--r-md);
  border: 1px solid var(--line-l2); background: transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .6s var(--ease-expo);
}
.pager__a--next { flex-direction: row-reverse; padding: 10px 10px 10px 18px; text-align: right; }
.pager__media { position: relative; flex: none; width: 108px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: #0f0c0b; }
.pager__media .cover { position: absolute; inset: 0; }
.pager__media .cover text { display: none; }
.pager__txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pager__k { font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--red-deep); }
.pager__arr { display: inline-block; transition: transform .45s var(--ease-expo); }
.pager__t { font-size: 15.5px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.pager__a:hover { border-color: rgba(215, 55, 43, .4); background: var(--cream); }
.pager__a:hover .pager__arr { transform: translateX(-4px); }
.pager__a--next:hover .pager__arr { transform: translateX(4px); }
@media (hover: hover) { .pager__a:hover { transform: translateY(-2px); } }

/* ---------- Keep reading [sand] ---------- */
.latest--related .latest__wrap { gap: clamp(44px, 5.4vw, 72px); }
.latest--related .sec-head > .link-arrow { align-self: flex-end; margin-bottom: 8px; }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .post-cover .cover { aspect-ratio: 16 / 10; }
  /* the art fills the frame on phones: the category stays in the breadcrumb, the small labels go */
  .post-cover .cover__label, .post-cover .cover .cv-lb { display: none; }
}
/* below 700px: the Blog's intro goes above "Written by", and the older and newer posts stack, so neither is
   squeezed into a thin column */
@media (max-width: 699px) {
  .bhero__foot { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager__a--next { flex-direction: row; padding: 10px 18px 10px 10px; text-align: left; }
}
@media (max-width: 599px) {
  .bhero__title { font-size: clamp(44px, 12.4vw, 58px); letter-spacing: -.05em; }
  .bhero__foot { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .post-hero__wrap { gap: 20px; }
  .post-hero__title { font-size: clamp(34px, 9.4vw, 40px); line-height: 1.06; letter-spacing: -.04em; }
  .post-hero__meta { gap: 14px; padding-top: 20px; }
  .post-hero__facts { width: 100%; justify-content: center; }
  /* no blurred copy on phones: a still glow instead */
  .post-hero__glow { display: none; }
  .post-hero__bg { background: radial-gradient(90% 55% at 50% 36%, rgba(138, 31, 23, .45), rgba(15, 12, 11, 0) 70%); }
  .post-cover__frame { padding: 5px; }
  .post-cover .cover { border-radius: calc(var(--r-lg) - 5px); }
  .prose { font-size: 17px; }
  .prose h2 { margin-top: 2.2em; font-size: 25px; }
  .prose h3 { font-size: 19.5px; }
  .prose .tldr { padding: 20px 20px 22px; }
  .prose .tldr li { padding-left: 34px; }
  .pfig__loop { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 10px; }
  .pfig__loop::before { display: none; }
  /* the table stacks and its header row hides: each cell says what it is */
  .ptable__row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px; }
  .ptable__row--head { display: none; }
  .ptable__row:nth-child(2) { border-top: 0; }
  .ptable__row:not(.ptable__row--head) > span:nth-child(n+2)::before {
    display: block; margin-bottom: 2px; font: 500 11px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--label-on-light);
  }
  .ptable__row:not(.ptable__row--head) > span:nth-child(2)::before { content: 'Best when'; }
  .ptable__row:not(.ptable__row--head) > span:nth-child(3)::before { content: 'Example'; }
  .pdl > div { grid-template-columns: minmax(0, 1fr); }
  .author { flex-direction: column; padding: 24px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager__a--next { flex-direction: row; padding: 10px 18px 10px 10px; text-align: left; }
}

/* the narrowest phones: the founder's line stays on one line beside the photo */
@media (max-width: 359px) {
  .byline > span:last-child > span, .bhero__by > span:last-child > span:last-child { font-size: 12px; letter-spacing: -.01em; }
  .bhero__by { gap: 12px; }
}

/* ---------- Reduced motion: the finished page, nothing loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .post-hero__drift, .bhero__rule span, .pfig__loop span { animation: none !important; }
  .bhero__rule span { display: none; }
  .toc__fill, .toc__bar, .pside, .pside__go, .pager__a, .pager__arr { transition: none !important; }
  .pside:hover, .pager__a:hover { transform: none; }
}
