  :root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --ink: #16161a;
    --muted: #5d5d66;
    --line: #e2e0d8;
    --accent: #d9480f;
    --accent-soft: #fbe4d8;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0e0e11; --surface: #17171c; --ink: #ecebe6; --muted: #9a9aa4;
      --line: #2a2a31; --accent: #ff7a3d; --accent-soft: #2b1a12;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0e0e11; --surface: #17171c; --ink: #ecebe6; --muted: #9a9aa4;
    --line: #2a2a31; --accent: #ff7a3d; --accent-soft: #2b1a12;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; }
  .wrap { max-width: 1040px; margin: 0 auto; padding-inline: 24px; }

  /* nav */
  header.nav {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  header.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
  .logo { font: 600 15px var(--mono); text-decoration: none; letter-spacing: -0.02em; }
  .logo span { color: var(--accent); }
  nav a { font-size: 14px; color: var(--muted); text-decoration: none; margin-left: 22px; }
  nav a:hover { color: var(--ink); }
  nav a { position: relative; transition: color .2s; }
  nav a.active { color: var(--ink); }
  nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
  nav a.active::after { transform: scaleX(1); }

  /* hero */
  .hero { position: relative; z-index: 1; padding-block: 96px 52px; }
  .hero-band { position: relative; overflow: hidden; }
  .hero-grid {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
            mask-image: linear-gradient(to bottom, #000 65%, transparent);
  }
  .hero { transition: opacity .4s; }
  .hero-band.playing .hero { opacity: .1; pointer-events: none; }
  .egg-playing .side-posts { opacity: 0; pointer-events: none; transition: opacity .3s; }
  .hero-band.playing .hero-grid { z-index: 2; pointer-events: auto; cursor: none; -webkit-mask-image: none; mask-image: none; }
  .kicker { font: 500 13px var(--mono); color: var(--accent); letter-spacing: 0.04em; margin: 0 0 20px; }
  h1 { font-size: clamp(44px, 8vw, 84px); line-height: 1; letter-spacing: -0.045em; margin: 0 0 24px; font-weight: 800; }
  .lede { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 640px; margin: 0 0 36px; }
  .lede strong { color: var(--ink); font-weight: 600; }
  .cta { display: flex; flex-wrap: wrap; gap: 12px; }
  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: 15px;
    text-decoration: none; border: 1px solid var(--line); background: var(--surface);
  }
  .btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .btn:hover { border-color: var(--accent); }

  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 52px; }
  .stat { background: var(--surface); padding: 18px 24px; }
  .stat b { display: block; font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; }
  .stat span { font-size: 13px; line-height: 1.45; color: var(--muted); }
  .stat span a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed currentColor; }
  .stat span a:hover { border-bottom-style: solid; }

  /* sections */
  section { padding-block: 72px; border-top: 1px solid var(--line); }
  .sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 36px; }
  .sec-head .num { font: 500 13px var(--mono); color: var(--accent); }
  h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
  .intro { color: var(--muted); max-width: 680px; margin: -16px 0 36px; }

  /* now */
  .now { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
  .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
  .card.feature { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
  .tag { display: inline-block; font: 500 12px var(--mono); color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px; margin-bottom: 14px; }
  .card h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.02em; }
  .card p { margin: 0; color: var(--muted); }

  /* timeline */
  .timeline { list-style: none; margin: 0; padding: 0; }
  .timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px dashed var(--line); }
  .timeline li:last-child { border-bottom: 0; }
  .when { font: 13px var(--mono); color: var(--muted); padding-top: 4px; }
  .timeline h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
  .role { color: var(--accent); font-weight: 500; font-size: 15px; margin: 2px 0 6px; }
  .timeline p { margin: 0; color: var(--muted); font-size: 15px; }

  /* games */
  .games { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
  .game { perspective: 1200px; cursor: pointer; border-radius: 12px; outline: none; }
  .game:focus-visible .game-face { box-shadow: 0 0 0 2px var(--accent); }
  .game-inner {
    position: relative; height: 100%; transform-style: preserve-3d;
    transform: translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg)));
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
  }
  .game.tilting .game-inner { transition: transform .12s ease-out; }
  .game.tilting.flipping .game-inner { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .game.tilting .game-face { box-shadow: 0 18px 40px -18px rgba(0,0,0,.55); }
  .game:hover { --lift: -3px; }
  .game.flipped { --flip: 180deg; }
  .game-face { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: border-color .2s; }
  .game:hover .game-face { border-color: var(--accent); }
  .game-front { position: relative; height: 100%; display: flex; flex-direction: column; }
  .game-back {
    position: absolute; inset: 0; transform: rotateY(180deg);
    padding: 20px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
    background: linear-gradient(170deg, var(--accent-soft), var(--surface) 55%);
  }
  .game-back .role { font: 600 13px var(--mono); color: var(--accent); }
  .game-back p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
  .game-back .placeholder { color: var(--muted); font-style: italic; }
  .flip-hint { margin-top: auto; padding-top: 10px; font: 11px var(--mono); color: var(--muted); }
  .game-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
  .thumb {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden;
    background:
      radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--c2) 55%, transparent), transparent 55%),
      repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.04) 14px 15px),
      linear-gradient(135deg, var(--c1), color-mix(in srgb, var(--c1) 60%, black));
  }
  .thumb .mono {
    position: absolute; left: 16px; bottom: 6px;
    font: 800 clamp(40px, 6vw, 56px)/1 var(--sans); letter-spacing: -0.05em;
    color: var(--c2); opacity: .9; text-shadow: 0 2px 18px rgba(0,0,0,.35);
  }
  .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .start-arc {
    font: 600 14px var(--sans); color: var(--accent); background: var(--accent-soft); cursor: pointer;
    padding: 3px 12px; margin-left: 2px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 999px;
    transition: background .2s, color .2s;
  }
  .start-arc:hover, .start-arc:focus-visible { background: var(--accent); color: #fff; outline: none; }
  /* Hover teaser on cards that have a story */
  .thumb-teaser {
    position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px;
    background: linear-gradient(to top, rgba(10,10,12,.94) 55%, rgba(10,10,12,0));
    color: #f2f1ec; transform: translateY(100%); opacity: 0;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s ease;
  }
  .thumb-teaser p { margin: 0 0 8px; font-size: 14px; font-style: italic; line-height: 1.4; }
  .thumb-teaser span { font: 600 12px var(--mono); color: var(--accent); }
  .game:hover .thumb-teaser, .game:focus-visible .thumb-teaser { transform: none; opacity: 1; }
  @media (hover: none) { .thumb-teaser { display: none; } }   /* phones have no hover */
  @media (prefers-reduced-motion: reduce) { .thumb-teaser { transition: none; } }
  /* Cancelled/unannounced projects card: a big centered "?" */
  .game.mystery .thumb .mono {
    /* Flexbox centering: the most widely supported way (older iOS Safari included). */
    left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; text-align: center;
    font-size: clamp(96px, 14vw, 150px); opacity: .95;
    text-shadow: 0 0 32px color-mix(in srgb, var(--c2) 45%, transparent);
  }
  .game.mystery .game-face { border-style: dashed; }
  .game .yr { font: 12px var(--mono); color: var(--muted); }
  .game h4 { margin: 0; font-size: 16px; letter-spacing: -0.01em; line-height: 1.3; }
  .game .studio { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 8px; }
  .game.upcoming .game-face { border-style: dashed; border-color: var(--accent); }
  .game.upcoming .yr { color: var(--accent); }

  /* writing */
  .pubs { display: grid; gap: 12px; }
  .pub { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
  .pub h4 { margin: 0; font-size: 17px; }
  .pub p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
  .pub .yr { font: 13px var(--mono); color: var(--muted); }
  .pub p a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
  .pub p a:hover { color: var(--accent); }
  .pub-side { display: flex; align-items: center; gap: 14px; }
  .pub-buy { font: 500 12px var(--mono); text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; transition: border-color .2s, color .2s; }
  .pub-buy:hover { border-color: var(--accent); color: var(--accent); }

  /* about */
  .about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
  .about p { margin: 0 0 16px; font-size: 18px; }
  .values { display: grid; gap: 10px; }
  .values details { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: border-color .2s; }
  .values details:hover, .values details[open] { border-color: var(--accent); }
  .values summary { font: 14px var(--mono); padding: 12px 16px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
  .values summary::-webkit-details-marker { display: none; }
  .values summary::before { content: ">"; color: var(--accent); display: inline-block; transition: transform .2s; }
  .values details[open] summary::before { transform: rotate(90deg); }
  .values summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
  .values blockquote { margin: 0; padding: 0 16px 14px 34px; color: var(--muted); font-size: 15px; font-style: italic; line-height: 1.6; animation: quote-in .25s ease-out; }
  .values .value-thanks { margin: -6px 0 0; padding: 0 16px 14px 34px; font: 12px var(--mono); color: var(--accent); animation: quote-in .25s ease-out; }
  @keyframes quote-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .values blockquote { animation: none; } }

  /* contact */
  .contact { text-align: center; padding-block: 96px; }
  .contact h2 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 16px; }
  .contact p { color: var(--muted); margin: 0 0 32px; }
  .contact .contact-tagline { color: var(--ink); font-size: 20px; margin-bottom: 8px; }
  .contact .cta { justify-content: center; }
  .email { font: 600 clamp(18px, 3vw, 24px) var(--mono); color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 28px; word-break: break-all; }

  footer { border-top: 1px solid var(--line); padding-block: 28px; font: 13px var(--mono); color: var(--muted); }
  footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

  .hero-top { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
  .portrait {
    position: relative; width: clamp(220px, 26vw, 300px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    box-shadow: 0 0 0 1px var(--line), 0 0 0 10px var(--bg), 0 0 0 11px var(--accent);
  }
  /* Blurred copy of the photo fills the circle behind the full, uncropped photo. */
  /* Inner layer that does the circular clipping. clip-path is used because iOS Safari
     ignores border-radius + overflow clipping for blurred (filtered) children. */
  .portrait-clip { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; clip-path: circle(50% at 50% 50%); isolation: isolate; }
  .portrait-clip:has(img)::before {
    content: ""; position: absolute; inset: -24px;
    background: url(../img/peter.jpg) center 40% / cover;
    filter: blur(14px) saturate(1.1);
  }
  .portrait:has(img) .portrait-fallback { display: none; }
  /* Hover swap: a second photo crossfades in when one is provided. */
  .portrait img.fun {
    opacity: 0; transition: opacity .35s ease;
    object-fit: cover; object-position: 50% 22%;
    -webkit-mask-image: none; mask-image: none;
  }
  .portrait:hover img.fun, .portrait.show-fun img.fun { opacity: 1; }
  .portrait:has(img.fun) { cursor: pointer; }
  .portrait img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 20%, #000 80%, transparent 94%);
            mask-image: linear-gradient(90deg, transparent 6%, #000 20%, #000 80%, transparent 94%);
  }
  .btn { transform: translate(var(--bx, 0px), var(--by, 0px)); transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .2s; }
  .btn.magnet { transition: transform .12s ease-out, border-color .2s; }
  .portrait-fallback { position: absolute; inset: 0; display: grid; place-items: center; font: 800 72px var(--sans); letter-spacing: -0.05em; color: var(--accent); }

  .spec-head { margin: 28px 0 12px; font: 500 13px var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
  .specialties { display: flex; flex-wrap: wrap; gap: 8px; }
  .spec {
    font: 14px var(--sans); color: var(--ink); cursor: pointer;
    padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
    transition: border-color .2s, background .2s, color .2s;
  }
  .spec:hover { border-color: var(--accent); }
  .spec[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  .spec:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .spec-panel {
    margin-top: 14px; padding: 16px 20px; border: 1px solid var(--accent); border-radius: 12px;
    background: linear-gradient(170deg, var(--accent-soft), var(--surface) 60%);
    animation: quote-in .25s ease-out;
  }
  .spec-panel p { margin: 0 0 10px; font-size: 15px; line-height: 1.65; }
  .spec-panel p:last-child { margin-bottom: 0; }
  @media (prefers-reduced-motion: reduce) { .spec-panel { animation: none; } }

  .about .mantra { margin: 24px 0 0; font: italic 500 18px var(--sans); color: var(--accent); text-align: center; }  /* .about scope beats the general .about p margin */
  .school { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .school img { width: 56px; height: 56px; object-fit: contain; flex: none; }
  .school b { display: block; font-size: 16px; }
  .school span { font-size: 14px; color: var(--muted); }
  /* Hover (or tap/focus) reveals a little school spirit. */
  .school { transition: border-color .2s; outline: none; }
  .school:hover, .school:focus-visible { border-color: #c00; }
  .school span.go-utes {
    display: block; max-height: 0; opacity: 0; overflow: hidden;
    font: 800 15px var(--sans); letter-spacing: .02em; color: #e03131;
    transition: max-height .25s ease, opacity .25s ease, margin-top .25s ease;
  }
  .school:hover span.go-utes, .school:focus span.go-utes { max-height: 24px; opacity: 1; margin-top: 4px; }

  /* talks */
  .talks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .talk { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
  .talk:hover { border-color: var(--accent); }
  .talk.feature-talk { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; border-color: var(--accent); }
  .talk-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
  .talk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
  .talk-thumb:hover img { transform: scale(1.04); }
  .play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0,0,0,.65); box-shadow: 0 0 0 2px rgba(255,255,255,.85) inset; }
  .play::after { content: ""; position: absolute; left: 22px; top: 18px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
  .talk-thumb:hover .play { background: var(--accent); }
  .dur { position: absolute; right: 8px; bottom: 8px; font: 600 12px var(--mono); color: #fff; background: rgba(0,0,0,.75); padding: 2px 7px; border-radius: 4px; }
  .talk-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
  .feature-talk .talk-body { padding: 28px; justify-content: center; }
  .talk .yr { font: 12px var(--mono); color: var(--accent); }
  .talk h4 { margin: 0; font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
  .feature-talk h4 { font-size: 24px; letter-spacing: -0.02em; }
  .talk h4 a { text-decoration: none; }
  .talk h4 a:hover { color: var(--accent); }
  .talk p { margin: 0; color: var(--muted); font-size: 14px; }
  .feature-talk p { font-size: 16px; }
  .talk-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .talk-links a { font: 500 13px var(--mono); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; }
  .talk-links a:hover { border-color: var(--accent); color: var(--accent); }

  /* ---------- game story panel (opened from a game card) ---------- */
  html { scrollbar-gutter: stable; }          /* locking scroll won't shift the page */
  html.story-open { overflow: hidden; }
  .story-overlay { position: fixed; inset: 0; z-index: 100; perspective: 1800px; }
  .story-backdrop { position: absolute; inset: 0; background: rgba(8, 8, 10, .72); backdrop-filter: blur(3px); opacity: 0; transition: opacity .5s ease; }
  .story-overlay.open .story-backdrop { opacity: 1; }
  .story-card { position: fixed; transform-style: preserve-3d; }
  .story-overlay.animating .story-card { transition: left .6s cubic-bezier(.2,.7,.2,1), top .6s cubic-bezier(.2,.7,.2,1), width .6s cubic-bezier(.2,.7,.2,1), height .6s cubic-bezier(.2,.7,.2,1); }
  .story-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .story-overlay.open .story-inner { transform: rotateY(180deg); }
  /* Same corners as the grid card; the big shadow only while open, fading in/out with the flight. */
  .story-face { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 0 rgba(0,0,0,0); transition: box-shadow .6s cubic-bezier(.2,.7,.2,1); }
  .story-overlay.open .story-face { box-shadow: 0 30px 80px -24px rgba(0,0,0,.65); }
  .story-overlay.mystery .story-face { border-style: dashed; }
  .story-front { display: flex; flex-direction: column; }
  /* Mirror the grid card exactly (3:4 cover, text area fills the rest) so the close ends seamlessly. */
  .story-front .thumb { flex: none; }
  .story-front .game-body { flex: 1; }
  .story-overlay.mystery .story-front .thumb .mono { left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: clamp(96px, 14vw, 150px); }
  .story-front .yr { font: 12px var(--mono); color: var(--muted); }
  .story-front h4 { margin: 0; font-size: 16px; letter-spacing: -0.01em; line-height: 1.3; }
  .story-front .studio { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 8px; }
  .story-back { transform: rotateY(180deg); background: linear-gradient(170deg, var(--accent-soft), var(--surface) 45%); border-color: var(--accent); }
  .story-back .story-content { position: absolute; inset: 0; overflow-y: auto; opacity: 0; transition: opacity .25s ease; }
  .story-overlay.settled .story-content { opacity: 1; }
  /* Plain block layout with explicit spacing: iOS Safari squeezes flex children inside a
     scrolling container, which collapsed the space between story paragraphs. */
  .story-content { padding: 30px 34px 24px; display: block; box-sizing: border-box; }
  .story-content .yr { display: block; font: 12px var(--mono); color: var(--muted); padding-right: 40px; }
  .story-content h3 { margin: 10px 0 0; font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; padding-right: 36px; }
  .story-content .role { display: block; margin-top: 10px; font: 600 13px var(--mono); color: var(--accent); }
  .story-content .story-hook { margin: 8px 0 0; font-size: 17px; font-style: italic; color: var(--muted); line-height: 1.45; }
  .story-content p { margin: 14px 0 0; font-size: 15.5px; line-height: 1.65; }
  .story-content p.story-hook { margin-top: 8px; }
  .story-content .placeholder { color: var(--muted); font-style: italic; }
  .story-hint { display: block; margin-top: 20px; font: 11px var(--mono); color: var(--muted); }
  .story-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
  .story-nav button {
    font: 500 13px var(--mono); color: var(--ink); background: var(--surface); cursor: pointer;
    padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s, color .2s;
  }
  .story-nav button span { color: var(--muted); }
  .story-nav button:hover, .story-nav button:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
  .story-nav .story-next { margin-left: auto; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
  @media (max-width: 760px) { .story-nav button { flex: 1 1 100%; text-align: left; } }
  .story-probe { position: absolute; left: -10000px; top: 0; visibility: hidden; }
  .story-close {
    position: absolute; z-index: 2; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 20px/1 var(--sans); cursor: pointer;
    opacity: 0; transition: opacity .25s ease, border-color .2s;
  }
  .story-overlay.settled .story-close { opacity: 1; }
  .story-close:hover, .story-close:focus-visible { border-color: var(--accent); outline: none; }
  @media (max-width: 760px) {
    .story-content { padding: 24px 20px 20px; }
    .story-content h3 { font-size: 22px; }
    .story-content p { font-size: 15px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .story-overlay.animating .story-card, .story-inner, .story-backdrop, .story-content, .story-close { transition: none; }
  }

  /* projects */
  .projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
  .project { display: flex; gap: 20px; align-items: flex-start; padding: 24px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: transform .2s, border-color .2s; }
  .project:hover { transform: translateY(-3px); border-color: var(--accent); }
  .project img { width: 72px; height: 72px; border-radius: 18px; flex: none; }
  .project-tile { width: 72px; height: 72px; border-radius: 18px; flex: none; display: grid; place-items: center; font-size: 38px; background: linear-gradient(140deg, #ff8fb8, #8a3ffc); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
  .project .yr { font: 12px var(--mono); color: var(--muted); }
  .project h4 { margin: 4px 0 6px; font-size: 20px; letter-spacing: -0.02em; }
  .project p { margin: 0; color: var(--muted); font-size: 15px; }
  .project .more { display: inline-block; margin-top: 12px; font: 500 13px var(--mono); color: var(--accent); }

  /* app page */
  .app-hero { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; padding-block: 88px 64px; }
  .app-icon { width: 160px; height: 160px; border-radius: 36px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5), 0 0 0 1px var(--line); }
  .app-meta { margin: 20px 0 0; font: 13px var(--mono); color: var(--muted); }
  .features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .features .card h3 { font-size: 19px; }
  .watch-list { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
  .watch-list li { margin: 6px 0; }

  /* latest-posts rail (wide screens only) */
  .side-posts { display: none; }
  @media (min-width: 1480px) {
    .side-posts {
      display: flex; flex-direction: column; gap: 12px;
      position: fixed; z-index: 5; left: 28px; top: calc(110px + env(safe-area-inset-top, 0px));
      width: min(210px, calc((100vw - 1040px) / 2 - 56px));
    }
  }
  .side-head { font: 500 12px var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
  .side-posts ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; border-left: 1px solid var(--line); }
  .side-posts li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; font-size: 14px; line-height: 1.35; transition: border-color .2s, color .2s; }
  .side-posts li a:hover { border-left-color: var(--accent); color: var(--accent); }
  .side-posts li span { display: block; font: 11px var(--mono); color: var(--muted); margin-bottom: 2px; }
  .side-all { font: 500 12px var(--mono); color: var(--muted); text-decoration: none; padding-left: 15px; }
  .side-all:hover { color: var(--accent); }

  /* secrets counter + toast */
  .secrets { position: relative; }
  .secrets button { all: unset; display: block; cursor: pointer; width: 100%; }
  .secrets button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 4px; }
  .secrets em { font-style: normal; color: var(--accent); white-space: nowrap; }
  .secrets button:hover span { color: var(--ink); }
  #secrets-list {
    position: absolute; z-index: 6; right: 0; top: calc(100% + 8px); width: max(100%, 260px);
    list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 6px;
    background: var(--surface); border: 1px solid var(--accent); border-radius: 10px;
    font: 12px var(--mono); color: var(--muted); box-shadow: 0 16px 40px -16px rgba(0,0,0,.5);
  }
  #secrets-list .got { color: var(--ink); }
  .secret-toast {
    position: fixed; z-index: 200; /* above the story panel (100) */ left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    display: grid; gap: 2px; padding: 12px 18px; border-radius: 10px; text-align: center;
    background: var(--ink); color: var(--bg); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5);
    transition: opacity .3s, transform .3s;
  }
  .secret-toast.show { opacity: 1; transform: translate(-50%, 0); }
  .secret-toast b { font-size: 14px; }
  .secret-toast span { font: 12px var(--mono); opacity: .75; }

  /* blog */
  .posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
  .post-card { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .2s, border-color .2s; }
  .post-card:hover { transform: translateY(-3px); border-color: var(--accent); }
  .post-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
  .post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .post-card-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
  .post-card .yr { font: 12px var(--mono); color: var(--muted); }
  .post-card h4 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
  .post-card p { margin: 0; color: var(--muted); font-size: 15px; }
  .see-all { margin-top: 24px; }

  .blog-page { padding-block: 72px 96px; min-height: 60vh; }
  .blog-title { font-size: clamp(36px, 6vw, 56px); margin-bottom: 40px; }
  .post { max-width: 720px; }
  .back { display: inline-block; font: 13px var(--mono); color: var(--muted); text-decoration: none; margin-bottom: 32px; }
  .back:hover { color: var(--accent); }
  .post-hero { margin: -8px 0 36px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
  .post-hero img { display: block; width: 100%; }
  .prose { font-size: 18px; line-height: 1.75; }
  .prose h2, .prose h3 { letter-spacing: -0.02em; line-height: 1.2; margin: 1.8em 0 .5em; }
  .prose h2 { font-size: 28px; }
  .prose h3 { font-size: 22px; }
  .prose a { color: var(--accent); }
  .prose img { border-radius: 10px; border: 1px solid var(--line); }
  .prose blockquote { margin: 1.5em 0; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
  .prose code { font: .88em var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
  .prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; overflow-x: auto; }
  .prose pre code { border: 0; padding: 0; background: none; font-size: 14px; }

  @media (max-width: 760px) {
    nav a:not(.nav-blog) { display: none; }
    .blog-page { padding-block: 48px 64px; }
    .app-hero { grid-template-columns: 1fr; gap: 24px; padding-block: 56px 40px; }
    .app-icon { width: 112px; height: 112px; border-radius: 26px; }
    .features { grid-template-columns: 1fr; }
    .projects { grid-template-columns: 1fr; }
    .project { padding: 18px; gap: 16px; }
    .project img { width: 56px; height: 56px; border-radius: 14px; }
    .project-tile { width: 56px; height: 56px; border-radius: 14px; font-size: 30px; }
    .hero-top { grid-template-columns: 1fr; gap: 32px; }
    .games { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .game-body { padding: 10px 12px 12px; }
    .game h4 { font-size: 14px; }
    .game .studio { font-size: 12px; }
    .game-back { padding: 14px; gap: 6px; }
    .game-back p { font-size: 13px; line-height: 1.45; }
    .thumb .mono { font-size: 36px; left: 12px; }
    .portrait { order: -1; width: 160px; }
    .portrait-fallback { font-size: 48px; }
    .talks { grid-template-columns: 1fr; }
    .talk.feature-talk { grid-template-columns: 1fr; }
    .feature-talk .talk-body { padding: 16px 20px 20px; }
    .hero { padding-block: 64px 48px; }
    .stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
    .now, .about { grid-template-columns: 1fr; gap: 20px; }
    .timeline li { grid-template-columns: 1fr; gap: 4px; }
    .pub { grid-template-columns: 1fr; gap: 4px; }
    .pub-side { justify-content: space-between; margin-top: 8px; }
    section { padding-block: 56px; }
  }
