/* Ship log: a games-industry magazine page. Tokens first. */
:root {
  --paper: #f3f5f6;
  --ink: #161616;
  --soft: #3d3d3a;
  --data: #ffd23f;
  --radius: 10px;   /* boxes and media: trailer, Game data box, decade/genre boxes, tool name strips (Sami, 2026-11-08) */
  --radius-sm: 6px; /* buttons and tabs */
  --red: #c81d32;
  --blue: #1d4ed8;
  --hair: rgba(22, 22, 22, .22);
  --max: 1360px;
  --gutter: 40px;
  --sans: "Archivo", system-ui, sans-serif;
  --serif: "Literata", Georgia, serif;
  /* theme-aware roles (dark mode, Sami 2026-11-10): solid = filled buttons; red-bg = red fills (tab, hovers, lanyard) */
  --solid: #161616;
  --on-solid: #ffd23f;
  --red-bg: #c81d32;
  --close-bg: #161616;
  --holder-bg: rgba(255, 255, 255, .55);
  --holder-line: rgba(22, 22, 22, .22);
  --icon-moon: block;
  --icon-sun: none;
  color-scheme: light;
}
/* Dark mode: follows the viewer's OS by default; the header toggle sets data-theme="light|dark" on <html>.
   Yellow surfaces (Game data card, decade boxes, tool strips, Sound button) and the closing band keep their light-mode ink (see below). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121416; --ink: #eceef0; --soft: #a9aeb5; --red: #f0606e; --blue: #8cb2ff;
    --hair: rgba(236, 238, 240, .2);
    --solid: #ffd23f; --on-solid: #161616; --close-bg: #1d2024;
    --holder-bg: rgba(255, 255, 255, .06); --holder-line: rgba(236, 238, 240, .2); --holder-hi: rgba(255, 255, 255, .1);
    --icon-moon: none; --icon-sun: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121416; --ink: #eceef0; --soft: #a9aeb5; --red: #f0606e; --blue: #8cb2ff;
  --hair: rgba(236, 238, 240, .2);
  --solid: #ffd23f; --on-solid: #161616; --close-bg: #1d2024;
  --holder-bg: rgba(255, 255, 255, .06); --holder-line: rgba(236, 238, 240, .2); --holder-hi: rgba(255, 255, 255, .1);
  --icon-moon: none; --icon-sun: block;
  color-scheme: dark;
}
/* yellow surfaces always carry dark ink, whatever the theme */
.data, .era-label, .tool-head, .trailer-sound {
  --ink: #161616; --soft: #3d3d3a; --paper: #f3f5f6; --blue: #1d4ed8; --solid: #161616; --on-solid: #ffd23f;
  color: var(--ink);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-color: var(--soft) var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--data); color: #161616; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
p, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
em { font-style: italic; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- folio bar ---------- */
.folio {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 14px 0; border-bottom: 4px solid var(--ink);
  position: relative; z-index: 6; background: var(--paper); /* header sits over the badge strap, so the strap hangs from the rule and never crosses the buttons */
  font: 700 14px/1 var(--sans); font-stretch: 110%; text-transform: uppercase; letter-spacing: .06em;
}
.folio-title { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.tab { background: var(--red-bg); color: #fff; padding: 6px 10px; }
.folio-nav { display: flex; gap: 22px; align-items: center; }
.folio-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.folio-title, .folio-nav a, .nav-email { font-stretch: 85%; }
.folio-nav a:hover { text-decoration: underline; }
.nav-email { background: var(--solid); color: var(--on-solid); padding: 8px 12px; border-radius: var(--radius-sm); text-decoration: none; white-space: nowrap; }
.nav-email:hover { background: var(--red-bg); color: #fff; text-decoration: none; }
/* header actions: résumé download + Email me (Sami, 2026-11-10) */
.folio-actions { display: flex; align-items: center; gap: 14px; }
.nav-resume { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; font-stretch: 85%; padding: 6px 0; }
.nav-resume:hover { text-decoration: underline; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- spread (first viewport) ---------- */
.spread {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "head head head head head head head head data data data data"
    "deck deck deck deck deck deck deck deck data data data data"
    "art  art  art  art  art  art  art  art  art  art  art  art";
  grid-template-rows: auto 1fr auto;
  column-gap: 32px;
  padding: 28px 0 56px;
  overflow-x: clip; /* the swinging ID card must never cause sideways scroll; vertical stays visible for the lanyard */
}
.spread-head {
  grid-area: head;
  font: 800 clamp(38px, 4.1vw, 68px)/1 var(--sans); font-stretch: 112%; letter-spacing: -.01em;
}
.spread-deck { grid-area: deck; }
.deck { font-size: 21px; line-height: 1.5; max-width: 60ch; margin: 22px 0 10px; }
.eyebrow { display: block; margin-bottom: 14px; }
.deck-lead { font: 700 23px/1.35 var(--sans); max-width: 40ch; }
.deck + .deck { margin-top: 0; margin-bottom: 12px; }
.byline { font: 600 15px/1.4 var(--sans); font-stretch: 80%; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); }
.spread-art { grid-area: art; margin-top: 40px; }
.spread-art figcaption { font: 400 14px/1.4 var(--sans); color: var(--soft); margin-top: 8px; }
.hero-art { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; background: #000; }
/* hero trailer: 2.4:1 video + sound toggle */
.trailer { position: relative; }
.trailer-video { aspect-ratio: 12 / 5; border-radius: var(--radius); }
@media (max-width: 560px) { .trailer-video { aspect-ratio: 4 / 5; } } /* phones play the 4:5 cut (Sami, 2026-11-10) */
.trailer-sound {
  position: absolute; right: 14px; bottom: 14px; padding: 8px 12px 7px;
  font: 700 13px/1 var(--sans); font-stretch: 112%; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink); background: var(--data); border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.trailer-sound:hover { background: var(--paper); }
.trailer-sound:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* phones: the video is ~140px tall, so the button sits under it instead of covering the captions */
@media (max-width: 400px) { .games:not(.genres) .era-dec { font-size: 28px; } .era-rows { margin-left: 8px; } }
@media (max-width: 560px) { .folio-nav { gap: 6px; font-size: clamp(10.5px, 3.2vw, 14px); letter-spacing: .02em; } }
@media (max-width: 560px) { .trailer-sound { position: static; display: block; margin: 8px 0 0 auto; padding: 7px 10px 6px; font-size: 12px; } }
/* video block-out (placeholder until the trailer is cut; unused now) */
.video-slot {
  aspect-ratio: 12 / 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--paper); font-family: var(--sans); text-align: center;
  outline: 2px dashed rgba(255,255,255,.35); outline-offset: -14px;
}
.video-slot-play {
  width: 0; height: 0; border-style: solid; border-width: 22px 0 22px 38px;
  border-color: transparent transparent transparent var(--data); margin-bottom: 6px;
}
.video-slot-label { font: 900 clamp(20px, 2.4vw, 30px)/1 var(--sans); font-stretch: 125%; text-transform: uppercase; }
.video-slot-spec { font: 400 14px/1.4 var(--sans); opacity: .7; }

/* fact box, worn as an ID card: clear plastic holder + red lanyard from the top of the page (Sami, 2026-11-08) */
.holder-wrap { grid-area: data; align-self: start; position: relative; margin-top: 8px; }
.holder {
  position: relative; border-radius: 22px; padding: 46px 10px 20px;
  background: var(--holder-bg);
  box-shadow: inset 0 0 0 2px var(--holder-line), inset 0 2px 0 var(--holder-hi, rgba(255, 255, 255, .9)), 0 14px 30px rgba(22, 22, 22, .12);
}
/* holder cut-outs: two side slots, a centre slot and a small hole on top; a thumb notch at the bottom */
.h-cut { position: absolute; background: var(--paper); box-shadow: inset 0 0 0 2px var(--holder-line); }
.h-cut.l, .h-cut.r { top: 13px; width: 28px; height: 18px; border-radius: 5px; }
.h-cut.l { left: 24px; }
.h-cut.r { right: 24px; }
.h-cut.c { top: 14px; left: 50%; width: 84px; height: 13px; margin-left: -42px; border-radius: 7px; }
.h-cut.o { top: 31px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; }
.holder::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 60px; height: 15px; margin-left: -30px;
  background: var(--paper); border-radius: 30px 30px 0 0;
}
/* strap: runs up past the page top (clipped there) into the clip, which hooks into the centre slot */
.lanyard { position: absolute; left: 50%; bottom: 100%; width: 24px; height: 3000px; margin: 0 0 10px -12px; background: var(--red-bg); z-index: 3; }
.clip { position: absolute; top: -26px; left: 50%; width: 34px; height: 34px; margin-left: -17px; background: #2b2b2b; border-radius: 8px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .35); z-index: 4; }
.clip::after { content: ""; position: absolute; left: 50%; bottom: -19px; width: 16px; height: 24px; margin-left: -8px; border: 4px solid #2b2b2b; border-top: 0; border-radius: 0 0 10px 10px; }
/* the card sits under the plastic: a soft sheen across it */
.holder .data { position: relative; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(22, 22, 22, .12); }
.holder .data::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.10) 22%, rgba(255,255,255,0) 38%,
    rgba(255,255,255,0) 70%, rgba(255,255,255,.14) 86%, rgba(255,255,255,0) 100%);
}
/* on page open the card drops in on its lanyard, the strap catches it (small bounce), then it swings and settles */
.holder-wrap { animation: card-drop 1.25s both; }
.holder { transform-origin: 50% -12px; animation: card-swing 2.8s cubic-bezier(.37, 0, .63, 1) .62s both; }
@keyframes card-drop {
  0%   { transform: translateY(-110vh); animation-timing-function: cubic-bezier(.55, 0, .85, .35); } /* falling */
  50%  { transform: translateY(0);      animation-timing-function: cubic-bezier(.2, .6, .4, 1); }   /* strap goes taut */
  64%  { transform: translateY(16px);   animation-timing-function: cubic-bezier(.4, 0, .6, 1); }    /* stretches */
  78%  { transform: translateY(-6px);   animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  90%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}
@keyframes card-swing {
  0%   { transform: rotate(0); }
  14%  { transform: rotate(2.6deg); }
  36%  { transform: rotate(-1.8deg); }
  58%  { transform: rotate(1.1deg); }
  78%  { transform: rotate(-.5deg); }
  100% { transform: rotate(0); }
}
/* phones/tablets: the card sits under the headline, so a long fall would cross it: short drop + fade instead */
@keyframes card-drop-short {
  0%   { transform: translateY(-26px); opacity: 0; animation-timing-function: cubic-bezier(.55, 0, .85, .35); }
  45%  { transform: translateY(0); opacity: 1; animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  62%  { transform: translateY(10px); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  80%  { transform: translateY(-3px); }
  100% { transform: translateY(0); opacity: 1; }
}
@media (max-width: 980px) {
  .holder-wrap { animation: card-drop-short .9s both; }
  .holder { animation-delay: .42s; }
}
@media (prefers-reduced-motion: reduce) {
  .holder-wrap, .holder { animation: none; }
}

/* phones/tablets: the card sits under the headline, so only a short strap above the clip */
@media (max-width: 980px) {
  .holder-wrap { margin-top: 0; padding-top: 72px; }
  .holder-wrap .lanyard { bottom: auto; top: 8px; height: 46px; margin-bottom: 0; }
}

/* fact box */
.data { align-self: start; background: var(--data); padding: 22px 24px 24px; font-family: var(--sans); border-radius: var(--radius); }
.data h2 {
  font: 900 26px/1 var(--sans); font-stretch: 125%; text-transform: uppercase;
  border-bottom: 3px solid var(--ink); padding-bottom: 10px; margin-bottom: 4px;
}
/* ID photo on the Game data badge (Sami, 2026-11-10; panel Round 12) */
.id-head { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid var(--ink); padding-bottom: 12px; margin-bottom: 4px; }
.id-head h2 { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.id-photo { position: relative; z-index: 1; width: 96px; height: 96px; flex: none; object-fit: cover; border-radius: var(--radius-sm); box-shadow: 0 0 0 2px var(--ink); background: var(--paper); }
.id-role { font: 800 15px/1.2 var(--sans); font-stretch: 100%; margin-top: 8px; }
.id-head h2 { font-size: 24px; line-height: 1.02; }
@media (max-width: 400px) { .id-photo { width: 80px; height: 80px; } .id-head { gap: 12px; } }
.data dl { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
.data dt, .data dd { padding: 7px 0; border-bottom: 1px solid rgba(22, 22, 22, .35); }
.data dt { font: 800 13px/1.35 var(--sans); font-stretch: 80%; text-transform: uppercase; letter-spacing: .04em; }
.data dd { font: 500 16px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.data dd b { font-weight: 900; font-size: 20px; }
.data dd a { color: var(--ink); }
.data .addr a { color: var(--ink); }
.btn {
  display: block; text-align: center; margin-top: 18px; padding: 15px 20px;
  background: var(--solid); color: var(--on-solid); text-decoration: none; border-radius: var(--radius-sm);
  font: 800 17px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em;
  transition: background-color .2s cubic-bezier(.16, 1, .3, 1), color .2s cubic-bezier(.16, 1, .3, 1);
}
.btn:hover { background: var(--red-bg); color: #fff; text-decoration: none; }
/* Email me | Book call side by side (Sami, 2026-11-10) */
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.btn-row .btn { margin-top: 0; padding-left: 10px; padding-right: 10px; }
.btn-alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-alt:hover { background: var(--solid); color: var(--on-solid); }
/* floating Email me: slides up from the corner once the fact-box button scrolls away; a slow ink ring pulses outward */
.btn-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 50; margin: 0; padding: 15px 22px;
  box-shadow: 0 6px 18px rgba(22, 22, 22, .22);
  opacity: 0; transform: translateY(24px); pointer-events: none; visibility: hidden;
  transition: opacity .2s ease-in, transform .2s ease-in, visibility 0s linear .2s,
    background-color .2s cubic-bezier(.16, 1, .3, 1), color .2s cubic-bezier(.16, 1, .3, 1);
}
.btn-float.is-on {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .5s cubic-bezier(.16, 1, .3, 1), visibility 0s,
    background-color .2s cubic-bezier(.16, 1, .3, 1), color .2s cubic-bezier(.16, 1, .3, 1);
}
.btn-float::after {
  content: ""; position: absolute; inset: 0; border: 2px solid var(--solid); border-radius: inherit; opacity: 0; pointer-events: none;
}
.btn-float.is-on::after { animation: float-pulse 4.2s cubic-bezier(.16, 1, .3, 1) 1s infinite; }
.btn-float:hover::after, .btn-float:focus-visible::after { animation: none; }
@keyframes float-pulse {
  0% { opacity: .55; transform: scale(1); }
  38% { opacity: 0; transform: scale(1.16, 1.5); }
  100% { opacity: 0; transform: scale(1.16, 1.5); }
}
/* floating pair: Email me stacked above Book call (Sami, 2026-11-10) */
.btn-float.js-email { bottom: 82px; }
.btn-float-call { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 0 6px 18px rgba(22, 22, 22, .18); }
.btn-float-call:hover { background: var(--solid); color: var(--on-solid); }
.btn-float-call::after, .btn-float-call.is-on::after { display: none; }
.btn-float { min-width: 156px; }
@media (max-width: 560px) { .btn-float { right: 16px; bottom: 16px; } .btn-float.js-email { bottom: 72px; } .btn-float { min-width: 140px; padding: 13px 18px; } }
@media (prefers-reduced-motion: reduce) {
  .btn-float, .btn-float.is-on { transform: none; }
  .btn-float.is-on::after { animation: none; }
}
.addr { margin-top: 10px; text-align: center; font: 500 14px/1.4 var(--sans); overflow-wrap: anywhere; }

/* ---------- bands ---------- */
.band { border-top: 4px solid var(--ink); padding: 40px 0 56px; }
.band-title {
  font: 800 clamp(32px, 3.4vw, 46px)/1.02 var(--sans); font-stretch: 112%; text-transform: uppercase;
  letter-spacing: .005em; margin-bottom: 30px; max-width: 24ch;
}
.band h3 { font: 800 22px/1.2 var(--sans); font-stretch: 105%; }

/* highlights ledger */
.ledger article:first-child { padding-top: 0; }
.ledger article { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 10px 48px; padding: 26px 0 28px; border-bottom: 1px solid var(--hair); }
.ledger .fig b { display: block; font: 900 clamp(34px, 3.4vw, 50px)/.95 var(--sans); font-stretch: 112%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ledger .fig-label { display: block; margin-top: 10px; font: 700 15px/1.3 var(--sans); font-stretch: 85%; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); max-width: 36ch; }
.ledger .tag { color: var(--red); font-weight: 900; }
.ledger h3 { font: 800 23px/1.2 var(--sans); font-stretch: 105%; margin-bottom: 8px; text-wrap: balance; }
.ledger p { max-width: none; }
.ledger .src { font-size: 15px; margin-top: 10px; }

/* games shipped: grouped by decade, with store icons */
.games .era { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px 36px; padding: 28px 0; border-top: 1px solid var(--hair); }
.games .era:first-of-type { border-top: 0; padding-top: 0; }
/* decade label = a small "Game data" fact box: decade, then Games / Years rows (one rule between them) */
.era-label {
  align-self: start; display: flex; flex-direction: column; background: var(--data); font-family: var(--sans);
  border-radius: var(--radius);
}
.era-dec { padding: 18px 20px 8px; font: 900 clamp(34px, 3.4vw, 48px)/.9 var(--sans); font-stretch: 118%; letter-spacing: -.02em; }
.era-rows { display: grid; grid-template-columns: auto 1fr; margin: 0 20px 18px; }
.era-k, .era-v { padding: 7px 0; border-top: 1px solid rgba(22, 22, 22, .35); }
.era-rows > :nth-child(-n+2) { border-top: 0; }
.era-k { padding-right: 14px; font: 800 12px/1.35 var(--sans); font-stretch: 80%; text-transform: uppercase; letter-spacing: .06em; }
.era-v { font: 500 15px/1.3 var(--sans); font-variant-numeric: tabular-nums; text-align: right; }
.era-v b { font-weight: 900; font-size: 18px; }
.games ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 28px; }
.games li { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.game-icon {
  flex: none; width: 68px; height: 68px; display: block; overflow: hidden; border-radius: 22%; background: #161616;
  box-shadow: 0 1px 2px rgba(22, 22, 22, .18), 0 4px 12px rgba(22, 22, 22, .10);
}
.game-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-icon--logo img { object-fit: contain; padding: 8%; }
.game-icon--blank { display: grid; place-items: center; color: var(--data); font: 900 16px/1 var(--sans); }
.game-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-family: var(--sans); }
.game-year { font: 900 14px/1 var(--sans); color: var(--red); letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.game-name { font: 800 19px/1.25 var(--sans); overflow-wrap: anywhere; }
.game-name a, .gn-name a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.game-name a:hover, .gn-name a:hover { text-decoration-color: var(--red); }
.game-role { font: 500 14px/1.4 var(--sans); color: var(--soft); overflow-wrap: anywhere; }

/* experience */
.role { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--hair); }
.role:first-of-type { border-top: 0; padding-top: 0; }
.role-head h3 { font-size: 23px; }
.role-head h3 a { color: inherit; }
.role-meta { font: 600 14px/1.4 var(--sans); color: var(--soft); margin-top: 8px; font-variant-numeric: tabular-nums; }
.role-body { min-width: 0; }
.role-body > p { margin-bottom: 14px; }
.wins { padding-left: 20px; display: grid; gap: 10px; }
.wins li::marker { color: var(--red); }
details { margin-top: 16px; border-top: 2px solid var(--ink); }
summary {
  cursor: pointer; padding: 12px 0; list-style: none; display: flex; align-items: center; gap: 12px;
  font: 800 16px/1.3 var(--sans); font-stretch: 80%; text-transform: uppercase; letter-spacing: .05em;
}
summary::-webkit-details-marker { display: none; }
/* drawn chevron inside the line (the browser marker hung in the phone gutter); turns down when open */
summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-left: 2px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .25s var(--ease-out, ease-out);
}
details[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
@media (prefers-reduced-motion: reduce) { summary::before { transition: none; } }
summary:hover { color: var(--red); }
details[open] > summary { margin-bottom: 6px; }
details > .wins { padding-bottom: 8px; }
.tags { margin-top: 16px; font: 500 14px/1.5 var(--sans); color: var(--soft); }


/* selected work */
.cases { columns: 2 380px; column-gap: 56px; }
@media (min-width: 1181px) { .cases { columns: 3; column-gap: 48px; } }
.case { break-inside: avoid; padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--hair); }
.case h3 { margin-bottom: 4px; }
.case-meta { font: 700 14px/1.4 var(--sans); font-stretch: 80%; text-transform: uppercase; letter-spacing: .05em; color: var(--red); margin-bottom: 10px; }
.case .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font: 600 15px var(--sans); }
.case .tags { margin-top: 10px; }

/* how I lead */
/* genres: reuses the Games decade layout (.games .era + yellow .era-label); body = title, short text, icon grid */
.genres .era-dec { font-size: clamp(22px, 1.8vw, 26px); }
.gn-body h3 { font: 800 23px/1.2 var(--sans); font-stretch: 105%; margin-bottom: 8px; }
.gn-body > p { max-width: none; }
.gn-body b { font-weight: 700; }
.gn-games { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
.gn-games li { display: flex; gap: 12px; align-items: center; min-width: 0; }
.gn-games .game-icon { width: 52px; height: 52px; }
.gn-games .game-icon--blank { font-size: 13px; }
.gn-text { display: flex; flex-direction: column; min-width: 0; }
.gn-name { font: 800 16px/1.25 var(--sans); }
.gn-note { font: 500 13px/1.3 var(--sans); color: var(--soft); }
@media (max-width: 1180px) { .gn-games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gn-games { grid-template-columns: minmax(0, 1fr); } }

/* tools: spec plates (yellow name strip, Stack / Built rows, description) */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 29px; row-gap: 0; }
/* subgrid: name strips share a row track so they line up; spec + description (.tool-body) sit top-aligned below; one 16px inset */
.tool { min-width: 0; display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; margin-bottom: 32px; }
.tool-head { background: var(--data); border-radius: var(--radius); padding: 14px 16px 12px; font: 900 clamp(20px, 1.7vw, 24px)/1.08 var(--sans); font-stretch: 112%; text-transform: uppercase;
  display: flex; align-items: flex-start; }
.tool-spec { padding: 0 16px; display: grid; grid-template-columns: auto 1fr; margin: 0; border-bottom: 1px solid var(--hair); }
.tool-spec dt, .tool-spec dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--hair); }
.tool-spec dt:first-of-type, .tool-spec dd:first-of-type { border-top: 0; }
.tool-spec dt { padding-right: 16px; font: 800 12px/1.5 var(--sans); font-stretch: 80%; text-transform: uppercase; letter-spacing: .06em; }
.tool-spec dd { font: 700 13px/1.4 var(--sans); font-stretch: 85%; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); }
.tool-desc { padding: 0 16px; margin-top: 13px; font-size: 17px; line-height: 1.55; }


/* ---------- contact ---------- */
.close { --ink: #161616; --paper: #f3f5f6; --red: #c81d32; background: var(--close-bg); color: var(--paper); padding: 72px 0 88px; }
.close h2 { font: 800 clamp(36px, 4.2vw, 64px)/1 var(--sans); font-stretch: 112%; letter-spacing: .005em; text-transform: uppercase; max-width: 16ch; }
.close p { max-width: 58ch; font-size: 20px; margin: 20px 0 28px; }
/* closing band: "What I'll do on your team" (Sami, 2026-11-10, backlog #5) */
.close-plan { max-width: 60ch; margin: 24px 0 32px; }
.close-plan h3 { font: 800 15px/1.2 var(--sans); font-stretch: 112%; text-transform: uppercase; letter-spacing: .06em; color: var(--data); margin-bottom: 14px; }
.close-plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.close-plan li { position: relative; padding-left: 22px; font-size: 18px; line-height: 1.5; }
.close-plan li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 3px; background: var(--data); }
.close-plan strong { font-family: var(--sans); font-weight: 800; }
.close-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.close .btn { display: inline-block; margin: 0; background: var(--data); color: var(--ink); }
.close .btn:hover { background: var(--red-bg); color: #fff; }
.close .btn-alt { background: transparent; color: var(--data); box-shadow: inset 0 0 0 2px var(--data); }
.close .btn-alt:hover { background: var(--data); color: var(--ink); }
.close .addr { margin: 0; text-align: left; }
.close-link { color: var(--data); font: 600 16px var(--sans); }
.close :focus-visible { outline-color: var(--data); }
/* wide screens: headline on the left, pitch and actions on the right, bottoms aligned */
@media (min-width: 981px) {
  .close .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head text" "head cta"; column-gap: 56px; align-items: end; }
  .close h2 { grid-area: head; align-self: center; }
  .close p, .close-plan { grid-area: text; margin-top: 0; }
  .close-cta { grid-area: cta; }
}

.footer { padding: 22px var(--gutter); font: 500 14px/1.5 var(--sans); color: var(--soft); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .games ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  :root { --gutter: 16px; }
  .folio { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title email" "nav nav"; gap: 12px; align-items: center; }
  .folio-title { grid-area: title; white-space: normal; flex-wrap: wrap; gap: 8px; }
  .folio-actions { grid-area: email; }
  .folio-nav { grid-area: nav; justify-content: space-between; gap: 12px; } /* one row, spread edge to edge (Sami: Experience wrapped alone) */
  .folio-nav a { padding: 10px 0; white-space: nowrap; } /* taller tap targets */
  .spread {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "data" "deck" "art";
    row-gap: 22px; padding-top: 22px;
  }
  .deck { margin-top: 0; font-size: 19px; }
  .spread-art { margin-top: 0; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger article { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 24px 0; }
  .role { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .close h2 { font-size: clamp(30px, 8.4vw, 44px); }
  .band-title { font-size: clamp(28px, 7.6vw, 40px); }
}
@media (max-width: 760px) {
  .games .era { grid-template-columns: minmax(0, 1fr); } /* minmax: a plain 1fr kept the label's min width and pushed small phones sideways */
  .era-label { flex-direction: row; align-items: center; justify-content: space-between; }
  .era-dec { padding: 14px 16px; }
  .era-rows { margin: 10px 16px; flex: 0 1 150px; min-width: 0; }
  .games:not(.genres) .era-v { white-space: nowrap; }
  .genres .era-rows { min-width: 0; }
}
@media (max-width: 560px) {
  .tools { grid-template-columns: minmax(0, 1fr); }
  .games ol { grid-template-columns: minmax(0, 1fr); }
  body { font-size: 17px; }
}

/* external links: drawn arrow instead of a unicode glyph */
.case .links a::after, .close-link::after {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-left: .3em; vertical-align: .05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4 3h5v5' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4 3h5v5' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- motion: the page gets "ruled" as you read (Sami, 2026-11-10: gentle, makes the page feel alive) ----------
   Only active when JS adds .m to <html> (IntersectionObserver present, no reduced-motion), so content is visible by default.
   Focal moment: each section's 4px ink rule is drawn left to right, then its title is set. Rows and icons follow quietly. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }
.m .band { position: relative; border-top-color: transparent; }
.m .band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 4px; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease-out);
}
.m .band.in::before { transform: scaleX(1); }
.m .band-title { clip-path: inset(0 0 100% 0); transform: translateY(.35em); transition: clip-path .8s var(--ease-out) .18s, transform .8s var(--ease-out) .18s; }
.m .band.in .band-title { clip-path: inset(0 0 -.2em 0); transform: none; }

/* Highlights: figure rises into place, the text follows a beat later */
.m .ledger article > * { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.m .ledger article > :not(.fig) { transition-delay: .08s; }
.m .ledger article.in > * { opacity: 1; transform: none; }

/* Games + Genres: the fact box drops in, then the shelf of icons fills, one after another (delay capped in JS) */
.m .era-label { opacity: 0; transform: translateY(-10px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.m .era.in .era-label { opacity: 1; transform: none; }
.m .era li { opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); transition-delay: var(--d, 0s); }
.m .era.in li { opacity: 1; transform: none; }

/* Tools: the yellow name strip wipes in like a label being stuck on */
.m .tool-head { clip-path: inset(0 100% 0 0); transition: clip-path .7s var(--ease-out); transition-delay: var(--d, 0s); }
.m .tool.in .tool-head { clip-path: inset(0 0 0 0); }

/* Experience: each role settles; long text, so movement stays small */
.m .role { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.m .role.in { opacity: 1; transform: none; }

/* Hover: game icons lift a touch (feedback on the linked titles) */
.game-icon { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
li:hover > .game-icon { transform: translateY(-3px) rotate(-2deg); box-shadow: 0 3px 4px rgba(22, 22, 22, .16), 0 12px 20px rgba(22, 22, 22, .16); }
@media (prefers-reduced-motion: reduce) { li:hover > .game-icon { transform: none; } }
@media print { .m .band::before, .m .band-title, .m .ledger article > *, .m .era-label, .m .era li, .m .tool-head, .m .role { opacity: 1; transform: none; clip-path: none; } }

/* ---------- theme toggle (Sami, 2026-11-10): header icon; the new theme wipes in from top left to bottom right ---------- */
.theme-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  background: transparent; color: var(--ink); border: 0; border-radius: var(--radius-sm); cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--hair); transition: box-shadow .2s var(--ease-out), color .2s var(--ease-out);
}
.theme-toggle:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.theme-toggle .ico { width: 18px; height: 18px; grid-area: 1 / 1; }
.theme-toggle .i-moon { display: var(--icon-moon); }
.theme-toggle .i-sun { display: var(--icon-sun); }
@media (max-width: 980px) { .theme-toggle { width: 40px; height: 40px; } }
/* View Transitions: the new page is revealed by a soft diagonal edge sweeping top left -> bottom right */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) {
  -webkit-mask: linear-gradient(to bottom right, #000 46%, transparent 54%) 100% 100% / 300% 300% no-repeat;
          mask: linear-gradient(to bottom right, #000 46%, transparent 54%) 100% 100% / 300% 300% no-repeat;
  animation: theme-wipe 1s cubic-bezier(.65, 0, .35, 1) both;
}
@keyframes theme-wipe {
  from { -webkit-mask-position: 100% 100%; mask-position: 100% 100%; }
  to   { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

/* small phones (320-399px): header and badge buttons stay on one line (Sami, 2026-11-11) */
.tab { white-space: nowrap; }
@media (max-width: 399px) {
  .folio-actions { gap: 10px; }
  .nav-resume-label { display: none; } /* icon only; the link keeps its aria-label */
  .nav-resume { padding: 10px 4px; }
  .data { padding-left: 18px; padding-right: 18px; }
  .btn-row .btn { white-space: nowrap; font-size: clamp(13px, 4.3vw, 17px); letter-spacing: .03em; padding-left: 6px; padding-right: 6px; }
}

/* References (Sami, 2026-11-11; panel Round 14 option B): Highlights ledger grammar, who first, then the quote */
.refs-title { font: 800 14px/1 var(--sans); font-stretch: 112%; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); margin-bottom: 22px; }
.refs figure { display: grid; grid-template-columns: minmax(0, 3.3fr) minmax(0, 8fr); gap: 10px 64px; padding: 26px 0 28px; border-bottom: 1px solid var(--hair); }
.refs figure:first-of-type { padding-top: 0; }
.refs .who b { display: block; font: 800 23px/1.2 var(--sans); font-stretch: 105%; }
.refs .who b a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.refs .who b a:hover { text-decoration-color: var(--red); }
.refs .who span { display: block; margin-top: 8px; font: 500 15px/1.4 var(--sans); color: var(--soft); }
.refs .who em { display: block; margin-top: 10px; font: 700 14px/1.3 var(--sans); font-style: normal; font-stretch: 85%; text-transform: uppercase; letter-spacing: .04em; color: var(--red); }
.refs blockquote { font: 400 clamp(18px, 1.45vw, 21px)/1.5 var(--serif); text-wrap: pretty; }
.refs blockquote strong { font-weight: 600; }
/* big red opening mark hangs in the column gap, level with the first line (phones: in a 36px indent); the text carries no quote characters */
.refs blockquote { position: relative; }
.refs blockquote::before { content: "\201C"; position: absolute; left: -48px; top: -14px; font: 600 88px/1 var(--serif); color: var(--red); pointer-events: none; }
@media (max-width: 980px) {
  .refs figure { grid-template-columns: minmax(0, 1fr); }
  .refs blockquote { padding-left: 36px; }
  .refs blockquote::before { left: -4px; top: -10px; font-size: 72px; }
}
