/* ---------- Themes (pick with the swatch in the dock) ---------- */
:root, [data-theme="meadow"] {
  --bg: #f5f2ea;
  --bg-alt: #ecebe2;
  --card: #fbfaf5;
  --ink: #26382d;
  --muted: #6d7a70;
  --accent: #4f6b2e;
  --accent-ink: #f5f2ea;
  --line: rgb(38 56 45 / .12);
  --g0: #e6e4d9; --g1: #c6d4a8; --g2: #95b06b; --g3: #66863e; --g4: #3f5a22;
}
[data-theme="pinkcity"] {
  --bg: #f7f0eb;
  --bg-alt: #f0e4dd;
  --card: #fcf8f5;
  --ink: #3b2a2c;
  --muted: #86706f;
  --accent: #b9566c;
  --accent-ink: #fbf3ef;
  --line: rgb(59 42 44 / .12);
  --g0: #ece0da; --g1: #ebbcc4; --g2: #d98a99; --g3: #b9566c; --g4: #7f3445;
}
[data-theme="lake"] {
  --bg: #f1f3ef;
  --bg-alt: #e4e9e6;
  --card: #f9fbf9;
  --ink: #21323a;
  --muted: #687880;
  --accent: #2f6f86;
  --accent-ink: #eef4f5;
  --line: rgb(33 50 58 / .12);
  --g0: #dde4e2; --g1: #b5d3d9; --g2: #7fb1bd; --g3: #43879a; --g4: #24576a;
}

:root {
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* just the pill: no track, an accent thumb that follows the section's colours */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; min-height: 48px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink); background-clip: padding-box; }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-color: var(--accent) transparent; } } /* Firefox */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background .5s, color .5s;
}
a { color: inherit; }
img.pixel-icon, .hero-art { image-rendering: pixelated; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
/* Read by screen readers, invisible on screen */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-art {
  position: absolute;
  inset: -4%;
  background: url("assets/hero.webp") center 60% / cover no-repeat;
  transform: scale(1.04);
  will-change: transform;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--tod-tint, transparent), transparent 70%);
}
:root[data-tod="morning"] { --tod-tint: rgb(255 226 170 / .16); }
:root[data-tod="evening"] { --tod-tint: rgb(255 112 84 / .18); }
:root[data-tod="night"] { --tod-tint: rgb(24 34 96 / .36); }
.hero-art::after { /* soft wash so the words read over the sky */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgb(60 40 30 / .28), transparent 70%),
    linear-gradient(transparent 65%, rgb(20 30 20 / .35));
}
.pollen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
  position: relative;
  width: min(900px, calc(100% - 32px));
  padding: 12vh 0 16vh;
  text-align: center;
}
.hero-title {
  margin: 0;
  font: 400 clamp(3rem, 8vw, 6.2rem)/1 var(--serif);
  letter-spacing: -.01em;
  text-shadow: 0 2px 24px rgb(40 25 15 / .35);
}
.hero-sub {
  margin: .6em 0 0;
  font: italic 400 clamp(1.15rem, 2.2vw, 1.55rem) var(--serif);
  opacity: .95;
  text-shadow: 0 1px 14px rgb(40 25 15 / .4);
}
.trail-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 6vh 0 18px;
  font: 400 .8rem var(--pixel);
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .9;
}
.trail-label span { width: 56px; height: 1px; background: rgb(255 255 255 / .6); }
/* Three frosted-glass cards, each with its pixel icon; a light sweeps across on hover */
.trails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 188px;
  padding: 18px 20px 18px;
  border: 1px solid rgb(255 255 255 / .34);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(255 255 255 / .24), rgb(255 255 255 / .07) 46%, rgb(40 25 15 / .2));
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), inset 0 -1px 0 rgb(0 0 0 / .08), 0 22px 44px -26px rgb(40 18 6 / .65);
  overflow: hidden;
  text-decoration: none;
  text-align: left;
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), border-color .25s, background .25s;
}
.trail::before { /* the light sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgb(255 255 255 / .32) 46%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .9s ease;
  pointer-events: none;
}
.trail img { height: 52px; width: auto; margin-bottom: auto; image-rendering: pixelated; filter: drop-shadow(0 5px 0 rgb(40 20 10 / .22)); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.trail em { position: absolute; top: 16px; right: 18px; font: 400 .7rem var(--pixel); letter-spacing: .14em; opacity: .75; }
.trail strong { margin-top: 18px; font: 400 1.55rem/1.08 var(--serif); text-shadow: 0 1px 10px rgb(40 25 15 / .35); }
.trail small { font: italic .98rem var(--serif); opacity: .82; }
.trail i { position: absolute; right: 18px; bottom: 16px; font-style: normal; transition: transform .25s; }
.trail:hover { transform: translateY(-5px); border-color: rgb(255 255 255 / .6); background: linear-gradient(160deg, rgb(255 255 255 / .3), rgb(255 255 255 / .1) 46%, rgb(40 25 15 / .16)); }
.trail:hover::before { transform: translateX(120%); }
.trail:hover img { transform: translateY(-6px) rotate(-4deg); }
.trail:hover i { transform: translateX(4px); }

/* ---------- The pixel me who walks the page (drawn by guide.js) ---------- */
/* one see-through layer over the page: him, his rope and the coins he drops */
.guide { position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none; }
body.guide-hover { cursor: pointer; }
/* what he says while hanging around (and the campfire / footer thoughts below) */
.guide-say, .think {
  margin: 0;
  padding: 6px 12px 5px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: 400 1.2rem/1.05 "VT323", var(--pixel), monospace;
  white-space: nowrap;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 18%, transparent);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.guide-say { position: fixed; left: 0; top: 0; z-index: 16; }
/* on a trail stop it's a thought: a soft cloud with the step's detail */
.guide-say.cloud { width: max-content; max-width: 270px; padding: 9px 14px 8px; border-radius: 22px; white-space: normal; font-size: 1.12rem; line-height: 1.12; }
.guide-say.cloud::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 9px;
  height: 9px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
}
.guide-say.on, .think.on { opacity: 1; }
/* thought bubbles get the little trail of circles */
.think::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 9px;
  height: 9px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
  box-shadow: 10px 10px 0 -3px var(--card), 10px 10px 0 -1px var(--ink);
}

/* ---------- Sections ---------- */
main { position: relative; }
.section { padding: 120px max(24px, calc((100% - 1040px) / 2)); }
.section.alt { background: var(--bg-alt); transition: background .5s; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.section-head.flip { flex-direction: row-reverse; text-align: right; }
.section-head h2 { margin: 0; font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--serif); }
.section-head h2 span { color: var(--accent); transition: color .5s; }
.section-head p { margin: .5em 0 0; font: italic 1.15rem var(--serif); color: var(--muted); }
.pixel-icon { width: 88px; height: auto; flex: none; animation: bob 3.5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background .5s, border-color .5s;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Projects ---------- */
/* the Workshop: a pinned stage, and one row of projects that slides along as you scroll */
#workshop { overflow-x: clip; } /* the row runs edge to edge; clip (not hidden) so the stage can still pin */
.ws-pin { position: relative; }
.ws-stage { position: sticky; top: 3vh; }
.ws-stage .section-head { margin-bottom: 20px; }
/* the row spans the whole screen, fading out at both edges; it starts and ends in line with the heading */
.ws-window {
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 6px 0 14px; /* room for the cards' offset shadows */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
}
.projects { display: flex; align-items: stretch; gap: 22px; width: max-content; padding: 0 var(--lead, 24px); will-change: transform; }
.projects > .project { flex: none; width: clamp(300px, 23vw, 430px); }
.projects .thumb { width: 100%; } /* a button only shrink-wraps its content otherwise */
.projects > .project.extra .window-bar { background: #2a2418; } /* side quests: a warmer bar */
.side-quests {
  flex: none;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  width: min(240px, 60vw);
  padding: 24px;
  border: 3px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, #f1bf45 12%, var(--card));
  text-align: center;
}
.side-quests svg { width: 56px; height: 56px; }
.side-quests b { font: 400 .9rem var(--pixel); letter-spacing: .1em; text-transform: uppercase; }
.side-quests span { color: var(--muted); font: 400 1.15rem/1.2 "VT323", var(--pixel), monospace; }
.side-quests i { font: 400 1.6rem var(--pixel); color: var(--accent); font-style: normal; animation: nudge-x 1s steps(2, jump-none) infinite; }
@keyframes nudge-x { 50% { transform: translateX(5px); } }
.ws-progress { display: flex; align-items: center; gap: 14px; margin-top: 6px; font: 400 1.2rem/1 "VT323", var(--pixel), monospace; color: var(--muted); }
.ws-bar { flex: 1; max-width: 420px; height: 12px; padding: 2px; border: 2px solid var(--ink); border-radius: 3px; background: var(--bg); }
.ws-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.ws-hint { transition: opacity .4s; }
.ws-progress button {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font: 400 .8rem var(--pixel);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, opacity .2s;
}
.ws-progress button:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.ws-progress button:disabled { opacity: .35; cursor: default; }
/* phones and touch screens: a row you swipe, cards snapping into place, and no pinning */
.ws-stage.swipe { position: static; }
.ws-stage.swipe .ws-window {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--lead, 16px);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.ws-stage.swipe .ws-window::-webkit-scrollbar { display: none; }
.ws-stage.swipe .projects { transform: none !important; }
.ws-stage.swipe .projects > * { scroll-snap-align: start; }
/* a sideways swipe over the row must never turn into the browser's back/forward gesture */
html { overscroll-behavior-x: none; }
.ws-stage.ended .ws-hint { opacity: 0; }
/* a short laptop screen: drop the tagline and pin higher, so the progress bar clears the dock */
@media (min-width: 760px) and (max-height: 820px) {
  .ws-stage { top: 10px; }
  .ws-stage .section-head p { display: none; }
  .ws-stage .section-head { margin-bottom: 12px; }
  .projects .thumb { aspect-ratio: 2 / 1; } /* flatter covers, so the row clears the dock */
  .projects .project-body { padding-top: 14px; padding-bottom: 14px; }
  .projects .project-head { margin-bottom: 8px; }
}
/* a card with no capture yet: its icon on a dark screen */
.thumb .screen { display: grid; place-content: center; justify-items: center; gap: 10px; width: 100%; aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 40%, #2c3446, #161a24 70%); color: #c9cfdb; font: 400 1.4rem "VT323", var(--pixel), monospace; }
.thumb .screen svg { width: 72px; height: 72px; }
/* the Workshop's cards wear the Inventory pouches' pixel frame */
.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--ink) 18%, transparent), 5px 5px 0 color-mix(in srgb, var(--ink) 16%, transparent);
  transition: transform .3s, box-shadow .3s, background .5s;
}
/* the cover is a little browser window: a dark bar with the live site's address, the capture below */
.project .window { position: relative; margin: 12px 12px 0; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; background: #1f2430; }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px 6px; color: #c9cfdb; font: 400 1.05rem/1 "VT323", var(--pixel), monospace; }
.window-bar i { flex: none; width: 8px; height: 8px; background: #c0473a; }
.window-bar i:nth-child(2) { background: #f1bf45; }
.window-bar i:nth-child(3) { background: #66863e; }
.window-bar .host { flex: 1; min-width: 0; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-bar .on-air { flex: none; color: #7ee0a2; animation: blink 2.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .45; } }
.project .thumb { border-bottom: 0; }
#projects .project { cursor: pointer; }
/* a hackathon win, pinned to the corner of the window */
.ribbon {
  position: absolute;
  top: 40px;
  right: 10px;
  z-index: 1;
  padding: 5px 10px 4px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: #f1bf45;
  color: #3a2a10;
  font: 400 1.1rem/1 "VT323", var(--pixel), monospace;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--ink) 55%, transparent);
  transform: rotate(3deg);
}
.project .tag { margin-left: 10px; padding: 3px 7px 2px; border: 2px solid var(--accent); border-radius: 4px; color: var(--accent); font: 400 .6rem var(--pixel); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.project-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.project-icon { /* an item slot holding the project's icon */
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 6px;
  background: linear-gradient(135deg, transparent 0 72%, color-mix(in srgb, var(--accent) 14%, transparent) 72%), var(--bg);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ink) 8%, transparent);
}
.project-icon svg { width: 36px; height: 36px; }
.project:hover .project-icon svg { animation: hop .5s steps(3, end) 1; }
@keyframes hop { 50% { transform: translateY(-4px); } }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 20px; }
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #1d1d1d;
  overflow: hidden;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease, filter .4s; }
.thumb:hover img { transform: scale(1.04); filter: brightness(.85); }
.thumb .play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 54px;
  padding-left: 4px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  color: var(--accent);
  font: 400 1.7rem/1 var(--pixel);
  transform: translate(-50%, -50%);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.thumb:hover .play { transform: translate(calc(-50% - 2px), calc(-50% - 2px)); box-shadow: 6px 6px 0 var(--ink); }
.thumb:active .play { transform: translate(calc(-50% + 3px), calc(-50% + 3px)); box-shadow: 1px 1px 0 var(--ink); }
.thumb .watch {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px 3px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font: 400 1.05rem/1 "VT323", var(--pixel), monospace;
}

/* Demo video player */
.player {
  width: min(880px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}
.pm.project { max-height: calc(100vh - 28px); overflow: auto; background: var(--card); cursor: auto; }
.pm.project > * { flex-shrink: 0; } /* a long write-up scrolls; it never squashes the video */
.pm.project:hover { transform: none; box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--ink) 18%, transparent), 5px 5px 0 color-mix(in srgb, var(--ink) 16%, transparent); }
.pm .window-bar form { margin: 0 0 0 6px; }
.pm-x { padding: 1px 7px; border: 2px solid #3a4256; border-radius: 4px; background: none; color: #c9cfdb; font: 400 1.05rem/1 "VT323", var(--pixel), monospace; cursor: pointer; }
.pm-x:hover { border-color: #c9cfdb; color: #fff; }
.pm .player-frame { border-radius: 0; box-shadow: none; }
.pm .player-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm .player-frame [hidden] { display: none; }
.pm-body { padding: 18px 24px 22px; }
.pm-won { display: inline-block; margin: 0 0 12px; padding: 5px 10px 4px; border: 3px solid var(--ink); border-radius: 4px; background: #f1bf45; color: #3a2a10; font: 400 1.1rem/1 "VT323", var(--pixel), monospace; }
.pm-won[hidden] { display: none; }
.pm .pm-text { margin: 0 0 12px; color: var(--ink); font-size: 1.02rem; line-height: 1.6; }
.pm-details { margin: 0 0 18px; padding-left: 20px; color: var(--muted); line-height: 1.55; }
.pm-details li { margin-bottom: 6px; }
.pm-details li::marker { content: "❖  "; color: var(--accent); }
.player::backdrop { background: rgb(15 20 15 / .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.player-frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player form { display: flex; justify-content: center; margin-top: 14px; }
.player-close {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 400 1.05rem var(--serif);
  cursor: pointer;
}
.project:hover { transform: translate(-2px, -4px); box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--ink) 18%, transparent), 8px 9px 0 color-mix(in srgb, var(--ink) 18%, transparent); }
.project .kind { font: 400 .75rem var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.project h3 { margin: 4px 0 0; font: 400 2rem/1.05 var(--serif); }
/* the tech chips are item slots, like the Inventory's */
.project .chips li {
  padding: 4px 9px 3px;
  border: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 5px;
  background: linear-gradient(135deg, transparent 0 72%, color-mix(in srgb, var(--accent) 14%, transparent) 72%), var(--bg);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ink) 8%, transparent);
  font: 400 1.15rem/1 "VT323", var(--pixel), monospace;
  color: var(--ink);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.chips li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .78rem;
  color: var(--muted);
}
.project p { margin: 0 0 20px; color: var(--muted); font-size: .95rem; }
.project .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.project .actions .btn {
  padding: 7px 14px 6px;
  border: 3px solid var(--ink);
  border-radius: 5px;
  font: 400 1.3rem/1 "VT323", var(--pixel), monospace;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.project .actions .btn.ghost { background: var(--card); color: var(--ink); }
.projects .actions { gap: 8px; }
.projects .actions .btn { padding: 6px 11px 5px; font-size: 1.2rem; } /* three buttons fit one row on a narrow card */
.project .actions .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.project .actions .btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform .2s, background .3s, color .3s;
}
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border: 1px solid var(--line); }
.btn:hover { transform: translateY(-1px); }

/* ---------- Journey: pinned, scroll moves through the stops ---------- */
.jr { position: relative; height: calc(var(--n, 3) * 55vh + 45vh); } /* each stop gets about half a screen of scrolling */
.jr-sticky {
  position: sticky;
  top: clamp(64px, 10vh, 112px);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px 34px;
  align-items: start;
}
.jr-rail { position: absolute; left: 11px; top: 14px; width: 2px; height: calc(var(--n, 3) * 92px - 50px); background: var(--line); }
.jr-rail-fill { position: absolute; inset: 0 0 auto 0; height: calc(var(--jp, 0) * 100%); background: var(--accent); }
.jr-steps { display: grid; gap: 22px; }
.jr-step {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 2px 0 0 40px;
  border: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color .4s;
}
.jr-step b { font: 400 1.5rem/1.1 var(--serif); }
.jr-step small { font: 400 .68rem var(--pixel); letter-spacing: .08em; text-transform: uppercase; }
.jr-dot {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 4px;
  background: var(--bg);
  transform: rotate(45deg);
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.jr-step.past .jr-dot { background: color-mix(in srgb, var(--accent) 55%, var(--bg)); border-color: var(--accent); }
.jr-step.on { color: var(--ink); }
.jr-step.on .jr-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.jr-panels { display: grid; } /* panels stack in one cell, so the box never resizes while switching */
/* the pinned Journey (steps, the tallest panel and the team stage) has to clear the dock on shorter laptop screens */
@media (min-width: 760px) and (max-width: 1100px) { .jr-sticky { grid-template-columns: 230px 1fr; } }
@media (min-width: 760px) and (max-height: 900px) { .jr-panel .chips { display: none; } .jr-panel ul { margin-bottom: 0; } }
.jr-panel {
  grid-area: 1 / 1;
  align-self: start; /* a short panel stays short; the cell keeps the tallest one's height */
  padding: 28px 30px 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1), visibility 0s .45s;
}
.jr-panel.on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.jr-meta { font: 400 .7rem var(--pixel); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.jr-panel h3 { margin: 8px 0 0; font: 400 2.1rem/1.05 var(--serif); }
.jr-panel .at { display: block; margin-bottom: 16px; font: italic 1.25rem var(--serif); color: var(--accent); }
.jr-panel ul { margin: 0 0 18px; padding: 0 0 0 20px; color: var(--muted); }
.jr-panel li { margin-bottom: 8px; }
.jr-panel li::marker { content: "❖  "; color: var(--accent); }
.jr-panel .chips { margin: 0; }

/* The team scene under the panel: one wide stage per stop, and a level-up between them */
.jr-side { position: relative; }
.stage {
  position: relative;
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 0 8px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(color-mix(in srgb, var(--accent) 7%, var(--card)), var(--card));
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--ink) 18%, transparent), 5px 5px 0 color-mix(in srgb, var(--ink) 16%, transparent);
  overflow: hidden;
}
.stage canvas { display: block; margin: 0 auto; image-rendering: pixelated; }
.stage figcaption { padding: 0 16px; font: 400 1.15rem/1.2 "VT323", var(--pixel), monospace; color: var(--muted); }
.stage figcaption b { font: 400 .72rem var(--pixel); color: var(--accent); }
.stage figcaption span:first-of-type { color: var(--ink); }
/* levelling up: the stage shakes, flashes white, and LEVEL UP! slams in */
.stage::after { content: ""; position: absolute; inset: 0; background: #fffdf4; opacity: 0; pointer-events: none; }
.stage.evolving { animation: shake .6s steps(12, end) 1; }
.stage.evolving::after { animation: flash .9s ease-out .1s 1; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-4px, 2px) rotate(-1deg); }
  40% { transform: translate(4px, -2px) rotate(1deg); }
  60% { transform: translate(-3px, -1px); }
  80% { transform: translate(3px, 1px); }
}
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.evo-stamp {
  position: absolute;
  left: 50%;
  top: 30%;
  z-index: 2;
  padding: 4px 12px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #ffd34a;
  color: var(--ink);
  font: 400 1rem var(--pixel);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-8deg) scale(2.4);
  pointer-events: none;
}
.stage.evolving .evo-stamp { animation: stamp 1.5s cubic-bezier(.2, 1.6, .4, 1) .15s 1; }
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.4); }
  25% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80%) rotate(-8deg) scale(1); }
}

/* ---------- Minimum hand-holding: an RPG dialogue ---------- */
.rpg { display: grid; margin-bottom: 80px; }
.rpg-scene, .rpg-box {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--ink) 25%, transparent), 6px 6px 0 color-mix(in srgb, var(--ink) 18%, transparent);
}
/* the workshop: a warm wall over floorboards; the canvas draws the room's contents */
.rpg-scene {
  height: 250px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgb(74 52 38 / .07) 46px 48px),
    linear-gradient(color-mix(in srgb, #f3e2bf 82%, var(--card)), color-mix(in srgb, #e8cf9f 82%, var(--card)) 84%, #b07f4f 84.2%, #94673d);
}
.rpg-scene canvas { position: absolute; left: 0; top: 0; }
/* the dialogue box sits over the bottom of the scene, the way a game draws it */
.rpg-box { z-index: 1; margin: -26px 22px 0; }
.rpg-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 30px 24px;
  background: var(--card);
  cursor: default;
}
.rpg-name {
  position: absolute;
  top: -16px;
  left: 20px;
  padding: 3px 12px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 400 .8rem var(--pixel);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rpg-text { margin: 0; min-height: 4.4em; font: 400 1.75rem/1.25 "VT323", var(--pixel), monospace; color: var(--ink); }
.rpg-choices { display: flex; flex-wrap: wrap; gap: 8px 22px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.rpg.ask .rpg-choices { opacity: 1; transform: none; pointer-events: auto; }
.rpg-choices button {
  position: relative;
  padding: 2px 0 2px 22px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 400 1.45rem "VT323", var(--pixel), monospace;
  cursor: pointer;
}
.rpg-choices button::before { content: "▶"; position: absolute; left: 0; top: 50%; font-size: .8em; color: var(--accent); opacity: 0; transform: translateY(-50%); }
.rpg-choices button:hover, .rpg-choices button:focus-visible, .rpg-choices button.picked { color: var(--ink); }
.rpg-choices button:hover::before, .rpg-choices button:focus-visible::before, .rpg-choices button.picked::before { opacity: 1; animation: nudge .8s steps(2, jump-none) infinite; }
@keyframes nudge { 50% { transform: translate(3px, -50%); } }
.rpg-next { position: absolute; right: 18px; bottom: 12px; color: var(--accent); font-size: .8rem; opacity: 0; }
.rpg-box.done .rpg-next { opacity: 1; animation: bob 1s steps(2, jump-none) infinite; }

.sub-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  font: 400 .78rem var(--pixel);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sub-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- The trail: a lantern walks it as you scroll, and finds me at the end ---------- */
/* the trail pins in the middle of the screen for a stretch of scrolling, one stop at a time */
.trail-pin { position: relative; height: calc(5 * 24vh + 50vh); margin-bottom: 280px; } /* the bottom margin is room for the crew strip */
.walk { position: sticky; top: 34vh; }
.walk-path { position: relative; z-index: 1; padding-top: 6px; }
.trail-fx { position: absolute; left: 0; top: 0; pointer-events: none; }
.trail-line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 31px;
  height: 2px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, transparent) 0 8px, transparent 8px 14px);
}
.trail-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); box-shadow: 0 0 12px rgb(255 197 107 / .7); } /* sized by guide.js to follow him */
.workflow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.workflow li { position: relative; text-align: center; padding: 0 2px; opacity: .45; transition: opacity .5s; }
.workflow li.lit { opacity: 1; }
.workflow .node {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
  font: 400 .95rem var(--pixel);
  box-shadow: 0 0 0 6px var(--bg-alt);
  transition: background .4s, color .4s, border-color .4s, box-shadow .4s;
}
.workflow li.lit .node {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 6px var(--bg-alt), 0 0 22px 2px rgb(255 190 90 / .55);
}
.workflow b { display: block; font: 400 1.35rem/1.1 var(--serif); }
.workflow li.lit .node { animation: stomp .3s ease-out 1; } /* a little squash when he lands on it */
.stop-detail { display: none; }
@keyframes stop-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes stomp { 40% { transform: scaleY(.86) translateY(3px); } }

/* ---------- Inventory: every skill on show, one pouch per group ---------- */
.bag { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pouch {
  padding: 14px 16px 16px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--ink) 18%, transparent), 5px 5px 0 color-mix(in srgb, var(--ink) 16%, transparent);
}
.pouch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pouch-head svg { width: 26px; height: 26px; flex: none; }
.pouch-head b { font: 400 .8rem var(--pixel); letter-spacing: .1em; text-transform: uppercase; }
.pouch-head small { margin-left: auto; font: 400 1.05rem "VT323", var(--pixel), monospace; color: var(--muted); }
.slots { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.slot {
  padding: 5px 10px 4px;
  border: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 5px;
  background: linear-gradient(135deg, transparent 0 72%, color-mix(in srgb, var(--accent) 14%, transparent) 72%), var(--bg);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ink) 8%, transparent);
  font: 400 1.25rem/1 "VT323", var(--pixel), monospace;
  opacity: 0;
  transform: translateY(-16px) scale(.8);
  transition: border-color .2s, box-shadow .2s;
}
.pouch.open .slot { animation: drop .5s cubic-bezier(.3, 1.6, .5, 1) var(--d, 0ms) forwards; }
@keyframes drop { to { opacity: 1; transform: none; } }
.slot:hover { border-color: var(--accent); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--accent) 30%, transparent), 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---------- Trophy room: the loot, then the shelf ---------- */
.loot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 22px; }
.loot-main, .loot-side > div { border-radius: var(--radius); padding: 26px 30px; }
.loot-main {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 190px;
  background:
    radial-gradient(circle at 85% 20%, rgb(255 210 120 / .35), transparent 45%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  color: var(--accent-ink);
  overflow: hidden;
}
.loot-main small, .loot-side small { font: 400 .72rem var(--pixel); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.loot-main strong { font: 400 clamp(3.6rem, 9vw, 6.4rem)/.95 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.loot-side { display: grid; gap: 18px; }
.loot-side > div { display: grid; align-content: center; background: var(--card); border: 1px solid var(--line); }
.loot-side strong { font: 400 2.8rem/1 var(--serif); color: var(--accent); }
.loot-side small { color: var(--muted); margin-top: 4px; }
.loot.rain .loot-main::after { /* a little shower of pixel coins */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, #ffd56b 3px, transparent 3.5px),
    radial-gradient(circle, #ffe9a8 2px, transparent 2.5px);
  background-size: 90px 90px, 60px 60px;
  background-position: 10px -40px, 40px -60px;
  animation: coins 1.8s ease-in forwards;
  pointer-events: none;
}
@keyframes coins { to { background-position: 10px 260px, 40px 300px; opacity: 0; } }

.trophies { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trophy {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 22px;
  transition: transform .3s, box-shadow .3s, background .5s;
}
.trophy:hover { transform: translateY(-4px); box-shadow: 0 16px 34px -22px rgb(30 40 30 / .45); }
.trophy-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.trophy .prize { font: 400 1.9rem/1 var(--serif); color: var(--ink); }
.trophy.paid .prize { color: #a8761a; }
.trophy .yr { font: 400 .72rem var(--pixel); color: var(--muted); }
.trophy .place { font: 400 .72rem var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.trophy b { font: 400 1.3rem/1.15 var(--serif); margin-top: 6px; }
.trophy .proj { margin-top: 2px; font-size: .88rem; color: var(--accent); font-weight: 500; }
.trophy .solo { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font: 400 .62rem var(--pixel); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.trophy p { margin: 8px 0 0; font-size: .88rem; color: var(--muted); }
.trophy.paid { background: linear-gradient(var(--card), color-mix(in srgb, #ffd56b 12%, var(--card))); }

/* ---------- GitHub garden ---------- */
.garden { padding: 22px 24px; }
/* pinned while he waters the whole bed. The extra scroll his walk takes has to be content, not padding:
   a sticky card can't move into its container's padding, so with padding it never pins. */
.garden-pin::after { content: ""; display: block; height: 50vh; }
.garden-pin > .garden { position: sticky; top: 26vh; } /* roughly the middle of the screen */
.garden-top, .garden-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .88rem; }
.garden-top span { font: 400 1.3rem var(--serif); }
.garden-top a { color: var(--muted); text-decoration: none; }
.garden-scroll { overflow-x: auto; margin: 6px 0 16px; padding: 64px 0 4px; } /* the top padding is headroom for the gardener */
.garden-bed { position: relative; width: max-content; margin: 0 auto; }
.gardener { position: absolute; left: 0; z-index: 1; pointer-events: none; }
.garden-plants {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 3px;
  align-items: end;
  height: 52px;
  margin-bottom: 3px;
  border-bottom: 3px solid color-mix(in srgb, var(--g4) 45%, #8a6a45);
}
.garden-plants i { position: relative; justify-self: center; width: 3px; height: 0; background: var(--g3); transition: height .9s steps(6, end); }
.garden-plants i.wet { height: var(--h, 0px); } /* each plant grows once it's been watered */
.garden-plants i::before, .garden-plants i::after { /* two pixel leaves */
  content: "";
  position: absolute;
  top: 35%;
  width: 4px;
  height: 3px;
  background: var(--g2);
  opacity: 0;
  transition: opacity .3s .6s;
}
.garden-plants i::before { right: 3px; }
.garden-plants i::after { left: 3px; top: 55%; background: var(--g3); }
.garden-plants i.wet::before, .garden-plants i.wet::after { opacity: 1; }
.garden-plants i.bloom { background: var(--g4); }
.garden-plants i.bloom::before { /* a flower on the best weeks */
  top: -4px;
  right: -2px;
  width: 7px;
  height: 6px;
  background: radial-gradient(circle, #ffd25e 1.5px, #f08aa3 2px);
  border-radius: 2px;
}
.garden-plants i.tuft { width: 5px; height: 0; background: none; border-bottom: 2px solid var(--g2); transition: none; }
.garden-plants i.tuft::before, .garden-plants i.tuft::after { display: none; }
/* the sprout in the heading grows up out of its pot */
#garden.grow .pixel-icon { animation: sprout 1s steps(5, end) 1, bob 3.5s ease-in-out 1s infinite; transform-origin: 50% 100%; }
@keyframes sprout { from { transform: scaleY(.25); } }
.garden-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 3px; width: max-content; margin: 0 auto; }
.garden-grid i, .legend i { width: 11px; height: 11px; border-radius: 2px; background: var(--g0); transition: background .5s; }
.garden-grid i[data-l="1"], .legend i[data-l="1"] { background: var(--g1); }
.garden-grid i[data-l="2"], .legend i[data-l="2"] { background: var(--g2); }
.garden-grid i[data-l="3"], .legend i[data-l="3"] { background: var(--g3); }
.garden-grid i[data-l="4"], .legend i[data-l="4"] { background: var(--g4); }
.garden-foot { color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 3px; }
.legend i { display: inline-block; }

/* ---------- The campfire, in the footer at night ---------- */
/* the ring is laid out 640 x 450 and scaled to fit its column (--camp-k, from guide.js), phones included */
.camp { position: relative; z-index: 1; width: 100%; max-width: 660px; height: calc(450px * var(--camp-k, 1)); margin: 0 auto; transform: scale(var(--camp-k, 1)); transform-origin: 50% 100%; }
.camp-ground { /* the warm light the fire throws on the grass */
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgb(255 170 80 / .32), rgb(255 140 60 / .12) 48%, transparent 70%);
  transform: translateX(-50%);
}
.fire { position: absolute; left: 50%; bottom: 82px; z-index: 2; width: 130px; transform: translateX(-50%); }
.camp-crew { position: absolute; left: calc(50% - 320px); bottom: 0; z-index: 3; pointer-events: none; }
.fire img { position: relative; width: 100%; image-rendering: pixelated; animation: flicker 1.6s steps(2, jump-none) infinite; }
@keyframes flicker { 50% { transform: scaleY(1.03) translateY(-1px); filter: brightness(1.08); } }
.fire-glow {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 340px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(rgb(255 170 70 / .38), transparent 65%);
  transform: translate(-50%, -50%);
  animation: glow 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow { 50% { opacity: .65; transform: translate(-50%, -50%) scale(1.06); } }
.ember {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 4px;
  height: 4px;
  background: #ffb347;
  animation: ember 2.8s linear infinite;
  opacity: 0;
}
.ember:nth-of-type(2) { left: 42%; animation-delay: .7s; background: #ffd27a; }
.ember:nth-of-type(3) { left: 58%; animation-delay: 1.4s; }
.ember:nth-of-type(4) { left: 48%; animation-delay: 2.1s; background: #ff8a3d; }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(14px, -120px); }
}

.camper {
  position: absolute;
  display: grid;
  justify-items: center;
  text-decoration: none;
  color: var(--ink);
  outline-offset: 6px;
}
.camper-fig { position: relative; display: block; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.camper-fig img { display: block; height: 100%; image-rendering: pixelated; }
.camper-screen { position: absolute; display: grid; place-items: center; }
.camper-screen svg { width: 58%; height: auto; }
.camper-tag {
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font: 400 .7rem var(--pixel);
  letter-spacing: .06em;
}
.camper-say {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  padding: 5px 12px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font: italic 1.05rem var(--serif);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .25s, transform .3s;
  pointer-events: none;
}
.camper:hover .camper-fig, .camper:focus-visible .camper-fig { transform: translateY(-8px); }
.camper:hover .camper-say, .camper:focus-visible .camper-say { opacity: 1; transform: translate(-50%, 0); }
.camper:hover, .camper:focus-visible { z-index: 6; } /* the speech bubble must show above the pixel me, who sits behind them */
/* round the fire: four in front, four behind (me, Claude, OpenClaw, X), the near side of the fire left open */
.camper .camper-fig { height: 132px; }
.camper.back-left .camper-fig { height: 124px; }
.camper.back-right .camper-fig { height: 112px; }
.camper.front-left { left: calc(50% - 330px); bottom: 0; } /* GitHub */
.camper.back-left { left: calc(50% - 224px); bottom: 34px; } /* LinkedIn, beside GitHub */
.camper.back-right { right: calc(50% - 250px); bottom: 182px; } /* X, across the fire */
.camper.front-right { right: calc(50% - 330px); bottom: 0; } /* Email */
/* night-time: the campers sit in firelight, and their name tags glow */
.footer .camper { color: #f4ecda; }
.footer .camper-fig img { filter: brightness(.82) saturate(.92) drop-shadow(0 0 10px rgb(255 160 70 / .25)); }
.footer .camper-tag { background: rgb(20 24 44 / .7); border-color: rgb(255 255 255 / .18); color: #f4ecda; }
.footer .camper-say { background: #f4ecda; color: #1b2033; }
/* my own log, behind the fire between LinkedIn and X; empty until I arrive */
/* his log is just left of the fire, so his thought floats up over the flames, between LinkedIn and X */
.camper.me-seat { left: calc(50% - 200px); bottom: 198px; z-index: 4; transform: translateX(-50%); } /* behind the fire, facing you */
.me-seat canvas { display: block; }
.me-seat .think { position: absolute; left: 50%; bottom: calc(100% - 14px); transform: translateX(-30%); white-space: nowrap; font-size: calc(1.2rem / var(--camp-k, 1)); } /* over his head, leaning toward the fire (clear of the left edge on a phone); readable when the ring shrinks */
.camp-mail { margin: 0 0 18px; font: italic 1.1rem var(--serif); opacity: .85; }
.camp-mail a { color: #ffd27a; }

/* ---------- Footer: the same valley after dark; the words on the left, the campfire on the right ---------- */
.footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: end;
  gap: 24px;
  min-height: 100vh; /* the whole screen, on any monitor */
  min-height: 100svh;
  padding: 0 max(24px, calc((100% - 1240px) / 2)) 110px;
  background: #0e1631 url("assets/footer-night.webp") center 72% / cover no-repeat;
  color: #f4ecda;
  text-align: left;
  overflow: hidden;
}
.footer::before { /* darken the grass a touch so the words read */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 35%, rgb(8 12 28 / .55) 78%, rgb(8 12 28 / .75));
  pointer-events: none;
}
.footer-sky { position: absolute; left: 0; top: 0; pointer-events: none; }
.footer-inner { position: relative; z-index: 1; padding-bottom: 20px; }
.footer-pitch { margin: 14px 0 0; font: italic 1.2rem var(--serif); color: #ffd27a; text-wrap: balance; }
.footer-kicker { margin: 0; font: 400 .72rem var(--pixel); letter-spacing: .25em; text-transform: uppercase; opacity: .75; text-wrap: balance; }
.footer-name { margin: .12em 0 .1em; font: 400 clamp(3rem, 8vw, 5.4rem)/1 var(--serif); text-shadow: 0 2px 30px rgb(255 210 140 / .25); }
.footer-line { margin: 0; font: italic 1.2rem var(--serif); opacity: .85; text-wrap: balance; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 18px; padding: 0; list-style: none; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 8px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 999px;
  background: rgb(255 255 255 / .09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: inherit;
  font: 400 1.05rem var(--serif);
  text-decoration: none;
  transition: background .25s, transform .25s;
}
.footer-links a:hover { background: rgb(255 255 255 / .18); transform: translateY(-2px); }
.footer-links svg { width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: #f4ecda; }
.footer-top { font: 400 .72rem var(--pixel); letter-spacing: .14em; text-transform: uppercase; color: inherit; opacity: .7; text-decoration: none; }
.footer-top:hover { opacity: 1; }

/* ---------- Dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -14px rgb(20 30 20 / .4);
  transform: translateX(-50%);
  transition: background .5s;
}
.dock a {
  padding: 7px 14px;
  border-radius: 999px;
  font: 400 1.05rem var(--serif);
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  transition: background .3s, color .3s;
}
.dock a:hover { color: var(--ink); }
.dock a.active { background: var(--accent); color: var(--accent-ink); }
.dock-sep { width: 1px; height: 22px; margin: 0 6px; background: var(--line); }
.dock-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.dock-btn:hover { background: var(--line); }
.theme span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 50%, var(--g1) 50% 100%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15);
}
.music svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.music .spk { fill: currentColor; }
.music .wave { display: none; }
.music[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.music[aria-pressed="true"] .wave { display: block; }
.music[aria-pressed="true"] .mute { display: none; }
.music-hint {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: italic .95rem var(--serif);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s, transform .4s;
  pointer-events: none;
}
.music-hint.on { opacity: 1; transform: none; }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .section { padding: 84px 20px; }
  /* the icon sits beside the title, not on a row of its own */
  .section-head, .section-head.flip { flex-direction: row-reverse; justify-content: flex-end; align-items: center; text-align: left; gap: 12px; }
  .pixel-icon { width: 52px; }
  /* the whole pinned stage has to fit above the dock: a short heading, two chips, smaller buttons */
  .ws-stage .section-head { margin-bottom: 10px; }
  .ws-stage .section-head p, .ws-stage .section-head .pixel-icon { display: none; }
  .ws-window { -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
  .projects .project-body { padding: 14px 16px 16px; }
  .projects .chips li:nth-child(n + 3) { display: none; }
  .projects .project h3 { font-size: 1.7rem; }
  .projects .actions .btn { padding: 5px 10px 4px; font-size: 1.15rem; }
  .thumb .play { width: 48px; height: 44px; font-size: 1.35rem; }
  /* RPG box stacks; trail runs down the left and ends at me */
  .rpg-scene { height: 200px; }
  .rpg-box { margin: -20px 8px 0; padding: 26px 20px 22px; }
  .rpg-text { font-size: 1.45rem; }
  .trail-line { left: 25px; right: auto; top: 26px; bottom: -40px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--accent) 35%, transparent) 0 8px, transparent 8px 14px); }
  .trail-fill { inset: 0 0 auto 0; width: auto; height: 0; }
  .workflow { grid-template-columns: 1fr; gap: 18px; }
  .workflow li { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; align-items: center; text-align: left; padding: 0; }
  .workflow .node { margin: 0; grid-row: 1 / span 2; }
  .workflow li.now .stop-detail { display: block; grid-column: 2; margin-top: 4px; font: italic 1rem/1.35 var(--serif); color: var(--muted); animation: stop-in .35s ease-out; }
  .loot { grid-template-columns: 1fr; }
  .loot-side { grid-template-columns: 1fr 1fr; }
  /* the trophies become one row you swipe, the next card peeking in from the right */
  .trophies { display: flex; gap: 12px; margin: 0 -20px; padding: 4px 20px 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .trophies::-webkit-scrollbar { display: none; }
  .trophy { flex: none; width: 78vw; max-width: 320px; scroll-snap-align: start; }
  .trophies .reveal { transition-delay: 0s !important; } /* a card swiped in shows at once */
  .bag { grid-template-columns: 1fr; }
  /* hero cards stack: icon on the left */
  .trails { grid-template-columns: 1fr; gap: 10px; }
  .trail { flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 14px 18px; }
  .trail img { height: 34px; margin: 0; }
  .trail strong { margin: 0; }
  .trail em { position: static; order: -1; }
  .trail i { position: static; margin-left: auto; }
  /* the Journey stage sits under the panel, a little shorter */
  .stage figcaption { font-size: 1rem; padding: 0 10px; }
  /* footer: the words, then the campfire, then the dock */
  .footer { grid-template-columns: 1fr; padding: 64px 20px 100px; align-content: end; }
  .trail-pin { height: calc(5 * 24vh + 60vh); margin-bottom: 250px; }
  .walk { top: 14vh; }
  .trail strong { font-size: 1.35rem; }
  .trail small { display: none; }
  .dock a { padding: 6px 9px; font-size: .95rem; }
  .dock a[data-sec="home"], .dock a[data-sec="journey"] { display: none; }
  /* journey: stops become a row of tabs above the pinned panel */
  .jr { height: calc(var(--n, 3) * 50vh + 60vh); }
  .jr-sticky { top: 14px; grid-template-columns: 1fr; gap: 10px; }
  /* tabs, then the team scene, then the job: all of it has to fit above the dock while pinned */
  .jr-side { order: -2; }
  .jr-sticky .stage { order: -1; }
  .stage #evo-say { display: none; }
  .jr-panel { padding: 16px 18px 12px; }
  .jr-panel h3 { font-size: 1.55rem; }
  .jr-panel .at { margin-bottom: 8px; font-size: 1.1rem; }
  .jr-panel ul { margin-bottom: 0; padding-left: 16px; }
  .jr-panel li { margin-bottom: 5px; font-size: .9rem; }
  .jr-panel .chips { display: none; }
  .jr-rail { display: none; }
  .jr-steps { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
  .jr-step { padding: 8px 8px 8px; border-top: 3px solid var(--line); }
  .jr-step.on, .jr-step.past { border-top-color: var(--accent); }
  .jr-step b { font-size: 1.05rem; }
  .jr-step small, .jr-dot { display: none; }
  .jr-panel { padding: 18px 18px 16px; font-size: .9rem; }
  .jr-panel li { margin-bottom: 6px; }
  .jr-panel h3 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* a section scrolled out of view pauses its loops (main.js) */
.asleep, .asleep * { animation-play-state: paused !important; }

/* ---------- Phones and tablets ---------- */
/* A live blur behind the dock and the glass cards is redone on every frame the page moves under them,
   and a phone's GPU can't keep up with that while you scroll: solid backgrounds instead. The pixel
   canvases draw at 1x (guide.js) and scale up sharp. The pinned stretches are shorter, so a swipe
   always moves the page along. */
@media (hover: none), (pointer: coarse) {
  .guide, .pollen, .footer-sky { image-rendering: pixelated; }
  .dock { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
  .trail { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(160deg, rgb(255 255 255 / .3), rgb(255 255 255 / .14) 46%, rgb(40 25 15 / .42)); }
  .footer-links a { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(255 255 255 / .14); }
  .ws-stage.swipe .projects { will-change: auto; } /* a row the width of 11 cards is too big a layer for a phone */
  .trail-pin { height: calc(5 * 16vh + 45vh); }
  .jr { height: calc(var(--n, 3) * 38vh + 45vh); }
  .garden-pin::after { height: 0; }
}

.xp {
  --seg: 8px;
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  z-index: 20;
  font: 400 .72rem var(--pixel);
  color: var(--ink);
}
.xp-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -14px rgb(20 30 20 / .4);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background .5s, border-color .5s;
}
.xp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.xp-lv { letter-spacing: .08em; white-space: nowrap; }
.xp-lv b { margin-left: 2px; font-weight: 400; color: var(--accent); transition: color .5s; }
.xp-bar {
  width: calc(var(--seg) * 10);
  height: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 2px), transparent calc(var(--seg) - 2px) var(--seg));
  mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 2px), transparent calc(var(--seg) - 2px) var(--seg));
}
.xp-bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .5s ease, background .5s; }
.xp-pts { min-width: 4.2em; color: var(--muted); white-space: nowrap; transition: color .3s; }
.xp-pts.gain { color: var(--accent); }
.xp-panel {
  width: min(290px, calc(100vw - 24px));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  margin-top: 8px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 30px -14px rgb(20 30 20 / .4);
  transition: background .5s, border-color .5s;
}
.xp-title { margin: 0 0 12px; letter-spacing: .06em; }
.xp-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font: 400 1rem/1.2 var(--serif); }
.xp-list li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.xp-list li span::before { content: "□ "; font-family: var(--pixel); font-size: .8em; }
.xp-list li em { font: 400 .62rem var(--pixel); align-self: center; opacity: .7; }
.xp-list li.done { color: var(--ink); }
.xp-list li.done span::before { content: "■ "; color: var(--accent); }
.xp-toast {
  width: max-content;
  max-width: calc(100vw - 24px);
  margin: 8px 0 0;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 18%, transparent);
  font: 400 .78rem/1.3 var(--pixel);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.xp-toast.show { opacity: 1; transform: none; }
.xp.pulse .xp-btn { animation: xp-pulse .6s ease-out 1; }
@keyframes xp-pulse { 40% { transform: scale(1.07); } }
@media (max-width: 760px) {
  .xp { --seg: 5px; top: max(10px, env(safe-area-inset-top)); left: 10px; }
  .xp-btn { gap: 8px; padding: 6px 11px 6px 10px; }
  .xp-pts:not(.gain) { display: none; }
  .xp-pts { min-width: 0; }
  .xp { transition: opacity .3s; }
  .xp.away { opacity: 0; pointer-events: none; }
}
@media (hover: none), (pointer: coarse) {
  .xp-btn { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
}

.term {
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #1a1f2b;
  color: #d7dde8;
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--ink) 16%, transparent);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: #2a3142;
  border-bottom: 3px solid var(--ink);
}
.term-bar span { width: 10px; height: 10px; border-radius: 2px; background: #5d6678; }
.term-bar span:nth-child(1) { background: #d9483b; }
.term-bar span:nth-child(2) { background: #f1bf45; }
.term-bar span:nth-child(3) { background: #7ee0a2; }
.term-bar b { margin-left: 8px; font: 400 .66rem var(--pixel); letter-spacing: .08em; color: #aeb6c6; }
.term-body {
  height: 280px;
  padding: 14px 16px 6px;
  overflow-y: auto;
  font: 400 1.2rem/1.3 "VT323", var(--pixel), monospace;
  cursor: text;
}
.term-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-line a { color: #f1bf45; text-decoration: none; }
.term-line a:hover, .term-line a:focus-visible { text-decoration: underline; }
.term-cmd { color: #7ee0a2; margin-top: 6px; }
.term-err { color: #f28c6b; }
.term-form { display: flex; align-items: center; gap: 10px; padding: 4px 16px 12px; font: 400 1.2rem/1.3 "VT323", var(--pixel), monospace; }
.term-form label { color: #7ee0a2; }
.term-form input {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  outline: 0;
  background: none;
  color: #e8ecf3;
  font: inherit;
  caret-color: #7ee0a2;
}
.term-form:focus-within { background: rgb(126 224 162 / .06); }
.term-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 14px; border-top: 2px solid #2a3142; }
.term-quick button {
  padding: 4px 11px 3px;
  border: 2px solid #3a4256;
  border-radius: 5px;
  background: #232836;
  color: #d7dde8;
  font: 400 1.1rem/1 "VT323", var(--pixel), monospace;
  cursor: pointer;
}
.term-quick button:hover, .term-quick button:focus-visible { border-color: #7ee0a2; color: #7ee0a2; outline: 0; }
@media (max-width: 760px) {
  .term-body { height: 240px; padding: 12px 12px 4px; font-size: 1.1rem; }
  .term-form { padding: 4px 12px 10px; font-size: 1.1rem; }
  .term-form input { font-size: 16px; }
  .term-quick { padding: 10px 12px 12px; }
}

.xp-more { display: flex; align-items: center; gap: 7px; padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); letter-spacing: .08em; transition: color .3s; }
.xp-btn:hover .xp-more, .xp-btn:focus-visible .xp-more { color: var(--ink); }
.xp-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .25s; }
.xp-btn[aria-expanded="true"] .xp-caret { transform: rotate(180deg); }
.xp-hint {
  position: relative;
  width: max-content;
  max-width: calc(100vw - 24px);
  margin: 12px 0 0 14px;
  padding: 7px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 18%, transparent);
  font: 400 .74rem/1.3 var(--pixel);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.xp-hint::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-top: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
  background: var(--card);
  transform: rotate(45deg);
}
.xp-hint.show { opacity: 1; transform: none; }
.xp.nudge .xp-btn { animation: xp-nudge 1.6s ease-out infinite; }
@keyframes xp-nudge {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 10px transparent; }
}
@media (max-width: 760px) {
  .xp-label { display: none; }
  .xp-more { padding-left: 8px; }
  .xp-hint { margin-left: 10px; }
}
