/* ==========================================================
   Akshaj Kumar Bhardwaj — Portfolio
   Design system: "Instruction Booklet"
   Ink on paper plus one spot colour. Hard edges and flat fills:
   no colour gradients, glows or blurred shadows. Patterns
   (halftone, hatching) are the only textures. Values come from
   the tokens in section 1.
   ========================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* colour: day edition */
  --paper: #f2ead8;
  --paper-2: #e7dcc3;
  --ink: #1a1612;
  --ink-2: #5a5143;
  --spot: #cf3118;        /* fills and large display type */
  --spot-text: #a8260f;   /* small text on paper */
  --spot-ink: #fff6e8;    /* text on a spot fill */
  --hair: color-mix(in srgb, var(--ink) 28%, transparent);
  --screen: #0c0a08;      /* the mini-game's display */

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --f-pixel: "Press Start 2P", var(--f-mono);

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-md: 1.0625rem;
  --t-lg: 1.3rem;
  --t-xl: 1.6rem;
  --t-2xl: 2.4rem;
  --t-h2: clamp(2.4rem, 6vw, 4.2rem);
  --t-hero: clamp(3.4rem, 17vw, 6.5rem);   /* one-column cover */

  /* space (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 104px;

  /* edges */
  --bw: 2px;
  --r: 3px;
  --r-art: 10px;
  --lift: 4px 4px 0 var(--ink);
  --lift-lg: 8px 8px 0 var(--ink);

  /* motion */
  --dur: .14s;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --mast-h: 60px;
  color-scheme: light;
}

/* night edition (also used by the Game Dev page in the day edition) */
:root[data-theme="dark"],
.bonus {
  --paper: #17130f;
  --paper-2: #231e17;
  --ink: #f0e7d3;
  --ink-2: #b0a590;
  --spot: #ff5b3d;
  --spot-text: #ff7a60;
  --spot-ink: #1d0b06;
  /* re-declared so they pick up this scope's ink */
  --hair: color-mix(in srgb, var(--ink) 28%, transparent);
  --lift: 4px 4px 0 var(--ink);
  --lift-lg: 8px 8px 0 var(--ink);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] .bonus { --paper: #0c0a08; --paper-2: #17130f; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--mast-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
::selection { background: var(--spot); color: var(--spot-ink); }
:focus-visible { outline: 3px solid var(--spot); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 2 * var(--s-4)); margin-inline: auto; }
@media (min-width: 700px) { .wrap { width: min(1160px, 100% - 2 * var(--s-6)); } }
@media (min-width: 861px) { :root { --t-hero: clamp(3.5rem, 9.6vw, 7.4rem); } }  /* two-column cover */

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4);
  font: 600 var(--t-sm) var(--f-mono);
}
.skip:focus { top: var(--s-2); }

/* ---------- 3. Components ---------- */

/* Button: a physical key. Variants: default (paper), .btn-a (spot). Sizes: default, .btn-sm */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5) var(--s-3) var(--s-3);
  background: var(--paper); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--lift);
  font: 600 var(--t-md)/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-a { background: var(--spot); color: var(--spot-ink); }
.btn-sm { padding: var(--s-2) var(--s-4); font-size: var(--t-sm); box-shadow: 3px 3px 0 var(--ink); }
.key {
  display: grid; place-items: center; flex: none;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  border: var(--bw) solid currentColor;
  font: 600 .8em/1 var(--f-mono);
}

/* Square icon button */
.sq-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  background: transparent; border: var(--bw) solid var(--ink); border-radius: var(--r); cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
.sq-btn:hover { background: var(--ink); color: var(--paper); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

/* Tag: a stamped label. Variant: .tag-live (in progress) */
.tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-2);
  border: 1.5px solid var(--ink); background: var(--paper);
  font: 500 var(--t-xs)/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
}
.tag-live { background: var(--spot); border-color: var(--spot); color: var(--spot-ink); }
.tag-live::before { content: ""; width: 7px; height: 7px; background: currentColor; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Small ruled heading */
.rule-title {
  display: flex; align-items: center; gap: var(--s-4);
  margin-bottom: var(--s-5);
  font: 600 var(--t-xs)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em;
}
.rule-title::after { content: ""; flex: 1; border-top: var(--bw) solid var(--ink); }

/* ---------- 4. Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50; height: var(--mast-h);
  background: var(--paper); border-bottom: var(--bw) solid var(--ink);
}
.masthead-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--ink); color: var(--paper);
  font: italic 900 1.05rem/1 var(--f-display); letter-spacing: -.02em;
}
.brand-txt { font: 600 var(--t-sm)/1.2 var(--f-body); }
.brand-txt small { display: block; font: 400 .68rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.contents { display: flex; gap: var(--s-5); }
.contents a {
  display: flex; align-items: baseline; gap: 6px; padding-block: var(--s-1);
  font: 500 var(--t-sm)/1 var(--f-body); text-decoration: none;
  border-bottom: var(--bw) solid transparent;
}
.contents a span { font: 400 .68rem/1 var(--f-mono); color: var(--ink-2); }
.contents a:hover, .contents a.active { border-bottom-color: var(--spot); }
.contents a.active span { color: var(--spot-text); }
.masthead-act { display: flex; align-items: center; gap: var(--s-3); }
.menu-btn { display: none; }

@media (max-width: 1080px) {
  .menu-btn { display: inline-grid; }
  .contents {
    position: absolute; top: calc(var(--mast-h) - var(--bw)); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0 var(--s-4);
    background: var(--paper); border-block: var(--bw) solid var(--ink);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--dur), transform var(--dur), visibility var(--dur);
  }
  .contents.open { visibility: visible; opacity: 1; transform: none; }
  .contents a { padding: var(--s-4) 0; border-bottom: 1px solid var(--hair); font: 800 var(--t-xl)/1 var(--f-display); gap: var(--s-3); }
  .contents a:last-child { border-bottom: 0; }
  .contents a:hover, .contents a.active { border-bottom-color: var(--hair); color: var(--spot-text); }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .brand-txt small { display: none; }
}

/* ---------- 5. Cover ---------- */
.cover { padding: var(--s-5) 0 var(--s-8); }
.cover-strip {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding-block: var(--s-2); border-block: var(--bw) solid var(--ink);
  font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .12em;
}
.cover-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; padding-block: var(--s-8); }
.kicker {
  display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5);
  font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em;
}
.kicker::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--spot); }
.cover h1 {
  font: 900 var(--t-hero)/.86 var(--f-display); letter-spacing: -.04em;
  margin-bottom: var(--s-6);
}
.cover h1 .h1-line, .cover h1 em { display: block; }
.cover h1 em { color: var(--spot); padding-bottom: .08em; }
.lede { max-width: 34rem; font-size: var(--t-lg); line-height: 1.5; margin-bottom: var(--s-6); }
.cta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-bottom: var(--s-6); }
.socials { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); font: 500 var(--t-sm)/1.4 var(--f-mono); }
.socials li + li::before { content: "/"; margin-right: var(--s-3); color: var(--spot-text); }
.socials a { text-decoration-thickness: var(--bw); text-underline-offset: 4px; }
.socials a:hover { color: var(--spot-text); }

/* cover art: a cartridge and a seal, drawn in CSS */
.cover-art { position: relative; padding: var(--s-5) 0 var(--s-7); }
.cart {
  width: min(300px, 76%); margin: 0 var(--s-4) 0 auto;
  background: var(--paper-2); border: var(--bw) solid var(--ink);
  border-radius: var(--r-art) var(--r-art) var(--r) var(--r);
  padding: var(--s-4) var(--s-5) var(--s-6);
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(4deg);
}
.cart-grip { display: grid; gap: 5px; padding-inline: 22%; margin-bottom: var(--s-4); }
.cart-grip i { display: block; height: 4px; background: var(--ink); }
.cart-label { background: var(--paper); border: var(--bw) solid var(--ink); padding: var(--s-3); }
.cart-brand, .cart-meta { display: flex; font: 600 .66rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.cart-brand { justify-content: space-between; }
.cart-art {
  display: grid; place-items: center; aspect-ratio: 4 / 3; margin-block: var(--s-3);
  border: var(--bw) solid var(--ink);
  background: radial-gradient(circle, var(--ink) 1.3px, transparent 1.6px) 0 0 / 9px 9px, var(--spot);
}
.cart-art span { font: italic 900 5.4rem/1 var(--f-display); letter-spacing: -.06em; color: var(--spot-ink); text-shadow: 4px 4px 0 var(--ink); }
.cart-title { font: 800 var(--t-lg)/1.05 var(--f-display); letter-spacing: -.02em; margin-bottom: var(--s-3); }
.cart-meta { gap: var(--s-2); }
.cart-meta span { border: 1.5px solid var(--ink); padding: 2px 6px; }

.seal { position: absolute; left: 0; bottom: 0; width: 132px; height: 132px; transform: rotate(-12deg); }
.seal-bg { fill: var(--spot); stroke: var(--ink); stroke-width: 2; }
.seal-ring { fill: none; stroke: var(--spot-ink); stroke-width: 1.5; stroke-dasharray: 3 4; }
.seal-round { font: 600 11px var(--f-mono); letter-spacing: .08em; fill: var(--spot-ink); }
.seal-mid { font: italic 800 21px var(--f-display); fill: var(--spot-ink); }
.seal-spin { transform-origin: 80px 80px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.specs { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--bw) solid var(--ink); }
.specs div { padding: var(--s-4) var(--s-5); }
.specs div + div { border-left: var(--bw) solid var(--ink); }
.specs dt { font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.specs dd { font: 800 var(--t-xl)/1.15 var(--f-display); letter-spacing: -.02em; }

@media (max-width: 860px) {
  .cover-grid { grid-template-columns: 1fr; padding-block: var(--s-7); gap: var(--s-6); }
  .cover-art { max-width: 360px; margin-inline: auto; width: 100%; }
  .cart { margin: 0 auto 0 var(--s-4); }
  .seal { left: auto; right: 0; bottom: var(--s-5); width: 116px; height: 116px; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .specs div:nth-child(3) { border-left: 0; }
  .specs div:nth-child(n + 3) { border-top: var(--bw) solid var(--ink); }
  .cover-strip span:nth-child(3) { display: none; }
}
@media (max-width: 420px) {
  .specs div { padding: var(--s-3) var(--s-4); }
  .specs dd { font-size: var(--t-lg); }
}

/* ---------- 6. Page (every numbered section) ---------- */
.page { padding-block: var(--s-9); border-top: var(--bw) solid var(--ink); }
.bonus { background-color: var(--paper); color: var(--ink); }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  padding-bottom: var(--s-4); margin-bottom: var(--s-7); border-bottom: var(--bw) solid var(--ink);
}
.page-head h2 { font: 900 var(--t-h2)/.95 var(--f-display); letter-spacing: -.035em; }
.folio { display: flex; align-items: center; gap: var(--s-3); font: 500 var(--t-xs)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; padding-bottom: 6px; }
.folio span { background: var(--ink); color: var(--paper); padding: var(--s-1) var(--s-2); }
.page-lede { max-width: 42rem; font-size: var(--t-lg); line-height: 1.5; margin: calc(-1 * var(--s-5)) 0 var(--s-7); }
.page-lede a, .prose a { text-decoration-color: var(--spot); text-decoration-thickness: var(--bw); text-underline-offset: 4px; font-weight: 600; }
.page-lede a:hover { color: var(--spot-text); }
@media (max-width: 700px) { .page { padding-block: var(--s-8); } }

/* 01 About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.prose p + p { margin-top: var(--s-4); }
.prose .dropcap { font-size: var(--t-lg); line-height: 1.5; }
.dropcap::first-letter {
  float: left; margin: .06em .12em 0 0;
  font: 900 4.3em/.74 var(--f-display); color: var(--spot);
}
.sheet { border: var(--bw) solid var(--ink); background: var(--paper-2); box-shadow: var(--lift-lg); }
.sheet-title { background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4); font: 600 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; }
.leaders { padding: var(--s-3) var(--s-4) var(--s-4); }
.leaders div { display: flex; align-items: baseline; gap: var(--s-2); padding-block: var(--s-2); }
.leaders dt { display: flex; flex: 1; align-items: baseline; gap: var(--s-2); font: 400 var(--t-sm)/1.4 var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.leaders dt::after { content: ""; flex: 1; min-width: var(--s-4); border-bottom: var(--bw) dotted var(--hair); transform: translateY(-3px); }
.leaders dd { font-weight: 600; text-align: right; }
.spot { color: var(--spot-text); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* 02 Education */
.stage {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: var(--s-5); align-items: center;
  padding-block: var(--s-5); border-bottom: 1px solid var(--hair);
}
.stage:first-child { padding-top: 0; }
.stage:last-child { border-bottom: 0; padding-bottom: 0; }
.stage-no {
  font: 900 5.4rem/.8 var(--f-display); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: var(--bw) var(--ink);
}
.stage:first-child .stage-no { color: var(--spot); -webkit-text-stroke: 0; }
.stage-body .tag { margin-bottom: var(--s-3); }
.stage-body h3 { font: 800 var(--t-xl)/1.15 var(--f-display); letter-spacing: -.02em; margin-bottom: var(--s-1); }
.stage-body p:last-child { color: var(--ink-2); }
.stage-score { text-align: right; }
.stage-score b { display: block; font: 900 var(--t-2xl)/1 var(--f-display); letter-spacing: -.03em; }
.stage-score span { font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
@media (max-width: 700px) {
  .stage { grid-template-columns: 52px minmax(0, 1fr); gap: var(--s-3) var(--s-4); align-items: start; }
  .stage-no { font-size: 3.4rem; }
  .stage-score { grid-column: 2; text-align: left; display: flex; align-items: baseline; gap: var(--s-3); }
  .stage-score b { font-size: var(--t-xl); }
}

/* 03 Skills */
.abilities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: var(--bw) solid var(--ink); counter-reset: ab; }
.ability { padding: var(--s-5); counter-increment: ab; }
.ability + .ability { border-left: var(--bw) solid var(--ink); }
.ability h3 {
  display: flex; gap: var(--s-2); margin-bottom: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--hair);
  font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
}
.ability h3::before { content: counter(ab, upper-alpha) "."; color: var(--spot-text); font-weight: 600; }
.ability li { font: 700 var(--t-lg)/1.2 var(--f-display); letter-spacing: -.015em; }
.ability li + li { margin-top: var(--s-2); }
.subjects { margin-top: var(--s-7); }
.subjects ol { columns: 3; column-gap: var(--s-6); counter-reset: subj; }
.subjects li {
  counter-increment: subj; break-inside: avoid;
  display: flex; gap: var(--s-3); align-items: baseline;
  padding-block: var(--s-3); border-bottom: var(--bw) dotted var(--hair);
}
.subjects li::before { content: counter(subj, decimal-leading-zero); font: 500 var(--t-xs) var(--f-mono); color: var(--spot-text); }
@media (max-width: 960px) {
  .abilities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ability:nth-child(3) { border-left: 0; }
  .ability:nth-child(n + 3) { border-top: var(--bw) solid var(--ink); }
  .subjects ol { columns: 2; }
}
@media (max-width: 560px) {
  .abilities { grid-template-columns: 1fr; }
  .ability + .ability { border-left: 0; border-top: var(--bw) solid var(--ink); }
  .subjects ol { columns: 1; }
}

/* 04 Projects */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: var(--s-7) var(--s-6); }
.tile-screen {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; margin-bottom: var(--s-5);
  border: var(--bw) solid var(--ink); background-color: var(--paper-2); overflow: hidden;
  box-shadow: var(--lift-lg); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tile:hover .tile-screen { transform: translate(3px, 3px); box-shadow: 5px 5px 0 var(--ink); }
.tile.is-upcoming .tile-screen { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, var(--hair) 10px 11px); }
.tile-screen img { width: 100%; height: 100%; object-fit: cover; }
.tile-no { font: 900 7rem/1 var(--f-display); color: var(--paper); -webkit-text-stroke: var(--bw) var(--ink); }
.tile-screen .tag { position: absolute; left: var(--s-3); bottom: var(--s-3); transform: rotate(-3deg); }
.tile h3 { font: 800 var(--t-xl)/1.15 var(--f-display); letter-spacing: -.02em; margin-bottom: var(--s-2); }
.tile > p:not(.tile-links) { color: var(--ink-2); margin-bottom: var(--s-4); }
.tile-tech { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.tile-tech li { padding: 2px var(--s-2); border: 1.5px solid var(--hair); font: 500 var(--t-xs)/1.4 var(--f-mono); }
.tile-links { display: flex; gap: var(--s-5); font: 500 var(--t-sm)/1.4 var(--f-mono); }
.tile-links span { color: var(--ink-2); }
.tile-links a { font-weight: 600; text-decoration-color: var(--spot); text-decoration-thickness: var(--bw); text-underline-offset: 4px; }
.tile-links a::after { content: " →"; }
.tile-links a:hover { color: var(--spot-text); }

/* 05 Game Dev: the one inverted spread (tokens swap in section 1) */
.bonus-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; margin-bottom: var(--s-8); }
.console-screen { position: relative; border: var(--bw) solid var(--ink); background: var(--screen); box-shadow: 8px 8px 0 var(--spot); }
.hud { display: flex; justify-content: space-between; padding: var(--s-3) var(--s-4); border-bottom: var(--bw) solid var(--ink); font: 400 .62rem/1 var(--f-pixel); letter-spacing: .04em; }
.hud b { font-weight: 400; color: var(--spot); }
#gameCanvas { width: 100%; height: auto; aspect-ratio: 3 / 2; image-rendering: pixelated; touch-action: none; }
.overlay {
  position: absolute; inset: 36px 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-4); padding: var(--s-4); text-align: center; background: color-mix(in srgb, var(--screen) 86%, transparent);
}
.overlay.hidden { display: none; }
.ov-title { font: 400 clamp(1rem, 3.6vw, 1.5rem)/1.3 var(--f-pixel); }
.ov-sub { font: 400 var(--t-sm)/1.4 var(--f-mono); color: var(--ink-2); }
.overlay .btn { box-shadow: 4px 4px 0 var(--ink); }
.pad { display: none; justify-content: space-between; margin-top: var(--s-5); }
.pad-btn { padding: var(--s-3) var(--s-6); font-size: var(--t-lg); touch-action: none; user-select: none; }
@media (hover: none) { .pad { display: flex; } }
.console figcaption { margin-top: var(--s-5); font: 400 var(--t-xs)/1.6 var(--f-mono); color: var(--ink-2); }
.console figcaption b { color: var(--ink); font-weight: 600; margin-right: var(--s-2); }

.bonus-side { display: grid; gap: var(--s-7); }
.objectives li { position: relative; padding: var(--s-2) 0 var(--s-2) 34px; color: var(--ink-2); }
.objectives li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 18px; height: 18px;
  border: var(--bw) solid var(--ink-2);
}
.objectives .done::before {
  border-color: var(--ink); background: var(--ink);
}
.objectives .done::after {
  content: ""; position: absolute; left: 6px; top: calc(.72em + 3px); width: 6px; height: 10px;
  border: solid var(--paper); border-width: 0 var(--bw) var(--bw) 0; transform: rotate(45deg);
}
.objectives .now { color: var(--ink); font-weight: 600; }
.objectives .now::before { border-color: var(--spot); background: var(--spot); animation: blink 1.2s steps(2) infinite; }
.inline-list { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); font: 700 var(--t-lg)/1.3 var(--f-display); letter-spacing: -.015em; }
.inline-list li:not(:last-child)::after { content: "/"; margin-left: var(--s-3); color: var(--spot); font-weight: 400; }

.slots { border: var(--bw) solid var(--ink); }
.slots li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--s-4); align-items: baseline; padding: var(--s-4) var(--s-5); }
.slots li + li { border-top: var(--bw) solid var(--ink); }
.slot-id, .slot-state { font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.slot-id { color: var(--spot-text); }
.slot-name { font: 700 var(--t-lg)/1.2 var(--f-display); letter-spacing: -.015em; }
.slot-state { color: var(--ink-2); }
@media (max-width: 900px) { .bonus-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .slots li { grid-template-columns: 1fr auto; padding: var(--s-4); }
  .slot-id { grid-column: 1 / -1; }
}

/* 06 Contact */
.mail {
  display: inline-block; margin-bottom: var(--s-7);
  font: 900 clamp(1.55rem, 5.4vw, 3.9rem)/1.05 var(--f-display); letter-spacing: -.035em;
  text-decoration: underline; text-decoration-color: var(--spot); text-decoration-thickness: .07em; text-underline-offset: .2em; text-decoration-skip-ink: none;
  overflow-wrap: anywhere;
}
.mail:hover { color: var(--spot); }
.links { border-top: var(--bw) solid var(--ink); }
.links a {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: var(--s-4); align-items: baseline;
  padding: var(--s-4) var(--s-3); border-bottom: var(--bw) solid var(--ink); text-decoration: none;
  transition: background var(--dur), color var(--dur), padding var(--dur) var(--ease);
}
.links a:hover { background: var(--ink); color: var(--paper); padding-inline: var(--s-5); }
.links-k { font: 500 var(--t-xs)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.links-v { font: 700 var(--t-xl)/1.2 var(--f-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.links-go { font: 500 var(--t-lg)/1 var(--f-mono); }
@media (max-width: 560px) {
  .links a { grid-template-columns: minmax(0, 1fr) auto; }
  .links-k { grid-column: 1 / -1; }
  .links-v { font-size: var(--t-lg); }
}

/* Colophon */
.colophon { border-top: var(--bw) solid var(--ink); padding-block: var(--s-5); font: 400 var(--t-xs)/1.5 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.colophon-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.colophon a { text-underline-offset: 4px; }
.colophon a:hover { color: var(--spot-text); }

/* ---------- 7. Motion ---------- */
:where(.js .reveal) { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
:where(.js .reveal.in) { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .seal-spin, .tag-live::before, .objectives .now::before { animation: none; }
  .btn, .tile-screen, .links a { transition: none; }
}
