/* v3: same tokens as gaganvarma.me. Two text sizes only: 15/24 and 13/20. */
:root {
  color-scheme: light;
  --ink: #121212; --body: #373737; --muted: #636363; --link: #0369a1;
  --hair: rgba(18,18,18,.08); --well: #f4f3f0;
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--body); font: 400 15px/24px "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { margin: 0; text-wrap: pretty; }
h1 { margin: 0; color: var(--ink); font-weight: 500; font-size: 15px; line-height: 24px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }

/* ───────── Shared left column ───────── */
.frame { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 320px 1fr; column-gap: 72px; align-items: start; }
.side { position: sticky; top: 0; padding: 104px 0 48px; }
.avatar { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; margin-bottom: 20px; }
.lede { color: var(--muted); }
.bio { margin-top: 24px; display: grid; gap: 12px; }
.reach { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.reach a, .email { color: var(--muted); transition: color .2s; }
.reach a:hover, .email:hover { color: var(--ink); }
.email { position: relative; color: var(--ink); border-bottom: 1px dotted rgba(18,18,18,.4); }
.email::after { content: "Copied"; position: absolute; left: calc(100% + 10px); top: 0; color: #1a8a4a; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .3s var(--ease); pointer-events: none; }
.email.copied::after { opacity: 1; transform: none; }

/* ───────── Home: the shelf ───────── */
.covers { padding: 104px 0 96px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px 36px; }
.entry { display: block; border-radius: 4px 8px 8px 4px; }
.entry .bk { transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.entry:hover .bk, .entry:focus-visible .bk { transform: translateY(-6px); box-shadow: var(--bk-shadow-hi); }
.entry:focus-visible { outline-offset: 6px; }

/* ───────── The book ───────── */
.bk { --c: #333; --fg: #e8d7a8;
  --bk-shadow:
    inset 0 1px 0 rgba(255,255,255,.12), inset -1px 0 0 rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.25),
    2px 2px 0 -1px #f7f3ea, 3px 3px 0 -1px rgba(0,0,0,.10), 4px 4px 0 -1px #efe9dc, 5px 5px 0 -1px rgba(0,0,0,.12),
    8px 14px 24px -10px rgba(40,28,12,.38), 2px 3px 6px rgba(40,28,12,.12);
  --bk-shadow-hi:
    inset 0 1px 0 rgba(255,255,255,.12), inset -1px 0 0 rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.25),
    2px 2px 0 -1px #f7f3ea, 3px 3px 0 -1px rgba(0,0,0,.10), 4px 4px 0 -1px #efe9dc, 5px 5px 0 -1px rgba(0,0,0,.12),
    12px 26px 36px -14px rgba(40,28,12,.42), 2px 4px 8px rgba(40,28,12,.12);
  position: relative; aspect-ratio: 4 / 5; border-radius: 2px 7px 7px 2px; padding: 11% 9% 8% 15%;
  display: flex; flex-direction: column; container-type: inline-size;
  color: var(--fg); background-color: var(--c); box-shadow: var(--bk-shadow);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(0,0,0,.18) .9%, rgba(255,255,255,.16) 2.2%, rgba(255,255,255,.04) 4%, rgba(0,0,0,.10) 6.2%,
      rgba(0,0,0,.30) 7.1%, rgba(0,0,0,.06) 7.7%, rgba(255,255,255,.14) 8.3%, rgba(255,255,255,0) 10%),
    linear-gradient(100deg, rgba(255,255,255,.07) 10%, rgba(255,255,255,0) 45%, rgba(0,0,0,.10) 100%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,0) 30%, rgba(0,0,0,.10)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M0 .5h6M0 3.5h6' stroke='%23000' stroke-opacity='.10' stroke-width='.6'/%3E%3Cpath d='M.5 0v6M3.5 0v6' stroke='%23fff' stroke-opacity='.05' stroke-width='.6'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E"); }
.bk .no { font-size: clamp(10px, 3.6cqw, 12px); line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; opacity: .62; margin-bottom: 10px; font-weight: 500; }
.bk .ttl { font-size: clamp(18px, 10cqw, 38px); line-height: 1.05; letter-spacing: -.02em; font-weight: 500; }
.bk .sub { margin-top: 10px; font-size: clamp(11px, 4.4cqw, 15px); line-height: 1.45; opacity: .66; max-width: 78%; }
.bk .out { margin-top: auto; position: relative; z-index: 1; max-width: 56%; }
.bk .out::before { content: ""; display: block; width: 18px; border-top: 1px solid currentColor; opacity: .45; margin-bottom: 10px; }
.bk .out b { display: block; font-size: clamp(15px, 8.4cqw, 32px); line-height: 1.1; font-weight: 500; letter-spacing: -.015em; }
.bk .out span { display: block; margin-top: 4px; font-size: clamp(11px, 4cqw, 14px); line-height: 1.35; opacity: .7; }
.bk.small { padding: 16px 12px 14px 24px; }
.bk.small .out { max-width: 100%; }

.stamp { --ink: var(--fg); position: absolute; right: 7%; bottom: 8%; width: 44%; max-width: 168px; aspect-ratio: 1; transform: rotate(-11deg); color: var(--ink); opacity: .26;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.6 2.1'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.6 2.1'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 100% 100%; }
.stamp[style*="--ink"] { opacity: .5; mix-blend-mode: multiply; }
.stamp svg { width: 100%; height: 100%; overflow: visible; }
.stamp text { fill: currentColor; font-family: "Geist", sans-serif; font-weight: 500; }
.stamp .logo { position: absolute; inset: 31%; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }

/* ───────── Experience page ───────── */
.bar { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 64px; padding: 0 24px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--hair);
  font-size: 13px; line-height: 20px; view-transition-name: bar; }
.back { color: var(--muted); font-weight: 500; transition: color .2s; justify-self: start; }
.back:hover { color: var(--ink); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 7px; border-radius: 8px; color: var(--muted); font-weight: 500; transition: background .2s, color .2s; }
.tab:hover { background: rgba(18,18,18,.04); color: var(--ink); }
.tab[aria-current] { background: rgba(18,18,18,.06); color: var(--ink); }
.tab i { width: 14px; height: 19px; border-radius: 1px 3px 3px 1px; background: var(--c); box-shadow: inset 2px 0 0 rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.15); }
.pager { justify-self: end; display: flex; align-items: center; gap: 4px; }
.count { min-width: 44px; text-align: center; color: var(--muted); }
.arrow { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); box-shadow: 0 0 0 1px var(--hair) inset; transition: background .2s; }
.arrow:hover { background: rgba(18,18,18,.04); }

.read .side { top: 64px; padding-top: 48px; max-height: calc(100vh - 64px); overflow-y: auto; scrollbar-width: none; }
.read .side::-webkit-scrollbar { display: none; }
.aside .bk { width: 152px; margin-bottom: 28px; }
.aside .meta { color: var(--muted); margin-bottom: 16px; }
.aside p + p { margin-top: 12px; }
.aside .ext { display: inline-block; margin-top: 16px; color: var(--link); font-weight: 500; transition: opacity .2s; }
.aside .ext:hover { opacity: .75; }

.shots { padding: 48px 0 96px; display: grid; gap: 24px; view-transition-name: shots; }
.shot { margin: 0; border-radius: 6px; overflow: hidden; background: var(--well); box-shadow: 0 0 0 1px var(--hair); min-height: 160px; }
.shot img { width: 100%; height: auto; opacity: 0; transition: opacity .5s ease; }
.shot img.loaded { opacity: 1; }
.endnav { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 16px; }
.endnav a { display: grid; color: var(--ink); font-weight: 500; transition: opacity .2s; }
.endnav a:last-child { text-align: right; }
.endnav a:hover { opacity: .7; }
.endnav .muted { font-weight: 400; }

/* ───────── Page transitions ───────── */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
/* between books: the screens slide in the direction you're going; the bar stays put */
/* Book → book is one moment: everything that changes (sidebar text, cover, screens) shares one timing family,
   old out in 160ms, new in 280ms, same strong ease-out. The Previous / Next bar and Overview stay still. */
html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-group(*) { animation-duration: .28s; animation-timing-function: cubic-bezier(.23,1,.32,1); }
html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-old(*) { animation-duration: .16s; animation-timing-function: cubic-bezier(.23,1,.32,1); }
html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-new(*) { animation-duration: .28s; animation-timing-function: cubic-bezier(.23,1,.32,1); }
/* Parts that barely change fade in and out over the same time, so their sum stays at full opacity (no dip) */
html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-old(root), html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-new(root), html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-old(endnav), html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-new(endnav), html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-old(side-foot), html:is(:active-view-transition-type(forward), :active-view-transition-type(backward))::view-transition-new(side-foot) { animation-duration: .2s; animation-timing-function: ease; }
/* Old and new screens overlap (never a blank gap); a light blur blends them into one change instead of two
   stacks swapping. Exit is quicker than entry, both ease-out, and the shift is only 8–12px. */
html:active-view-transition-type(forward)::view-transition-old(shots) { animation: .16s cubic-bezier(.23,1,.32,1) both vt-out-left; }
html:active-view-transition-type(forward)::view-transition-new(shots) { animation: .28s cubic-bezier(.23,1,.32,1) both vt-in-right; }
html:active-view-transition-type(backward)::view-transition-old(shots) { animation: .16s cubic-bezier(.23,1,.32,1) both vt-out-right; }
html:active-view-transition-type(backward)::view-transition-new(shots) { animation: .28s cubic-bezier(.23,1,.32,1) both vt-in-left; }
@keyframes vt-out-left { to { opacity: 0; filter: blur(4px); transform: translateX(-8px); } }
@keyframes vt-out-right { to { opacity: 0; filter: blur(4px); transform: translateX(8px); } }
@keyframes vt-in-right { from { opacity: 0; filter: blur(4px); transform: translateX(12px); } }
@keyframes vt-in-left { from { opacity: 0; filter: blur(4px); transform: translateX(-12px); } }
::view-transition-old(shots), ::view-transition-new(shots) { height: auto; }

@media (max-width: 1000px) {
  .frame { grid-template-columns: 1fr; }
  .side, .read .side { position: static; max-height: none; overflow: visible; padding-bottom: 0; }
  .covers { padding-top: 56px; }
  .bar { grid-template-columns: auto 1fr auto; padding: 0 12px; gap: 8px; }
  .shots { padding-top: 32px; }
}
@media (max-width: 720px) {
  .frame { padding: 0 16px; }
  .side { padding-top: 72px; }
  .covers { grid-template-columns: 1fr; gap: 28px; padding-right: 6px; }
  .bar { grid-template-columns: 1fr auto; grid-template-rows: 48px 48px; height: auto; }
  .bar .tabs { grid-column: 1 / -1; grid-row: 2; padding-bottom: 6px; }
  .read .side { padding-top: 28px; }
  .aside .bk { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  @view-transition { navigation: none; }
}
/* Title always first; YC batch sits beside it, quieter */
.bk .ttl .yc { font-size: .42em; letter-spacing: .02em; opacity: .6; white-space: nowrap; vertical-align: .32em; }
/* Outcome detail stays on one line */
.bk .out { max-width: 100%; }
.bk .out span { white-space: nowrap; }

/* Sidebar floats: pinned to the left edge of the window, out of the layout.
   The books / screenshots centre on the whole page, and only shift right when the window is too narrow to clear it. */
@media (min-width: 1001px) {
  .frame { display: block; max-width: none; padding: 0; }
  .side { position: fixed; z-index: 1; left: 40px; top: 0; width: 280px; height: 100vh; overflow-y: auto; scrollbar-width: none; padding: 104px 0 40px; }
  .side::-webkit-scrollbar { display: none; }
  .read .side { top: 64px; height: calc(100vh - 64px); max-height: none; padding-top: 48px; }
  .covers, .shots { width: min(760px, calc(100vw - 400px)); margin-left: max(360px, calc(50vw - 380px)); }
}
/* YC batch at the same size as the title, just quieter */
.bk .ttl .yc { font-size: 1em; vertical-align: baseline; letter-spacing: inherit; opacity: .5; font-weight: 400; }

/* Sidebar + books centred together as one group; sidebar still pinned while the books scroll. */
@media (min-width: 1001px) {
  :root { --group: min(1120px, calc(100vw - 80px)); --gl: calc((100vw - var(--group)) / 2); --sw: 280px; --gap: 64px; }
  .side { left: var(--gl); width: var(--sw); }
  .covers, .shots { margin-left: calc(var(--gl) + var(--sw) + var(--gap)); width: calc(var(--group) - var(--sw) - var(--gap)); }
}
@media (min-width: 1001px) { :root { --group: min(1120px, calc(var(--vw, 100vw) - 80px)); --gl: calc((var(--vw, 100vw) - var(--group)) / 2); } }
/* No visible page scrollbar: the page still scrolls, but the bar doesn't eat into the width or the centring */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

/* No top bar: navigation lives in the sidebar */
.read .back { display: inline-block; margin-bottom: 28px; color: var(--muted); font-weight: 400; }
.read .back:hover { color: var(--ink); }
.shelf-nav { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--hair); display: grid; gap: 2px; view-transition-name: shelf-nav; }
.shelf-nav a { display: flex; align-items: center; gap: 10px; padding: 4px 0; color: var(--muted); transition: color .2s; }
.shelf-nav a:hover { color: var(--ink); }
.shelf-nav a[aria-current] { color: var(--ink); font-weight: 500; }
.shelf-nav i { width: 12px; height: 16px; flex: none; border-radius: 1px 2px 2px 1px; background: var(--c); box-shadow: inset 2px 0 0 rgba(0,0,0,.22), 0 1px 2px rgba(0,0,0,.15); transition: transform .3s var(--ease); }
.shelf-nav a:hover i { transform: translateY(-2px); }
.shelf-nav a[aria-current] i { transform: rotate(-6deg); }
@media (min-width: 1001px) {
  .read .side { top: 0; height: 100vh; padding-top: 104px; display: flex; flex-direction: column; }
  .read .side .shelf-nav { margin-top: auto; }
  .read .side > p:last-of-type, .read .side .ext { margin-bottom: 40px; }
  .shots { padding-top: 104px; }
}
/* Cover shows on phones too */
@media (max-width: 720px) {
  .aside .bk { display: flex; width: 132px; }
  .read .side { padding-top: 32px; }
}
@media (min-width: 1001px) {
  .read .side { padding-top: 72px; padding-bottom: 32px; }
  .read .back { margin-bottom: 24px; }
  .read .side > p:last-of-type, .read .side .ext { margin-bottom: 24px; }
  .shots { padding-top: 72px; }
}

/* Sidebar foot: back to the shelf, and ↑ ↓ to flip through the books */
.side-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--hair); display: flex; align-items: center; justify-content: space-between; gap: 12px; view-transition-name: side-foot; }
.read .side-foot .back { margin: 0; }
.updown { display: flex; gap: 6px; }
.updown .arrow { width: 32px; height: 32px; font-size: 15px; color: var(--ink); }
@media (min-width: 1001px) { .read .side .side-foot { margin-top: auto; } }
.endnav a { display: flex; align-items: center; gap: 8px; }
.endnav a .muted { transition: transform .2s var(--ease); }
.endnav a:first-child:hover .muted { transform: translateX(-3px); }
.endnav a:last-child:hover .muted { transform: translateX(3px); }
/* Subtitles break exactly where written */
.bk .sub { max-width: none; }
.bk .sub > span { display: block; white-space: nowrap; }

/* One bottom row across the page: sidebar foot (Back, ↑ ↓) and Previous / Next share a baseline, pinned to the window */
@media (min-width: 1001px) {
  .read .side { padding-bottom: 28px; }
  .endnav { position: fixed; z-index: 1; bottom: 0; margin: 0; padding: 16px 0 28px; align-items: center; min-height: 0;
    left: calc(var(--gl) + var(--sw) + var(--gap)); width: calc(var(--group) - var(--sw) - var(--gap));
    background: linear-gradient(rgba(255,255,255,.92), #fff); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .endnav a { height: 32px; }
  .read .shots { padding-bottom: 128px; }
}
.side-foot { min-height: 49px; }
.read .side-foot .back { line-height: 32px; }

/* Bottom nav: solid white row, with a blur above it that strengthens toward the bottom (no hard edge) */
@media (min-width: 1001px) {
  .endnav { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 0; }
  .endnav::after { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid var(--hair); }
  .pblur { position: absolute; left: 0; right: 0; bottom: 100%; height: 88px; pointer-events: none; }
  .pblur i { position: absolute; inset: 0; }
  .pblur i:nth-child(1) { backdrop-filter: blur(.5px); -webkit-backdrop-filter: blur(.5px); mask: linear-gradient(to bottom, transparent 0%, #000 20%, #000 40%, transparent 60%); -webkit-mask: linear-gradient(to bottom, transparent 0%, #000 20%, #000 40%, transparent 60%); }
  .pblur i:nth-child(2) { backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); mask: linear-gradient(to bottom, transparent 20%, #000 40%, #000 60%, transparent 80%); -webkit-mask: linear-gradient(to bottom, transparent 20%, #000 40%, #000 60%, transparent 80%); }
  .pblur i:nth-child(3) { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); mask: linear-gradient(to bottom, transparent 40%, #000 60%, #000 80%, transparent 100%); -webkit-mask: linear-gradient(to bottom, transparent 40%, #000 60%, #000 80%, transparent 100%); }
  .pblur i:nth-child(4) { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); mask: linear-gradient(to bottom, transparent 60%, #000 80%); -webkit-mask: linear-gradient(to bottom, transparent 60%, #000 80%); }
  /* a whisper of white so the blur settles into the white row */
  .pblur i:nth-child(5) { background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.55)); }
}
@media (max-width: 1000px) { .pblur { display: none; } }
.endnav { view-transition-name: endnav; } /* stays put while the screens slide */

/* Real progressive blur: 8 stacked layers, each blurrier and masked to a lower band (0.5px at the top → 64px at the strip). No white fade. */
@media (min-width: 1001px) {
  .endnav { left: calc(var(--gl) + var(--sw) + var(--gap) - 6px); width: calc(var(--group) - var(--sw) - var(--gap) + 12px); padding-left: 6px; padding-right: 6px; }
  .endnav::after { left: 6px; right: 6px; }
  .pblur { height: 128px; left: 0; right: 0; }
  .pblur i { background: none !important; }
  .pblur i:nth-child(1) { backdrop-filter: blur(0.5px); -webkit-backdrop-filter: blur(0.5px); mask: linear-gradient(to bottom, transparent 0%, #000 12.5%, #000 25%, transparent 37.5%); -webkit-mask: linear-gradient(to bottom, transparent 0%, #000 12.5%, #000 25%, transparent 37.5%); }
  .pblur i:nth-child(2) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to bottom, transparent 12.5%, #000 25%, #000 37.5%, transparent 50%); -webkit-mask: linear-gradient(to bottom, transparent 12.5%, #000 25%, #000 37.5%, transparent 50%); }
  .pblur i:nth-child(3) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); mask: linear-gradient(to bottom, transparent 25%, #000 37.5%, #000 50%, transparent 62.5%); -webkit-mask: linear-gradient(to bottom, transparent 25%, #000 37.5%, #000 50%, transparent 62.5%); }
  .pblur i:nth-child(4) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask: linear-gradient(to bottom, transparent 37.5%, #000 50%, #000 62.5%, transparent 75%); -webkit-mask: linear-gradient(to bottom, transparent 37.5%, #000 50%, #000 62.5%, transparent 75%); }
  .pblur i:nth-child(5) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); mask: linear-gradient(to bottom, transparent 50%, #000 62.5%, #000 75%, transparent 87.5%); -webkit-mask: linear-gradient(to bottom, transparent 50%, #000 62.5%, #000 75%, transparent 87.5%); }
  .pblur i:nth-child(6) { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); mask: linear-gradient(to bottom, transparent 62.5%, #000 75%, #000 87.5%, transparent 100%); -webkit-mask: linear-gradient(to bottom, transparent 62.5%, #000 75%, #000 87.5%, transparent 100%); }
  .pblur i:nth-child(7) { backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px); mask: linear-gradient(to bottom, transparent 75%, #000 87.5%, #000 100%); -webkit-mask: linear-gradient(to bottom, transparent 75%, #000 87.5%, #000 100%); }
  .pblur i:nth-child(8) { backdrop-filter: blur(64px); -webkit-backdrop-filter: blur(64px); mask: linear-gradient(to bottom, transparent 87.5%, #000 100%); -webkit-mask: linear-gradient(to bottom, transparent 87.5%, #000 100%); }
}
/* The blur sits outside the bottom strip (the strip is its own layer, so a blur inside it only saw white) */
@media (min-width: 1001px) {
  .pblur { position: fixed; z-index: 1; bottom: 76px; top: auto; height: 128px;
    left: calc(var(--gl) + var(--sw) + var(--gap) - 6px); right: auto; width: calc(var(--group) - var(--sw) - var(--gap) + 12px); }
  .endnav { height: 76px; padding-top: 16px; padding-bottom: 28px; box-sizing: border-box; }
}

/* Gentler, shorter progressive blur: 64px tall, 0.5px → 8px */
@media (min-width: 1001px) {
  .pblur { height: 64px; }
  .pblur i:nth-child(n+7) { display: none; }
  .pblur i:nth-child(1) { backdrop-filter: blur(0.5px); -webkit-backdrop-filter: blur(0.5px); mask: linear-gradient(to bottom, transparent 0.0%, #000 14.3%, #000 28.6%, transparent 42.9%); -webkit-mask: linear-gradient(to bottom, transparent 0.0%, #000 14.3%, #000 28.6%, transparent 42.9%); }
  .pblur i:nth-child(2) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to bottom, transparent 14.3%, #000 28.6%, #000 42.9%, transparent 57.1%); -webkit-mask: linear-gradient(to bottom, transparent 14.3%, #000 28.6%, #000 42.9%, transparent 57.1%); }
  .pblur i:nth-child(3) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); mask: linear-gradient(to bottom, transparent 28.6%, #000 42.9%, #000 57.1%, transparent 71.4%); -webkit-mask: linear-gradient(to bottom, transparent 28.6%, #000 42.9%, #000 57.1%, transparent 71.4%); }
  .pblur i:nth-child(4) { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); mask: linear-gradient(to bottom, transparent 42.9%, #000 57.1%, #000 71.4%, transparent 85.7%); -webkit-mask: linear-gradient(to bottom, transparent 42.9%, #000 57.1%, #000 71.4%, transparent 85.7%); }
  .pblur i:nth-child(5) { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); mask: linear-gradient(to bottom, transparent 57.1%, #000 71.4%, #000 85.7%, transparent 100.0%); -webkit-mask: linear-gradient(to bottom, transparent 57.1%, #000 71.4%, #000 85.7%, transparent 100.0%); }
  .pblur i:nth-child(6) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); mask: linear-gradient(to bottom, transparent 71.4%, #000 85.7%, #000 100.0%); -webkit-mask: linear-gradient(to bottom, transparent 71.4%, #000 85.7%, #000 100.0%); }
}
/* Faint white tint in the lower part of the blur, so the softened screen settles into the white strip */
@media (min-width: 1001px) {
  .pblur i:nth-child(7) { display: block; backdrop-filter: none; -webkit-backdrop-filter: none; -webkit-mask: none; mask: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 40%, rgba(255,255,255,.35) 75%, rgba(255,255,255,.8) 100%) !important; }
}
/* Twitter handle styled like the email; no "Copied" label */
a.email::after { content: none; }
.reach + .reach { margin-top: 8px; }
/* Email + Twitter: gray, black on hover; dotted underline under the text only (not the ↗) */
.email { color: var(--muted); border-bottom: 0; transition: color .2s; }
.email:hover { color: var(--ink); }
.email .ul { border-bottom: 1px dotted currentColor; }

/* Outcomes: the numbers that matter, pulled out of the prose */
.outcomes { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.outcomes dt { color: var(--ink); font-weight: 500; font-size: 23px; line-height: 32px; letter-spacing: -.01em; }
.outcomes dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
/* Outcomes, quieter: same size as the text, one line each — the number in ink, the label in gray */
.outcomes { display: grid; grid-template-columns: none; gap: 0; margin-top: 16px; padding-top: 0; border-top: 0; }
.outcomes > div { display: flex; gap: 6px; align-items: baseline; }
.outcomes dt { font-size: 15px; line-height: 24px; letter-spacing: 0; }
.outcomes dd { font-size: 15px; line-height: 24px; }
/* Back nudges left on hover, like the Previous link */
.back .arr { display: inline-block; transition: transform .2s var(--ease); }
.back:hover .arr { transform: translateX(-3px); }

/* outcomes sit like another paragraph */
.outcomes { margin-top: 12px; }
/* outcomes follow the text like one more paragraph (12px); the link keeps its space below */
.read .side > p:has(+ .outcomes) { margin-bottom: 0; }
.aside .outcomes { margin-top: 12px; margin-bottom: 24px; }
/* tighter rhythm between screens */
.shots { gap: 8px; }
/* external arrow nudges the way it points */
.email .arr { display: inline-block; transition: transform .2s var(--ease); }
.email:hover .arr { transform: translate(2px, -2px); }
@media (min-width: 1001px) {
  /* Blur band reaches 32px past the screens, so a blurred card edge fades into white instead of being cut off at the band's sides */
  .pblur { left: calc(var(--gl) + var(--sw) + var(--gap) - 32px); width: calc(var(--group) - var(--sw) - var(--gap) + 64px); }
  /* Room on the left of the scrolling sidebar so the ← can nudge without being clipped */
  .read .side { left: calc(var(--gl) - 12px); width: calc(var(--sw) + 12px); padding-left: 12px; box-sizing: border-box; }
}
/* Previous / Next stay at the edges, but each fills half the bar so the whole half is clickable */
.endnav { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.endnav a:first-child { justify-content: flex-start; }
.endnav a:last-child { justify-content: flex-end; }
/* Live-site link: blue dotted underline under the text only; ↗ nudges up-right on hover (same as the Twitter link) */
.aside .ext .ul { border-bottom: 1px dotted currentColor; }
.aside .ext .arr { display: inline-block; transition: transform .2s var(--ease); }
.aside .ext:hover .arr { transform: translate(2px, -2px); }
/* "Copied" uses the link blue */
.email::after { color: var(--link); }

/* ── Trial screen layouts (?layout=…) ─────────────── */
.shots { --tint: color-mix(in srgb, var(--c, #22385c) 7%, #f6f5f2); }
/* Stage: each screen rises out of a soft tinted panel, cropped at the panel's bottom edge */
.l-stage .shot { background: var(--tint); box-shadow: none; border-radius: 8px; padding: 48px 48px 0; min-height: 0; }
.l-stage .shot img { display: block; border-radius: 4px 4px 0 0; box-shadow: 0 0 0 1px rgba(18,18,18,.06), 0 16px 40px -12px rgba(18,24,40,.22); }

/* Photo background: same framing as the other panels (padding top and sides, screen runs off the bottom),
   with the screen in a thin frosted-glass frame over its own calm photo */
.shot .glass { display: contents; }
.shots.l-stage[data-bg="photo"] .shot { background: #c9d3e3 var(--photo) center / cover no-repeat; }
.shots.l-stage[data-bg="photo"] .glass { display: block; padding: 5px 5px 0; border-radius: 9px 9px 0 0;
  background: rgba(255,255,255,.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 24px 60px -16px rgba(18,24,40,.35); }
.shots.l-stage[data-bg="photo"] .glass img { border-radius: 4px 4px 0 0; box-shadow: none; }

/* ── Window, round 3 ───────────────────────────── */
/* Per-experience palette for the Window backdrops: four glow colours + a base */
.shots { --w1: #5a86d6; --w2: #6a68cc; --w3: #4677c2; --w4: #2f5598; --wb: #263c6c; }               /* Parcel: blue */
.shots[data-slug="releaseshq"] { --w1: #3cb3a6; --w2: #3a9fb8; --w3: #2c9488; --w4: #1f6f72; --wb: #1a5558; } /* teal */
.shots[data-slug="artisan"] { --w1: #f7f4ee; --w2: #eeeae1; --w3: #e7e2d6; --w4: #d9d2c3; --wb: #e2dccf; }    /* sand, from the cover (#ebe7de) */
.shots[data-slug="agnost-ai"] { --w1: #a596d8; --w2: #8479c4; --w3: #8a7cb4; --w4: #55488e; --wb: #37305c; }

/* ── Mobile experience page: Overview above the cover; Previous / Next pinned to the bottom ── */
@media (max-width: 1000px) {
  .read .side { display: flex; flex-direction: column; }
  .read .side .side-foot { order: -1; margin: 0 0 24px; padding: 0; border-top: 0; min-height: 0; }
  .read .side .side-foot .back { line-height: 24px; }
  .endnav { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; margin: 0; border-top: 0;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; }
  .endnav a { height: 32px; }
  .read .shots { padding-bottom: 112px; }
  /* progressive blur just above the white row: strengthens toward the bottom, no hard edge */
  .pblur { display: block; position: fixed; z-index: 3; left: 0; right: 0; top: auto; width: auto; pointer-events: none;
    bottom: calc(58px + env(safe-area-inset-bottom)); height: 48px; }
  .pblur i { position: absolute; inset: 0; display: block; background: none; }
  .pblur i:nth-child(n+6) { display: none; }
  .pblur i:nth-child(1) { backdrop-filter: blur(.5px); -webkit-backdrop-filter: blur(.5px); mask: linear-gradient(to bottom, transparent 0%, #000 25%, #000 50%, transparent 75%); -webkit-mask: linear-gradient(to bottom, transparent 0%, #000 25%, #000 50%, transparent 75%); }
  .pblur i:nth-child(2) { backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); mask: linear-gradient(to bottom, transparent 25%, #000 50%, #000 75%, transparent 100%); -webkit-mask: linear-gradient(to bottom, transparent 25%, #000 50%, #000 75%, transparent 100%); }
  .pblur i:nth-child(3) { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); mask: linear-gradient(to bottom, transparent 50%, #000 75%, #000 100%); -webkit-mask: linear-gradient(to bottom, transparent 50%, #000 75%, #000 100%); }
  .pblur i:nth-child(4) { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); mask: linear-gradient(to bottom, transparent 75%, #000 100%); -webkit-mask: linear-gradient(to bottom, transparent 75%, #000 100%); }
  .pblur i:nth-child(5) { background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.6)); }
}

/* ── Stage + Photo in every experience's colours ──
   Each panel is a soft mesh in the page's palette (teal / violet / purple / navy). Where a page has
   photos (Parcel), the photo sits on top, washed with the palette's deep base so it reads as the brand. */
.shots.l-stage[data-bg="photo"] .shot {
  background:
    radial-gradient(60% 55% at var(--mx, 18%) var(--my, 12%), var(--w1), transparent 72%),
    radial-gradient(55% 50% at 88% 35%, var(--w2), transparent 72%),
    radial-gradient(65% 60% at 30% 100%, var(--w3), transparent 72%),
    var(--wb); }
.shots.l-stage[data-bg="photo"] .shot:nth-child(2n) { --mx: 82%; --my: 8%; }
.shots.l-stage[data-bg="photo"] .shot:nth-child(3n) { --mx: 45%; --my: 0%; }
/* Photo panels: the photo is turned to greyscale, scaled to the page's brightness (--pb, from site.js) and
   softened, then coloured with one palette hue, so every panel on a page reads as the same shade. */
.shots.l-stage[data-bg="photo"] .shot[style*="--photo"] { position: relative; isolation: isolate; background: var(--w3); }
.shots.l-stage[data-bg="photo"] .shot[style*="--photo"]::before, .shots.l-stage[data-bg="photo"] .shot[style*="--photo"]::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.shots.l-stage[data-bg="photo"] .shot[style*="--photo"]::before { background: var(--photo) center / cover no-repeat; filter: grayscale(1) contrast(var(--pc, .75)) brightness(var(--pb, 1)); }
.shots.l-stage[data-bg="photo"] .shot[style*="--photo"]::after { background: color-mix(in srgb, var(--w4) 72%, #777); mix-blend-mode: color; }
/* Stage on phones: tighter panel padding so the screen keeps most of the width */
@media (max-width: 720px) {
  .l-stage .shot { padding: 20px 20px 0; }
  .shots.l-stage[data-bg="photo"] .glass { padding: 3px 3px 0; border-radius: 7px 7px 0 0; }
  .shots.l-stage[data-bg="photo"] .glass img { border-radius: 4px 4px 0 0; }
}
/* Water and dunes carry much more texture than the sea and sand photos, so they get a softer contrast */
.shots:is([data-slug="parcel"],[data-slug="agnost-ai"]) { --pc: .38; }
/* Looping screen recordings sit in the same frame as the stills (poster shows the first frame while it loads) */
.shot video { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 912; object-fit: cover; background: #fff; }
.l-stage .shot video { border-radius: 4px 4px 0 0; box-shadow: 0 0 0 1px rgba(18,18,18,.06), 0 16px 40px -12px rgba(18,24,40,.22); }
.shots.l-stage[data-bg="photo"] .glass video { border-radius: 4px 4px 0 0; box-shadow: none; }
@media (max-width: 720px) { .shots.l-stage[data-bg="photo"] .glass video { border-radius: 4px 4px 0 0; } }
/* Interactive embeds (e.g. a 3D mock) sit in the same frame as a screen */
.shot iframe.embed { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; background: #ececef; }
.shots.l-stage[data-bg="photo"] .glass iframe.embed { border-radius: 4px 4px 0 0; }

/* Light/dark pairs: both screens share one grid cell; the dark one fades in over the light one */
.shot .tw { display: grid; }
.shot .tw > img { grid-area: 1 / 1; }
.shot .tw img.t-dark { opacity: 0; transition: opacity .24s cubic-bezier(.23,1,.32,1); }
.shots[data-theme="dark"] .shot .tw img.t-dark.loaded { opacity: 1; }
/* Three side drawers on one stage, each in its own glass frame */
.shot.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; }
@media (max-width: 720px) { .shot.trio { gap: 8px; } }
/* Theme switch: a small frosted button in the stage's top-right corner, moon ↔ sun */
.shot:has(.theme-tg) { position: relative; }
.theme-tg { position: absolute; top: 12px; right: 12px; z-index: 2; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  transition: background-color .15s ease, transform .16s ease-out; }
.theme-tg svg { grid-area: 1 / 1; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity .2s cubic-bezier(.23,1,.32,1), transform .2s cubic-bezier(.23,1,.32,1); }
.theme-tg .sun, .shots[data-theme="dark"] .theme-tg .moon { opacity: 0; transform: rotate(-45deg) scale(.7); }
.shots[data-theme="dark"] .theme-tg .sun { opacity: 1; transform: none; }
.theme-tg:active { transform: scale(.94); }
.theme-tg:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .theme-tg:hover { background: rgba(255,255,255,.24); color: #fff; } }
@media (max-width: 720px) { .theme-tg { top: 4px; right: 4px; width: 22px; height: 22px; } .theme-tg svg { width: 11px; height: 11px; } }
@media (prefers-reduced-motion: reduce) { .theme-tg svg { transform: none !important; } }
/* Artisan's messaging recording is a little taller than the ReleasesHQ ones */
.shots[data-slug="artisan"] .shot video { aspect-ratio: 1600 / 956; }
