/* Jack Adee — home. Minecraft chat colours, GitHub history as the spine. */

:root {
  /* the chat formatting codes CalcMod prints in */
  --aqua: #55FFFF;   /* §b */
  --ink: #000000;    /* §0 */
  --white: #FFFFFF;  /* §f */
  --green: #55FF55;  /* §a */
  --gold: #FFAA00;   /* §6 */
  --yellow: #FFFF55; /* §e */
  --gray: #AAAAAA;   /* §7 */
  --red: #FF5555;    /* §c */
  --muted-on-gold: #5a3c00;

  /* contribution squares on black */
  --c0: #1d1d1d;
  --c1: #00555a;
  --c2: #00AAAA;
  --c3: #2ad5d5;
  --c4: #55FFFF;

  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Onest", "Helvetica Neue", Arial, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1rem + 1.2vw, 2.125rem);
  --step-head: clamp(1.625rem, 0.9rem + 2.6vw, 3.25rem);
  --step-display: clamp(2.5rem, 6.4vw, 7.5rem);
  --step-figure: clamp(5rem, 18vw, 20rem);

  --m: clamp(16px, 2.2vw, 32px);
  --gap-section: clamp(96px, 12vw, 200px);
  --radius: 4px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--aqua);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.5;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--aqua); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- shared pieces ---------- */

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-small);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1.15em;
  background: var(--ink);
  color: var(--aqua);
  font: 500 var(--step-small)/1 var(--text);
  text-decoration: none;
  border-radius: 0;
  transition: transform 220ms var(--ease-spring);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); transition-duration: 80ms; }
.btn-full { width: 100%; }
.btn-tall { min-height: 52px; font-size: var(--step-body); }

/* ---------- history (hero) ---------- */

.history { position: relative; background: var(--aqua); }
.stage { padding: var(--m); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 3;
}
.bar nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.bar nav a:not(.btn) {
  font-weight: 500;
  font-size: var(--step-small);
  text-decoration: none;
  position: relative;
}
.bar nav a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.bar nav a:not(.btn):hover::after { transform: scaleX(1); }

.split {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.25rem, 9vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 48px 0 32px;
}
.half { display: block; white-space: nowrap; }
.half-r { text-align: right; }

.reel { display: grid; gap: 24px; max-width: 760px; margin: 0 auto; }

.frame {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(14px, 1.5vw, 24px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(10px, 1.2vw, 18px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  container-type: inline-size;
}
.frame-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
@media (min-width: 900px) {
  /* Poster order: the note up top, the squares, then the year set large at the foot */
  .frame-head { order: 3; align-items: flex-end; }
  /* sized from the frame itself, so the count always keeps room beside it */
  .frame-head .yr { flex: none; font-size: min(var(--step-display), 16cqw); line-height: .85; }
  .frame-head .cnt { min-width: 0; text-align: right; }
  .frame-note { order: -1; }
}
.yr {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-lead);
  letter-spacing: -0.03em;
  color: var(--aqua);
  line-height: 1;
  text-decoration: none;
}
.cnt { font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.cnt b { font-weight: 500; color: var(--aqua); }
.frame-note { line-height: 1.4; max-width: 46ch; }

.graph {
  align-self: center;
  display: grid;
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: clamp(1px, 0.18vw, 3px);
}

.cell {
  aspect-ratio: 1;
  border-radius: 1px;
  background: var(--c0);
  position: relative;
}
.cell::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--fill, var(--c0));
  opacity: 0;
  transform: scale(.2);
}
.cell.l1 { --fill: var(--c1); }
.cell.l2 { --fill: var(--c2); }
.cell.l3 { --fill: var(--c3); }
.cell.l4 { --fill: var(--c4); }
.cell.pad { background: transparent; }
.cell.future { opacity: .35; }
.frame.on .cell::after {
  opacity: 1;
  transform: scale(1);
  transition: opacity 260ms ease, transform 420ms var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 9ms);
}
html:not(.js) .cell::after { opacity: 1; transform: none; }

/* Profile frame: the avatar rebuilt from squares */
.frame-profile {
  container-type: size;
  grid-template-rows: 1fr;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
}
.mosaic {
  position: relative;
  width: min(52cqw, 100cqh);
  height: min(52cqw, 100cqh);
  padding: 0;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
}
.mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mosaic-cells {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(36, 1fr);
  grid-template-rows: repeat(36, 1fr);
  gap: 1px;
  background: var(--ink);
  transition: background-color 120ms ease;
}
.mcell {
  background: var(--c0);
  opacity: 0;
  transform: scale(.3);
}
.frame.on .mcell {
  opacity: 1;
  transform: none;
  transition: opacity 240ms ease, transform 380ms var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 7ms);
}
.frame.on .mosaic.reveal .mcell {
  opacity: 0;
  transform: scale(.3);
  transition-delay: calc(var(--d, 0) * 14ms);
}
.mosaic.reveal .mosaic-cells { background-color: transparent; transition-delay: 250ms; }
html:not(.js) .mosaic-cells { display: none; }
.m-f { background: var(--white); }
.m-1 { background: #0000AA; } .m-2 { background: #00AA00; } .m-3 { background: #00AAAA; }
.m-4 { background: #AA0000; } .m-5 { background: #AA00AA; } .m-6 { background: #FFAA00; }
.m-8 { background: #555555; } .m-9 { background: #5555FF; } .m-a { background: #55FF55; }
.m-b { background: #55FFFF; } .m-c { background: #FF5555; } .m-d { background: #FF55FF; }
.m-e { background: #FFFF55; }
.profile { display: grid; gap: 12px; align-content: center; min-width: 0; }
.profile .yr { font-size: clamp(0.875rem, 4.6cqw, 1.75rem); white-space: nowrap; }
.profile .yr:hover { color: var(--white); }
.profile-bio { line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
@container (max-height: 300px) { .profile-bio { display: none; } }

.support { max-width: 36ch; margin-top: 32px; display: grid; gap: 8px; }
.now b { font-weight: 500; }

.tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--white);
  color: var(--ink);
  font-size: var(--step-small);
  font-variant-numeric: tabular-nums;
  padding: 6px 10px;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); /* taste-skill-ignore: floating tooltip */
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-100% - 6px));
  transition: opacity 120ms ease, visibility 0s linear 120ms;
}
.tip.show { opacity: 1; visibility: visible; transition-delay: 0s; }

/* Pinned version, switched on by home.js when motion is allowed */
.history.pin .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  padding: 0;
}
.history.pin .bar { position: absolute; top: 0; left: 0; right: 0; padding: var(--m); }
.history.pin .reel-window { position: absolute; top: var(--win-top, 22vh); bottom: var(--win-bottom, 22vh); left: 50%; width: var(--reel-w, 56vw); transform: translateX(-50%); overflow: hidden; }
.history.pin .reel { display: block; max-width: none; margin: 0; position: relative; height: 100%; }
.history.pin .frame {
  position: absolute; top: 0; left: 0; width: 100%;
  will-change: transform;
}
.history.pin .split { margin: 0; font-size: var(--step-display); }
.history.pin .half { position: absolute; z-index: 2; }
.history.pin .half-l { left: var(--m); top: calc(var(--m) + 64px); }
.history.pin .half-r { right: var(--m); bottom: var(--m); }
.history.pin .support {
  position: absolute;
  right: var(--m);
  top: calc(var(--m) + 64px);
  max-width: 36ch;
  text-align: right;
  margin: 0;
}

/* Page-load sequence */
@keyframes from-left { from { opacity: 0; transform: translateX(-64px); } }
@keyframes from-right { from { opacity: 0; transform: translateX(64px); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes fade { from { opacity: 0; } }
.history.pin .half-l { animation: from-left 900ms var(--ease-out) 120ms both; }
.history.pin .half-r { animation: from-right 900ms var(--ease-out) 240ms both; }
.history.pin .bar { animation: fade 700ms ease 80ms both; }
.history.pin .reel-window { animation: fade 800ms ease 360ms both; }
.history.pin .support { animation: rise 800ms var(--ease-out) 520ms both; }

/* ---------- CalcMod showcase ---------- */

.showcase {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
.showcase-bg {
  position: absolute; inset: 0;
  overflow: hidden;
}
/* crop each gallery shot to its scene, away from its own banner and chat */
.showcase-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(var(--zoom, 1.7));
  transform-origin: 100% 0;
  opacity: 0;
  transition: opacity 700ms ease;
  will-change: transform;
}
.calc-shot { position: relative; aspect-ratio: 16 / 10; margin-top: auto; border-radius: 2px; overflow: hidden; background: #222; }
.calc-shot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 500ms ease, transform 700ms var(--ease-out);
}
.showcase[data-feature="craft"] [data-feature="craft"],
.showcase[data-feature="syntax"] [data-feature="syntax"],
.showcase[data-feature="portal"] [data-feature="portal"],
.showcase[data-feature="travel"] [data-feature="travel"],
.showcase[data-feature="hopper"] [data-feature="hopper"] { opacity: 1; }
.showcase[data-feature="craft"] .calc-shot [data-feature="craft"],
.showcase[data-feature="syntax"] .calc-shot [data-feature="syntax"],
.showcase[data-feature="portal"] .calc-shot [data-feature="portal"],
.showcase[data-feature="travel"] .calc-shot [data-feature="travel"],
.showcase[data-feature="hopper"] .calc-shot [data-feature="hopper"] { transform: none; }

.calc-card {
  position: absolute;
  left: 25vw;
  top: 50%;
  transform: translateY(-50%);
  width: max(22vw, 320px);
  min-height: 52svh;
  background: var(--ink);
  color: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  z-index: 2;
}
.calc-card h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-lead);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--green);
  line-height: 1;
}

.calc-card .btn { background: var(--green); color: var(--ink); min-height: 48px; font-size: var(--step-body); }
.quiet-link { text-underline-offset: 3px; }
.quiet-link:hover { color: var(--green); }

/* Minecraft chat, an interface fragment */
.chat {
  position: absolute;
  right: var(--m);
  bottom: var(--m);
  width: min(44vw, 640px);
  z-index: 2;
  font-family: var(--text);
  font-weight: 500;
  font-size: var(--step-body);
  color: var(--white);
}
.chat-log { display: grid; }
.chat-log li {
  background: rgba(0, 0, 0, .6);
  padding: 4px 10px;
  animation: chat-in 320ms var(--ease-out) both;
  overflow-wrap: anywhere;
}
@keyframes chat-in { from { opacity: 0; transform: translateY(10px); } }
.mc-gray { color: var(--gray); }
.mc-aqua { color: var(--aqua); }
.mc-green { color: var(--green); }
.mc-red { color: var(--red); }
.mc-yellow { color: var(--yellow); }
.mc-copy {
  color: var(--aqua);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 160ms ease;
}
.mc-copy:hover { color: var(--white); text-decoration: underline; }
.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0 4px;
}
.chat-suggest button {
  background: rgba(0, 0, 0, .8);
  color: var(--gray);
  border: 0;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 120ms ease, transform 160ms var(--ease-spring);
}
.chat-suggest button:hover, .chat-suggest button:focus-visible { color: var(--yellow); transform: translateY(-2px); }
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, .75);
  padding: 8px 10px;
  cursor: text;
}
.chat-cmd { color: var(--white); }
.chat-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--aqua);
  font: inherit;
  caret-color: var(--white);
  padding: 0;
}
.chat-input input::placeholder { color: rgba(85, 255, 255, .45); }
.chat-input input:focus { outline: none; }
.chat-input:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }

/* ---------- downloads ---------- */

.downloads {
  background: var(--green);
  color: var(--ink);
  min-height: 100svh;
  padding: var(--gap-section) var(--m);
  display: grid;
  grid-template-rows: auto 1fr;
  row-gap: 24vh;
}
.downloads h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-head);
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.figure-block { align-self: end; }
.figure {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-figure);
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums lining-nums;
  display: flex;
  align-items: flex-start;
  margin-left: -0.04em;
}
.figure sup { font-size: 0.33em; line-height: 1; margin-left: 0.06em; top: 0; vertical-align: baseline; }
.figure-caption { max-width: 34ch; margin-top: 40px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .3em; }
.figure-caption b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pulse {
  align-self: center;
  width: 10px; height: 10px;
  margin-right: .35em;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(.55); opacity: .5; } }

/* ---------- other projects ---------- */

.work {
  background: var(--gold);
  color: var(--ink);
  padding: var(--gap-section) var(--m);
}
.work h2 { font-size: var(--step-lead); font-weight: 500; line-height: 1.1; margin-bottom: 48px; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-items: start;
}
.names { grid-column: 1 / 8; display: grid; }
.name-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 10px 0;
  color: var(--muted-on-gold);
  transition: color 200ms ease, transform 300ms var(--ease-out);
}
.name-link {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-head);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  transition: transform 300ms var(--ease-out);
}
.name-kind { white-space: nowrap; }
.name.is-active .name-row { color: var(--ink); }
.name.is-active .name-row { transform: translateX(12px); }
.name-pic, .name-text { display: none; }

.preview {
  grid-column: 8 / 13;
  position: sticky;
  top: 15vh;
  display: grid;
  gap: 16px;
}
.preview-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--ink);
  border-radius: 2px;
  overflow: hidden;
}
.preview-layer {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 260ms ease, transform 500ms var(--ease-out);
}
.preview-layer.show { opacity: 1; transform: none; }
.preview-layer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.preview-text { max-width: 44ch; min-height: 3em; }

/* Batcher, drawn: a mailed reply slip being read into a donation row */
.remit {
  position: absolute; inset: 0;
  container-type: inline-size;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 2.5cqw;
  padding: 3.5cqw 4cqw;
  background: #1d1d1d;
  font-family: var(--text);
}
.slip {
  position: relative;
  background: #fbfaf7;
  color: #111;
  display: grid;
  grid-template-columns: 1fr 26%;
  border-top: 2px dashed #9a9a9a;
  transform: rotate(-1.2deg);
  overflow: hidden;
  font-size: 2.15cqw;
  line-height: 1.25;
}
.slip-main { padding: 2.2cqw 2.6cqw 1.6cqw; display: grid; gap: 1.1cqw; align-content: start; }
.tear { justify-self: center; font-size: .8em; font-weight: 500; letter-spacing: .04em; margin-top: -1.4cqw; }
.slip-appeal { font-size: 1.75em; line-height: 1.1; font-weight: 500; letter-spacing: -0.01em; }
.slip-yes b { font-weight: 500; }
.slip-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2cqw; align-items: center; }
.enclosed { border: 2px solid #b3203a; display: grid; }
.enc-title { font-weight: 500; padding: .5cqw 1cqw; }
.enc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4cqw 1cqw; padding: 0 1cqw .8cqw; font-size: 1.2em; }
.box::before { content: ""; display: inline-block; width: .8em; height: .8em; border: 1.5px solid #111; margin-right: .3em; vertical-align: -.05em; }
.box.on::before { background: #111; box-shadow: inset 0 0 0 2px #fbfaf7; } /* taste-skill-ignore: inside data-ui */
.respond { border-top: 2px solid #b3203a; color: #b3203a; font-weight: 500; padding: .5cqw 1cqw; }
.respond i { color: #111; font-weight: 400; margin-left: .4em; }
.addr { font-size: 1.1em; }
.scanline { justify-self: center; font-size: 1.15em; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.slip-side {
  border-left: 2px dashed #9a9a9a;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .6cqw;
  padding: 1.5cqw;
  text-align: center;
}
.slip-side b { color: #b3203a; font-size: 1.15em; }
.qr { width: 72%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(21, 1fr); margin-top: 1cqw; }
.qr i { background: #111; }
.qr i.off { background: transparent; }
/* what Batcher has read, boxed in its own aqua */
.ocr { outline: 2px solid var(--aqua); outline-offset: .5cqw; }
.ocr.read { animation: ocr-read 1.4s ease both; }
@keyframes ocr-read { 0% { outline-color: transparent; } 40% { outline-color: var(--aqua); background-color: rgba(85, 255, 255, .25); } 100% { outline-color: var(--aqua); } }
.scan {
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--aqua);
  animation: scan 2.6s ease-in-out infinite alternate;
}
@keyframes scan { to { transform: translateY(var(--scan-h, 160px)); } }
.rows {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  color: var(--ink);
  font: 2cqw/1.3 var(--text);
  font-variant-numeric: tabular-nums;
}
.rows th, .rows td { text-align: left; padding: .7cqw 1cqw; border-bottom: 1px solid #ddd; }
.rows th { font-weight: 500; background: #eee; }
.rows tbody td { background: var(--aqua); }

/* ---------- SideFlick, in its Midnight Matinee theme ---------- */

.sideflick {
  --sf-velvet: #1b0c17;
  --sf-card: #27121f;
  --sf-surface: #321a2a;
  --sf-cream: #fff4e4;
  --sf-muted: #dcc3cf;
  --sf-popcorn: #ffc83d;
  --sf-mint: #3fe3b0;
  --sf-bubblegum: #ff5da2;
  --sf-sky: #5cc6ff;
  --sf-tomato: #ff6247;
  --sf-radius: 0.9rem;
  background: var(--sf-velvet);
  color: var(--sf-cream);
  padding: var(--gap-section) var(--m);
  display: grid;
  gap: clamp(48px, 7vw, 96px);
  overflow: hidden;
}
.sf-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; align-items: end; }
.sf-head { grid-column: 1 / 9; display: grid; gap: 24px; }
.sf-icon { width: clamp(56px, 6vw, 88px); height: auto; }
.sideflick h2 {
  font-family: "Bagel Fat One", var(--display);
  font-weight: 400;
  font-size: var(--step-display);
  line-height: .95;
  letter-spacing: -0.01em;
}
.sf-copy { grid-column: 9 / 13; display: grid; gap: 24px; }
.sf-facts { display: grid; gap: 10px; color: var(--sf-muted); }
.sf-facts b { color: var(--sf-popcorn); font-weight: 500; }
.sf-btn { justify-self: start; background: var(--sf-popcorn); color: #150910; border-radius: var(--sf-radius); min-height: 48px; padding: 0 1.4em; font-size: var(--step-body); }

.sf-screens { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; }
.sf-game { grid-column: 1 / 10; width: 100%; border-radius: var(--sf-radius); background: var(--sf-card); }
.sf-ext { grid-column: 10 / 13; width: 100%; max-height: 80svh; object-fit: cover; object-position: top; border-radius: var(--sf-radius); transform: rotate(2deg); }

/* a sample game: the playhead runs as you scroll, each question pops at its scene */
.sf-film { position: relative; display: grid; gap: 20px; padding-top: 8px; }
.sf-cards { position: relative; height: clamp(190px, 17vw, 230px); }
.sf-card {
  position: absolute;
  bottom: 0;
  left: clamp(0px, calc(var(--pin) - 140px), calc(100% - 280px));
  width: 280px;
  background: var(--sf-card);
  border-top: 6px solid var(--tone);
  border-radius: var(--sf-radius);
  padding: 16px 18px;
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateY(24px) scale(.94);
  transition: opacity 300ms ease, transform 500ms var(--ease-spring);
}
.sf-card.on { opacity: 1; transform: none; }
.sf-card.past { opacity: .35; transform: translateY(8px) scale(.96); }
.sf-type { color: var(--tone); font-weight: 500; font-size: var(--step-small); }
.sf-card p { line-height: 1.3; }
.sf-options { display: grid; gap: 6px; }
.sf-options button {
  background: var(--sf-surface);
  color: var(--sf-cream);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease-spring), border-color 160ms ease, background-color 160ms ease;
}
.sf-options button:hover { transform: translateX(4px); border-color: var(--sf-popcorn); }
.sf-options button.right { background: var(--sf-mint); color: #150910; }
.sf-options button.wrong { background: var(--sf-tomato); color: #150910; }
.sf-card-play { width: 300px; left: clamp(0px, calc(var(--pin) - 150px), calc(100% - 300px)); }
.sf-track { position: relative; height: 12px; border-radius: 6px; background: var(--sf-surface); }
.sf-fill {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--sf-bubblegum);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
.sf-pin {
  position: absolute; top: 50%; left: var(--pin);
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--sf-velvet);
  border: 4px solid var(--tone);
  transition: transform 300ms var(--ease-spring);
}
.sf-pin.hit { transform: scale(1.35); background: var(--tone); }
.sf-head-time {
  position: absolute; top: 22px;
  left: calc(var(--p, 0) * 100%);
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
  font-size: var(--step-small);
  color: var(--sf-popcorn);
  white-space: nowrap;
}
.sf-score { justify-self: end; color: var(--sf-popcorn); font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 16px; }
html:not(.js) .sf-card { position: static; opacity: 1; transform: none; margin-bottom: 12px; }
html:not(.js) .sf-cards { height: auto; }

/* ---------- contact ---------- */

.contact {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--white);
}
.contact-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
}
/* the photo starts as squares and resolves as it scrolls into focus */
.contact-pixels {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}
.contact-pixels.done { opacity: 0; transition: opacity 300ms ease; }
.visit {
  position: absolute;
  top: 60px;
  left: 60px;
  width: 380px;
  z-index: 1;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 20px;
}
.visit h2 { font-size: var(--step-lead); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
.visit dl { display: grid; gap: 8px; }
.visit dl div { display: flex; justify-content: space-between; gap: 16px; }
.visit dt { font-weight: 500; }
.visit dd a { text-underline-offset: 3px; }
.visit .btn { margin-top: 8px; padding: 0 1.2em; }

/* ---------- footer ---------- */

.foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
  background: var(--ink);
  color: var(--aqua);
}
.foot-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.foot-menu {
  padding: 80px var(--m) var(--m) calc(var(--m) + 4vw);
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.menu { display: grid; gap: 20px; }
.menu a {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-head);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  transition: transform 260ms var(--ease-out), color 200ms ease;
}
.menu:hover a { color: #2a9a9a; }
.menu a:hover, .menu a:focus-visible { color: var(--aqua); transform: translateX(12px); }
.foot-blocks { display: flex; gap: 48px; color: var(--white); }
.foot-blocks a { color: var(--aqua); text-underline-offset: 3px; }
.legal { margin-top: auto; font-size: var(--step-small); color: var(--white); max-width: 60ch; }

/* ---------- reveals ---------- */

html.js [data-reveal] > * {
  opacity: 0;
  transform: translateY(24px);
}
html.js [data-reveal].in > * {
  opacity: 1;
  transform: none;
  transition: opacity 700ms ease, transform 800ms var(--ease-out);
  transition-delay: calc(var(--k, 0) * 80ms);
}
html.js .calc-card[data-reveal] > *, html.js .visit[data-reveal] > * { transform: translateY(16px); }

/* ---------- phone and tablet ---------- */

@media (max-width: 899px) {
  .history.pin .stage { display: flex; flex-direction: column; padding: var(--m); gap: 20px; }
  .history.pin .bar { margin-bottom: auto; }
  .history.pin .support { margin-bottom: auto; }
  .history.pin .bar { position: static; padding: 0; animation: none; }
  .history.pin .split { font-size: min(9vw, 4rem); display: contents; }
  .history.pin .half { position: static; transform: none; }
  .history.pin .half-l { order: 1; }
  .history.pin .reel-window { order: 2; position: relative; top: auto; bottom: auto; left: auto; transform: none; width: 100%; max-width: 620px; align-self: center; flex: none; height: var(--win-h, 60svh); overflow: hidden; }
  .history.pin .half-r { order: 3; }
  .history.pin .support { order: 4; position: static; width: auto; }
  .history.pin .half-l { animation-name: from-left-m; }
  .history.pin .half-r { animation-name: from-right-m; }
  @keyframes from-left-m { from { opacity: 0; transform: translateX(-40px); } }
  @keyframes from-right-m { from { opacity: 0; transform: translateX(40px); } }
  .frame { aspect-ratio: 16 / 11; }
  .profile-bio { display: none; }
  .history.pin .support { position: static; text-align: left; max-width: none; }

  .bar nav a[href="#projects"], .bar nav a[href="#contact"] { display: none; }


  .showcase { display: flex; flex-direction: column; min-height: 0; }
  .showcase-bg { position: relative; inset: auto; height: 56svh; }
  .calc-card { position: relative; left: auto; top: auto; transform: none; width: auto; min-height: 0; margin: -80px 16px 0; text-align: left; }
  .chat { position: relative; right: auto; bottom: auto; width: auto; margin: 24px 16px 32px; }

  .downloads { row-gap: 18vh; min-height: 80svh; }
  .figure { font-size: 21vw; }

  .work-grid { display: block; }
  .preview { display: none; }
  .names { gap: 56px; }
  .name-pic { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--ink); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
  .name-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
  .name-text { display: block; }
  .name-row { color: var(--ink); flex-direction: column; gap: 4px; padding: 0 0 8px; }
  .name.is-active .name-row { transform: none; }

  .sf-top, .sf-screens { display: grid; grid-template-columns: 1fr; }
  .sf-head, .sf-copy, .sf-game { grid-column: auto; }
  .sf-ext { display: none; }
  .sf-cards { height: auto; display: grid; gap: 12px; }
  .sf-card, .sf-card-play { position: relative; left: auto; width: auto; bottom: auto; }
  .sf-card:not(.on):not(.past) { display: none; }

  .contact { min-height: 0; display: flex; flex-direction: column; }
  .contact-bg { position: relative; height: 70svh; }
  .visit { position: relative; top: auto; left: auto; width: auto; margin: -80px 16px 48px; }
  .contact-pixels { height: 70svh; }

  .foot { grid-template-columns: 1fr; }
  .foot-photo { height: 50svh; }
  .foot-menu { padding: 40px var(--m) var(--m); }
  .foot-blocks { flex-direction: column; gap: 20px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  html.js [data-reveal] > * { opacity: 1; transform: none; }
  .cell::after, .mcell { opacity: 1; transform: none; }
  .pulse, .scan, .ocr.read { animation: none; }
  .sf-card { opacity: 1; transform: none; }
}
