/* ============================================================
   djdevelops.com — "the site writes itself"
   ------------------------------------------------------------
   LIGHT ON PURPOSE. Every developer portfolio is near-black with
   one neon accent; this one is paper. Two surfaces that read as
   different materials: a warm off-white editor (#fbfaf7) and a
   cool off-white page (#f4f6fb), so the split reads as "tool"
   and "thing being made" rather than as two panels.

   Single theme by choice, not omission: color-scheme is pinned
   to light and every colour is set explicitly, so the page looks
   the same on a machine set to dark.

   Load order on the homepage: site.css only. /card/* still runs
   the older dark card.css + portfolio.css — see the session log.
   ============================================================ */

:root {
  color-scheme: light;

  --paper: #fbfaf7;     /* the editor surface  */
  --paper-bar: #f7f5f0;
  --site: #f4f6fb;      /* the page being built */
  --card: #ffffff;

  --ink: #191c21;
  --mute: #6f7785;
  --faint: #aab2bf;
  --line: #dfe4ee;
  --line-warm: #e6e2d9;

  --hot: #e04e1b;       /* accent: caret, active line, play */
  --kw: #6b3fd4;        /* syntax */
  --st: #0e7c66;
  --fn: #1d4ed8;
  --op: #a8560f;
  --cm: #8d949e;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --disp: "Bricolage Grotesque", system-ui, sans-serif;
  --body: Manrope, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --rail: 46px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* A class that sets `display` beats the user-agent's [hidden] rule, which
   is how the "built in 1.6s" footer showed up during the build. Anything
   toggled with the hidden attribute needs this. */
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  background: var(--site);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
.mono { font-family: var(--mono); }
a { color: var(--hot); }
::selection { background: rgba(224, 78, 27, .2); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 11px 16px; font-weight: 600;
}
.skip:focus { left: 0; }

:where(button, a, select, input):focus-visible {
  outline: 2px solid var(--hot); outline-offset: 3px;
}

/* ============ THE SHELL ============ */
.shell {
  display: flex;
  align-items: stretch;
  height: calc(100svh - var(--rail));
  min-height: 520px;
  overflow: hidden;
}

/* ---- editor ---- */
.code-pane {
  flex: 1 1 460px;
  max-width: 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-right: 1px solid var(--line-warm);
  /* mount() collapses this: the width animates to nothing and the
     site pane takes the space, because flex-basis is animatable
     while `display` is not. */
  transition: flex-basis .78s var(--ease), max-width .78s var(--ease),
              opacity .5s ease, transform .78s var(--ease);
}
.shell.is-mounted .code-pane {
  flex-basis: 0;
  max-width: 0;
  opacity: 0;
  transform: translateX(-28px);
  border-right-color: transparent;
}

.code-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 15px;
  background: var(--paper-bar);
  border-bottom: 1px solid var(--line-warm);
  flex: 0 0 auto;
}
.code-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hot); }
.code-bar .file { font-size: 11.5px; color: var(--mute); }
.code-bar .prog { margin-left: auto; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.code {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.78;
}
.cline { display: flex; align-items: flex-start; padding-right: 14px; }
.cline.is-cur { background: rgba(224, 78, 27, .055); }
.cno {
  flex: 0 0 42px; text-align: right; padding-right: 14px;
  color: #c9c4ba; font-variant-numeric: tabular-nums; user-select: none;
}
.ctx { flex: 1 1 auto; min-width: 0; white-space: pre-wrap; word-break: break-word; }

.t-kw { color: var(--kw); }
.t-st { color: var(--st); }
.t-cm { color: var(--cm); font-style: italic; }
.t-fn { color: var(--fn); }
.t-id { color: var(--ink); }
.t-op { color: var(--op); }
.t-pn { color: var(--mute); }
.caret { color: var(--hot); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* the editable expressions inside the code */
.csel {
  font: inherit; color: var(--st); cursor: pointer;
  background: rgba(224, 78, 27, .07);
  border: 1px dashed rgba(224, 78, 27, .55);
  border-radius: 3px; padding: 0 3px;
}
.csel:hover { background: rgba(224, 78, 27, .16); }

.code-foot {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 11px 15px;
  background: var(--paper-bar);
  border-top: 1px solid var(--line-warm);
}
.play, .ghost {
  font-family: var(--mono); font-size: 11px; cursor: pointer;
  min-height: 34px; padding: 0 13px; border-radius: 4px;
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}
.play { font-weight: 600; border: 1px solid var(--hot); background: var(--hot); color: #fff; }
.play.is-playing { background: transparent; color: var(--hot); }
.ghost { border: 1px solid #d6d1c6; background: transparent; color: var(--mute); }
.ghost:hover, .play:hover { transform: translateY(-1px); }
.ghost:hover { border-color: var(--ink); color: var(--ink); }
.scrub { flex: 1 1 140px; min-width: 100px; accent-color: var(--hot); cursor: pointer; }

/* ---- the page being built ---- */
.site-pane {
  flex: 999 1 420px; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--site);
  transition: flex-basis .78s var(--ease);
}
.site-inner {
  flex: 1 1 auto; overflow: auto;
  display: flex; flex-direction: column;   /* so .grid can claim what's left */
  min-height: 0;
  padding: clamp(20px, 3.2vw, 44px);
  padding-left: max(clamp(20px, 3.2vw, 44px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(20px, 3.2vw, 44px), env(safe-area-inset-right, 0px));
}
.waiting { font-size: 11.5px; color: var(--faint); letter-spacing: .1em; }
.eyebrow { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: #8d95a3; }
.h1 {
  font-family: var(--disp);
  font-size: clamp(28px, 4vw, 52px); font-weight: 800;
  letter-spacing: -.04em; line-height: .98; margin-top: 9px;
  text-wrap: balance;
}
.hot { color: var(--hot); }
.count { font-size: 12px; color: var(--mute); margin-top: 16px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
#head { animation: pop .52s var(--ease) both; margin-bottom: clamp(18px, 2.4vw, 28px); flex: 0 0 auto; }

/* ---- the grid ----
   Every project on the page has a recording, so the tile IS the still:
   image full-bleed, title over a scrim. The grid STRETCHES to fill the
   viewport rather than sitting in a band with dead space under it —
   grid-auto-rows: 1fr inside a flex child that owns the remaining height.
   minmax(150px, 1fr) means rows stretch when there is room and scroll
   when there is not, instead of squashing to nothing on a short screen. */
.grid {
  display: grid;
  /* Sixteen projects is a perfect square, so on a desktop the grid is 4x4 and
     fills the viewport exactly — no dead band under it, no scroll. The column
     count is fixed per breakpoint rather than auto-filled, because auto-fill
     picks whatever width fits and leaves an orphan row. grid-auto-rows: 1fr
     then divides the leftover height evenly between the rows.
     minmax(112px, 1fr) is the floor: on a short laptop the rows stop shrinking
     and the pane scrolls instead of squashing the tiles into strips. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(82px, 1fr);
  gap: 12px;
  flex: 1 1 auto;
  /* min-content, NOT 0. With min-height:0 the flex box shrinks below its
     content and the tiles spill out over the footer instead of scrolling —
     visible while the editor is still open and the pane is half-width.
     min-content lets the box grow to fit and the pane scroll, while flex-grow
     still stretches it to fill when there IS spare room. */
  min-height: min-content;
  align-content: stretch;
}
@media (min-width: 620px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Seventeen tiles into four columns leaves one orphan on the last row. The
   lead project takes a 2x2 hero cell instead, which makes 20 cells — exactly
   five full rows — and gives the piece DJ most wants seen the space to be
   read. Only where there are four columns to spare it. */
@media (min-width: 980px) {
  .shell.is-mounted .grid .tile:first-child { grid-column: span 2; grid-row: span 2; }
  .shell.is-mounted .grid .tile:first-child .tile-h { font-size: 23px; }
  .shell.is-mounted .grid .tile:first-child .tile-s { font-size: 11.5px; margin-top: 7px; }
  .shell.is-mounted .grid .tile:first-child .tile-body { padding: 18px 20px 19px; }
}

/* While the editor is still open the site pane is half the width, so it gets
   fewer, taller columns rather than four cramped ones. */
.shell:not(.is-mounted) .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1240px) { .shell:not(.is-mounted) .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.grid .tile {
  position: relative; display: block; overflow: hidden; cursor: pointer;
  padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: #e9eef8; font-family: inherit; color: #fff; text-align: left;
  animation: pop .55s var(--ease) both;
  transition: transform .34s var(--ease), box-shadow .34s, opacity .42s, filter .42s, border-color .3s;
}
.grid .tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(25, 28, 33, .17);
  border-color: rgba(25, 28, 33, .22);
}
.grid .tile.is-dim { opacity: .26; filter: grayscale(1); }
.grid .tile.is-dim:hover { transform: none; box-shadow: none; }

.tile-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .6s var(--ease);
}
.grid .tile:hover .tile-img { transform: scale(1.05); }

/* The scrim is what makes white text legible over an arbitrary screenshot.
   Two stops rather than one: a hard floor for the text and a long fade so
   the image does not look like it has a bar across it. */
.tile-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top,
    rgba(12, 15, 20, .92) 0%,
    rgba(12, 15, 20, .74) 22%,
    rgba(12, 15, 20, .22) 52%,
    rgba(12, 15, 20, .04) 100%);
}

.tile-play {
  position: absolute; right: 11px; top: 11px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 9.5px;
  background: rgba(255, 255, 255, .9); color: var(--ink);
  transition: background .22s, color .22s, transform .22s var(--ease);
}
.grid .tile:hover .tile-play { background: var(--hot); color: #fff; transform: scale(1.14); }

.grid .tile-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: block; padding: 13px 14px 14px;
}
/* Once the build has finished the headline has done its job. Shrinking it
   hands roughly 80px back to the grid, which is the difference between the
   sixteen tiles fitting a laptop screen and spilling off the bottom. */
.shell.is-mounted .h1 { font-size: clamp(21px, 2.5vw, 34px); }
.shell.is-mounted .eyebrow { font-size: 9.5px; }
.shell.is-mounted .count { margin-top: 10px; font-size: 11px; }
.shell.is-mounted #head { margin-bottom: 14px; }
.shell.is-mounted .site-inner { padding-block: clamp(16px, 2vw, 26px); }
.shell.is-mounted .built { margin-top: 14px; padding-top: 12px; font-size: 10.5px; }

.tile-h {
  display: block; font-size: 16px; font-weight: 600; letter-spacing: -.018em;
  line-height: 1.22; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
.tile-s {
  display: block; font-size: 10px; color: rgba(255, 255, 255, .72); margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.grid .tile-tag {
  display: inline-block; margin-top: 8px; font-size: 9px; letter-spacing: .07em;
  color: #ffd9a8; background: rgba(224, 78, 27, .3);
  border: 1px solid rgba(255, 196, 120, .45); border-radius: 999px; padding: 2px 8px;
}

/* filters, inside the pane, above the grid they control */
.site-pane .filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; flex: 0 0 auto; }
.site-pane .filters[hidden] { display: none; }
.site-pane .chip { font-size: 11px; padding: 7px 13px; min-height: 32px; }

@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

.built {
  animation: pop .48s var(--ease) both;
  flex: 0 0 auto;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--mute);
}
.built b { color: var(--ink); font-variant-numeric: tabular-nums; }
.built-nav { display: flex; flex-wrap: wrap; gap: 14px; }
.built-nav a { font-size: 11.5px; color: var(--mute); text-decoration: none; }
.built-nav a:first-child { color: var(--ink); border-bottom: 1px solid var(--hot); padding-bottom: 2px; }

/* ---- the rail ---- */
.rail {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end;
  min-height: var(--rail);
  padding: 7px max(16px, env(safe-area-inset-right, 0px)) calc(7px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: #eef1f8; border-top: 1px solid var(--line);
}
.rail #reopen { margin-right: auto; }
.again { font-size: 11px; color: var(--mute); text-decoration: none; }
.again:hover { color: var(--ink); }
.skip-link {
  font-size: 11px; color: #4b5563; text-decoration: none;
  border-bottom: 1px dotted #9aa3b2; padding-bottom: 1px;
}
.skip-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ============ THE LIST BELOW ============ */
.below {
  padding-inline: max(22px, env(safe-area-inset-left, 0px)) max(22px, env(safe-area-inset-right, 0px));
  padding-block: clamp(44px, 7vw, 86px) 0;
  max-width: 1180px; margin-inline: auto;
}
.below-head { max-width: 70ch; }
.kicker { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--hot); }
.h2 {
  font-family: var(--disp);
  font-size: clamp(25px, 3.4vw, 40px); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.04; margin-top: 11px; text-wrap: balance;
}
.lede { margin-top: 14px; color: var(--mute); font-size: 16px; max-width: 64ch; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  font-family: var(--mono); font-size: 11.5px; cursor: pointer;
  padding: 8px 14px; min-height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--mute);
  transition: border-color .16s, color .16s, background .16s;
}
.chip b { font-weight: 500; opacity: .6; margin-left: 3px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] b { opacity: .7; }

/* gallery.js markup — scoped to #gallery so it never collides with
   the build grid above, which uses the same .tile class name. */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 16px; margin-top: 26px;
}
.gallery .tile {
  display: block; text-align: left; cursor: pointer; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; color: inherit; padding: 0;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.gallery .tile:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(25, 28, 33, .11); border-color: #c8d0e0; }
.gallery .shot {
  display: block; position: relative; aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e7ecf6, #f6f8fc);
  border-bottom: 1px solid var(--line);
}
.gallery .tile:nth-child(3n+2) .shot { background: linear-gradient(135deg, #f2e9e2, #fbf7f3); }
.gallery .tile:nth-child(3n+3) .shot { background: linear-gradient(135deg, #e5efe9, #f5faf7); }
.shot-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-num {
  position: absolute; left: 11px; top: 9px; font-family: var(--mono);
  font-size: 10.5px; color: var(--mute); background: rgba(255, 255, 255, .82);
  padding: 2px 6px; border-radius: 3px;
}
.gallery .play {
  position: absolute; right: 10px; bottom: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  border: 1px solid var(--line); min-height: 0; padding: 0;
  transition: background .18s, color .18s, transform .18s;
}
.gallery .tile:hover .play { background: var(--hot); color: #fff; transform: scale(1.1); }
.tile-body { display: block; padding: 14px 15px 16px; }
.tile-h2 { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.012em; }
.tile-p { display: block; font-size: 10.5px; color: #7b828d; margin-top: 7px; line-height: 1.6; }
.gallery .tile-tag {
  display: inline-block; margin-top: 9px; font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .06em; color: var(--op);
  border: 1px solid rgba(168, 86, 15, .32); background: rgba(168, 86, 15, .05);
  border-radius: 999px; padding: 2px 8px;
}

/* ---- contact + footer ---- */
.contact { padding-block: clamp(44px, 6vw, 78px) 0; }
.crows { display: grid; grid-template-columns: repeat(auto-fit, minmax(234px, 1fr)); gap: 12px; margin-top: 26px; }
.crow {
  display: block; padding: 15px 16px; border-radius: 10px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.crow:hover { transform: translateY(-2px); border-color: var(--hot); box-shadow: 0 8px 20px rgba(25, 28, 33, .08); }
.crow-k { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.crow-v { display: block; font-size: 13.5px; margin-top: 4px; word-break: break-all; }

.foot {
  margin-top: clamp(44px, 6vw, 72px); padding-block: 24px 36px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--mute);
}
.foot-legal { display: flex; gap: 9px; }
.foot-legal a { color: var(--mute); text-decoration: none; }
.foot-legal a:hover { color: var(--hot); }

/* ============ THE DETAIL SHEET ============ */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(25, 28, 33, .46); backdrop-filter: blur(5px); }
.sheet-panel {
  position: relative; z-index: 1; width: min(760px, 100%); max-height: 90svh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 30px 70px rgba(25, 28, 33, .26);
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  animation: pop .34s var(--ease) both;
}
.sheet-close {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 14px;
}
.sheet-close:hover { background: var(--hot); color: #fff; border-color: var(--hot); }
.sheet-media { background: #eef1f8; border-bottom: 1px solid var(--line); }
.sheet-video { display: block; width: 100%; max-height: 58svh; object-fit: contain; background: #eef1f8; }
.sheet-media.is-portrait { display: grid; place-items: center; padding: 14px 0; }
.sheet-media.is-portrait .sheet-video { width: auto; max-width: 100%; height: 66svh; max-height: 66svh; }
.sheet-noshot { display: grid; place-content: center; text-align: center; padding: 52px 20px; font-family: var(--mono); color: var(--faint); font-size: 30px; }
.noshot-note { display: block; font-size: 11px; letter-spacing: .12em; margin-top: 8px; }
.sheet-body { padding: 24px 26px 30px; }
.sheet-num { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--hot); }
.sheet-body h2 { font-family: var(--disp); font-size: clamp(22px, 3.4vw, 31px); font-weight: 800; letter-spacing: -.03em; margin-top: 7px; }
.sheet-stack { font-size: 11.5px; color: var(--mute); margin-top: 9px; }
.sheet-blurb { font-size: 16.5px; margin-top: 17px; max-width: 66ch; }
.sheet-h3 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-top: 24px; }
.sheet-how { font-size: 15px; color: #3f4753; margin-top: 10px; max-width: 66ch; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sheet-links[hidden] { display: none; }
.sheet-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 17px;
  border-radius: 8px; background: var(--ink); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.sheet-links a:hover { background: var(--hot); }

/* ============ PHONE ============
   The split cannot work at 400px, so the editor becomes a short band
   on top and the page builds underneath it. mount() collapses it the
   same way, just vertically. */
@media (max-width: 880px) {
  .shell { flex-direction: column; height: auto; min-height: 0; }
  .code-pane {
    flex: 0 0 auto; max-width: none; width: 100%;
    height: 40svh; min-height: 230px;
    border-right: 0; border-bottom: 1px solid var(--line-warm);
    transition: height .7s var(--ease), opacity .5s ease, transform .7s var(--ease);
  }
  .shell.is-mounted .code-pane {
    height: 0; min-height: 0; max-width: none; flex-basis: auto;
    transform: translateY(-20px); border-bottom-color: transparent;
  }
  .site-pane { flex: 1 1 auto; min-height: 60svh; }
  .code { font-size: 12px; }
  .cno { flex-basis: 34px; padding-right: 10px; }
  .grid, .shell.is-mounted .grid, .shell:not(.is-mounted) .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(118px, 1fr); gap: 10px;
  }
  .gallery { grid-template-columns: 1fr; }
  .sheet { padding: 0; align-items: end; }
  .sheet-panel { max-height: 92svh; border-radius: 14px 14px 0 0; }
  .sheet-media.is-portrait .sheet-video { height: 58svh; max-height: 58svh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .caret { animation: none !important; }
}

/* ============ /about — the only page that is about a person ============
   Same tokens, no build sequence. It reuses .below / .h2 / .kicker /
   .lede / .contact / .crows / .foot from above; this block is only what
   the document pages add. */
body.doc { background: var(--site); }

.docnav {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 13px max(22px, env(safe-area-inset-right, 0px)) 13px max(22px, env(safe-area-inset-left, 0px));
  background: rgba(244, 246, 251, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.docnav .back { color: var(--ink); text-decoration: none; font-weight: 600; }
.docnav .back:hover { color: var(--hot); }
.docnav-links { display: flex; gap: 18px; }
.docnav-links a { color: var(--mute); text-decoration: none; }
.docnav-links a:hover { color: var(--ink); }
.docnav-links a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--hot); padding-bottom: 2px; }

.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 44px; align-items: start; margin-top: 30px;
}
.about-body p { margin-top: 17px; font-size: 16.5px; color: #3f4753; max-width: 62ch; }
.about-body p:first-child { margin-top: 0; }
.about-body strong { color: var(--ink); font-weight: 600; }
.about-photo {
  border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--card);
}
.about-photo img { display: block; width: 100%; height: auto; }
.about-photo figcaption {
  padding: 12px 15px; font-size: 11.5px; color: var(--mute); border-top: 1px solid var(--line);
}

.docsec { padding-block: clamp(42px, 6vw, 76px) 0; }

.traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(262px, 1fr)); gap: 16px; margin-top: 28px; }
.trait { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 21px 20px; }
.trait-num { font-size: 10.5px; letter-spacing: .16em; color: var(--hot); }
.trait h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.015em; margin-top: 7px; }
.trait p { margin-top: 9px; font-size: 14.5px; color: var(--mute); }

.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 1px; margin-top: 28px; background: var(--line);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.stack-col { background: var(--card); padding: 20px; }
.stack-col h3 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--hot); }
.stack-col ul { list-style: none; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.stack-col li {
  font-family: var(--mono); font-size: 11.5px; color: var(--mute);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px;
}

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

/* A project whose media is a diagram rather than a recording. The work
   harness runs on a work machine against real customer data and can never be
   screen-recorded, so it ships an architecture drawing instead — and says so
   on the tile rather than wearing a play badge that would lie. */
.sheet-still { display: block; width: 100%; height: auto; background: #12151b; }
.tile-still {
  position: absolute; right: 11px; top: 11px;
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(12, 15, 20, .72);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; padding: 3px 9px;
}

/* The escape hatch for someone who did not come here to watch a build.
   Deliberately the loudest thing in the rail while it is showing: the
   small text links beside it read as navigation, and a recruiter in a
   hurry should not have to work out which one stops the performance. */
.skipbuild {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; cursor: pointer;
  min-height: 34px; padding: 0 15px; border-radius: 4px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  transition: background .16s, transform .16s, border-color .16s;
}
.skipbuild:hover { background: var(--hot); border-color: var(--hot); transform: translateY(-1px); }
.skipbuild[hidden] { display: none !important; }
