/* ============================================================
   sahilgarg.work
   Page is white + black (+ one blue). Colour lives on the cards.
   ============================================================ */

/* Geist Serif (Vercel, OFL; from the `geist` npm package). Only Regular exists so far,
   so the browser never fakes bold or italic, except for **bold** and *italic* in the text. */
@font-face {
  font-family: "Geist Sans";
  src: url("assets/fonts/GeistSans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Serif";
  src: url("assets/fonts/GeistSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-2: rgba(10, 10, 10, 0.58);
  --ink-3: rgba(10, 10, 10, 0.38);
  --hair: rgba(10, 10, 10, 0.08);
  --blue: #2f45ff;

  /* one face for the whole page; the four names stay so each role can be retuned on its own */
  --gs: "Geist Serif", "Times New Roman", Times, serif;
  --sans: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;   /* the animations */
  --display: var(--gs);
  --font: var(--gs);
  --serif: var(--gs);
  --read: var(--gs);   /* reading pages */
  --char: #232220;   /* charcoal: card shells, reading-page text */
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", cursive;

  /* motion */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-drawer: 620ms;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* set by app.js */
  --card-w: 920px;
  --body-h: 460px;
  --base-h: 72px;
  --bar-h: 34px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { font-synthesis: none; }
/* nothing is bold: strong keeps the regular weight; italics may still be slanted */
strong, b { font-weight: 400; }
em { font-synthesis: style; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
::selection { background: var(--blue); color: #fff; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
kbd {
  font: 500 11px/1 var(--mono);
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(10, 10, 10, 0.05);
  color: var(--ink-2);
}
:focus { outline: none; }
:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue); border-radius: 6px; }

/* ---------- nav: invisible, plain text ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 80;
  font-size: 14px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

/* ---------- the sg mark: "sg" in Fraunces (opsz 72, wght 620, SOFT 50) as one path, cream on a bronze tile ----------
   The light comes from the top left and pools dark at the bottom right. Same gradients as tools/brand.py,
   which draws favicon.svg, the PNG icons and og.png. */
.nav-brand { display: flex; align-items: center; gap: 11px; border-radius: 10px; text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.nav-brand:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sg {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 22%; overflow: hidden; isolation: isolate;
  box-shadow: inset 0 0 0 0.5px rgba(42, 25, 16, 0.14), 0 1px 2px rgba(42, 25, 16, 0.18), 0 6px 14px -8px rgba(42, 25, 16, 0.5);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.sg-glyph { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; fill: #fcf7e7; }
.sg-bg { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(58% 52% at 21% 25%, rgba(232, 206, 176, 0.95) 0%, rgba(214, 182, 150, 0.55) 38%, rgba(214, 182, 150, 0) 72%),
  radial-gradient(48% 40% at 72% 16%, rgba(196, 160, 132, 0.55) 0%, rgba(196, 160, 132, 0) 70%),
  radial-gradient(62% 56% at 80% 84%, rgba(84, 50, 36, 0.95) 0%, rgba(92, 57, 42, 0.55) 42%, rgba(92, 57, 42, 0) 78%),
  linear-gradient(150deg, #c49e80 0%, #a87f65 46%, #7b5442 100%); }
.nav-brand:hover .sg { transform: translateY(-1px); box-shadow: inset 0 0 0 0.5px rgba(42, 25, 16, 0.14), 0 2px 4px rgba(42, 25, 16, 0.2), 0 10px 20px -8px rgba(42, 25, 16, 0.55); }
.nav-brand:active .sg { transform: scale(0.95); }
@media (prefers-reduced-motion: reduce) { .sg { transition: none; } }
.nav-link {
  color: var(--ink-2);
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  transition: color 0.15s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--ink); }

/* ---------- stage ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; }

.hero {
  position: absolute;
  left: 0; right: 0;
  top: var(--hero-top, 140px);
  padding: 0 24px;
  text-align: center;
  transition: opacity 0.32s var(--ease-out), transform var(--t-drawer) var(--ease-drawer), filter 0.32s var(--ease-out);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 5.6vw, 84px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero h1 .u { position: relative; display: inline-block; }
.scribble {
  position: absolute;
  left: -3%;
  width: 108%;
  top: 88%;
  height: 0.42em;
  overflow: visible;
  pointer-events: none;
}
.scribble path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero p {
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: 16.5px;
  color: rgba(10, 10, 10, 0.8);
  letter-spacing: 0;
  line-height: 1.5;
  text-wrap: balance;
}
/* the intro line: lower case as written, a softer grey so the name stays the loudest thing */
#subline { color: rgba(10, 10, 10, 0.62); }
.hero p .sl { display: block; }
.hero p .sl + .sl { margin-top: 2px; }

/* "craft" pill (assets/craft.js): the word in white italic on a looping clip. Its negative block margin keeps
   the 1.6em pill from making the line taller, so nothing around it moves. */
.craft-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  height: 1.6em; margin: -0.3em 0.06em -0.2em; padding: 0 0.5em 0 0.42em; border: 0; border-radius: 0.45em;
  overflow: hidden; isolation: isolate; cursor: pointer;
  z-index: 10;   /* the drawer (#drawer) spans the hero; lift the pill above it so it gets the hover and tap */
  font: inherit; font-style: italic; font-synthesis: style; line-height: 1; color: #fff; background: #3a332e;   /* Geist Serif has no italic: let this one be slanted */
  -webkit-tap-highlight-color: transparent;
}
.craft-pill-media { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.craft-pill::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.25); pointer-events: none; }
.craft-pill-word { position: relative; padding-right: 0.05em; -webkit-text-stroke: 0.03em #fff;   /* no bold cut either, so thicken the strokes */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 10px rgba(0, 0, 0, 0.3); }
.craft-pill:focus { outline: none; }
.craft-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* its card: on <body>, position: fixed, so it floats over the stack */
.craft-card {
  --ax: 50%;
  position: fixed; z-index: 76; left: 0; top: 0;
  width: 380px; max-width: 90vw; box-sizing: border-box; padding: 18px 18px 16px;
  background: #fff; border-radius: 16px; color: #0a0a0a; text-align: left;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.06), 0 1px 2px rgba(10, 10, 10, 0.05), 0 10px 30px -8px rgba(10, 10, 10, 0.16), 0 30px 60px -24px rgba(10, 10, 10, 0.16);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out), visibility 0s linear 0.18s;
}
.craft-card.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out); }
.craft-card::before {   /* the arrow, pointing up at the pill */
  content: ""; position: absolute; top: -6px; left: calc(var(--ax) - 7px);
  width: 14px; height: 14px; background: #fff; border-radius: 3px 0 0 0; transform: rotate(45deg); box-shadow: -1px -1px 0 rgba(10, 10, 10, 0.06);
}
.cc-head { display: flex; align-items: baseline; gap: 10px; }
.cc-word { font-family: var(--gs); font-style: italic; font-size: 1.5rem; line-height: 1.1; }
.cc-ipa, .cc-src { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 12.5px; color: rgba(10, 10, 10, 0.5); }
.cc-def { margin: 8px 0 0; font-family: var(--gs); font-size: 1.05rem; line-height: 1.4; }
.cc-src { margin: 6px 0 14px; }
.cc-media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #eee; }
body.is-lifted .hero {
  opacity: 0;
  transform: translateY(-18px);
  filter: blur(6px);
  pointer-events: none;
}

/* ---------- the drawer ---------- */
.drawer { position: absolute; inset: 0; }

.card {
  position: absolute;
  top: 0;
  left: calc(50% - var(--card-w) / 2);
  width: var(--card-w);
  transform-origin: 50% 0;
  /* every card shares one charcoal shell, so a lit top edge and a soft shadow
     cast up onto the card behind keep the stack readable */
  background: var(--frame, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 -10px 26px -14px rgba(0, 0, 0, 0.55);
  color: var(--frame-ink, var(--ink));
  border-radius: 20px;
  padding: 0 4px 4px;
  transition: transform var(--t-drawer) var(--ease-drawer);
  will-change: transform;
  cursor: pointer;
}
.card.is-lifted { cursor: default; }

/* the tab: label + meta. It's what you see when a card is filed away. */
.card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--bar-h);
  padding: 0 12px 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: left;
  border-radius: 16px 16px 0 0;
}
/* the tab label: the name set large in serif italic, its number as a footnote marker */
.card-bar .label {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  padding-top: 2px;
}
.card-bar .name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;   /* smaller since the tabs went charcoal */
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.card-bar .meta {
  display: grid;
  font-weight: 400;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}
.card-bar .meta > * {
  grid-area: 1 / 1;
  justify-self: end;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.3s var(--ease-out);
}
.card-bar .putback { opacity: 0; transform: translateY(4px); }
.card.is-lifted .card-bar .glyph { opacity: 0; transform: translateY(-4px); }

/* ---------- tab glyphs ----------
   Small, slow, one ink. They run while the drawer is closed, pause on filed
   tabs while a card is out, and sit still for reduced motion. */
.glyph {
  display: block;
  width: 64px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.card.is-filed .glyph * { animation-play-state: paused; }

/* experience: a line draws through three dots, then erases forward */
.g-timeline .track { opacity: 0.22; }
.g-timeline .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tl-draw 3.6s linear infinite; }
.g-timeline .dot { fill: currentColor; stroke: none; opacity: 0.28; transform-box: fill-box; transform-origin: center; animation: 3.6s linear infinite; }
.g-timeline .d1 { animation-name: tl-d1; }
.g-timeline .d2 { animation-name: tl-d2; }
.g-timeline .d3 { animation-name: tl-d3; }
@keyframes tl-draw { 0% { stroke-dashoffset: 1; } 45%, 72% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes tl-d1 { 0% { opacity: 1; transform: scale(1.6); } 5% { transform: scale(1); } 71% { opacity: 1; } 74%, 100% { opacity: 0.28; } }
@keyframes tl-d2 { 0%, 22% { opacity: 0.28; transform: scale(1); } 23% { opacity: 1; transform: scale(1.6); } 28% { transform: scale(1); } 85% { opacity: 1; } 88%, 100% { opacity: 0.28; } }
@keyframes tl-d3 { 0%, 44% { opacity: 0.28; transform: scale(1); } 45% { opacity: 1; transform: scale(1.6); } 50% { transform: scale(1); } 97% { opacity: 1; } 100% { opacity: 0.28; } }

/* ramblings: a cursor, blinking like a real one (hard on/off) */
.g-caret .cursor { fill: currentColor; stroke: none; animation: caret 1.06s steps(1, end) infinite; }
@keyframes caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* video: a playhead runs the track, loops like a clip */
.g-playhead .tri { fill: currentColor; stroke: none; }
.g-playhead .track { opacity: 0.25; }
.g-playhead .prog { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ph-prog 6s linear infinite; }
.g-playhead .head { fill: currentColor; stroke: none; animation: ph-head 6s linear infinite; }
@keyframes ph-prog { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ph-head { from { transform: translateX(0); } to { transform: translateX(37px); } }

/* recent work: four bars rise one after another */
.g-bars .base { opacity: 0.35; }
.g-bars rect { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: 50% 100%; animation: bars 2.8s cubic-bezier(0.32, 0.72, 0, 1) infinite; }
.g-bars .b2 { animation-delay: 0.14s; }
.g-bars .b3 { animation-delay: 0.28s; }
.g-bars .b4 { animation-delay: 0.42s; }
@keyframes bars { 0% { transform: scaleY(0.18); } 30%, 72% { transform: scaleY(1); } 100% { transform: scaleY(0.18); } }

/* content: a record turning */
.g-disc .spin { transform-box: fill-box; transform-origin: center; animation: disc 4.8s linear infinite; }
.g-disc .shine { opacity: 0.55; }
.g-disc .hub { fill: currentColor; stroke: none; }
@keyframes disc { to { transform: rotate(360deg); } }
.card.is-lifted .card-bar .putback { opacity: 1; transform: none; }
.card.is-lifted .card-bar:hover .meta { opacity: 1; }
.card.is-lifted .card-bar { cursor: pointer; }

.card-body {
  position: relative;
  height: calc(var(--body-h) + var(--base-h));
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
}

/* veil on cards that are filed while another is out */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.card.is-filed::after { opacity: 0.38; }
.card.is-filed:hover::after { opacity: 0.12; }

/* while filed, a card shows only its tab name and imagery;
   the column titles arrive once it's pulled out */
.col-head, .col.essay .num, .col.essay .excerpt, .col.essay .read, .col.art::before {
  transition: opacity 0.28s var(--ease-out);
}
.card:not(.is-lifted) .col-head,
.card:not(.is-lifted) .col.essay .num,
.card:not(.is-lifted) .col.essay .excerpt,
.card:not(.is-lifted) .col.essay .read,
.card:not(.is-lifted) .col.art::before { opacity: 0; }
.card.is-lifted .col-head,
.card.is-lifted .col.essay .num,
.card.is-lifted .col.essay .excerpt { transition-delay: 0.16s; }

/* ---------- columns ---------- */
.cols {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 4px;
  height: 100%;
}
.col {
  --ink-on: var(--ink);
  position: relative;
  display: block;
  height: 100%;
  background: var(--c);
  color: var(--ink-on);
  border-radius: 6px;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  cursor: inherit;
}
.card.is-lifted .col { cursor: pointer; }
.col-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 0;
}
.col-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  white-space: nowrap;
}
.col-sub {
  font-size: 12.5px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.col-open {
  position: absolute;
  z-index: 4;
  right: 12px;
  top: calc(var(--body-h) - 58px);
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s, transform 0.3s var(--ease-out);
  pointer-events: none;
}
.card.is-lifted .col:hover .col-open,
.card.is-lifted .col:focus-visible .col-open { opacity: 1; transform: none; }

/* ---------- art columns: one treated photo per section ---------- */
.col .art-img {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: calc(var(--body-h) - 16px);
  object-fit: cover;
  object-position: 50% 35%;
  transform: scale(1.001);
  transition: transform 0.9s var(--ease-drawer), filter 0.4s var(--ease-out);
}
/* shade behind the title so it reads over busy art */
.col.art::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 64px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5, 9, 48, 0.55), transparent);
}
.card.is-lifted .col.art:hover .art-img { transform: scale(1.035); filter: brightness(1.06); }
.pane-head .art-wide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pane-head .scrim.ink { background: linear-gradient(to top, rgba(5, 9, 48, 0.85), rgba(5, 9, 48, 0.35) 45%, transparent 75%); }

/* ---------- essay columns (ramblings) ---------- */
.col.essay .col-head { display: block; padding: 16px 18px 0; }
.col.essay .num {
  position: absolute;
  z-index: 3;
  right: 16px;
  top: 16px;
  font: 400 12px/1 var(--mono);
  opacity: 0.55;
}
.col.essay .col-title {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: normal;
  padding-right: 28px;
}
.col.essay .col-sub { display: block; margin-top: 10px; }
.col.essay .excerpt {
  position: relative;
  z-index: 3;
  margin: 26px 18px 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.78;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(var(--body-h) - 210px);
}
.col.essay .read {
  position: absolute;
  z-index: 3;
  left: 18px;
  top: calc(var(--body-h) - 54px);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  gap: 6px;
  align-items: center;
}
.col.essay .read span { transition: transform 0.3s var(--ease-out); }
.card.is-lifted .col.essay:hover .read span { transform: translateX(3px); }

/* ---------- video card ---------- */
.video-body { background: #0a0a0a; }
.video-body video {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: var(--body-h);
  object-fit: contain;
  background: #0a0a0a;
}
.video-body .poster {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--body-h);
  width: 100%;
  object-fit: cover;
  transition: opacity 0.4s;
}
.video-body.is-playing .poster { opacity: 0; }
/* the YouTube player, once it's playing */
.video-body .yt-slot iframe { position: absolute; left: 0; top: 0; z-index: 2; width: 100%; height: var(--body-h); border: 0; background: #0a0a0a; }
.play {
  position: absolute;
  left: 50%;
  top: calc((var(--body-h) - 16px) / 2);
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.card:not(.is-lifted) .play { opacity: 0; transform: scale(0.9); }
.video-body.is-playing .play { opacity: 0; transform: scale(1.1); pointer-events: none; }
.video-body.is-playing:hover .play { opacity: 0; }
.video-body .vbar {
  position: absolute;
  left: 0;
  top: calc(var(--body-h) - 18px);
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: #fff;
  opacity: 0.85;
}
.video-body .mute {
  position: absolute;
  right: 12px;
  top: 12px;
  height: 28px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s;
}
.card.is-lifted .video-body.is-started .mute { opacity: 1; }

/* ---------- drawer lip: the front of the drawer ---------- */
.lip {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 100vh;
  z-index: 40;
  background: var(--bg);
  transform: translateY(var(--lip-y, 100vh));
  transition: transform var(--t-drawer) var(--ease-drawer);
  pointer-events: none;
}
.lip::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% - 1px);   /* overlap by a pixel so no seam shows */
  height: 34px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 100%);
}
body.is-lifted .lip::before { height: 30px; }
.hint {
  margin: 18px 0 0;
  text-align: center;
  font: 400 12px/1 var(--mono);
  color: var(--ink-3);
  letter-spacing: 0;
  transition: opacity 0.3s;
}

/* ---------- pane ---------- */
.pane-layer { position: fixed; inset: 0; z-index: 82; }
.pane-layer[hidden] { display: none; }
.pane-scrim {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.pane-layer.is-open .pane-scrim { opacity: 1; }
.pane {
  --c: #eee; --cd: #222; --ink-on: #0a0a0a;
  position: absolute;
  left: calc(50% - var(--pane-w) / 2);
  top: var(--pane-top);
  width: var(--pane-w);
  height: var(--pane-h);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.08), 0 40px 90px -30px rgba(10, 10, 10, 0.4);
  clip-path: inset(0 round 20px);
  transform-origin: 0 0;
  transition: clip-path 0.52s var(--ease-drawer), transform 0.52s var(--ease-drawer), background-color 0.3s var(--ease-out);
  will-change: clip-path, transform;
}
.pane-head {
  position: relative;
  flex: none;
  height: 200px;
  overflow: hidden;
  transition: height 0.32s var(--ease-drawer);
}
.pane-head .ph-layer {
  position: absolute;
  inset: 0;
  background: var(--c);
  color: var(--ink-on);
  transition: opacity 0.24s var(--ease-out);
}
.pane-head .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--c) 0%, color-mix(in srgb, var(--c) 70%, transparent) 30%, transparent 70%);
  pointer-events: none;
}
.pane-head .titles {
  position: absolute;
  left: 32px;
  right: 80px;
  bottom: 22px;
}
.pane-head h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.pane-head .essay-title h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 54px;
  letter-spacing: -0.01em;
}
.pane-head .sub {
  margin-top: 8px;
  font-size: 13.5px;
  opacity: 0.75;
}
.pane-x {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s var(--ease-out), background 0.15s;
}
.pane-x:hover { background: #fff; }
.pane-x:active { transform: scale(0.94); }

.pane-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 40px 48px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.18) transparent;
}
.pane-body .content { transition: opacity 0.2s var(--ease-out), transform 0.28s var(--ease-out); }
.pane-body .content.is-out { opacity: 0; transform: translateY(6px); pointer-events: none; }
.prose {
  max-width: 60ch;
  font-size: 16.5px;
  line-height: 1.72;
  color: #161616;
  letter-spacing: -0.003em;
}
.prose > p { margin: 0 0 1em; }
.prose > h3 {
  margin: 1.9em 0 0.5em;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.prose > ul { margin: 0 0 1em; padding-left: 1.1em; }
.prose > ul > li { margin: 0 0 0.35em; }
.prose > ul > li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-family: var(--serif); font-style: italic; font-size: 1.08em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 0;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink);
  text-indent: -0.4em;
}
.prose a.ext {
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.prose a.ext:hover { text-decoration-color: var(--ink); }
.prose a.ext::after { content: "\2009\2197"; font-size: 0.85em; color: var(--ink-3); }

/* references: a highlighter mark. Click one and the page blurs while its meaning
   writes itself in after the word; click anywhere (or Esc) and the page comes back. */
.prose {
  position: relative;
  --mark: var(--blue);                   /* the open word */
  --mark-rest: rgba(47, 69, 255, 0.09);
  --mark-hover: rgba(47, 69, 255, 0.16);
  --mark-ink: #fff;
  --lk-ink: #0a0a0a;
}
.ref, .lk-word {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  padding: 0 3px;
  margin: 0 -3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ref {
  background: var(--mark-rest);
  cursor: pointer;
  transition: background 0.15s, opacity 0.2s;
}
.ref:hover { background: var(--mark-hover); }
.ref:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ref.is-on { opacity: 0; }

:where(.content > :not(.prose), .prose > :not(.lk)) {
  transition: filter 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}
.content.is-looking > :not(.prose),
.content.is-looking .prose > :not(.lk) {
  filter: blur(5px);
  opacity: 0.32;
  pointer-events: none;
  user-select: none;
}
.lk {
  position: absolute;
  z-index: 2;
  color: var(--lk-ink);
  cursor: default;
  transition: opacity 0.18s;
}
.lk.is-gone { opacity: 0; }
.lk-word { background: var(--mark); color: var(--mark-ink); cursor: pointer; }
/* words arrive one after another, each sharpening as it lands */
.lk-w {
  display: inline-block;
  text-indent: 0;
  animation: lk-in 0.55s var(--ease-out) calc(var(--i) * 42ms + 0.08s) both;
}
@keyframes lk-in { from { opacity: 0; filter: blur(4px); } }
.lk-go {
  font: inherit;
  color: inherit;
  opacity: 0.6;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.lk-go:hover { opacity: 1; }
.lk-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pane-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  background: rgba(10, 10, 10, 0.05);
  transition: background 0.15s;
}
.pane-link:hover { background: rgba(10, 10, 10, 0.08); }

.pane-foot {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 10px;
  border-top: 1px solid var(--hair);
  background: #fff;
}
.pf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.pf-btn:hover:not(:disabled) { background: rgba(10, 10, 10, 0.045); color: var(--ink); }
.pf-btn:disabled { opacity: 0.35; cursor: default; }
.pf-prev { justify-self: start; }
.pf-next { justify-self: end; }
.pf-btn .k { color: var(--ink-3); }
.pf-btn .sw { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }

/* ---------- reading pane (Experience): white page, charcoal text, one serif, nothing else.
   Three sizes only: --t1 the title, --t2 everything you read, --t3 the small print. ---------- */
.pane.is-reading { --t1: 40px; --t2: 13px; --t3: 11px; --col: calc(var(--t2) * 40); background: #fff; color: var(--char); }
/* one column: the opener, text, figures, clips, the video and the call-outs share one width and one left edge */
.pane.is-reading .hook, .pane.is-reading .r-title, .pane.is-reading .prose > * { max-width: var(--col); }
.pane.is-reading .pane-head { height: 56px; }
.ph-layer.reading-head { background: none; }
.r-title { margin: 30px 0 26px; }
/* the hook: a 4:1 strip that opens the page, above the title */
.hook { display: block; margin: 20px 0 0; }
.hook + .r-title { margin-top: 26px; }
.r-title h2 {
  margin: 0;
  font-family: var(--read);
  font-weight: 400;
  font-size: var(--t1);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--char);
}
.r-sub { margin: 10px 0 0; font-size: var(--t3); color: rgba(35, 34, 32, 0.55); }
.pane.is-reading .pane-x { background: rgba(35, 34, 32, 0.06); color: var(--char); box-shadow: none; }
.pane.is-reading .pane-x:hover { background: rgba(35, 34, 32, 0.11); }
.pane.is-reading .pane-body { padding: 0 68px 64px 40px; }
/* text dissolves under the slim bar instead of being cut at its edge */
.pane.is-reading .pane-body { -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
.pane.is-reading .prose {
  max-width: none;
  font-family: var(--read);
  font-size: var(--t2);
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--char);
}
.pane.is-reading .prose > p { margin: 0 0 1.1em; }
.pane.is-reading .prose em { font-family: var(--read); font-size: 1em; }
.pane.is-reading .prose > h3 { margin: 2em 0 0.6em; font: 400 var(--t2)/1.4 var(--read); color: rgba(35, 34, 32, 0.5); }
.pane.is-reading .prose > ul { margin: 0 0 1.4em; padding: 0; list-style: none; }
.pane.is-reading .prose > ul > li { position: relative; margin: 0 0 1em; padding-left: 1.35em; }
.pane.is-reading .prose > ul > li::before {
  content: "";
  position: absolute;
  left: 0.25em;
  top: 0.76em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(35, 34, 32, 0.32);
}
.pane.is-reading ::selection { background: var(--char); color: #fff; }
.pane.is-reading .prose .fig { width: 100%; }
/* tactic call-outs: ::tactic blocks, side by side when there's room.
   On reading pages they hang under the bullet that introduces them, lined up with its text. */
.tactics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0 0 1.6em;
}
.tactic {
  padding: 14px 16px 16px;
  border-radius: 12px;
  background: #f7f6f3;
  box-shadow: inset 0 0 0 1px rgba(35, 34, 32, 0.07);
}
.tactic h4 { margin: 0 0 6px; font: 400 1em/1.5 var(--read); color: var(--char); }
.tactic p:last-child { margin: 0; font-size: 1em; line-height: 1.6; color: rgba(35, 34, 32, 0.74); }
.pane.is-reading .prose > .tactics { margin: 0 0 1.6em; }

/* ::clip and ::shot: a screen recording that loops while it's on screen (click to pause), or a still */
.media { margin: 24px 0 28px; }
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #f7f6f3;
  box-shadow: 0 0 0 1px rgba(35, 34, 32, 0.09), 0 12px 32px -18px rgba(35, 34, 32, 0.35);
}
.media-frame video, .media-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media video { cursor: pointer; }
.media.is-tall { max-width: 400px; }
/* a tactic with its own figure takes the whole row: the figure beside its text (above it on phones) */
.tc-fig { margin: 0 0 14px; }
.tactics:has(.has-fig) > .tactic { grid-column: 1 / -1; }
.tactic.has-fig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.tactic.has-fig .tc-fig { margin: 0; }
@media (max-width: 720px) { .tactic.has-fig { grid-template-columns: 1fr; gap: 12px; } }

/* ::youtube: the thumbnail and a play button; the player replaces it on click */
.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 28px 0 36px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(35, 34, 32, 0.08);
}
.yt-play, .yt iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.yt-play { padding: 0; cursor: pointer; }
/* YouTube's thumbnails carry a few rows of black top and bottom: scale them just past the frame */
.yt-play img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); transition: transform 0.6s var(--ease-out), filter 0.3s; }
.yt-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(35, 34, 32, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease-out), background 0.2s;
}
.yt-btn svg { width: 24px; height: 24px; margin-left: 3px; fill: #fff; }
@media (hover: hover) {
  .yt-play:hover img { transform: scale(1.035); filter: brightness(0.92); }
  .yt-play:hover .yt-btn { background: rgba(35, 34, 32, 0.86); transform: translate(-50%, -50%) scale(1.06); }
}
.yt-play:active .yt-btn { transform: translate(-50%, -50%) scale(0.95); }
.yt-play:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 14px; }

/* animated figures from the motion lab: full column width, breathing room around them */
.prose .fig { width: calc(var(--pane-w) - 80px); max-width: none; margin: 36px 0 42px; }
.part { display: block; height: 0; }

/* section bar: beginning / middle / end */
.pane-map {
  position: absolute;
  right: 8px;
  top: 50%;
  z-index: 6;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.pane-map[hidden] { display: none; }
.pm-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 34px;
  height: 26px;
  padding-right: 6px;
}
.pm-bar {
  display: block;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: rgba(35, 34, 32, 0.25);
  transition: width 0.3s var(--ease-out), background 0.2s;
}
.pm-line:hover .pm-bar { width: 18px; background: rgba(35, 34, 32, 0.6); }
.pm-line.is-on .pm-bar { width: 24px; background: var(--char); }
.pm-label {
  position: absolute;
  right: 38px;
  padding: 5px 8px;
  border-radius: 6px;
  font: 400 11.5px/1 var(--mono);
  white-space: nowrap;
  color: #fff;
  background: var(--char);
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.16s, transform 0.2s var(--ease-out);
  pointer-events: none;
}
.pm-line:hover .pm-label, .pm-line:focus-visible .pm-label { opacity: 1; transform: none; }
.pm-line:focus-visible { box-shadow: none; }
.pm-line:focus-visible .pm-bar { background: var(--char); }

/* the AIESEC figures are the lab's package, kept identical to it, so they're rethemed from here:
   dark like every other figure, one sans, no titles or notes, and the chapter labels as pill tabs */
.pane .fx {
  --ink: #ededed;
  --ink-2: #a0a0a0;
  --ink-3: #6e6e6e;
  --hair: rgba(255, 255, 255, 0.06);
  --blue: #4a6aff;
  --card: #1a1a1a;
  --font: var(--sans);
  --mono: var(--sans);
  --fx-ink-rgb: 237, 237, 237;
  --fx-blue-rgb: 74, 106, 255;
  border-radius: 12px;
  font-size: 13px;
}
.pane .fx-cap, .pane .am .need .note, .pane .tk .tk-note, .pane .tk .tk-pill { display: none; }
/* the map keeps one line per beat, defining its term (Supply: …, Demand: …, Package: …, Bundle: …) */
.pane .am .fx-cap { display: block; height: 46px; }
.pane .am .fx-line { top: 18px; font-size: 13px; font-weight: 400; letter-spacing: normal; color: var(--ink-2); }
.pane .am .fx-line .w:first-child { color: var(--ink); }
.pane .am.is-narrow .fx-cap { height: 58px; }
.pane .am.is-narrow .fx-line { top: 14px; }
.pane .fx-play:hover { background: rgba(255, 255, 255, 0.06); }
.pane .fx-ticks i { background: rgba(255, 255, 255, 0.18); }
.pane .fx-ticks i.lit { background: var(--ink); }
.pane .fx-beats button { font-size: 11px; padding: 4px 8px; margin-left: -8px; border-radius: 999px; transition: color 0.15s, background 0.2s; }
.pane .fx-beats button.on { color: #161616; background: var(--ink); }
.pane .fx .chip, .pane .am .need { background: #2a2a2a; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.pane .fx .chip b { font-size: 11px; font-weight: 400; }
.pane .am .chip .pkg span { background: rgba(74, 106, 255, 0.2); font: 400 11px/15px var(--sans); color: #b4c0ff; }
.pane .am .need li { font-size: 11px; }
.pane .am .need .m { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.pane .am .am-tip { background: rgba(42, 42, 42, 0.94); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.pane .am .am-tip h4 { font-size: 11px; font-weight: 400; }
.pane .am .am-tip .row { font-size: 11px; }
.pane .am .am-tip .bar { background: rgba(255, 255, 255, 0.1); }
.pane .tk .ig-veil { background: rgba(26, 26, 26, 0.86); }
.pane .tk .art-head b { font-weight: 400; }
/* the slides themselves stay paper: dark text on their white cards */
.pane .tk .art { --ink: #0a0a0a; --ink-2: rgba(10, 10, 10, 0.58); --ink-3: rgba(10, 10, 10, 0.38); color: var(--ink); }

/* ---------- rail: the cards as icons beside an open pane ----------
   An icon opens a row of folders (its sections), each with its picture inside.
   Opening, the folders slide out of the icon one after another; closing, they
   slide back in, last one first. Under 76px of room on the left, the rail
   moves under the pane and the folders rise in a column instead. */
.rail {
  position: absolute;
  z-index: 7;
  left: var(--rail-x, 28px);
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  opacity: 0;
  transform: translate(-8px, -50%);
  pointer-events: none;
  transition: opacity 0.24s var(--ease-out), transform 0.4s var(--ease-drawer);
}
/* the capsule is a layer of its own, so the tray's frost (a child of the rail) still blurs the page */
.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--hair), 0 20px 44px -22px rgba(10, 10, 10, 0.45);
}
.pane-layer.is-open .rail {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
  transition-delay: 0.16s;
}
.rl-item { position: relative; }
/* each card is a folder in its card's colour (app.js folderIcon), its mark etched into the front */
.rl-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border-radius: 12px;
  transition: background-color 0.18s, transform 0.2s var(--ease-out);
}
.rl-icon:active { transform: scale(0.92); }
.rl-icon:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.rl-item.is-open .rl-icon { background: rgba(10, 10, 10, 0.06); }

.rf { width: 32px; height: 27px; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(10, 10, 10, 0.22)); }
.rf-back { fill: var(--f-back); }
.rf-paper { fill: #fbfaf7; stroke: rgba(10, 10, 10, 0.08); stroke-width: 0.5; transform-box: fill-box; transform-origin: center bottom;
  transform: translateY(3px); transition: transform 0.35s var(--ease-out); }
.rf-front { transform-box: fill-box; transform-origin: center bottom; transition: transform 0.35s var(--ease-out); }
.rf-face { fill: var(--f-front); }
.rf-shine { fill: rgba(255, 255, 255, 0.35); }
/* the etched mark: a dark cut, with a pale lip just under it */
.rf-etch { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rf-lo { color: rgba(0, 0, 0, 0.42); }
.rf-hi { color: rgba(255, 255, 255, 0.38); }
.rf * { animation: none !important; }
.rf .g-timeline .draw, .rf .draw { stroke-dashoffset: 0; }
.rf .dot { opacity: 1; }
.rf .track { opacity: 0.5; }
.rf .lines { opacity: 1; }
.rf .hub { fill: currentColor; }
/* open a little on hover; the card you're reading stays open, its sheet up */
@media (hover: hover) {
  .rl-icon:hover .rf-front { transform: perspective(60px) rotateX(-22deg); }
  .rl-icon:hover .rf-paper { transform: translateY(-1px); }
}
.rl-item.is-here .rf-front, .rl-item.is-open .rf-front { transform: perspective(60px) rotateX(-26deg); }
.rl-item.is-here .rf-paper, .rl-item.is-open .rf-paper { transform: translateY(-1.5px); }
@media (prefers-reduced-motion: reduce) { .rf-front, .rf-paper { transition: none; } }

.rl-tip {
  position: absolute;
  left: 49px;
  top: 50%;
  padding: 5px 8px;
  border-radius: 6px;
  font: 400 11.5px/1 var(--mono);
  white-space: nowrap;
  color: #fff;
  background: var(--ink);
  opacity: 0;
  transform: translate(-4px, -50%);
  pointer-events: none;
  transition: opacity 0.16s, transform 0.2s var(--ease-out);
}
@media (hover: hover) {
  .rl-item:not(.is-open) .rl-icon:hover + .rl-tip { opacity: 1; transform: translate(0, -50%); }
}

/* the row: a frosted tray that unrolls from the icon */
.rl-row {
  position: absolute;
  left: 49px;
  top: 50%;
  display: flex;
  gap: 2px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--hair), 0 20px 44px -22px rgba(10, 10, 10, 0.45);
  transform: translateY(-50%);
  clip-path: inset(0 100% 0 0 round 16px);
  visibility: hidden;
  transition: clip-path 0.3s cubic-bezier(0.5, 0, 0.75, 0) 0.08s, visibility 0s 0.4s;
}
.rl-item.is-open .rl-row {
  clip-path: inset(0 0 0 0 round 16px);
  visibility: visible;
  transition: clip-path 0.5s var(--ease-drawer), visibility 0s;
}

.rl-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 84px;
  padding: 6px 0 7px;
  border-radius: 10px;
  opacity: 0;
  transform: translateX(calc(var(--i) * -86px - 50px)) scale(0.6);
  transition:
    transform 0.26s cubic-bezier(0.5, 0, 0.75, 0) calc((var(--n) - 1 - var(--i)) * 24ms),
    opacity 0.18s calc((var(--n) - 1 - var(--i)) * 24ms + 70ms),
    background 0.15s;
}
.rl-item.is-open .rl-folder {
  opacity: 1;
  transform: none;
  transition:
    transform 0.5s var(--ease-drawer) calc(var(--i) * 40ms),
    opacity 0.22s calc(var(--i) * 40ms),
    background 0.15s;
}
.rl-folder:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* the folder: back with a tab, the picture, a front flap leaning forward.
   Every shell is the same warm charcoal, so only the pictures carry colour. */
.fd {
  --shell: #2b2a28;
  --shell-back: #1c1b1a;
  position: relative;
  display: block;
  width: 76px;
  height: 58px;
}
.fd-back {
  position: absolute;
  inset: 8px 0 0;
  border-radius: 2px 6px 6px 6px;
  background: var(--shell-back);
}
.fd-back::before {
  content: "";
  position: absolute;
  left: 0;
  top: -7px;
  width: 30px;
  height: 11px;
  border-radius: 4px 4px 0 0;
  background: inherit;
}
.fd-img {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 5px;
  height: 40px;
  overflow: hidden;
  border-radius: 3px;
  background: #fbfaf6;
  box-shadow: 0 0 0 1.5px #fff, 0 2px 6px rgba(10, 10, 10, 0.3);
  transform: translateY(7px);
  transition: transform 0.36s var(--ease-drawer);
}
.rl-item.is-open .fd-img { transform: none; transition-delay: calc(var(--i) * 40ms + 0.16s); }
.fd-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fd-sheet {
  position: absolute;
  left: 7px;
  right: 9px;
  top: 7px;
  height: 24px;
  background: repeating-linear-gradient(to bottom, rgba(10, 10, 10, 0.3) 0 1.5px, transparent 1.5px 6px);
}
.fd-cover {
  position: absolute;
  top: 4px;
  left: calc(9px + var(--k) * 17px);
  width: 22px;
  height: 30px;
  border-radius: 2px;
  background: var(--tone);
  box-shadow: 0 0 0 0.5px rgba(10, 10, 10, 0.15), 0 2px 4px rgba(10, 10, 10, 0.25);
  transform: rotate(calc(-5deg + var(--k) * 9deg));
}
.fd-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 29px;
  border-radius: 4px 4px 6px 6px;
  background: linear-gradient(rgba(255, 255, 255, 0.07), transparent 60%), var(--shell);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 -1px 3px rgba(10, 10, 10, 0.2);
  transform: perspective(220px) rotateX(-14deg);
  transform-origin: 50% 100%;
  transition: transform 0.36s var(--ease-drawer);
}
.fd-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 78px;
  margin-top: 7px;
  font: 500 11.5px/1.25 var(--font);
  text-align: center;
  color: var(--ink-2);
}
.rl-folder.is-here .fd-name { color: var(--ink); }
.rl-folder.is-here .fd-name::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 5px 1px 0;
  border-radius: 50%;
  background: currentColor;
}
.rl-item.is-open .rl-folder.is-here .fd-img { transform: translateY(-4px); }
@media (hover: hover) {
  .rl-folder:hover { background: rgba(10, 10, 10, 0.04); }
  .rl-item.is-open .rl-folder:hover .fd-img { transform: translateY(-8px) rotate(-3deg); transition-delay: 0s; }
  .rl-folder:hover .fd-front { transform: perspective(220px) rotateX(-26deg); }
}
.fd { transition: transform 0.15s var(--ease-out); }
.rl-folder:active .fd { transform: scale(0.96); }

/* no room on the left: the rail sits under the pane, the folders rise above their icon */
.pane-layer.rail-bottom .rail {
  left: 50%;
  top: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  flex-direction: row;
  transform: translate(-50%, 8px);
}
.pane-layer.rail-bottom.is-open .rail { transform: translate(-50%, 0); }
.rail-bottom .rl-tip { left: 50%; top: auto; bottom: 49px; transform: translate(-50%, 4px); }
@media (hover: hover) {
  .rail-bottom .rl-item:not(.is-open) .rl-icon:hover + .rl-tip { transform: translate(-50%, 0); }
}
.rail-bottom .rl-row {
  left: 50%;
  top: auto;
  bottom: 49px;
  flex-direction: column-reverse;
  transform: translateX(-50%);
  clip-path: inset(100% 0 0 0 round 16px);
}
.rail-bottom .rl-item.is-open .rl-row { clip-path: inset(0 0 0 0 round 16px); }
.rail-bottom .rl-folder { transform: translateY(calc(var(--i) * 84px + 50px)) scale(0.6); }
.rail-bottom .rl-item.is-open .rl-folder { transform: none; }

/* ---------- Say hi: the command palette ----------
   A Spotlight-style panel over a blurred, dimmed page: search on top, actions in groups, the one under the cursor
   (or the arrows) in a light pill. On phones it is a bottom sheet with tall rows and no key hints. */
/* Say hi: a black pill, lit from the top like the folders and the tile */
.nav-hi {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; margin: 0; padding: 0 9px 0 15px; border-radius: 99px;
  color: #fff; background: linear-gradient(180deg, #3a3936 0%, #161615 55%, #0a0a0a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(10, 10, 10, 0.25), 0 8px 18px -10px rgba(10, 10, 10, 0.6);
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.nav-hi:hover, .nav-hi[aria-expanded="true"] { color: #fff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 2px 4px rgba(10, 10, 10, 0.25), 0 12px 24px -10px rgba(10, 10, 10, 0.65); }
.nav-hi:active { transform: scale(0.96); }
.nav-kbd { padding: 2px 6px; border-radius: 99px; font: 400 10.5px/1.3 var(--sans); color: rgba(255, 255, 255, 0.72); background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
.nav-hi:hover .nav-kbd { color: #fff; }
@media (pointer: coarse), (max-width: 720px) { .nav-kbd { display: none; } .nav-hi { padding: 0 15px; } }

.cmdk { position: fixed; inset: 0; z-index: 120; }
.cmdk[hidden] { display: none; }
.cmdk-scrim { position: absolute; inset: 0; background: rgba(12, 12, 12, 0.26); -webkit-backdrop-filter: blur(6px) saturate(0.9); backdrop-filter: blur(6px) saturate(0.9);
  opacity: 0; transition: opacity 0.24s var(--ease-out); }
.cmdk.is-open .cmdk-scrim { opacity: 1; }
.cmdk-panel {
  position: absolute; left: 50%; top: clamp(64px, 16vh, 160px); width: min(560px, calc(100vw - 32px));
  display: flex; flex-direction: column; overflow: hidden; outline: none;
  border-radius: 16px; background: rgba(252, 252, 251, 0.94); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.08), 0 1px 2px rgba(10, 10, 10, 0.08), 0 32px 70px -24px rgba(10, 10, 10, 0.5);
  font: 400 14px/1.3 var(--sans); color: var(--ink);
  opacity: 0; transform: translate(-50%, 6px) scale(0.985); transition: opacity 0.2s var(--ease-out), transform 0.3s var(--ease-out);
}
.cmdk.is-open .cmdk-panel { opacity: 1; transform: translate(-50%, 0); }
.cmdk-grab { display: none; }
.cmdk-search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 16px; border-bottom: 1px solid rgba(10, 10, 10, 0.07); }
.cmdk-search svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; }
.cmdk-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.cmdk-search input::placeholder { color: var(--ink-3); }
/* the caret already says where you are: no focus ring on the search box or the panel */
.cmdk-search input:focus-visible { box-shadow: none; }
.cmdk-panel:focus-visible { box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.08), 0 1px 2px rgba(10, 10, 10, 0.08), 0 32px 70px -24px rgba(10, 10, 10, 0.5); }
.cmdk kbd { padding: 2px 5px; border-radius: 5px; font: 400 10.5px/1.3 var(--sans); color: var(--ink-3); background: rgba(10, 10, 10, 0.05); box-shadow: inset 0 0 0 0.5px rgba(10, 10, 10, 0.12); }
.cmdk-list { max-height: min(380px, 52vh); overflow-y: auto; padding: 6px; overscroll-behavior: contain; scrollbar-width: thin; }
.cmdk-group { margin: 8px 10px 4px; font-size: 11px; color: var(--ink-3); }
.cmdk-group:first-child { margin-top: 4px; }
.cmdk-none { margin: 18px 12px; color: var(--ink-3); }
.cmdk-row { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 10px; border-radius: 10px; cursor: pointer; scroll-margin: 6px; }
.cmdk-row.is-on { background: #ededed; }
.cmdk-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 0.5px rgba(10, 10, 10, 0.14), 0 1px 1.5px rgba(10, 10, 10, 0.08); }
.cmdk-ic svg { width: 15px; height: 15px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cmdk-label { display: grid; flex: none; }
.cmdk-label > * { grid-area: 1 / 1; white-space: nowrap; transition: opacity 0.18s, transform 0.25s var(--ease-out); }
.cmdk-label .done { opacity: 0; transform: translateY(4px); color: var(--blue); }
.cmdk-row.is-copied .cmdk-label .idle { opacity: 0; transform: translateY(-4px); }
.cmdk-row.is-copied .cmdk-label .done { opacity: 1; transform: none; }
.cmdk-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 13px; }
.cmdk-tail { flex: none; font-size: 12px; color: var(--ink-3); opacity: 0; transition: opacity 0.15s; }
.cmdk-row.is-on .cmdk-tail { opacity: 1; }
/* the movie line: the site's one blue, under the list */
.cmdk-quote { position: relative; margin: 0 6px 6px; padding: 16px 44px 14px 18px; border-radius: 12px; background: var(--blue); color: #fff; }
.cmdk-quote figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cq-more, .cq-x { border: 0; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s, transform 0.15s var(--ease-out); }
.cq-more { flex: none; height: 26px; padding: 0 11px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); font: 400 11.5px/1 var(--sans); }
.cq-more:hover { background: rgba(255, 255, 255, 0.26); }
.cq-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.cq-x:hover { background: rgba(255, 255, 255, 0.24); }
.cq-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.cq-more:active, .cq-x:active { transform: scale(0.94); }
.cq-more:focus-visible, .cq-x:focus-visible { box-shadow: 0 0 0 2px #fff; }
.cmdk-quote[hidden] { display: none; }
.cmdk-quote blockquote { margin: 0; font: 400 17px/1.35 var(--serif); letter-spacing: -0.01em; }
.cmdk-quote figcaption { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.cmdk-quote figcaption i { font-style: normal; color: rgba(255, 255, 255, 0.9); }
.cmdk-quote blockquote, .cq-who { transition: opacity 0.16s, filter 0.16s; }
.cmdk-quote.is-swapping blockquote, .cmdk-quote.is-swapping .cq-who { opacity: 0; filter: blur(3px); }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid rgba(10, 10, 10, 0.07); font-size: 11.5px; color: var(--ink-3); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot kbd { min-width: 12px; text-align: center; }

/* phones: a bottom sheet */
.cmdk.is-sheet .cmdk-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%); transition: transform 0.42s var(--ease-drawer), opacity 0.2s; }
.cmdk.is-sheet.is-open .cmdk-panel { transform: none; }
.cmdk.is-sheet .cmdk-grab { display: block; width: 36px; height: 4px; margin: 8px auto 2px; border-radius: 4px; background: rgba(10, 10, 10, 0.16); }
.cmdk.is-sheet .cmdk-search { height: 50px; }
.cmdk.is-sheet .cmdk-esc, .cmdk.is-sheet .cmdk-foot { display: none; }
.cmdk.is-sheet .cmdk-list { max-height: 62vh; padding: 6px 8px 12px; flex: 1 1 auto; min-height: 0; }
/* never taller than the screen: when the movie line opens, the list gives up room and scrolls */
.cmdk.is-sheet .cmdk-panel { max-height: calc(100dvh - 24px); }
.cmdk.is-sheet .cmdk-quote, .cmdk.is-sheet .cmdk-search { flex: none; }
.cmdk.is-sheet .cmdk-row { height: 56px; font-size: 15px; }
.cmdk.is-sheet .cmdk-row.is-on { background: none; }
.cmdk.is-sheet .cmdk-row:active { background: #ededed; }
.cmdk.is-sheet .cmdk-ic { width: 32px; height: 32px; border-radius: 9px; }
.cmdk.is-sheet .cmdk-ic svg { width: 17px; height: 17px; }
.cmdk.is-sheet .cmdk-tail { opacity: 1; }
.cmdk.is-sheet .cmdk-meta { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .cmdk-panel, .cmdk-scrim, .cmdk.is-sheet .cmdk-panel { transition: none; } }

/* ---------- intro (first visit per session) ---------- */
body.no-anim .card, body.no-anim .lip, body.no-anim .hero { transition: none !important; }
body.intro .card { transition: none; }
body.intro .hero { opacity: 0; transform: translateY(10px); filter: blur(4px); transition: none; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .card-bar .name { font-size: 24px; }
  .nav { padding: 0 18px; height: 56px; }
  .hero h1 { font-size: 48px; }
  .hero p { font-size: 15px; margin-top: 10px; }
  .col-title { font-size: 16px; }
  .col-sub { display: none; }
  .cols {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .cols::-webkit-scrollbar { display: none; }
  .col { flex: 0 0 78%; scroll-snap-align: start; }
  .col:only-child { flex-basis: 100%; }
  .pane-body { padding: 22px 22px 40px; }
  .pane-head { height: 168px; }
  .pane-head h2 { font-size: 32px; }
  .pane-head .essay-title h2 { font-size: 42px; }
  .pane-head .titles { left: 22px; }
  .pane.is-reading .pane-head { height: 50px; }
  .ph-layer.reading-head { padding: 0 64px 0 22px; }
  .r-title { margin: 24px 0 22px; }
  .hook { margin-top: 18px; }
  .hook + .r-title { margin-top: 24px; }
  .pane.is-reading .pane-body { padding: 0 40px 56px 22px; }
  .pane-map { right: 2px; }
  .prose { font-size: 16px; }
  .pf-btn .nm { display: none; }
}

@media (hover: none) {
  .card.is-filed:hover::after { opacity: 0.38; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-drawer: 1ms; }
  .pane { transition-duration: 1ms !important; }
  /* glyphs hold a finished, readable frame */
  .glyph * { animation: none !important; }
  .g-timeline .draw, .g-playhead .prog { stroke-dashoffset: 0; }
  .g-timeline .dot { opacity: 1; }
  .g-playhead .prog { stroke-dashoffset: 0.45; }
  .g-playhead .head { transform: translateX(20px); }
  /* the rail's row just appears */
  .rl-row, .rail-bottom .rl-row { clip-path: none; transition: none; }
  .rl-folder, .rail-bottom .rl-folder, .fd-img { transform: none; transition: opacity 0.12s; }
  /* a looked-up meaning appears whole */
  .lk-w { animation: none; }
}

/* ---------- Projects (was Recent work): a desktop, each project a document on it ----------
   His own wallpaper under an orange gradient tint (Experience is blue, this card is orange). */
.desk { position: relative; height: 100%; overflow: hidden; isolation: isolate; border-radius: 6px; background: #1d120b; color: #fff; font: 400 12px/1.2 var(--sans); }
.desk-wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 40%; }
.desk-tint { position: absolute; inset: 0; background: linear-gradient(140deg, #ff5b1f 0%, #ff8a3d 45%, #b8340a 100%); mix-blend-mode: color; opacity: 0.85; }
.desk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 120, 50, 0.22), rgba(40, 12, 0, 0.35)); pointer-events: none; }
.desk > :not(.desk-wall):not(.desk-tint) { position: absolute; z-index: 1; }
.desk-bar { left: 0; right: 0; top: 0; height: 26px; display: flex; align-items: center; gap: 15px; padding: 0 14px; background: rgba(20, 8, 2, 0.32); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.desk-bar svg { width: 12px; height: 14px; fill: #fff; margin-top: -2px; }
.desk-bar b { font-weight: 400; }
.desk-bar span { opacity: 0.92; }
.desk-clock { margin-left: auto; }
.desk-cal { right: 14px; top: 40px; width: 150px; padding: 10px 11px 9px; border-radius: 14px; background: rgba(24, 12, 6, 0.55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.desk-cal p { margin: 0 0 6px; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: #ff8a5c; }
.desk-cal div { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 0; text-align: center; font-size: 10px; }
.desk-cal b { font-weight: 400; color: rgba(255, 255, 255, 0.55); }
.desk-cal i { font-style: normal; line-height: 16px; }
.desk-cal i.on { margin: 0 auto; width: 16px; border-radius: 50%; background: #ff5b1f; }
.desk-docs { left: 22px; top: 50px; display: flex; gap: 14px; }
.desk .col.doc { flex: none; height: auto; width: 124px; color: #fff; background: none; border-radius: 0; overflow: visible; display: flex; flex-direction: column; align-items: center; gap: 8px; outline: none; }
.doc-sheet {
  position: relative; display: block; width: 96px; aspect-ratio: 0.78; overflow: hidden;
  background: #fbfaf7; border-radius: 4px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s var(--ease-out);
}
.doc-sheet::after { content: ""; position: absolute; right: 0; top: 0; width: 18px; height: 18px; background: linear-gradient(225deg, transparent 50%, #e2ddd3 50%); }
.doc-sheet img { position: absolute; left: 8px; right: 8px; top: 22px; bottom: 10px; width: calc(100% - 16px); height: calc(100% - 32px); object-fit: cover; object-position: 0 0; border-radius: 2px; }
.doc-name { max-width: 100%; padding: 2px 6px; border-radius: 5px; text-align: center; font-size: 13px; line-height: 1.25; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.card.is-lifted .desk .col.doc:hover .doc-sheet { transform: translateY(-3px) scale(1.03); }
.desk .col.doc:active .doc-sheet { transform: scale(0.97); }
.desk .col.doc:focus-visible .doc-name { background: #2f56ff; text-shadow: none; }
@media (max-width: 720px) {
  .desk-bar span:not(.desk-clock) { display: none; }
  .desk-cal { display: none; }
  /* four documents share the row evenly, so none falls off the phone's edges */
  .desk-docs { left: 6px; right: 6px; justify-content: center; gap: 0; }
  .desk .col.doc { flex: 1 1 0; width: auto; min-width: 0; max-width: 100px; }
  .doc-sheet { width: min(72px, 100%); }
  .doc-name { font-size: 12px; }
}

/* a project page opens on its window: the recording on the left (3/4), its explainer on the right (1/4) */
.pwin { max-width: var(--col, 520px); margin: 20px 0 0; border-radius: 12px; overflow: hidden; background: #1a1a1a; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 16px 36px rgba(0, 0, 0, 0.16); }
.pwin + .r-title { margin-top: 26px; }
.pwin-bar { position: relative; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #242424; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05); font: 400 11px/1 var(--sans); color: #a0a0a0; }
.pwin-bar i { width: 9px; height: 9px; border-radius: 50%; background: #464646; }
.pwin-bar span { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
.pwin-body { display: grid; grid-template-columns: 3fr 1fr; min-height: 280px; }
.pwin-media { position: relative; display: grid; place-items: center; background: #121212; }
.pwin-media img, .pwin-media video { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: contain; }
.pwin-fig { position: relative; min-width: 0; box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06); }
@media (max-width: 720px) {
  .pwin-body { grid-template-columns: 1fr; min-height: 0; }
  .pwin-fig { min-height: 230px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
}

/* [Tool](logo:slug): the tool's logo before its name */
.tl { white-space: nowrap; }
.tl img { display: inline-block; width: 0.95em; height: 0.95em; margin: 0 0.3em 0 0.05em; vertical-align: -0.12em; opacity: 0.82; }

.r-title.is-bare { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.r-title.is-bare + .prose { padding-top: 34px; }

/* ---------- Books: a stack of spines on the Content card ----------
   Each spine wears its cover's own colours; length, offset and thickness vary like a real pile. */
/* one wooden desk under all three Content columns: no gaps, no corners between them.
   wood-shader.js paints it into a canvas at the back of .cols; the photo is the fallback without WebGL */
.cols.is-wood {
  position: relative;
  gap: 0;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 50%, rgba(18, 8, 2, 0.55) 100%),
    url("assets/desktop/wood.webp") center 30% / cover no-repeat,
    #4a2a16;
}
.cols.is-wood > .col { background: none; border-radius: 0; color: #fff6ec; isolation: auto; }
/* a shade along the top so the labels read; it is the same in every column, so it runs on without a seam */
.cols.is-wood > .col::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 90px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 8, 2, 0.45), rgba(18, 8, 2, 0));
}
.cols.is-wood .col-head { text-shadow: 0 1px 2px rgba(30, 12, 2, 0.5); }
.cols.is-wood > .wood-gl { position: absolute; left: 0; top: 0; z-index: 0; height: 100%; display: block; pointer-events: none; }
.spines { position: absolute; z-index: 2; left: 16px; right: 16px; top: 50px; height: calc(var(--body-h) - 122px); display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.spine {
  filter: drop-shadow(2px 3px 3px rgba(14, 6, 0, 0.5));
  flex: var(--p) 1 0; min-height: 0; max-height: 34px;
  width: var(--w); margin-left: var(--x); box-sizing: border-box;
  display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 0 10px;
  border-radius: 2px; color: var(--ink);
  /* the cover's signature band shows on the right end, fading into its colour behind the title */
  background: linear-gradient(90deg, var(--bg) 38%, transparent 82%), var(--img) right 0 top var(--py) / 58% auto no-repeat, var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  font: 400 11px/1 var(--sans); white-space: nowrap;
  transition: transform 0.45s var(--ease-out), box-shadow 0.3s;
}
.spines::after { content: ""; position: absolute; z-index: -1; left: 4%; right: 4%; bottom: -10px; height: 20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(10, 4, 0, 0.7), transparent); }
.spine b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 700 12px/1 "Newsreader", Georgia, serif; letter-spacing: 0.005em; }   /* spine titles: a bold serif, the one exception to regular-only */
.card.is-lifted .spine:hover { transform: translateX(6px); }
/* pulled out: the spine slides right, its neighbours shift a little */
.spine.is-pulled { transform: translateX(22%) translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); }
.spine.n-up1 { transform: translate(-4px, -2px) rotate(-0.9deg); }
.spine.n-dn1 { transform: translate(5px, 2px) rotate(0.8deg); }
.spine.n-up2 { transform: translate(-2px, -1px) rotate(-0.3deg); }
.spine.n-dn2 { transform: translate(2px, 1px) rotate(0.3deg); }
@media (max-width: 720px) { .spines { left: 12px; right: 12px; top: 44px; } }

/* ---------- Podcasts: a dark tablet on the desk, open on a YouTube-style feed ---------- */
.tube {
  position: absolute; z-index: 2; left: 16px; right: 16px; top: 50px; height: calc(var(--body-h) - 122px);
  padding: 10px 0 0; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column;
  border-radius: 14px; background: #0f0f0f;
  box-shadow: 0 0 0 4px #1c1c1c, 0 0 0 5px rgba(255, 255, 255, 0.08), 4px 10px 22px rgba(14, 6, 0, 0.55), 1px 2px 4px rgba(14, 6, 0, 0.4);
  transition: transform 0.5s var(--ease-drawer);
}
.card.is-lifted .col.has-tube:hover .tube { transform: translateY(-3px); }
/* the feed runs off the bottom of the screen */
.tube::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: linear-gradient(rgba(15, 15, 15, 0), #0f0f0f); pointer-events: none; }
.tube-bar { display: flex; align-items: center; gap: 10px; height: 20px; padding: 0 10px; flex: none; }
.tube-logo { flex: none; width: 20px; height: 14px; border-radius: 4px; background: #ff0033; position: relative; }
.tube-logo::after { content: ""; position: absolute; left: 8px; top: 4px; border-left: 5px solid #fff; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.tube-chips { display: flex; gap: 5px; margin: 9px 0 0; padding: 0 10px 10px; flex: none; }
.tube-chips span { padding: 3px 8px; border-radius: 6px; background: #272727; color: #f1f1f1; font-size: 10px; line-height: 1.2; }
.tube-chips span.on { background: #f1f1f1; color: #0f0f0f; }
.card.is-lifted .tube-chips span { cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.15s var(--ease-out); }
.card.is-lifted .tube-chips span:not(.on):hover { background: #3f3f3f; }
.card.is-lifted .tube-chips span:active { transform: scale(0.94); }
.tube-tile[hidden] { display: none; }
.tube-tile.is-in { animation: tube-in 0.35s var(--ease-out) both; animation-delay: calc(var(--k) * 30ms); }
@keyframes tube-in { from { opacity: 0; transform: translateY(4px); } }
/* the feed scrolls under the chips, like the real thing: wheel or swipe, once the card is pulled out */
.tube-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px 8px; padding: 0 10px 44px;
  overflow: hidden; overscroll-behavior: auto contain; scrollbar-width: thin; scrollbar-color: #3f3f3f transparent; }   /* keeps up/down to itself; sideways swipes go on to the row and the deck */
.card.is-lifted .tube-grid { overflow-x: hidden; overflow-y: auto; }
.tube-grid::-webkit-scrollbar { width: 4px; }
.tube-grid::-webkit-scrollbar-thumb { background: #3f3f3f; border-radius: 4px; }
.tube-tile { display: block; min-width: 0; color: #f1f1f1; }
.tube-tile > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #272727; transition: border-radius 0.2s; }
.card.is-lifted .tube-tile:hover > img { border-radius: 2px; }
.tube-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; min-width: 0; }
.tube-meta img { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.tube-meta b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 10px; }
@media (max-width: 720px) { .tube { left: 12px; right: 12px; top: 44px; } }


/* ---------- Some thoughts (was Some ramblings): a desk of essays ----------
   paper-shader.js paints the background (a writer at his desk as green paper) into a canvas at the back of .blog;
   .blog-fall is the same photo, blurred and tinted in CSS, for when WebGL is missing. Essays are small icons with
   their titles under them, laid out from the top left like files on a desktop. */
.blog { position: relative; height: 100%; overflow: hidden; isolation: isolate; border-radius: 6px; background: #1f3d2e; color: #fff; }
.blog-fall { position: absolute; inset: -20px; background: url("assets/ramblings/writer-blur.jpg") 50% 40% / cover no-repeat; filter: grayscale(1) contrast(0.9) brightness(0.8); }
.blog-fall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, #2f5a43, #10251a); mix-blend-mode: color; }
.blog .paper-gl { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; }
.blog.has-gl .blog-fall { display: none; }
/* print marks in the corners, as on the Experience art */
.blog-marks { --m: rgba(226, 250, 232, 0.55); position: absolute; z-index: 2; inset: 12px 12px calc(var(--base-h) + 12px); pointer-events: none;
  background:
    linear-gradient(var(--m), var(--m)) left top / 18px 1px no-repeat, linear-gradient(var(--m), var(--m)) left top / 1px 18px no-repeat,
    linear-gradient(var(--m), var(--m)) right top / 18px 1px no-repeat, linear-gradient(var(--m), var(--m)) right top / 1px 18px no-repeat,
    linear-gradient(var(--m), var(--m)) left bottom / 18px 1px no-repeat, linear-gradient(var(--m), var(--m)) left bottom / 1px 18px no-repeat,
    linear-gradient(var(--m), var(--m)) right bottom / 18px 1px no-repeat, linear-gradient(var(--m), var(--m)) right bottom / 1px 18px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 33% / 9px 1px no-repeat, linear-gradient(var(--m), var(--m)) 0 66% / 9px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 33% / 9px 1px no-repeat, linear-gradient(var(--m), var(--m)) 100% 66% / 9px 1px no-repeat; }
.blog-docs { position: absolute; z-index: 3; left: 24px; top: 24px; right: 18px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
/* a blog card: the cover, date and read time, the title, one line on what it's about */
.blog .col.post {
  flex: none; width: 300px; height: auto; padding: 8px 8px 16px; box-sizing: border-box; display: flex; flex-direction: column;
  border-radius: 18px; background: #fbfbf9; color: var(--char); overflow: hidden; outline: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(2, 20, 10, 0.18), 0 22px 44px -22px rgba(2, 20, 10, 0.7);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.post-pic { display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #0a3d22; }
.post-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.post-meta { display: flex; align-items: center; gap: 8px; margin: 14px 8px 0; font: 400 11px/1.3 var(--read); color: rgba(35, 34, 32, 0.6); }
.post-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.post-title { margin: 8px 8px 0; font: 400 19px/1.18 var(--read); letter-spacing: -0.015em; color: #0f0f0e; }
.post-about { margin: 8px 8px 0; font: 400 13px/1.5 var(--read); color: rgba(35, 34, 32, 0.62);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.is-lifted .blog .col.post:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(2, 20, 10, 0.2), 0 30px 56px -24px rgba(2, 20, 10, 0.8); }
.card.is-lifted .blog .col.post:hover .post-pic img { transform: scale(1.04); }
.blog .col.post:active { transform: scale(0.985); }
.blog .col.post:focus-visible { box-shadow: 0 0 0 2px #2f56ff, 0 22px 44px -22px rgba(2, 20, 10, 0.7); }

/* the icon on the essay's page, above its title */
.r-icon { display: block; width: 48px; height: 48px; margin: 0 0 18px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(35, 34, 32, 0.1), 0 14px 28px -14px rgba(60, 40, 10, 0.5); }

@media (max-width: 720px) {
  .r-icon { width: 42px; height: 42px; border-radius: 10px; }
  .blog-docs { left: 12px; right: 12px; top: 12px; bottom: 12px; }
  .blog .col.post { width: 100%; max-width: 360px; }
  .post-title { font-size: 17px; }
  /* the phone card can be short: the post never runs past it, the cover gives up height first */
  body.is-deck .blog-docs { justify-content: center; }
  body.is-deck .blog .col.post { max-height: 100%; }
  body.is-deck .post-pic { flex: 1 1 auto; min-height: 72px; aspect-ratio: auto; max-height: 220px; }
  body.is-deck .post-pic img { position: static; }
  body.is-deck .post-meta { margin-top: 12px; flex: none; }
  body.is-deck .post-title { flex: none; margin-top: 6px; }
  body.is-deck .post-about { flex: none; margin-top: 6px; -webkit-line-clamp: 2; }
}

/* ---------- phones: the deck ----------
   One card at a time, front and centre under the headline (app.js moves the others off to the sides); swipe or the
   arrows for the next; the dock along the bottom holds every card's folder, the current one open. */
.deck-dock { display: none; }
body.is-deck .deck-dock {
  position: fixed; z-index: 70; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px; padding: 5px; transform: translateX(-50%);
  border-radius: 22px; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--hair), 0 18px 40px -20px rgba(10, 10, 10, 0.45);
  transition: opacity 0.2s;
}
body.is-deck.pane-on .deck-dock { opacity: 0; pointer-events: none; }
.dk-folders { display: flex; }
.dk-f, .dk-arrow { display: grid; place-items: center; width: 44px; height: 42px; border-radius: 14px; color: var(--ink-2); -webkit-tap-highlight-color: transparent; transition: transform 0.2s var(--ease-out), opacity 0.2s, background-color 0.18s; }
.dk-arrow { width: 36px; }
.dk-arrow svg { width: 16px; height: 16px; }
.dk-arrow:disabled { opacity: 0.25; }
.dk-f:active, .dk-arrow:active { transform: scale(0.9); }
.dk-f:focus-visible, .dk-arrow:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.dk-f .rf { width: 30px; height: 25px; }
.dk-f.is-here { background: rgba(10, 10, 10, 0.05); }
.dk-f.is-here .rf-front { transform: perspective(60px) rotateX(-26deg); }
.dk-f.is-here .rf-paper { transform: translateY(-1.5px); }
/* the deck keeps the headline, shows each card whole (no drawer front over its base), and drops the put-back */
body.is-deck .card-body { height: var(--body-h); }
body.is-deck .card-bar .putback { display: none; }
/* the deck's cards carry just their names: no little looping marks on the right */
body.is-deck .card-bar .meta { display: none; }
/* phones: the Books pile is one tap target (it opens the pile page); single spines don't catch taps */
body.is-deck .col.has-spines .spine { pointer-events: none; }
/* the sideways-scroll hint at the foot of a card with several sections (app.js) */
.cols-hint { display: none; }
body.is-deck .cols-hint {
  position: absolute; z-index: 6; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 9px; max-width: calc(100% - 32px); height: 30px; padding: 0 12px 0 10px;
  border: 0; border-radius: 99px; background: rgba(12, 12, 12, 0.62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font: 400 12px/1 var(--sans); white-space: nowrap; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.5); transition: transform 0.2s var(--ease-out);
}
body.is-deck .cols-hint:active { transform: translateX(-50%) scale(0.96); }
.ch-dots { display: inline-flex; gap: 4px; }
.ch-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); transition: background 0.2s, width 0.25s var(--ease-out); }
.ch-dots i.on { width: 12px; border-radius: 3px; background: #fff; }
.ch-text { overflow: hidden; text-overflow: ellipsis; }
body.is-deck .card-bar { cursor: default; }
body.is-deck .lip { display: none; }
body.is-deck .card.is-filed { opacity: 0.5; }
body.is-deck .hero h1 { font-size: 40px; }
body.is-deck .hero p { margin-top: 8px; font-size: 14px; }

/* ---------- Simple view: the site as a plain old web page (app.js) ----------
   On purpose not the rest of the site's look: system sans, blue underlined links, a big bold name, grey text,
   bullets, details in brackets, everything lowercase. */
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-simple { font-size: 13px; }
.nav-simple[aria-pressed="true"] { color: var(--ink); }
.simple { position: fixed; inset: 0; z-index: 5; overflow-y: auto; padding: 96px 32px 90px; background: #fff; }
.simple[hidden] { display: none; }
body.is-simple .stage, body.is-simple .deck-dock { display: none; }
.sm-col { max-width: 640px; margin: 0 0 0 max(0px, calc(18vw - 140px)); font: 400 17px/1.6 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif; color: #1a1a1a; text-transform: lowercase; }
.sm-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 30px; }
.sm-nav a, .sm-intro a { color: #0b63d6; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sm-nav a:hover, .sm-intro a:hover { color: #0846a0; }
.simple h1 { margin: 0 0 26px; font-family: inherit; font-weight: 700; font-size: 50px; line-height: 1.05; letter-spacing: -0.035em; color: #111; }
.sm-intro { margin: 0 0 18px; color: #7a7a7a; }
.sm-group { margin-top: 38px; }
.sm-group h2 { margin: 0 0 10px; font-family: inherit; font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; color: #111; }
.sm-group ul { margin: 0; padding-left: 22px; }
.sm-group li { margin: 0 0 6px; color: #7a7a7a; }
.sm-group li::marker { color: #9a9a9a; }
.sm-group li a { color: #3a3a3a; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(58, 58, 58, 0.55); }
.sm-group li a:hover { color: #0b63d6; text-decoration-color: currentColor; }
.sm-m { color: #8a8a8a; }
.simple a:focus-visible { box-shadow: none; outline: 2px solid #0b63d6; outline-offset: 2px; border-radius: 2px; }
@media (max-width: 720px) {
  .nav-right { gap: 12px; }
  .simple { padding: 84px 22px 60px; }
  .sm-col { margin: 0; font-size: 16px; }
  .simple h1 { font-size: 40px; }
  .sm-nav { gap: 4px 14px; font-size: 15px; }
}
}

/* phones: long-press a folder in the dock and its sections rise above it (app.js) */
.dk-f { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.dk-pop { position: absolute; bottom: calc(100% + 10px); min-width: 200px; padding: 6px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--hair), 0 20px 44px -18px rgba(10, 10, 10, 0.5);
  opacity: 0; transform: translateY(8px) scale(0.97); transform-origin: 50% 100%; transition: opacity 0.18s, transform 0.28s var(--ease-out); }
.dk-pop[hidden] { display: none; }
.dk-pop.is-open { opacity: 1; transform: none; }
.dk-pop p { margin: 6px 10px 4px; font: 400 11px/1.3 var(--sans); color: var(--ink-3); }
.dk-pop button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; height: 44px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; font: 400 15px/1 var(--read); color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; }
.dk-pop button span { color: var(--ink-3); font-size: 13px; }
.dk-pop button:active { background: #ededed; }

