/* ============ Tokens ============ */
:root {
  --bg: #ffffff;
  --alt: #f5f5f7;
  --ink: #1d1d1f;
  --gray: #86868b;
  --hairline: rgba(0,0,0,0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --tile: #f5f5f7;
  --radius: 28px;
  --spring: cubic-bezier(0.32, 1.32, 0.42, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}
.dark {
  --bg: #000000;
  --alt: #0b0b0d;
  --ink: #f5f5f7;
  --gray: #86868b;
  --hairline: rgba(255,255,255,0.12);
  --tile: #141416;
}

/* ============ Base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

/* Cross-document page morphs (Chromium/Safari TP) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

/* Ink-flood theme switch: darkness spreads from the island */
html.inking::view-transition-old(root) { animation: none; }
html.inking::view-transition-new(root) {
  animation: ink 0.45s cubic-bezier(0.3, 0, 0.25, 1);
}
@keyframes ink {
  from { clip-path: circle(0px at var(--ink-x, 50%) var(--ink-y, 40px)); }
  to   { clip-path: circle(140vmax at var(--ink-x, 50%) var(--ink-y, 40px)); }
}
/* keep the page clickable while the ink animation plays */
::view-transition { pointer-events: none; }
/* fallback crossfade for browsers without View Transitions */
html.theme-fade, html.theme-fade body, html.theme-fade * {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}

.island { view-transition-name: island; }
.vt-ux   { view-transition-name: track-ux; }
.vt-game { view-transition-name: track-game; }
.vt-lab  { view-transition-name: track-lab; }

/* ============ Dynamic Island ============ */
.island-wrap {
  position: fixed; top: 12px; left: 12px; right: 12px; z-index: 100;
  display: flex; justify-content: center; pointer-events: none;
  transition: left 0.45s cubic-bezier(0.22, 0.8, 0.3, 1), right 0.45s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.island-wrap.compact { left: 20px; right: 20px; }
.island {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: calc(100vw - 24px);
  min-width: 0;
  flex: 0 1 auto;
  box-sizing: border-box;
  background: transparent;
  color: #f5f5f7;
  border: none;
  border-radius: 22px;
  padding: 12px 22px;
  overflow: visible;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.28));
  transition: max-width 0.45s cubic-bezier(0.22, 0.8, 0.3, 1), padding 0.45s cubic-bezier(0.22, 0.8, 0.3, 1), transform 0.2s ease;
}
.island.compact { max-width: 1120px; }
.island:active { transform: scale(0.97, 0.93); }
.island.drop-open:active { transform: none; }
.island.squish { animation: squish 0.45s var(--spring); }
@keyframes squish {
  0% { transform: scale(1); }
  40% { transform: scale(1.05, 0.86); }
  100% { transform: scale(1); }
}
.island-goo {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  filter: url(#goo-nav);
  overflow: visible;
}
.island-shell {
  position: absolute; inset: 0;
  display: block;
  background: #000;
  border-radius: 22px;
}
.drop-shell {
  position: absolute;
  display: block;
  background: #000;
  border-radius: 20px;
  opacity: 0;
  transform: scaleY(0.2);
  transform-origin: top center;
  /* Flow between triggers while keeping the dropdown expanded. */
  transition: opacity 0.28s cubic-bezier(0.22, 0.8, 0.3, 1),
              transform 0.42s cubic-bezier(0.22, 0.8, 0.3, 1),
              left 0.35s cubic-bezier(0.22, 0.8, 0.3, 1),
              top 0.35s cubic-bezier(0.22, 0.8, 0.3, 1),
              width 0.35s cubic-bezier(0.22, 0.8, 0.3, 1),
              height 0.35s cubic-bezier(0.22, 0.8, 0.3, 1);
  will-change: transform, opacity;
}
.drop-shell.on {
  opacity: 1;
  transform: scaleY(1);
}
@media (prefers-reduced-motion: reduce) {
  .island-goo { filter: none; }
  .drop-shell { transition: opacity 0.15s ease; transform: none; }
}
.island .who {
  position: relative; z-index: 2;
  justify-self: start;
  font-size: 15px; font-weight: 700; font-variation-settings: "wght" 700;
  letter-spacing: -0.01em; white-space: nowrap;
}
.island .who span {
  color: #86868b; font-weight: 600; font-variation-settings: "wght" 600;
  transition: opacity 0.3s ease, max-width 0.4s cubic-bezier(0.22, 0.8, 0.3, 1);
  display: inline-block; max-width: 120px; overflow: hidden; vertical-align: bottom;
}
.island.compact .who span { opacity: 0; max-width: 0; }
.island-links {
  display: flex; align-items: center; gap: 4px;
  justify-self: center;
  position: relative; z-index: 2; white-space: nowrap;
}
.goo-layer {
  display: none; /* TEMP: grey active-link pill disabled. Delete this line to bring it back. */
  position: absolute; inset: -12px; z-index: 0; pointer-events: none;
  filter: url(#goo);
}
.goo-layer i {
  position: absolute;
  background: #46464c;
  border-radius: 14px;
  will-change: left, width;
}
.goo-layer .tail { opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .goo-layer { filter: none; } .goo-layer .tail { display: none; } }
.island-links > a,
.island-links .nav-top {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  font-size: 15px; font-weight: 700; font-variation-settings: "wght" 700;
  color: #a1a1a6;
  padding: 7px 14px; border-radius: 14px;
  transition: color 0.25s, transform 0.2s ease;
}
.island-links > a:hover,
.island-links .nav-top:hover,
.nav-drop.open .nav-top { color: #fff; }
.island-links > a:active,
.island-links .nav-top:active { transform: scale(0.92, 0.88); }
.island-links > a.here,
.island-links .nav-top.here { color: #fff; }
.nav-drop {
  position: relative;
  display: flex; align-items: center;
}
.drop-panel {
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%) translateY(-4px);
  display: flex; flex-direction: column; align-items: stretch;
  gap: 2px;
  min-width: 148px;
  /* top padding bridges the goo join so the pointer never leaves .nav-drop */
  padding: 16px 8px 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease 0.05s, transform 0.35s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s linear 0.3s;
}
.nav-drop.open .drop-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.22s ease 0.08s, transform 0.35s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s;
}
.drop-panel a {
  display: block;
  padding: 8px 14px;
  border-radius: 12px;
  color: #c7c7cc;
  font-size: 13.5px;
  font-weight: 700;
  font-variation-settings: "wght" 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
  transition: color 0.2s, background 0.2s, transform 0.2s ease;
}
.drop-panel a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.drop-panel a:active { transform: scale(0.96, 0.92); }
/* ============ Type & buttons ============ */
.eyebrow {
  font-size: 14px; font-weight: 600; color: var(--gray);
  letter-spacing: -0.01em; margin-bottom: 14px;
}
h1 {
  font-size: clamp(44px, 7.5vw, 92px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.04;
}
.subhead {
  font-size: clamp(19px, 2.3vw, 26px);
  font-weight: 400; color: var(--gray); letter-spacing: -0.01em;
  line-height: 1.35; margin-top: 20px;
}
h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.08;
}
.btn {
  display: inline-block;
  background: var(--blue); color: #fff;
  font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
  padding: 11px 24px; border-radius: 99px;
  transition: background 0.2s, transform 0.25s var(--spring);
}
.btn:hover { background: var(--blue-hover); }
.btn:active { transform: scale(0.94, 0.88); background: #0062c9; }
.link-arrow {
  color: var(--blue); font-size: 16px; font-weight: 400;
  display: inline-flex; align-items: center; gap: 4px;
}
.link-arrow::after { content: "›"; font-size: 19px; transition: transform 0.25s var(--spring); }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ============ Page hero ============ */
.hero {
  text-align: center;
  padding: 150px 24px 70px;
  max-width: 900px; margin: 0 auto;
}
.hero .actions { margin-top: 32px; display: flex; gap: 24px; justify-content: center; align-items: center; flex-wrap: wrap; }
/* Home hero: the machine alone, centred; scrolling slides it aside and writes the intro */
.hero-scroll { position: relative; height: 240vh; z-index: 2; overflow-x: clip; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  padding-top: 56px; box-sizing: border-box; overflow: visible;
}
.hero-sticky .ticket-stage {
  --machine-w: 300px; width: 360px; min-height: 0; margin: 0; flex: none;
  will-change: transform; transform-origin: 50% 50%;
}
.hero-copy {
  position: absolute; top: 50%; left: max(24px, calc(50% - 560px)); width: min(540px, 50vw);
  transform: translateY(-46%); text-align: left; pointer-events: none;
}
.hero-copy.is-in { pointer-events: auto; }
.hero-copy h1 { font-size: clamp(40px, 5.2vw, 72px); }
.hero-copy .actions { margin-top: 32px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
/* animated words */
.hero-copy .hp, .hero-copy .w {
  opacity: 0; filter: blur(10px);
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0s;
}
.hero-copy .hp { transform: translateY(26px); }
.hero-copy .w { display: inline-block; transform: translateY(0.7em) rotate(3deg); transform-origin: 0 100%; }
.hero-copy.is-in .hp, .hero-copy.is-in .w {
  opacity: 1; filter: none; transform: none;
  transition-delay: calc(var(--i) * 0.11s);
}
@media (max-width: 900px) {
  /* Phones: a slimmer machine, and the intro sits below the card instead of beside it */
  .hero-sticky .ticket-stage { --sleeve-n: 172; --machine-w: 236px; --machine-body-h: 56px; width: 260px; }
  .hero-copy { left: 0; right: 0; width: auto; top: auto; bottom: 22px; transform: none; text-align: center; padding: 0 22px; }
  .hero-copy .subhead { display: none; }
  .hero-copy .eyebrow { margin-bottom: 8px; }
  .hero-copy h1 { font-size: clamp(36px, 10.5vw, 52px); }
  .hero-copy .actions { margin-top: 16px; justify-content: center; }
}
@media (max-height: 720px) {
  .hero-sticky .ticket-stage { --sleeve-n: 180; --machine-body-h: 56px; --machine-w: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy .hp, .hero-copy .w { transition: none; opacity: 1; filter: none; transform: none; }
}
/* content sits above the parallaxing hero so its faded text can't intercept clicks */
.filter-row, .post-grid, .bento-section, .feature, .tracks, .next-nav, .more-writing, .resume-section {
  position: relative; z-index: 2;
}

/* ============ Bento ============ */
.bento-section { max-width: 1120px; margin: 0 auto; padding: 30px 24px 90px; }
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 14px;
}
.tile {
  position: relative; overflow: hidden;
  background: var(--tile);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease);
}
.tile:hover { transform: scale(1.015); box-shadow: 0 24px 60px -28px rgba(0,0,0,0.25); }
.tile:active { transform: scale(0.98, 0.965); }
.tile.w2 { grid-column: span 2; }
.tile.h2 { grid-row: span 2; }
.tile.dark-tile { background: #101012; color: #f5f5f7; }
.tile .kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 6px;
}
.tile h3 {
  font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15;
  max-width: 16ch;
}
.tile .more {
  margin-top: auto; position: relative; z-index: 2;
  font-size: 14px; color: var(--blue); font-weight: 500;
}
.tile .more::after { content: " ›"; }
.dark-tile .more { color: #6bb6ff; }

/* --- tile artwork (pure CSS, no emoji) --- */
.art { position: absolute; inset: 0; pointer-events: none; }
/* iPhone */
.art .phone {
  position: absolute; right: 8%; bottom: -14%;
  width: 216px; height: 440px;
  border-radius: 50px;
  padding: 9px;
  background: #1a1a1d;
  box-shadow:
    0 34px 64px -22px rgba(0,0,0,0.38),
    inset 0 0 0 1px rgba(255,255,255,0.22);
  transform: rotate(-8deg);
  transition: transform 0.6s var(--spring);
}
.tile:hover .art .phone { transform: rotate(-5deg) translateY(-8px); }
/* side buttons: volume + action (left), power (right) */
.art .phone::before {
  content: ""; position: absolute; left: -2.5px; top: 112px;
  width: 3px; height: 30px; border-radius: 2px; background: #303034;
  box-shadow: 0 44px 0 #303034, 0 -32px 0 -7px #303034;
}
.art .phone::after {
  content: ""; position: absolute; right: -2.5px; top: 156px;
  width: 3px; height: 54px; border-radius: 2px; background: #303034;
}
.art .ph-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 41px;
  background: #f7f7f9;
  overflow: hidden;
}
.art .ph-island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 58px; height: 17px; border-radius: 99px; background: #0a0a0c;
}
.art .ph-ui {
  position: absolute; inset: 44px 15px 15px;
  display: flex; flex-direction: column; gap: 10px;
}
.art .ph-ui i { display: block; border-radius: 99px; background: #e7e7ec; }
.art .ph-ui .ph-hero {
  height: 86px; border-radius: 16px; flex: none;
  background: #e2e2ea;
}
.art .ph-ui .ph-line { height: 10px; width: 72%; }
.art .ph-ui .ph-line.short { width: 46%; }
.art .ph-ui .ph-grid { display: flex; gap: 10px; height: 74px; flex: none; }
.art .ph-ui .ph-grid i { flex: 1; border-radius: 14px; }
.art .ph-ui .ph-cta { margin-top: 4px; height: 34px; flex: none; background: var(--blue); }
/* browser window */
.art .window {
  position: absolute; right: -6%; bottom: -22%;
  width: 62%; min-width: 300px; height: 75%;
  background: #fff; border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,0.25);
  transition: transform 0.6s var(--spring);
}
.tile:hover .art .window { transform: translateY(-10px); }
.art .window::before {
  content: ""; position: absolute; top: 14px; left: 16px;
  width: 10px; height: 10px; border-radius: 50%; background: #ff5f57;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}
.art .window::after {
  content: ""; position: absolute; top: 38px; left: 16px; right: 16px; height: 26px;
  border-radius: 99px; background: #f0f0f2;
  box-shadow: 0 44px 0 -8px #f0f0f2, 0 78px 0 -8px #f0f0f2;
}
/* server rack */
.art .rack {
  position: absolute; right: 28px; bottom: 24px;
  width: 46%; min-width: 210px;
  display: flex; flex-direction: column; gap: 8px;
}
.art .rack i {
  display: block; height: 34px; border-radius: 10px;
  background: #1d1d1f; position: relative;
}
.art .rack i::before {
  content: ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #30d158;
  box-shadow: -14px 0 0 rgba(255,255,255,0.25), -28px 0 0 rgba(255,255,255,0.25);
}
.art .rack i:nth-child(2)::before { background: #0a84ff; }
/* unreal grid */
.art .ue-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  transform: perspective(500px) rotateX(58deg) translateY(30%) scale(1.6);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, black 30%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, black 30%, transparent 85%);
}
.art .glow {
  position: absolute; right: 14%; bottom: 18%;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(10,132,255,0.55), transparent 70%);
  filter: blur(10px);
}
/* game pad cross */
.art .pad {
  position: absolute; right: 34px; bottom: 30px; width: 92px; height: 92px;
  transition: transform 0.6s var(--spring);
}
.tile:hover .art .pad { transform: rotate(90deg); }
.art .pad::before, .art .pad::after {
  content: ""; position: absolute; background: #1d1d1f; border-radius: 10px;
}
.art .pad::before { left: 50%; top: 0; bottom: 0; width: 32px; transform: translateX(-50%); }
.art .pad::after  { top: 50%; left: 0; right: 0; height: 32px; transform: translateY(-50%); }
/* cursor / segmented pill for UX tile */
.art .seg-pill {
  position: absolute; right: 26px; bottom: 74px;
  width: 130px; height: 36px; border-radius: 99px;
  background: rgba(0,0,0,0.06);
}
.art .seg-pill::before {
  content: ""; position: absolute; top: 4px; left: 4px;
  width: 56px; height: 28px; border-radius: 99px; background: #1d1d1f;
  transition: transform 0.5s var(--spring);
}
.tile:hover .art .seg-pill::before { transform: translateX(66px); }

/* --- tile artwork, dark theme --- */
.dark .art .phone {
  box-shadow:
    0 34px 64px -22px rgba(0,0,0,0.85),
    inset 0 0 0 1px rgba(255,255,255,0.18);
}
.dark .art .ph-screen { background: #101014; }
.dark .art .ph-island { box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.dark .art .ph-ui i { background: #232329; }
.dark .art .ph-ui .ph-hero { background: #232329; }
.dark .art .ph-ui .ph-cta { background: #0a84ff; }
.dark .art .window { background: #1d1d1f; border-color: rgba(255,255,255,0.1); }
.dark .art .window::after { background: #2f2f33; box-shadow: 0 44px 0 -8px #2f2f33, 0 78px 0 -8px #2f2f33; }
.dark .art .rack i { background: #2a2a2e; }
.dark .art .pad::before, .dark .art .pad::after { background: #e8e8ed; }
.dark .art .seg-pill { background: rgba(255,255,255,0.1); }
.dark .art .seg-pill::before { background: #f5f5f7; }
.dark .tile:hover { box-shadow: 0 24px 60px -28px rgba(0,0,0,0.7); }

/* ============ Track rows (Learn more) ============ */
.tracks { max-width: 1120px; margin: 0 auto; padding: 0 24px 110px; }
.tracks .row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.tracks-head { text-align: center; margin-bottom: 36px; }
.tracks-head .eyebrow { margin-bottom: 10px; }
.track-card {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--bg); border-radius: var(--radius); padding: 28px 26px 26px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.06); /* the shared lift */
  transition: transform 0.45s var(--spring), box-shadow 0.45s var(--ease);
}
.track-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(0,0,0,0.13), 0 4px 10px rgba(0,0,0,0.07); }
.track-card:active { transform: scale(0.98); }
.track-card:focus-visible { outline: 3px solid rgba(0,113,227,0.5); outline-offset: 4px; }
/* ink glyphs drawn like the What I do blob's details */
.track-icon { width: 40px; height: 40px; margin-bottom: 20px; overflow: visible; flex: none; transition: transform 0.45s var(--spring); }
.track-card:hover .track-icon { transform: rotate(-6deg) scale(1.06); }
.track-icon .ti-on { fill: var(--ink); }
.track-icon .ti-ink { fill: var(--bg); } /* small details cut out of the glyph */
.track-icon .ti-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.track-card h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.track-card p { font-size: 14.5px; color: var(--gray); margin-bottom: 22px; }
/* the blue pill sits on the card's floor, so all four line up */
.track-go {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  padding: 8px 14px 8px 16px; border-radius: 99px; transition: transform 0.3s var(--spring), background 0.2s;
}
.track-go i { font-style: normal; font-size: 17px; line-height: 1; transition: transform 0.3s var(--spring); }
.track-card:hover .track-go { background: var(--blue-hover); }
.track-card:hover .track-go i { transform: translateX(3px); }
.dark .track-card { background: var(--tile); box-shadow: 0 10px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4); }

/* ============ Feature sections (subpages) ============ */
.feature {
  max-width: 1120px; margin: 0 auto; padding: 40px 24px;
}
.panel {
  background: var(--alt);
  border-radius: 34px;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden; position: relative;
}
.dark .panel { background: var(--tile); }
.panel.centered { text-align: center; }
.panel .sub { color: var(--gray); font-size: clamp(17px, 2vw, 21px); margin-top: 14px; max-width: 58ch; }
.panel.centered .sub { margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.spec-list { list-style: none; margin-top: 22px; }
.spec-list li {
  padding: 14px 0; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 18px;
  font-size: 15px;
}
.spec-list li:last-child { border-bottom: 1px solid var(--hairline); }
.spec-list .k { font-weight: 600; }
.spec-list .v { color: var(--gray); text-align: right; }
.stat-row { display: flex; gap: clamp(28px, 6vw, 80px); justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.stat-row .stat { text-align: center; }
.stat-row .num { font-size: clamp(34px, 4.5vw, 56px); font-weight: 600; letter-spacing: -0.03em; }
.stat-row .lbl { font-size: 14px; color: var(--gray); margin-top: 4px; }

/* ============ StreetPass ticket demo ============ */
.panel.ticket-feature { overflow: visible !important; }
.ticket-copy { max-width: 640px; margin-bottom: 28px; }
.ticket-stage[data-tier="1"] {
  --p0: #EAF3FF; --p1: #CFE3FA; --p2: #F4F8FF; --p3: #F4F8FF;
  --flat: #DDEBFC; --glow: #9BD1FF;
}
.ticket-stage[data-tier="2"] {
  --p0: #FFE58A; --p1: #F5C542; --p2: #FFF1B8; --p3: #E0A81C;
  --flat: #F5D56A; --glow: #FFC53D;
}
.ticket-stage {
  /* RipTicket / SleeveFace design space (260×372) */
  --sleeve-n: 220;
  /* k scales every app-space (260-wide) measurement to the rendered sleeve */
  --k: calc(var(--sleeve-n) / 260);
  --sk: var(--k);
  --sleeve-w: calc(var(--sleeve-n) * 1px);
  --sleeve-h: calc(var(--k) * 372px);
  --card-ps: calc(var(--k) * 0.96);
  --card-in-w: calc(var(--k) * 240px);
  --card-in-h: calc(var(--k) * 336px);
  --reveal-n: min(250, calc(var(--sleeve-n) * 1.14));
  --reveal-ps: calc(var(--reveal-n) / 250);
  --reveal-w: calc(var(--reveal-n) * 1px);
  --reveal-h: calc(var(--reveal-n) * 1.4px);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* paper stock + slot glow, per tier (app: sleeveStock / GLOW) */
  --p0: #fbfbfa; --p1: #fbfbfa; --p2: #fbfbfa; --p3: #fbfbfa;
  --flat: #fbfbfa; --glow: #ffffff;
  --machine-w: min(360px, 100%);
  /* App: MACHINE_H 86 → body 62 / port 24 */
  --machine-body-h: 62px;
  --machine-port-h: 24px;
  --slit-inset: 8px;
  --slit-h: 7px;
  /* Ticket top sits mid-slit (TICKET_EMERGE) */
  --slot-y: calc(var(--machine-body-h) + var(--slit-inset) + 4px);
  --open-top: calc(var(--slot-y) + 66px);
  --reveal-top: calc(var(--machine-body-h) + var(--machine-port-h) + 18px);
  position: relative;
  width: 100%;
  min-height: 720px;
  margin-top: 8px;
  display: flex; flex-direction: column; align-items: center;
  user-select: none;
  overflow: visible;
  border-radius: 24px;
}

.ticket-rig {
  position: relative;
  width: var(--machine-w);
  height: calc(var(--reveal-top) + var(--reveal-h) + 20px);
  isolation: isolate;
}

/* Continuous machine: same width + #121413, rounded only on outer corners */
.tm-port {
  position: absolute;
  top: var(--machine-body-h);
  left: 0; right: 0;
  height: var(--machine-port-h);
  z-index: 2;
  border-radius: 0 0 22px 22px;
  background: #121413;
  padding-top: var(--slit-inset);
  box-shadow: 0 8px 14px rgba(18,20,19,0.2);
  pointer-events: none;
}
.tm-slot {
  position: relative;
  margin: 0 30px;
  height: var(--slit-h);
  border-radius: 99px;
  background: #000;
}
/* Slot glow: lit while printing; a special ticket keeps pulsing */
.tm-slot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
  opacity: 0; transition: opacity 0.35s;
}
.ticket-stage[data-state="printing"] .tm-slot::after { opacity: 1; }
.ticket-stage[data-tier="2"]:not([data-state="idle"]):not([data-state="revealed"]) .tm-slot::after {
  opacity: 1; animation: tm-blink 0.5s infinite;
}
@keyframes tm-blink { 50% { opacity: 0.25; } }

.tm-body {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--machine-body-h);
  z-index: 4;
  border-radius: 24px 24px 0 0;
  background: #121413;
  pointer-events: none;
}
.tm-copy { position: absolute; inset: 0; font-family: var(--mono); font-size: 11px; }
.tm-label { position: absolute; left: 18px; top: 16px; color: #fff; }
.tm-status { position: absolute; left: 18px; top: 34px; color: #9ba19c; text-transform: uppercase; white-space: nowrap; }

.ticket-lane {
  position: absolute;
  top: var(--slot-y);
  left: 0; right: 0;
  bottom: 0;
  z-index: 3;
  overflow: visible;
}
.ticket-stage[data-state="idle"] .ticket-lane,
.ticket-stage[data-state="printing"] .ticket-lane { overflow: hidden; }
.ticket-remnant {
  position: absolute;
  left: 50%; top: -1px;
  width: var(--sleeve-w); height: 12px;
  margin-left: calc(var(--sleeve-w) / -2);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
/* Remnant opacity is JS-driven so a partial tear can hang on ready */
.ticket-stage[data-state="drop"] .ticket-remnant,
.ticket-stage[data-state="opening"] .ticket-remnant,
.ticket-stage[data-state="revealed"] .ticket-remnant { opacity: 1; }

.ticket-sleeve {
  position: absolute;
  left: 50%; top: 0;
  width: var(--sleeve-w); height: var(--sleeve-h);
  margin-left: calc(var(--sleeve-w) / -2);
  cursor: grab;
  outline: none;
  touch-action: none;
}
/* The sealed ticket is simulated in app space (260×372) and scaled to fit */
.sleeve-scale {
  position: absolute; left: 0; top: 0; width: 260px; height: 372px;
  transform: scale(var(--sk)); transform-origin: 0 0;
  --k: 1; --card-ps: 0.96; --card-in-w: 240px; --card-in-h: 336px;
}
.sleeve-scale > div, .sleeve-scale .sb, .sleeve-scale .sbr, .sleeve-scale .sbc { position: absolute; left: 0; top: 0; width: 260px; height: 372px; }
.sleeve-scale .sw { filter: drop-shadow(0 8px 10px rgba(0,0,0,0.14)); }
.sleeve-scale .sbc { pointer-events: none; }
.sleeve-scale .sh { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.ticket-sleeve:focus-visible {
  outline: 3px solid rgba(0,113,227,0.35);
  outline-offset: 3px; border-radius: 8px;
}
.ticket-stage[data-state="ripping"] .ticket-sleeve,
.ticket-stage[data-state="held"] .ticket-sleeve { cursor: grabbing; }
/* Keep sleeve visible during drop (settle) — hide only after opened shell is up */
.ticket-stage[data-state="drop"] .ticket-sleeve { pointer-events: none; }
.ticket-stage[data-state="opening"] .ticket-sleeve,
.ticket-stage[data-state="revealed"] .ticket-sleeve {
  pointer-events: none;
  visibility: hidden;
}

.sleeve-face {
  position: absolute; inset: 0;
  border-radius: 2px 2px 14px 14px;
  overflow: hidden;
  color: #121413;
}
.sleeve-stock {
  position: absolute; inset: 0;
  background: linear-gradient(166deg, var(--p0), var(--p1) 33%, var(--p2) 66%, var(--p3));
}
.sleeve-perf {
  position: absolute; left: calc(var(--k) * 10px); right: calc(var(--k) * 10px); top: calc(var(--k) * 4px);
  border-top: calc(var(--k) * 2px) dashed rgba(18,20,19,0.22); z-index: 2;
}
/* Type is laid out in app points (260×372) and scaled by k */
.sleeve-row {
  position: absolute; left: calc(var(--k) * 20px); right: calc(var(--k) * 20px);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: calc(var(--k) * 11px); line-height: 1.2;
  color: #121413; z-index: 2; white-space: nowrap;
}
.sleeve-row-top { top: calc(var(--k) * 24px); }
.sleeve-row-mid { bottom: calc(var(--k) * 58px); }
.sleeve-row-bot { bottom: calc(var(--k) * 20px); color: rgba(18,20,19,0.7); }
.sleeve-big {
  position: absolute; left: calc(var(--k) * 20px); right: calc(var(--k) * 20px); top: calc(var(--k) * 48px);
  margin: 0; z-index: 2;
  font-size: calc(var(--k) * 30px); font-weight: 800;
  line-height: calc(var(--k) * 29px); letter-spacing: calc(var(--k) * -0.9px);
}
.sleeve-role {
  position: absolute; left: calc(var(--k) * 20px); right: calc(var(--k) * 20px); top: calc(var(--k) * 108px);
  margin: 0; z-index: 2;
  font-size: calc(var(--k) * 14px); font-weight: 600; color: #121413;
  white-space: nowrap;
}
/* WIN = {l:26,t:128,r:234,b:262} → % of 260×372 */
.sleeve-window {
  position: absolute;
  left: calc(26 / 260 * 100%);
  right: calc(26 / 260 * 100%);
  top: calc(128 / 372 * 100%);
  height: calc(134 / 372 * 100%);
  border-radius: calc(var(--k) * 12px); overflow: hidden; z-index: 2;
}
/* Window lip + the paper's shadow falling onto the card */
.sleeve-window::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 0 calc(var(--k) * 1.5px) rgba(18,20,19,0.22);
  background: linear-gradient(180deg, rgba(0,0,0,0.38), rgba(0,0,0,0) calc(var(--k) * 12px));
}
.sleeve-lining {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #2b2b28, #57544c);
}
/* The card sits in the sleeve at (10,22), 240 wide; the window shows its middle */
.pass-card-in {
  position: absolute;
  left: calc(var(--k) * -16px); top: calc(var(--k) * -106px);
  width: var(--card-in-w); height: var(--card-in-h);
  --ps: var(--card-ps);
}
.sleeve-place { font-family: system-ui, sans-serif; font-size: calc(var(--k) * 13px); font-weight: 700; }
.sleeve-dash {
  position: absolute; left: calc(var(--k) * 20px); right: calc(var(--k) * 20px); bottom: calc(var(--k) * 44px);
  border-top: calc(var(--k) * 2px) dashed rgba(18,20,19,0.35); z-index: 2;
}

.opened-sleeve {
  position: absolute;
  left: 50%;
  top: var(--open-top);
  width: var(--sleeve-w); height: var(--sleeve-h);
  margin-left: calc(var(--sleeve-w) / -2);
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}
/* visibility + opacity for opened sleeve are driven by JS */
.rem-stop { stop-color: var(--flat); }
.stock-stop:nth-child(1) { stop-color: var(--p0); }
.stock-stop:nth-child(2) { stop-color: var(--p1); }
.stock-stop:nth-child(3) { stop-color: var(--p2); }
.stock-stop:nth-child(4) { stop-color: var(--p3); }
.opened-path { fill: url(#openedStock); }
.opened-lining {
  position: absolute;
  left: calc(26 / 260 * 100%);
  right: calc(26 / 260 * 100%);
  top: calc(128 / 372 * 100%);
  height: calc(134 / 372 * 100%);
  border-radius: 12px;
  background: linear-gradient(180deg, #2b2b28, #57544c);
  z-index: 1;
}
.opened-paper {
  position: absolute; inset: 0;
  z-index: 3;
  color: #121413;
  pointer-events: none;
}
.opened-stock {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  /* Soft shadow without filter() — filter+evenodd SVG was painting blank in Chrome */
  -webkit-mask-image: none;
}
.pass-card-shell {
  position: absolute;
  left: calc(10 / 260 * 100%);
  top: calc(22 / 372 * 100%);
  width: var(--card-in-w); height: var(--card-in-h);
  z-index: 2;
  opacity: 0;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,0.4);
  border-radius: calc(var(--card-ps) * 18px);
  --ps: var(--card-ps);
}
.ticket-stage[data-state="opening"] .pass-card-shell { opacity: 1; }

.reveal-stage {
  position: absolute;
  left: 50%;
  top: var(--reveal-top);
  width: var(--reveal-w);
  height: var(--reveal-h);
  margin-left: calc(var(--reveal-w) / -2);
  z-index: 7;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  perspective: 900px;
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}
/* opacity/visibility driven by JS to avoid flash at handoff */
.ticket-stage[data-state="revealed"] .reveal-stage {
  pointer-events: auto;
}
.pass-card-reveal {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  cursor: grab;
  will-change: transform;
  --ps: var(--reveal-ps);
  border-radius: calc(var(--reveal-ps) * 18px);
  box-shadow: 0 22px 40px -16px rgba(0,0,0,0.48);
}
/* PassCard (plate-bottom): 250×350 design space, scaled by --ps */
.pass-face {
  position: absolute; left: 0; top: 0; width: 250px; height: 350px;
  transform: scale(var(--ps)); transform-origin: 0 0;
  border-radius: 18px; overflow: hidden;
  background: #121413; color: #fff;
}
.pc-art { position: absolute; left: 0; top: 0; width: 250px; height: 350px; overflow: hidden; background: radial-gradient(120% 75% at 30% 10%, #0C3A44 0%, #06161B 55%, #040B0E 100%); }
.pc-art svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* drifting colour fields behind the route */
.pc-aurora { position: absolute; border-radius: 50%; filter: blur(34px); opacity: 0.7; will-change: transform; }
.pc-aurora.a { width: 190px; height: 190px; left: -40px; top: -50px; background: #00A1B1; animation: pc-drift-a 9s ease-in-out infinite alternate; }
.pc-aurora.b { width: 170px; height: 170px; right: -60px; top: 90px; background: #7F3F98; opacity: 0.55; animation: pc-drift-b 11s ease-in-out infinite alternate; }
.pc-aurora.c { width: 130px; height: 130px; left: 40px; bottom: -50px; background: #1E6BFF; opacity: 0.45; animation: pc-drift-c 13s ease-in-out infinite alternate; }
@keyframes pc-drift-a { to { transform: translate(70px, 60px) scale(1.15); } }
@keyframes pc-drift-b { to { transform: translate(-80px, -50px) scale(0.9); } }
@keyframes pc-drift-c { to { transform: translate(90px, -40px) scale(1.2); } }
.pc-rosette { fill: none; stroke: rgba(255,255,255,0.16); stroke-width: 0.8; transform-box: view-box; animation: pc-spin 60s linear infinite; }
.pc-rosette ellipse { vector-effect: non-scaling-stroke; }
.pc-rings circle { fill: none; stroke: rgba(255,255,255,0.18); stroke-width: 1; }
@keyframes pc-spin { to { transform: translate(125px, 150px) rotate(360deg); } }
.pc-km { font: 900 92px/1 system-ui, -apple-system, sans-serif; letter-spacing: -6px; filter: drop-shadow(0 0 14px rgba(0,229,255,0.45)); animation: pc-breathe 4s ease-in-out infinite alternate; }
@keyframes pc-breathe { to { filter: drop-shadow(0 0 24px rgba(127,63,152,0.8)); } }
.pc-chip { position: absolute; left: 14px; top: 14px; min-width: 30px; height: 30px; padding: 0 7px; box-sizing: border-box; border-radius: 15px; background: #fff; color: #06161B; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.pc-tagline { position: absolute; right: 14px; top: 20px; font: 700 10px/12px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; color: rgba(255,255,255,0.8); }
.pc-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(255,255,255,0.9); opacity: 0; animation: pc-twinkle 3.4s ease-in-out infinite; }
.pc-spark.s1 { left: 188px; top: 70px; }
.pc-spark.s2 { left: 36px; top: 150px; animation-delay: 1.1s; }
.pc-spark.s3 { left: 206px; top: 190px; animation-delay: 2s; }
.pc-spark.s4 { left: 120px; top: 36px; animation-delay: 2.7s; }
@keyframes pc-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1.6); } }
/* One continuous card: art runs full height and melts into the name, no plate or divider */
.pc-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,9,11,0.92) 0%, rgba(5,9,11,0.55) 22%, rgba(5,9,11,0) 46%); pointer-events: none; }
.pc-plate {
  position: absolute; left: 0; right: 0; bottom: 0; height: 88px; padding: 0 18px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pc-id { min-width: 0; }
.pc-name { margin: 0; font-size: 19px; line-height: 22px; font-weight: 800; letter-spacing: -0.4px; color: #fff; white-space: nowrap; }
.pc-role { margin: 3px 0 0; font-size: 11px; line-height: 13px; color: #A9AEB5; white-space: nowrap; }
/* Foil: an oversized band layer, moved with transforms by the tilt loop (JS) */
.pc-foilwrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0.4; }
.pc-foil {
  position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; will-change: transform;
  background: repeating-linear-gradient(115deg, rgba(0,161,177,0) 0%, rgba(0,200,220,0.8) 4%, rgba(190,250,255,0.95) 7.5%, rgba(120,190,215,0.8) 11%, rgba(70,130,200,0.6) 14%, rgba(0,161,177,0) 17%);
}
.ticket-stage[data-tier="1"] .pc-foil { background: repeating-linear-gradient(115deg, rgba(220,228,240,0) 0%, rgba(210,222,240,0.7) 3.5%, rgba(255,255,255,0.9) 6.5%, rgba(200,220,245,0.7) 9.5%, rgba(230,220,250,0.6) 12%, rgba(220,228,240,0) 15%); }
.ticket-stage[data-tier="2"] .pc-foil { background: repeating-linear-gradient(115deg, rgba(255,190,80,0) 0%, rgba(255,200,90,0.8) 3.5%, rgba(255,236,170,0.9) 6.5%, rgba(255,214,120,0.8) 9.5%, rgba(230,160,60,0.7) 12%, rgba(255,190,80,0) 15%); }
/* idle light sweep so the card is alive before you touch it */
.pc-sheen { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 18px; }
.pc-sheen::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 46px; left: -80px; transform: skewX(-18deg); background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.28), rgba(255,255,255,0)); animation: pc-sweep 5.5s 1.2s ease-in-out infinite; }
@keyframes pc-sweep { 0% { left: -80px; } 28%, 100% { left: 340px; } }
.pc-glarewrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: overlay; }
.pc-glare { position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; will-change: transform; opacity: 0.5; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.45), rgba(255,255,255,0) 22%); }
.pc-edge { position: absolute; inset: 0; border-radius: 18px; border: 1px solid rgba(255,255,255,0.28); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .pc-aurora, .pc-rosette, .pc-km, .pc-spark, .pc-sheen::before { animation: none; }
}

.ticket-hud {
  margin-top: 10px;
  min-height: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ticket-hint {
  font-size: 14px; font-weight: 600; color: var(--gray);
}
.ticket-replay {
  appearance: none; border: 1px solid var(--hairline);
  background: var(--bg); color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 8px 16px; border-radius: 99px;
  cursor: pointer;
}
.ticket-replay:hover { background: #fff; }
.ticket-replay[hidden] { display: none !important; }

@media (max-width: 700px) {
  .ticket-stage {
    --sleeve-n: 180;
    --machine-w: min(300px, 100%);
    --machine-body-h: 56px;
    --reveal-n: min(210, calc(var(--sleeve-n) * 1.14));
    min-height: 620px;
  }
  .tm-copy { font-size: 10px; }
}

/* media placeholder (for future clips/screens) */
.media {
  border-radius: 24px; background: var(--bg);
  border: 1px solid var(--hairline);
  aspect-ratio: 16/10;
  display: grid; place-items: center;
  color: var(--gray); font-size: 13px; font-weight: 500;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.3);
}
.dark .media { background: #1a1a1c; }
.media .play {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(128,128,136,0.18);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: transform 0.35s var(--spring);
}
.media:hover .play { transform: scale(1.12); }
.media .play::before {
  content: ""; margin-left: 5px;
  border-left: 18px solid currentColor;
  border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}

/* next-page footer nav */
.next-nav {
  max-width: 1120px; margin: 0 auto; padding: 30px 24px 90px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.next-nav a {
  background: var(--alt); border-radius: 24px; padding: 26px 28px;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease);
}
.dark .next-nav a { background: var(--tile); }
.next-nav a:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -24px rgba(0,0,0,0.3); }
.next-nav a:active { transform: scale(0.98); }
.next-nav .small { font-size: 12.5px; color: var(--gray); }
.next-nav .big { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.next-nav .big::after { content: " ›"; color: var(--blue); }

/* ============ Footer socials ============ */
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}
.social-icon.stack-icon {
  flex: none;
  width: 52px;
  min-width: 52px;
  padding: 0;
  margin: 0;
  gap: 0;
  border-radius: 50%;
  background: var(--bg);
  aspect-ratio: 1;
  justify-content: center;
  cursor: pointer;
}
.social-icon.stack-icon img {
  width: 22px;
  height: 22px;
  margin: 0;
}
.dark .social-icon img[src*="github"] { filter: invert(1); }
@media (hover: hover) {
  .footer-socials .social-icon:hover { transform: scale(1.08); }
  .footer-socials .social-icon:hover img { transform: scale(1.05); }
}
.footer-socials .social-icon:active { transform: scale(0.94); }

/* ============ Resume / about ============ */
.resume-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 90px;
}
.resume-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}
.resume-head h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.resume-head .sub {
  color: var(--gray);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-top: 14px;
}
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.resume-panel {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.06); /* same lift as the What I do chips */
}
.dark .resume-panel { background: var(--tile); box-shadow: 0 10px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4); }
.resume-panel h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4px;
}
.resume-entry {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.resume-entry:first-of-type {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}
.re-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.re-meta {
  font-size: 14px;
  color: var(--gray);
  margin-top: 5px;
}
.re-desc {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.5;
  margin-top: 10px;
}
/* Toolkit: two slow rows of tool chips, drifting in opposite directions */
.resume-panel.toolkit { grid-column: 1 / -1; padding: 22px 0 26px; overflow: hidden; }
.resume-panel.toolkit h3 { margin: 0 0 18px; padding: 0 24px; text-align: center; }
.mq-row {
  overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.mq-track { display: flex; gap: 12px; width: max-content; list-style: none; margin: 0; padding: 0 6px; animation: mq-slide 46s linear infinite; }
.mq-row.mq-b .mq-track { animation-direction: reverse; animation-duration: 54s; }
.toolkit:hover .mq-track { animation-play-state: paused; }
@keyframes mq-slide { to { transform: translateX(-50%); } }
.mq-chip {
  display: flex; align-items: center; gap: 11px; flex: none;
  padding: 10px 20px 10px 12px; border-radius: 99px; background: var(--bg);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), inset 0 0 0 1px var(--hairline);
}
.mq-chip img { width: 28px; height: 28px; object-fit: contain; }
.mq-chip span { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.dark .mq-chip img[src*="tailscale"], .dark .mq-chip img[src*="unrealengine"], .dark .mq-chip img[src*="three.js"], .dark .mq-chip img[src*="expo"] { filter: invert(1); }
@media (max-width: 700px) {
  .mq-chip { padding: 8px 16px 8px 10px; gap: 9px; }
  .mq-chip img { width: 24px; height: 24px; }
  .mq-chip span { font-size: 14px; }
  .mq-track { animation-duration: 38s; }
  .mq-row.mq-b .mq-track { animation-duration: 44s; }
}
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding: 0 20px; }
  .mq-chip[aria-hidden="true"] { display: none; }
  .mq-row { -webkit-mask-image: none; mask-image: none; }
}
.resume-dl {
  text-align: center;
  margin-top: 32px;
}

/* ============ Contact / footer ============ */
.contact {
  text-align: center; padding: 100px 24px 90px;
  background: var(--alt);
}
.dark .contact { background: #0b0b0d; }
.contact h2 { max-width: 20ch; margin: 0 auto; }
.contact .subhead { max-width: 44ch; margin-left: auto; margin-right: auto; }
.contact .actions { margin-top: 30px; display: flex; gap: 24px; justify-content: center; align-items: center; }
footer {
  padding: 22px 24px 34px; text-align: center;
  font-size: 12px; color: var(--gray);
  background: var(--alt);
}
.dark footer { background: #0b0b0d; }
footer .hairline { border-top: 1px solid var(--hairline); max-width: 1120px; margin: 0 auto 18px; }

/* ============ iPad-style pointer ============ */
html.km-pointer, html.km-pointer * { cursor: none !important; }
.pointer-ring {
  position: fixed; top: 0; left: 0; z-index: 300;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.11);
  border-radius: 99px;
  opacity: 0;
  will-change: transform, width, height;
}
.dark .pointer-ring { background: rgba(255, 255, 255, 0.15); }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============ Writing index ============ */
.tag-chip {
  display: inline-flex; align-items: center;
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--tc, var(--gray));
  padding: 4px 11px 4px 20px; border-radius: 99px;
  background: color-mix(in srgb, var(--tc, #888) 12%, transparent);
  position: relative;
}
.tag-chip::before {
  content: ""; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--tc, var(--gray));
}

.filter-row {
  max-width: 1120px; margin: 0 auto; padding: 0 24px 34px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter {
  background: var(--alt); color: var(--gray);
  border: 1px solid var(--hairline); border-radius: 99px;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  padding: 9px 18px; cursor: pointer;
  transition: transform 0.25s var(--spring), color 0.2s, background 0.2s, border-color 0.2s;
}
.filter:hover { color: var(--ink); }
.filter:active { transform: scale(0.94, 0.88); }
.filter.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.blog-page .hero { padding: 124px 24px 36px; }
.blog-page .hero h1 { font-size: clamp(40px, 5.5vw, 64px); max-width: none; line-height: 1.1; }
.blog-page .hero .subhead { font-size: 20px; max-width: 650px; }
.blog-feature {
  position: relative; z-index: 2;
  max-width: 1072px; margin: 0 auto 64px; padding: 32px;
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 36px; align-items: center;
  background: var(--alt); border-radius: var(--radius);
}
.blog-feature-copy h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -0.035em; margin-bottom: 16px; }
.blog-feature-copy > p:not(.eyebrow) { color: var(--ink); opacity: 0.75; font-size: 16px; line-height: 1.65; margin-bottom: 24px; max-width: 34ch; }
.blog-feature-film { min-width: 0; }
.blog-feature-film video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #18181b; }
.blog-feature-film figcaption { font-size: 12px; margin-top: 10px; color: var(--ink); opacity: 0.65; }
.pc-preview { height: 180px; margin: -28px -28px 24px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--tile); }
.pc-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
@media (max-width: 1120px) {
  .blog-feature { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 700px) {
  .blog-feature { grid-template-columns: 1fr; gap: 24px; margin: 0 16px 40px; padding: 24px; }
  .blog-feature-copy > p:not(.eyebrow) { max-width: none; }
  .blog-feature-film { order: -1; }
  .blog-feature-film video { border-radius: 12px; }
}

/* Project landing pages share the blog's media-led presentation. */
.project-page .hero { padding: 124px 24px 36px; }
.project-page .hero h1 { font-size: clamp(40px, 5.5vw, 64px); line-height: 1.1; }
.project-page .hero .subhead { font-size: 20px; max-width: 650px; margin-left: auto; margin-right: auto; }
.project-feature { grid-template-columns: 1fr 1fr; scroll-margin-top: 110px; }
.dark.project-page .link-arrow { color: #2997ff; }
.project-feature .project-detail { font-size: 13px !important; }
.project-film { min-width: 0; }
.project-screen { overflow: hidden; border-radius: 16px; background: var(--tile); }
.project-screen video { display: block; width: 100%; height: auto; border-radius: 16px; }
.project-film-phone .project-screen { display: flex; align-items: center; justify-content: center; padding: 20px; min-height: 340px; }
.project-film-phone video { width: auto; max-width: 100%; max-height: 360px; border-radius: 12px; }
.project-film figcaption, .project-process-grid figcaption { font-size: 12px; color: var(--ink); opacity: 0.7; margin-top: 12px; }
.project-section { position: relative; z-index: 2; max-width: 1120px; padding: 0 24px; margin: 0 auto 64px; scroll-margin-top: 110px; }
.project-section > h2, .project-section-heading h2 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -0.03em; margin-bottom: 24px; }
.project-section-heading h2 { margin-bottom: 12px; }
.project-section-heading p { color: var(--ink); opacity: 0.75; max-width: 60ch; margin-bottom: 28px; }
.project-story-grid, .project-process-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-story { min-width: 0; padding: 24px; background: var(--alt); border-radius: var(--radius); }
.project-story > .project-film { margin-bottom: 24px; }
.project-story .project-screen { height: 340px; min-height: 0; display: flex; align-items: center; justify-content: center; }
.project-story .project-screen video { max-height: 300px; object-fit: contain; }
.project-story-copy h3 { font-size: 25px; line-height: 1.2; letter-spacing: -0.025em; margin-bottom: 12px; }
.project-story-copy p { color: var(--ink); opacity: 0.75; margin-bottom: 20px; line-height: 1.65; }
.project-process-grid figure { min-width: 0; }
.project-process-grid img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--tile); }
.project-process-grid a { display: block; transition: opacity 0.2s; }
.project-process-grid a:hover { opacity: 0.85; }
@media (max-width: 700px) {
  .project-feature { grid-template-columns: 1fr; }
  .project-feature > .project-film { order: -1; }
  .project-page .hero { padding: 116px 20px 32px; }
  .project-page .hero .subhead { font-size: 18px; }
  .project-section { padding: 0 16px; margin-bottom: 40px; }
  .project-story-grid, .project-process-grid { grid-template-columns: 1fr; }
  .project-story { padding: 20px; }
  .project-film-phone .project-screen { min-height: 0; padding: 16px; }
  .project-film-phone video { max-height: 320px; }
  .project-story .project-screen { height: auto; }
}

.post-grid {
  max-width: 1120px; margin: 0 auto; padding: 0 24px 100px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--alt); border-radius: var(--radius);
  padding: 28px; min-height: 230px;
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease), opacity 0.35s var(--ease);
}
.dark .post-card { background: var(--tile); }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px -26px rgba(0,0,0,0.28); }
.post-card:active { transform: scale(0.985); }
.post-card.hide { display: none; }
.post-card .pc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.post-card h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 8px; }
.post-card p { font-size: 14.5px; color: var(--gray); flex: 1; }
.post-card .pc-meta { font-size: 12.5px; color: var(--gray); margin-top: 18px; }
.post-card .pc-read::before { content: "·"; margin: 0 7px; }

/* ============ Single post ============ */
.post {
  max-width: 720px; margin: 0 auto; padding: 150px 24px 60px;
}
.post-back {
  display: inline-block; font-size: 14px; font-weight: 500; color: var(--gray);
  margin-bottom: 32px; transition: color 0.2s, transform 0.25s var(--spring);
}
.post-back:hover { color: var(--ink); }
.post-back::before { content: "‹ "; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.post-meta .m { font-size: 13.5px; color: var(--gray); }
.post-meta .m + .m::before { content: "·"; margin-right: 12px; }
.post-title { font-size: clamp(34px, 5.5vw, 60px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.post-dek { font-size: clamp(18px, 2.4vw, 23px); color: var(--gray); letter-spacing: -0.01em; margin-top: 18px; line-height: 1.35; }
.post-cover { margin: 44px 0 8px; }
.post-cover img, .post-cover .media { width: 100%; border-radius: 24px; }

.post-body { margin-top: 40px; font-size: 18px; line-height: 1.65; letter-spacing: -0.005em; }
.post-body > * + * { margin-top: 22px; }
.post-body .lede { font-size: 21px; line-height: 1.5; color: var(--ink); }
.post-body h2 { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; margin-top: 48px; }
.post-body h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-top: 36px; }
.post-body p { color: #2b2b2f; }
.dark .post-body p { color: #c7c7cc; }
.post-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.post-body ul { padding-left: 22px; }
.post-body li { margin-top: 8px; color: #2b2b2f; }
.dark .post-body li { color: #c7c7cc; }
.post-body blockquote {
  margin: 34px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--ink);
  font-size: 23px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.35;
}
.post-body hr { border: 0; border-top: 1px solid var(--hairline); margin: 44px 0; }
.post-body .spec-list { margin-top: 28px; }
.post-body .spec-list li { font-size: 16px; }
.post-body .spec-list .v { max-width: 58%; }
.post-inset {
  background: var(--tile);
  border-radius: 20px;
  padding: 28px 20px 24px;
  margin: 28px 0 8px;
}
.post-inset.post-wire { padding: 0; overflow: hidden; }
.post-wire .wire-lane {
  padding: 22px 24px;
  border-top: 1px solid var(--hairline);
}
.post-wire .wire-lane:first-child { border-top: 0; }
.post-wire .wire-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
.post-wire .wire-track {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.post-wire .flow-node {
  padding: 8px 13px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 11px;
  white-space: nowrap;
}
.post-wire .flow-arrow {
  color: var(--gray);
  font-size: 12px;
  user-select: none;
}
.post-wire .wire-note {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.45;
}
.post-body .post-wire .wire-note { color: var(--gray); }
.post-figure { margin: 40px 0; }
.post-figure img, .post-figure .media { width: 100%; border-radius: 20px; }
.post-figure figcaption { margin-top: 12px; font-size: 13.5px; color: var(--gray); text-align: center; }

/* tech stack icons (blog posts) */
.post-inset .stack-icons {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  width: 100%;
}
.stack-icons {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin: 28px 0;
  width: 100%;
}
.stack-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 8px 4px;
  margin: -8px -4px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.35s var(--spring);
}
.stack-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.35s var(--spring);
}
.dark .stack-icon img[src*="tailscale"] { filter: invert(1); }
.dark .stack-icon img[src*="unrealengine"],
.dark .stack-icon img[src*="three.js"] { filter: invert(1); }
.stack-icon span {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray);
  line-height: 1.2;
  transition: color 0.2s ease;
}
@media (hover: hover) {
  .stack-icon:hover {
    transform: translateY(-5px);
  }
  .stack-icon:hover img { transform: scale(1.14); }
  .stack-icon:hover span { color: var(--ink); }
}
.stack-icon:active { transform: scale(0.94); transition-duration: 0.15s; }
@media (prefers-reduced-motion: reduce) {
  .stack-icon, .stack-icon img { transition: none; }
  .stack-icon:active { transform: none; }
}

.more-writing {
  max-width: 1120px; margin: 40px auto 0; padding: 60px 24px 100px;
  border-top: 1px solid var(--hairline);
}
.more-writing h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 26px; }
.more-writing .post-grid { padding: 0; }

.post-missing { max-width: 720px; margin: 0 auto; padding: 180px 24px; text-align: center; }
.post-missing h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.post-missing p { color: var(--gray); margin: 14px 0 26px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 220px; }
  .tile.h2 { grid-row: span 1; }
  .art .phone { width: 156px; height: 310px; bottom: -30%; border-radius: 38px; padding: 7px; }
  .art .ph-screen { border-radius: 31px; }
  .art .ph-ui { inset: 38px 12px 12px; gap: 8px; }
  .art .ph-ui .ph-hero { height: 60px; }
  .art .ph-ui .ph-grid { height: 52px; }
  .art .ph-ui .ph-cta { height: 28px; }
  .tracks .row { grid-template-columns: repeat(2, 1fr); }
  .resume-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .next-nav { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* island becomes a links-only pill — the name doesn't fit and the page says it anyway */
  .island-wrap, .island-wrap.compact { left: 12px; right: 12px; }
  .island, .island.compact {
    display: flex; justify-content: center; align-items: center;
    width: 100%; max-width: none; min-width: 0; flex: 1 1 auto;
    padding: 10px 12px;
  }
  .island .who { display: none; }
  .island-links { min-width: 0; gap: 0; }
  .island-links > a,
  .island-links .nav-top { padding: 6px 8px; font-size: 13px; }
  .drop-panel,
  .drop-shell { display: none !important; }
  .island.drop-open .drop-shell { display: none !important; }
  .hero { padding: 120px 22px 56px; }
  .hero .actions { margin-top: 26px; gap: 18px; }
  .post { padding: 116px 20px 48px; }
  .post-inset .stack-icons,
  .stack-icons { gap: 4px; }
  .stack-icon img { width: 34px; height: 34px; }
  .stack-icon span { font-size: 9.5px; }
  .post-wire .wire-lane { padding: 18px 16px; }
  .post-wire .wire-track { font-size: 12.5px; gap: 6px 4px; }
  .post-wire .flow-node { padding: 6px 10px; }
  .post-wire .wire-note { font-size: 13.5px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .tile.w2 { grid-column: auto; } /* spans would force a phantom 2nd column into the 1-col grid */
  .post-grid { grid-template-columns: 1fr; }
  .tile.h2 { min-height: 340px; }
  .art .phone { bottom: -12%; right: 5%; }
  .art .rack { min-width: 0; width: 54%; right: 20px; bottom: 20px; }
  .art .rack i { height: 30px; }
  .bento-section { padding: 16px 16px 64px; }
  .resume-section { padding: 16px 16px 64px; }
  .tracks { padding: 0 16px 72px; }
  .tracks .row { gap: 12px; }
  .tracks-head { margin-bottom: 24px; }
  .track-card { padding: 18px 16px 16px; border-radius: 22px; }
  .track-icon { width: 34px; height: 34px; margin-bottom: 14px; }
  .track-card h3 { font-size: 17px; }
  .track-card p { font-size: 13px; line-height: 1.4; margin-bottom: 16px; }
  .track-go { font-size: 12.5px; padding: 7px 11px 7px 13px; }
  .feature { padding: 20px 16px; }
  .panel { border-radius: 26px; }
  .next-nav { padding: 20px 16px 64px; }
  .filter-row { padding: 0 16px 24px; }
  .post-grid { padding: 0 16px 72px; }
  .contact { padding: 72px 22px 60px; }
  .subhead { font-size: 17px; }
  .stat-row { gap: 22px; }
}
@media (max-width: 390px) {
  .island-links > a,
  .island-links .nav-top { padding: 6px 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* "rip me" doodle: draws in beside the ticket once it has printed */
.rip-hint {
  position: absolute; right: calc(100% - 40px); top: 120px; width: 120px; height: 80px;
  pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 8; color: var(--ink, #1d1d1f);
}
.rip-hint svg { display: block; overflow: visible; }
.rip-text { font-family: "Caveat", "Bradley Hand", "Segoe Print", cursive; font-size: 30px; font-weight: 600; fill: currentColor; transform: rotate(-8deg); transform-box: fill-box; transform-origin: left bottom; }
.rip-arrow { stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 130; stroke-dashoffset: 130; }
.rip-head { stroke-dasharray: 40; stroke-dashoffset: 40; }
.ticket-stage[data-state="ready"] .rip-hint { opacity: 1; animation: rip-nudge 1.5s 1.2s ease-in-out infinite; }
.ticket-stage[data-state="ready"] .rip-arrow { animation: rip-draw 0.6s 0.15s ease-out forwards; }
.ticket-stage[data-state="ready"] .rip-head { animation-delay: 0.7s; animation-duration: 0.25s; }
@keyframes rip-draw { to { stroke-dashoffset: 0; } }
@keyframes rip-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(7px); } }
@media (max-width: 900px) {
  .rip-hint { right: calc(100% - 30px); top: 92px; width: 84px; height: 56px; }
  .rip-hint svg { width: 84px; height: 56px; }
}
@media (max-width: 360px) { .rip-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .ticket-stage[data-state="ready"] .rip-hint { animation: none; } .ticket-stage[data-state="ready"] .rip-arrow { animation: none; stroke-dashoffset: 0; } }

/* ============ Hero: the showreel fills the screen, then settles into a card as you scroll ============ */
.reel-hero { position: relative; height: 240svh; z-index: 2; }
.rh-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
/* showreel.js sets the frame's box, --r (corner radius) and --sh (shadow strength) from scroll progress */
.reel-frame {
  --r: 0px; --sh: 0;
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  border-radius: var(--r); overflow: hidden; background: #fff; isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari: keep the video inside the rounded corners */
  will-change: left, top, width, height;
}
/* The frame's Safari mask clips its own shadow, so the shadow lives on a twin layer behind it (same box, set by showreel.js) */
.reel-shadow {
  --r: 0px; --sh: 0;
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: var(--r); pointer-events: none;
  box-shadow:
    0 40px 90px -12px rgba(0,0,0,calc(var(--sh) * 0.22)),
    0 16px 36px rgba(0,0,0,calc(var(--sh) * 0.10)),
    0 3px 10px rgba(0,0,0,calc(var(--sh) * 0.06));
}
.reel-video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; } /* showreel.js sizes it to the frame */
.rh-copy { position: absolute; left: 24px; right: 24px; text-align: center; opacity: 0; }
.rh-copy h1 { font-size: clamp(36px, 5vw, 64px); }
.reel-actions { margin-top: 22px; display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; }
.reel-sound {
  position: absolute; right: 22px; bottom: 22px; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 0; border-radius: 99px;
  background: rgba(0,0,0,0.78); color: #f5f5f7; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform 0.25s var(--spring), background 0.2s;
}
.reel-sound:hover { background: #000; }
.reel-sound:active { transform: scale(0.94, 0.88); }
.reel-sound:focus-visible { outline: 3px solid rgba(0,113,227,0.5); outline-offset: 3px; }
.reel-sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reel-sound .spk { fill: currentColor; }
.reel-sound .wave { display: none; }
.reel-sound[aria-pressed="true"] .wave { display: inline; }
.reel-sound[aria-pressed="true"] .mute { display: none; }
@media (max-width: 700px) {
  .reel-sound { right: 12px; bottom: 12px; width: 36px; height: 36px; padding: 0; justify-content: center; }
  .reel-sound svg { width: 16px; height: 16px; }
  .reel-sound span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rh-copy { left: 16px; right: 16px; }
  .reel-actions { margin-top: 16px; }
}

/* Film mode: over the full-screen hero the island plays the film's nav, then becomes the real one on hover, focus or scroll */
.film-links {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: flex; align-items: center; gap: 4px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
}
.film-links span { position: relative; z-index: 1; font-size: 15px; font-weight: 700; color: #a1a1a6; padding: 7px 14px; border-radius: 14px; transition: color 0.25s; }
.film-links span.on { color: #fff; }
.film-links .film-goo { position: absolute; inset: -12px; z-index: 0; filter: url(#goo); }
.film-links .film-goo i { position: absolute; background: #46464c; border-radius: 14px; opacity: 0; transition: left 0.35s cubic-bezier(0.22,0.8,0.3,1), width 0.35s cubic-bezier(0.22,0.8,0.3,1), opacity 0.25s; }
.film-links .film-goo i.tail { transition: left 0.45s cubic-bezier(0.22,0.8,0.3,1) 0.04s, width 0.45s cubic-bezier(0.22,0.8,0.3,1) 0.04s, opacity 0.25s; }
.island .island-links { transition: opacity 0.3s ease; }
.island.is-film .island-links { opacity: 0; pointer-events: none; }
.island.is-film .film-links { opacity: 1; }
.island-wrap { transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 0.8, 0.3, 1), left 0.45s cubic-bezier(0.22, 0.8, 0.3, 1), right 0.45s cubic-bezier(0.22, 0.8, 0.3, 1); }
/* while the film's own pill is elsewhere (the opening drop, the end card), the island steps aside */
.island-wrap.film-away { opacity: 0; transform: translateY(-28px); }
@media (max-width: 700px) { .film-links { gap: 0; } .film-links span { padding: 6px 8px; font-size: 13px; } }
@media (max-width: 390px) { .film-links span { padding: 6px 6px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .film-links { display: none; } }

/* ============ Selected work: expanding strips ============ */
.gallery-section { max-width: 1120px; margin: 0 auto; padding: 40px 24px 96px; position: relative; z-index: 2; }
.gallery-head { text-align: center; margin-bottom: 36px; }
.gallery-head .eyebrow { margin-bottom: 10px; }
.strips { --sh: clamp(420px, 62vh, 560px); display: flex; gap: 12px; height: var(--sh); }
.strip {
  --r: 26px;
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--r);
  /* rounded with overflow rather than clip-path, which would clip the shadow too */
  box-shadow: 0 10px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.06);
  background: transparent; cursor: pointer; isolation: isolate;
  transition: flex-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), flex-basis 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.strip.on { flex-grow: var(--grow, 7); }
/* Phone captures open to exactly their own aspect ratio, so the footage never crops or zooms */
.strip.strip-app.on { flex-grow: 0; flex-basis: calc(var(--sh) * var(--ar)); }
.strip img, .strip video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
  transform: scale(1.12); filter: saturate(0.75) brightness(0.8);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}
.strip.on img, .strip.on video { transform: scale(1); filter: none; }
.strip::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0) 46%);
  opacity: 0; transition: opacity 0.5s ease;
}
.strip.on::after { opacity: 1; }
.strip-cap {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; color: #fff;
  display: flex; flex-direction: column; gap: 6px; min-width: 240px;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.strip.on .strip-cap { opacity: 1; transform: none; transition-delay: 0.25s; }
.strip-tag { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.strip-kick { font: 600 11px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.strip-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; white-space: nowrap; }
.strip-title i { font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; font-style: normal; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.18); border-radius: 99px; padding: 7px 9px; letter-spacing: 0; }
.strip:focus-visible { outline: 3px solid rgba(0,113,227,0.5); outline-offset: 3px; }
@media (max-width: 700px) {
  /* Phones: a swipeable row of full-size cards. The centred card plays; tap any card to open it. */
  .gallery-section { padding: 28px 0 72px; }
  .gallery-head { padding: 0 22px; margin-bottom: 24px; }
  .strips {
    --sh: 460px;
    gap: 12px; height: auto; padding: 14px 22px 32px; margin: -10px 0 -14px; /* room for the cards' shadow inside the scroller */
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-padding-inline: 22px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .strips::-webkit-scrollbar { display: none; }
  .strip, .strip.on, .strip.strip-app.on {
    --r: 24px; flex: 0 0 auto; width: min(300px, 78vw); height: var(--sh);
    scroll-snap-align: center; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: scale(0.94);
  }
  .strip.on { transform: none; }
  .strip.strip-app, .strip.strip-app.on { width: calc(var(--sh) * var(--ar)); }
  .strip img, .strip video { transform: none; filter: saturate(0.85) brightness(0.88); transition: filter 0.4s ease; }
  .strip.on img, .strip.on video { filter: none; }
  .strip::after { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.6) 24%, rgba(0,0,0,0) 56%); }
  .strip-cap, .strip.on .strip-cap { text-shadow: 0 1px 8px rgba(0,0,0,0.5); opacity: 1; transform: none; min-width: 0; left: 16px; right: 16px; bottom: 16px; transition: none; }
  .strip-title { font-size: 19px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .strip, .strip img, .strip video, .strip-cap { transition: none; } }
.strip-app .strip-cap { min-width: 0; left: 16px; right: 16px; }
.strip-app .strip-title { font-size: 19px; }

/* Social links: pop out from behind the opened card and float beside it */
.reveal-socials { position: absolute; left: 100%; top: 0; width: 0; height: 100%; z-index: -1; }
.sf {
  position: absolute; top: var(--y); left: 0; margin: -23px 0 0 calc(12px + var(--x));
  width: 46px; height: 46px; border-radius: 50%; pointer-events: none;
  background: #121413; box-shadow: 0 10px 22px -8px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.14);
  opacity: 0; transform: translateX(-64px) scale(0.4);
  transition: transform 0.75s cubic-bezier(0.22, 1.1, 0.36, 1) calc(var(--n) * 0.13s), opacity 0.3s ease calc(var(--n) * 0.13s), box-shadow 0.2s;
  display: grid; place-items: center;
}
.ticket-stage.socials-in .sf { opacity: 1; transform: none; pointer-events: auto; }
.sf-i { display: grid; place-items: center; width: 100%; height: 100%; animation: sf-drift 9s ease-in-out infinite; animation-delay: calc(var(--n) * -3s); }
.sf:nth-child(2) .sf-i { animation-direction: reverse; animation-duration: 11s; }
.sf svg { width: 21px; height: 21px; display: block; }
/* slow, smooth wander in two dimensions, kept within the circle */
@keyframes sf-drift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(2px, -1.5px); }
  45% { transform: translate(2.5px, 1.5px); }
  70% { transform: translate(-1.5px, 2px); }
  85% { transform: translate(-2.5px, -1px); }
}
.ticket-stage.socials-in .sf:hover { transform: scale(1.14); transition-delay: 0s; transition-duration: 0.25s; box-shadow: 0 14px 26px -8px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.3); }
.ticket-stage.socials-in .sf:active { transform: scale(0.92); }
.sf:focus-visible { outline: 3px solid rgba(0,113,227,0.6); outline-offset: 3px; }
@media (max-width: 900px) { .sf { width: 40px; height: 40px; margin-top: -20px; margin-left: calc(8px + var(--x) * 0.6); } .sf svg { width: 18px; height: 18px; } }
@media (prefers-reduced-motion: reduce) { .sf, .sf-i { transition: none; animation: none; } }

/* ============ What I do: the morphing blob ============ */
.showcase { max-width: 1120px; margin: 0 auto; padding: 70px 24px 40px; position: relative; z-index: 2; text-align: center; }
.sc-head { margin-bottom: 30px; }
.sc-head .eyebrow { margin-bottom: 10px; }
.sc-stage {
  position: relative; width: min(560px, 100%); aspect-ratio: 560 / 380; margin: 0 auto;
  background: var(--bg); color: var(--ink); overflow: visible;
}
.sc-goo, .sc-detail { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sc-detail { pointer-events: none; }
.sc-copy { display: grid; max-width: 640px; margin: 54px auto 0; }
.sc-mode { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.35s; }
.sc-mode.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0.25s, 0.25s, 0s; }
.sc-mode h3 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; letter-spacing: -0.02em; }
.sc-mode p { color: var(--gray); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.4; margin: 10px auto 0; max-width: 46ch; }
.sc-chips { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sc-mode .mq-chip { opacity: 0; transform: translateY(12px) scale(0.94); }
/* What I do chips: no outline, lifted on a soft shadow instead */
.sc-chips .mq-chip { box-shadow: 0 10px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.06); }
.dark .sc-chips .mq-chip { box-shadow: 0 10px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4); }
.sc-mode.on .mq-chip { animation: tk-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.45s + var(--i) * 0.07s); }
@keyframes tk-in { from { opacity: 0; transform: translateY(12px) scale(0.94); } to { opacity: 1; transform: none; } }
/* One progress track with labelled stops, and a pause button */
.sc-ctrl { display: flex; align-items: flex-start; justify-content: center; gap: 18px; width: min(520px, 100%); margin: 26px auto 0; }
.sc-pause {
  flex: none; width: 34px; height: 34px; border: 0; padding: 0; margin-top: -14px; cursor: pointer;
  background: transparent; color: var(--ink); display: grid; place-items: center; transition: transform 0.2s ease, opacity 0.2s ease; opacity: 0.9;
}
.sc-pause:hover { opacity: 1; transform: scale(1.1); }
.sc-pause:active { transform: scale(0.9); }
.sc-pause:focus-visible { outline: 3px solid rgba(0,113,227,0.5); outline-offset: 2px; border-radius: 8px; }
.sc-pause svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.sc-pause .ic-play { display: none; }
.sc-pause.is-paused .ic-pause { display: none; }
.sc-pause.is-paused .ic-play { display: block; }
.sc-track { position: relative; flex: 1; height: 6px; margin-top: 0; border-radius: 99px; background: var(--hairline); }
.sc-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--ink);  }
.sc-stop {
  position: absolute; top: 50%; left: calc(var(--p) * 25%); transform: translateY(-50%);
  appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0; width: 25%; height: 44px; margin-top: 0; font: inherit;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
}
.sc-stop span { position: absolute; left: 0; top: calc(50% + 12px); font: inherit; font-size: 13px; font-weight: 600; color: var(--gray); white-space: nowrap; transition: color 0.25s ease; }
.sc-stop.on span, .sc-stop:hover span { color: var(--ink); }
.sc-stop:focus-visible { outline: 3px solid rgba(0,113,227,0.5); outline-offset: -2px; border-radius: 8px; }
@media (max-width: 700px) {
  .showcase { padding: 48px 18px 24px; }
  .sc-stage { border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) { .sc-mode .mq-chip, .sc-mode.on .mq-chip { animation: none; opacity: 1; transform: none; } }

/* ============ Post media: wide figures, phone frames, sprite panels ============ */
.post-figure video { display: block; width: 100%; border-radius: 20px; background: #000; }
.post-figure.post-wide { width: min(1040px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }
.post-figure.post-phone { max-width: 340px; margin-left: auto; margin-right: auto; }
.post-figure.post-phone img, .post-figure.post-phone video { border-radius: 28px; }
.post-figure.post-sprites img { background: #fdefd3; padding: 24px 28px; box-sizing: border-box; }
.dark .post-figure.post-sprites img { background: #2a241a; }
.post-phones {
  display: flex; justify-content: center; gap: 14px; margin: 40px 0;
  width: min(860px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%);
}
.post-phones figure { flex: 0 1 calc((100% - 28px) / 3); }
.post-phones figure { margin: 0; }
.post-phones img, .post-phones video { display: block; width: 100%; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; border-radius: 24px; background: var(--tile); }
/* every phone in a row shares one height: screenshots and clips are cropped to the same 1:2 frame */
.post-phones video { object-position: center; }
.post-phones figcaption { margin-top: 10px; font-size: 13px; color: var(--gray); text-align: center; }
@media (max-width: 700px) {
  .post-phones { gap: 8px; }
  .post-phones figure { flex-basis: calc((100% - 16px) / 3); }
  .post-phones img, .post-phones video { border-radius: 14px; }
  .post-phones figcaption { font-size: 11.5px; }
}

/* Slider navigation: panels stay put until selected. */
.gallery-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: -12px 0 24px; }
#gallery-status { text-align: center; font-size: 13px; font-weight: 600; }
#gallery-slider { width: 100%; height: 32px; margin: 0; accent-color: #171918; cursor: pointer; }
#gallery-slider:focus { outline: none; }
@media (max-width: 700px) { .gallery-controls { padding: 0 16px; } }

.gallery-auto .strip { transition-duration: 3s; }
#gallery-pause { border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 12px; }

/* Separate progress and remaining pills, with air around the thumb. */
.gallery-slider-track { position: relative; width: min(360px, 80%); height: 32px; }
.gallery-slider-track::before, .gallery-slider-track::after { content: ""; position: absolute; top: 13px; height: 6px; border-radius: 999px; pointer-events: none; }
.gallery-slider-track::before { left: 0; width: max(0px, calc((100% - 8px) * var(--position) - 6px)); background: #171918; }
.gallery-slider-track::after { left: min(100%, calc(14px + (100% - 8px) * var(--position))); right: 0; background: #d4d5d3; }
#gallery-slider { position: relative; z-index: 1; appearance: none; -webkit-appearance: none; background: transparent; border: 0; box-shadow: none; outline: none; padding: 0; }
#gallery-slider::-webkit-slider-runnable-track { height: 6px; border: 0; background: transparent; box-shadow: none; }
#gallery-slider::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 8px; height: 26px; margin-top: -10px; border-radius: 999px; background: #171918; border: 0; box-shadow: none; }
#gallery-slider::-moz-range-track { height: 6px; border: 0; background: transparent; box-shadow: none; }
#gallery-slider::-moz-range-thumb { width: 8px; height: 26px; border-radius: 999px; background: #171918; border: 0; box-shadow: none; }

/* Lab: the working browser and the services behind it. */
.lab-homelab { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.lab-homelab-copy h2 { font-size: clamp(28px,3.5vw,40px); line-height: 1.15; letter-spacing: -.03em; margin: 16px 0; }
.lab-homelab-copy > p:not(.eyebrow) { line-height: 1.7; opacity: .75; margin-bottom: 24px; }
.lab-stack { min-width: 0; padding: 24px; border-radius: var(--radius); background: var(--alt); }
.lab-stack .stack-icons { justify-content: space-between; gap: 4px; margin-bottom: 24px; }
.lab-service { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.lab-service > span { opacity: .65; }
.lab-service strong { font-weight: 600; }
@media (max-width: 700px) { .lab-homelab { grid-template-columns: 1fr; gap: 24px; } .lab-stack { padding: 20px; } }

/* Mobile scrolling uses a stable viewport and a single white page surface. */
html { background: var(--bg); color-scheme: light; }
html.dark { color-scheme: dark; }
@media (max-width: 900px) {
  .hero-sticky .ticket-stage { --machine-w: 236px; }
  .hero-scroll { height: 240svh; }
  .hero-sticky { height: 100svh; }
  .hero-copy .hp, .hero-copy .w { filter: none; transition-property: opacity, transform; }
  .rip-hint { display: block; left: -32px; right: auto; top: 100px; width: 66px; height: 50px; }
  .rip-hint svg { width: 66px; height: 50px; }
  .ticket-stage[data-state="ready"] .rip-hint { animation: none; }
}
@media (max-width: 900px), (hover: none), (pointer: coarse) {
  .island { filter: none; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
  .island-goo, .goo-layer { filter: none; }
  .sleeve-scale .sw { filter: none; }
  .ticket-stage .pc-aurora, .ticket-stage .pc-spark, .ticket-stage .pc-sheen,
  .ticket-stage .pc-foilwrap, .ticket-stage .pc-glarewrap { display: none; }
  .ticket-stage .pc-art { background: radial-gradient(ellipse at 20% 20%, #007780, transparent 65%), radial-gradient(ellipse at 90% 60%, #49205f, transparent 65%), #06161b; }
  .ticket-stage .pc-rosette, .ticket-stage .pc-km { animation: none; filter: none; }
  .sleeve-scale .sh { display: none; }
  .pass-card-reveal { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}
@media (max-width: 700px) {
  .strip, .strip.on, .strip.strip-app.on { transform: none; transition: none; }
  .strip img, .strip video, .strip.on img, .strip.on video { filter: none; transition: none; }
}
.gallery-section, .showcase { scroll-margin-top: 90px; }
@media (max-width: 700px) {
  .strips { padding-inline: max(22px, calc((100vw - min(300px, 78vw)) / 2)); scroll-padding-inline: max(22px, calc((100vw - min(300px, 78vw)) / 2)); }
}
@media (max-width: 360px) {
  .rip-hint { left: -20px; width: 54px; height: 44px; }
  .rip-hint svg { width: 54px; height: 44px; }
}

/* Keep the rich finish on the one revealed card, away from the six tear bands. */
@media (max-width: 900px), (hover: none), (pointer: coarse) {
  .reveal-stage .pc-aurora, .reveal-stage .pc-spark,
  .reveal-stage .pc-foilwrap, .reveal-stage .pc-glarewrap { display: block; }
  .reveal-stage .pc-art { background: radial-gradient(120% 75% at 30% 10%, #0C3A44 0%, #06161B 55%, #040B0E 100%); }
  .reveal-stage .pc-aurora { animation: none; will-change: auto; }
  .reveal-stage .pc-spark { animation: none; opacity: .65; }
  .reveal-stage .pc-km { filter: drop-shadow(0 0 14px rgba(0,229,255,.45)); }
  .reveal-stage .pc-rosette { animation: none; }
}
@media (max-width: 700px) {
  .strips.gallery-scrub { scroll-snap-type: none; scroll-behavior: auto; }
  #gallery-slider { touch-action: none; }
}

/* Native mobile scrolling; keep the printer first without pinning a large scene. */
@media (max-width: 900px) {
  .hero-scroll { height: auto; overflow: visible; }
  .hero-sticky { position: relative; height: auto; min-height: 0; padding: 0; flex-direction: column; }
  .hero-sticky .ticket-stage {
    order: 1; height: 100svh; min-height: 560px; box-sizing: border-box;
    padding: 76px 0 30px; justify-content: center;
    transform: none !important; will-change: auto;
  }
  .hero-copy { order: 2; position: relative; inset: auto; width: 100%; box-sizing: border-box; padding: 24px 22px 60px; transform: none; }
  .hero-copy .hp, .hero-copy .w { opacity: 1; transform: none; filter: none; transition: none; }
}
.pass-card-reveal.is-held { cursor: grabbing; }

@media (max-width: 900px) {
  .sleeve-scale .sb { will-change: transform; }
  .sc-mode.on { transition-delay: 0s; }
  .sc-mode.on .mq-chip { animation-delay: calc(var(--i) * 0.04s); }
}

/* ============ Shared lift: white cards on a soft shadow, blue pill actions (all pages) ============ */
.blog-feature, .project-story, .next-nav a, .post-card, .lab-stack {
  background: var(--bg);
  box-shadow: 0 10px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.06);
}
.dark .blog-feature, .dark .project-story, .dark .next-nav a, .dark .post-card, .dark .lab-stack {
  background: var(--tile);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4);
}
.next-nav a:hover, .post-card:hover { box-shadow: 0 22px 44px rgba(0,0,0,0.13), 0 4px 10px rgba(0,0,0,0.07); }
.dark .next-nav a:hover, .dark .post-card:hover { box-shadow: 0 22px 44px rgba(0,0,0,0.6), 0 4px 10px rgba(0,0,0,0.45); }
/* closing call to action and footer sit on the page, not a grey band */
.contact, footer { background: var(--bg); }
/* blog filters: no outline, lifted like the What I do chips */
.filter { background: var(--bg); border-color: transparent; box-shadow: 0 6px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05); }
.dark .filter { background: var(--tile); box-shadow: 0 6px 16px rgba(0,0,0,0.45); }
.filter.on { border-color: transparent; }
/* "Read the story" style links inside cards become the blue pill */
.blog-feature-copy .link-arrow, .project-story-copy .link-arrow, .lab-homelab-copy .link-arrow {
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  padding: 8px 14px 8px 16px; border-radius: 99px; gap: 6px; text-decoration: none;
  transition: background 0.2s, transform 0.25s var(--spring);
}
.blog-feature-copy .link-arrow:hover, .project-story-copy .link-arrow:hover, .lab-homelab-copy .link-arrow:hover { background: var(--blue-hover); text-decoration: none; }
.blog-feature-copy .link-arrow:active, .project-story-copy .link-arrow:active, .lab-homelab-copy .link-arrow:active { transform: scale(0.94, 0.88); }
.blog-feature-copy .link-arrow::after, .project-story-copy .link-arrow::after, .lab-homelab-copy .link-arrow::after { font-size: 17px; line-height: 1; }
.dark.project-page .blog-feature-copy .link-arrow, .dark.project-page .project-story-copy .link-arrow, .dark.project-page .lab-homelab-copy .link-arrow { color: #fff; }
.dark .contact, .dark footer { background: var(--bg); }
