/* site.css — the résumé page.
   One palette for the WHOLE page: that of the world and its sky. The page starts in
   space and comes down to the green-black of the game (#10130e), so the résumé, the
   fall and the game are one place and not three pages glued together.
   Styles and scripts live in their own files so the server can send a content
   security policy with no 'unsafe-inline' in it (see .htaccess). */
:root {
  --night: #10130e;                  /* the game's background: everything lands here */
  --fg: #e8e8dd; --muted: #a9b2a4; --dim: #7b8471;
  --gold: #ffe9a8; --cream: #f4ecc8;
  --accent: #78dc8c; --accent-soft: rgba(120, 220, 140, .1);
  --card: rgba(16, 19, 14, .5); --line: #3c4434;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  color: var(--fg); position: relative;
  font: 16.5px/1.65 "Inter", system-ui, sans-serif;
  /* The page starts in SPACE: deep black lightening towards the upper atmosphere,
     anchored on the #12161d the sky of the fall opens with.
     One single descent: orbit -> re-entry -> clouds -> the island. */
  background: linear-gradient(180deg, #07090f 0%, #0a0d15 40%, #0f131b 65%, #12161d 82%, var(--night) 100%);
}
.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.5rem; }
::selection { background: var(--accent); color: var(--night); }
/* Two layers of the SAME star tile tell the change of style: at the top, the
   smallest scale = fine, sober dots; further down that layer fades and the same
   texture emerges at a large scale = pixel-art stars. The background "pixelates"
   with depth, and the fall paints its own opaque sky on top. */
body::before, body::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("stars.webp") repeat; mix-blend-mode: screen;
}
body::before {
  background-size: 230px; opacity: .3;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 900px, transparent 2000px);
  mask-image: linear-gradient(180deg, #000 0, #000 900px, transparent 2000px);
}
body::after {
  background-size: 720px; opacity: .4; image-rendering: pixelated;
  animation: twinkle 4.5s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(180deg, transparent 700px, #000 1900px);
  mask-image: linear-gradient(180deg, transparent 700px, #000 1900px);
}
@keyframes twinkle { from { opacity: .22; } to { opacity: .42; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes beat { 50% { opacity: .35; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- hero: in orbit ---------- */
.hero { position: relative; overflow: hidden; }
.moonbox {
  position: absolute; right: 3%; top: 50%; width: min(270px, 28vw);
  aspect-ratio: 1; pointer-events: none;
  animation: orbit-float 9s ease-in-out infinite alternate;
}
.moon {
  position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated;
  clip-path: circle(36.5%);            /* crops the black square of the image */
  filter: drop-shadow(0 0 26px rgba(210, 218, 235, .14));   /* a discreet lunar halo */
}
@keyframes orbit-float { from { transform: translateY(-54%); } to { transform: translateY(-46%); } }
.hero-inner {
  display: flex; gap: 2.8rem; align-items: center; flex-wrap: wrap;
  padding: 5.5rem 1.5rem; position: relative; z-index: 1;
}
.hero-text { flex: 1 1 20rem; min-width: 0; max-width: 37rem; }
.hero h1 { text-shadow: 0 2px 14px rgba(8, 10, 24, .9); }
.hero img.face {
  width: 148px; height: 148px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255, 233, 168, .35);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .45);
}
h1 { font-family: "Fraunces", serif; font-weight: 600; color: #fff;
     font-size: clamp(2.3rem, 5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.1; }
.hero .role { color: var(--muted); font-size: 1.12rem; margin-top: .7rem; max-width: 32rem;
              text-shadow: 0 2px 14px rgba(8, 10, 24, .9); }
.hero .chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.3rem; }
.hero .chips span {
  font-size: .78rem; font-weight: 500; letter-spacing: .02em;
  border: 1px solid var(--line); border-radius: 99px;
  padding: .25rem .8rem; color: var(--cream); background: rgba(0, 0, 0, .3);
}
.hero .chips .open { color: var(--accent); border-color: rgba(120, 220, 140, .45); background: var(--accent-soft); }
.hero .links { margin-top: 1.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .links a {
  color: var(--accent); text-decoration: none; font-weight: 500; font-size: .95rem;
  border-bottom: 1px solid rgba(120, 220, 140, .4); padding-bottom: 1px;
}
.hero .links a:hover { border-color: var(--accent); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  color: var(--gold); font: 600 .85rem var(--mono); letter-spacing: .1em;
  text-shadow: 0 2px 0 #000; animation: blink 1.4s steps(2) infinite;
}

/* ---------- downlink: live telemetry from the island below ---------- */
.downlink {
  margin-top: 1.5rem; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem;
  font: 500 .78rem/1.5 var(--mono); color: var(--muted);
  background: rgba(8, 11, 16, .62); border: 1px solid var(--line); border-radius: 4px;
  padding: .5rem .85rem; text-decoration: none; max-width: 100%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .4); transition: border-color .18s ease, transform .18s ease;
  opacity: 0; animation: rise .7s .58s cubic-bezier(.22,1,.36,1) forwards;
}
.downlink:hover { border-color: var(--accent); transform: translateY(-2px); }
.downlink .dot { width: 8px; height: 8px; background: var(--dim); flex: none; }
.downlink.up .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: beat 1.6s steps(2) infinite; }
.downlink .k { color: var(--dim); text-transform: uppercase; letter-spacing: .09em; font-size: .7rem; }
.downlink b { color: var(--cream); font-weight: 600; }
.downlink canvas { width: 72px; height: 16px; image-rendering: pixelated; }

/* ---------- sections ---------- */
section { padding: 3.6rem 0 0; }
h2 { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.6rem; color: var(--gold);
     letter-spacing: -0.01em; margin-bottom: 1.4rem; }
h2 .n { color: var(--accent); font-size: 1rem; vertical-align: .35em;
        margin-right: .5rem; font-family: var(--mono); font-weight: 600; }
.lede { max-width: 42rem; color: #f2f2ea; }   /* a touch lighter than --fg: body text at 100% */
.lede p { margin: .7rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem 1.5rem 1.3rem; display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: .55rem; color: var(--cream); }
.card p, .card li { font-size: .93rem; color: var(--muted); }
/* a title with a small pill link on its right (the multiplayer server card) */
/* the title never breaks: when both do not fit, the pill drops to its own line */
.card h3.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .6rem; }
.card h3.split span { white-space: nowrap; }
.card .jump {
  font: 500 .72rem var(--mono); letter-spacing: .04em; white-space: nowrap;
  color: var(--accent); text-decoration: none; border-radius: 99px; padding: .2rem .7rem;
  border: 1px solid rgba(120, 220, 140, .45); background: var(--accent-soft);
  transition: background .18s ease, border-color .18s ease;
}
.card .jump:hover, .card .jump:focus-visible { border-color: var(--accent); background: rgba(120, 220, 140, .2); }
.card ul { padding-left: 1.1rem; display: grid; gap: .45rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: 1rem; }
.tags span { font-size: .73rem; font-weight: 500; border-radius: 6px;
             padding: .18rem .55rem; background: var(--accent-soft); color: var(--accent); }

.tools { display: grid; grid-template-columns: 11.5rem 1fr; gap: 0 1.6rem; max-width: 52rem; }
.tools dt, .tools dd { padding: .7rem 0; border-top: 1px solid var(--line); margin: 0; }
.tools dt { font: 600 .74rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.tools dd { display: flex; flex-wrap: wrap; gap: .35rem; }
.tools dd span { font: 500 .8rem/1.5 var(--mono); color: var(--cream);
                 border: 1px solid var(--line); border-radius: 4px; padding: .1rem .5rem;
                 background: rgba(16, 19, 14, .45); transition: border-color .15s, color .15s; }
.tools dd span:hover { border-color: var(--accent); color: var(--accent); }
.tools dd span.core { border-color: rgba(255, 233, 168, .5); color: var(--gold); background: rgba(255, 233, 168, .06); }

/* ---------- a request's path ---------- */
/* Five stations and a packet crossing them. It is generic on purpose: no technology
   names and no details of any real system. The red packet is an unauthorized request
   (a stranger, or someone known without permission): it does not get through. */
.flow { margin: 0 0 1.4rem; padding: 1.4rem 1.2rem 1.1rem; border: 1px solid var(--line); border-radius: 14px;
        background: linear-gradient(180deg, rgba(16, 19, 14, .62), rgba(16, 19, 14, .34)); }
.flow-head { margin-bottom: 1.5rem; }
.flow-head b { font: 600 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.flow-line { --cycle: 6.4s; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; }
.flow-line li { position: relative; text-align: center; padding: 0 .35rem; }
.flow-line .ico {
  position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto .7rem;
  background: #12160f; border: 2px solid var(--line); border-radius: 4px; color: var(--gold);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .5);
}
.flow-line .ico svg { width: 28px; height: 28px; shape-rendering: crispEdges; }
.flow-line b { display: block; font: 600 .86rem/1.3 "Inter", sans-serif; color: var(--cream); }
.flow-line em { display: block; font-style: normal; font-size: .76rem; line-height: 1.4; color: var(--muted); margin-top: .2rem; }
.flow-line li + li::before {          /* the stretch between two stations */
  content: ""; position: absolute; top: 23px; left: calc(-50% + 30px); width: calc(100% - 60px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px);
}
.flow-line li + li::after, .flow-line .deny {     /* the packet */
  content: ""; position: absolute; top: 19px; left: calc(-50% + 30px); width: 10px; height: 10px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 0;
  animation: hop var(--cycle) linear infinite;
}
.flow-line li:nth-child(3)::after { animation-delay: calc(var(--cycle) * .14); }
.flow-line li:nth-child(4)::after { animation-delay: calc(var(--cycle) * .28); }
.flow-line li:nth-child(5)::after { animation-delay: calc(var(--cycle) * .42); }
.flow-line .deny { background: #e2574a; box-shadow: 0 0 10px #e2574a; animation: hop-deny var(--cycle) linear infinite; }
.flow-line .gate .ico { color: var(--accent); animation: gate var(--cycle) linear infinite; }
.flow-line li:nth-child(5) .ico { animation: arrive var(--cycle) linear infinite; }
@keyframes hop {
  0%   { left: calc(-50% + 30px); opacity: 1; }
  14%  { left: calc(50% - 40px); opacity: 1; }
  14.1%, 100% { left: calc(50% - 40px); opacity: 0; }
}
@keyframes hop-deny {
  0%, 66%   { left: calc(-50% + 30px); opacity: 0; }
  66.1%     { opacity: 1; }
  80%       { left: calc(50% - 40px); opacity: 1; transform: none; }
  86%       { left: calc(50% - 46px); opacity: 0; transform: scale(2.2) rotate(45deg); }
  100%      { left: calc(50% - 46px); opacity: 0; }
}
@keyframes gate {
  0%, 79%, 90%, 100% { border-color: var(--line); color: var(--accent); }
  81%, 86% { border-color: #e2574a; color: #e2574a; }
}
@keyframes arrive {
  0%, 55%, 66%, 100% { border-color: var(--line); }
  57%, 61% { border-color: var(--accent); }
}
.flow-foot { margin-top: 1.3rem; padding-top: .85rem; border-top: 1px solid var(--line);
             font: .76rem/1.7 var(--mono); color: var(--dim); display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.flow-foot b { color: var(--muted); font-weight: 500; }
.flow-foot i { display: inline-block; width: 8px; height: 8px; margin-right: .45rem; }
.flow-foot .ok i { background: var(--accent); } .flow-foot .no i { background: #e2574a; }

/* ---------- altitude rail ---------- */
/* The whole page is a descent, from orbit to the ground: the rail says how high you
   are and lets you jump between sections. Only where there is margin to spare. */
#rail { position: fixed; left: 22px; top: 50%; z-index: 5; height: min(58vh, 460px); transform: translateY(-50%);
        font: 500 .68rem/1 var(--mono); letter-spacing: .09em; text-transform: uppercase;
        transition: opacity .4s; display: none; }
#rail.off { opacity: 0; pointer-events: none; }
#rail::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px;
                background: repeating-linear-gradient(180deg, var(--line) 0 4px, transparent 4px 8px); }
#rail a { position: absolute; left: 0; transform: translateY(-50%); color: var(--dim); text-decoration: none;
          padding-left: 20px; white-space: nowrap; transition: color .2s; }
#rail a::before { content: ""; position: absolute; left: 1px; top: 50%; width: 8px; height: 2px; background: var(--dim); }
#rail a:hover, #rail a.on { color: var(--gold); }
#rail a.on::before { background: var(--gold); }
#railDot { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin-top: -5px;
           background: var(--accent); box-shadow: 0 0 10px var(--accent); }
#railAlt { position: absolute; left: 0; top: -2.6rem; color: var(--accent); white-space: nowrap;
           letter-spacing: .04em; text-transform: none; font-size: .8rem; font-weight: 600; }
#railAlt::before { content: "ALTITUDE"; display: block; margin-bottom: 4px; color: var(--dim);
                   font-size: .6rem; font-weight: 500; letter-spacing: .12em; }
@media (min-width: 1280px) { #rail { display: block; } }

/* ---------- the edge of the résumé ---------- */
/* The section closes EXACTLY on the colour the sky of the fall opens with (#12161d):
   the join does not depend on where the body's gradient happens to land. */
#edge { padding: 4.5rem 0 7rem; background: linear-gradient(180deg, transparent, #12161d); }
#edge .lede .go { color: var(--gold); font: 600 .95rem var(--mono); margin-top: 1.1rem; }

/* ---------- the fall ---------- */
/* A container six screens tall; inside it, a sticky stage of one. Scrolling does not
   move the page: it moves the WORLD. Everything is driven by --p (0..1), set by JS. */
#fall { height: 600vh; position: relative; background: var(--night); }
#stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  touch-action: pinch-zoom;          /* swipes here are steps, handled in site.js */
  --p: 0; --fade: 0;
}
.sky {
  position: absolute; left: 0; top: 0; width: 100%; height: 400vh;
  /* it starts in the SAME night tone as the page at that point, opens into a bank of
     moonlit blue halfway down and closes again into the night of the game */
  background: linear-gradient(#12161d 0%, #1b2542 22%, #24325c 46%, #1a2340 70%, #131a29 86%, var(--night) 100%);
  transform: translateY(calc(var(--p) * -300vh));
}
/* The island you are falling towards: a real 3D model (island.js) built from the same
   world file the game server runs, drawn small and scaled up so it keeps the pixel
   grain. It sits UNDER the clouds: you see it through them before you reach it. */
#isle { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.cl {
  position: absolute; left: -45%; top: 0; width: 190%; height: 420vh;
  background: url("clouds2.webp") repeat-y; background-size: 100% auto;
  mix-blend-mode: screen; image-rendering: pixelated; pointer-events: none; opacity: .85;
  transform: translateY(calc(var(--p) * -320vh));
  /* the layer fades in: when the fall starts there are no clouds and they emerge from
     below — without this, the top edge of the image showed half a cloud cut off */
  -webkit-mask-image: linear-gradient(180deg, transparent 30vh, #000 100vh);
  mask-image: linear-gradient(180deg, transparent 30vh, #000 100vh);
}
/* Altitude marks rushing past upwards: each one is a rule the island below is built
   with (and the services I build at work). */
.mark {
  position: absolute; left: 0; right: 0; top: 50%; pointer-events: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .45rem clamp(1rem, 5vw, 4rem) 0; border-top: 2px dashed rgba(244, 236, 200, .2);
  color: rgba(244, 236, 200, .78); font: 600 clamp(.72rem, 1.6vw, .9rem) var(--mono);
  letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
  transform: translateY(calc((var(--at) - var(--p)) * 900vh));
}
.mark b, .mark span { background: rgba(10, 14, 10, .62); padding: .15rem .6rem; border-radius: 3px; font-weight: 600; }
.mark span { color: var(--accent); letter-spacing: .04em; }
.mark.m1 { --at: .167; } .mark.m2 { --at: .4; } .mark.m3 { --at: .633; } .mark.m4 { --at: .833; }
/* Really falling: a symmetric free-fall pose (arms up) and manga-style speed lines —
   vertical strokes running upwards around the body, sharp (no blur). */
.faller {
  position: absolute; left: 50%; top: 36%; width: 118px; aspect-ratio: 192/204;
  transform: translate(-50%, -50%); pointer-events: none;
  opacity: 0; transition: opacity .4s;
}
#stage.falling .faller { opacity: 1; }
.faller img {
  position: absolute; left: 0; top: 0; width: 100%; image-rendering: pixelated;
  animation: fallsway 1.7s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 18px rgba(0, 0, 0, .35));
}
.faller .lines {
  position: absolute; left: 50%; bottom: 82%; width: 210px; height: 170px;
  transform: translateX(-50%);
  /* each gradient is ONE line: it thins out upwards and brightens towards the body */
  background-image:
    linear-gradient(180deg, transparent, rgba(244, 236, 200, .55)),
    linear-gradient(180deg, transparent, rgba(244, 236, 200, .30)),
    linear-gradient(180deg, transparent, rgba(244, 236, 200, .50)),
    linear-gradient(180deg, transparent, rgba(244, 236, 200, .25)),
    linear-gradient(180deg, transparent, rgba(244, 236, 200, .40));
  background-repeat: no-repeat;
  background-size: 4px 120px, 3px 70px, 4px 150px, 3px 60px, 3px 95px;
  background-position: 22px bottom, 58px 55%, 103px bottom, 148px 60%, 184px bottom;
  animation: rush .5s linear infinite;
}
@keyframes rush {
  from { transform: translateX(-50%) translateY(10px); opacity: .55; }
  to   { transform: translateX(-50%) translateY(-14px); opacity: 1; }
}
@keyframes fallsway { from { rotate: -4deg; translate: 0 -4px; } to { rotate: 4deg; translate: 0 4px; } }
/* Captions as an RPG dialogue box: a dark plate readable over any cloud, and the
   blinking ▼ — the universal video-game sign for "read this". */
.cap {
  position: absolute; left: 50%; transform: translateX(-50%); top: 58%;
  width: min(38rem, 90vw); text-align: center; opacity: 0;
  color: var(--cream); font: 600 clamp(1.05rem, 2.6vw, 1.4rem)/1.5 var(--mono);
  background: rgba(10, 14, 10, .85); border: 2px solid var(--line); border-radius: 12px;
  padding: 1.05rem 1.6rem 1.35rem; box-shadow: 0 5px 0 rgba(0, 0, 0, .45);
}
.cap::before {
  content: "eduardo"; position: absolute; top: -.85em; left: 14px;
  color: var(--gold); background: var(--night); border: 2px solid var(--line);
  border-radius: 6px; padding: .05em .6em; font-size: .68em; letter-spacing: .06em;
}
.cap::after {
  content: "▼"; position: absolute; right: 12px; bottom: 5px;
  color: var(--accent); font-size: .72em; animation: blink 1.1s steps(2) infinite;
}
.cap small { display: block; color: var(--muted); font-weight: 400; font-size: .74em; margin-top: .5em; }
/* a permanent guide: the visitor always knows what to do and how far is left */
.fall-hud {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  color: var(--gold); font: 600 .85rem var(--mono);
  text-shadow: 0 2px 0 #000; opacity: 0; transition: opacity .4s; text-align: center;
}
#stage.falling .fall-hud { opacity: 1; }
.fall-hud .alt { color: var(--muted); font-weight: 400; }
.fall-hud .meter { width: min(280px, 60vw); height: 6px; border: 2px solid #000; border-radius: 4px;
                   background: rgba(0, 0, 0, .5); overflow: hidden; }
.fall-hud .meter i { display: block; height: 100%; background: var(--accent);
                     transform-origin: left; transform: scaleX(var(--p)); }
.fall-hud .kb { animation: bob2 1.6s ease-in-out infinite; }
@keyframes bob2 { 50% { transform: translateY(4px); } }
.blackout { position: absolute; inset: 0; background: var(--night); opacity: var(--fade); pointer-events: none; }

/* ---------- the skip button ---------- */
/* The one fixed control on the page: down to the server, or back up. */
#skip {
  position: fixed; top: 14px; right: 14px; z-index: 30; cursor: pointer;
  font: 500 .72rem var(--mono); letter-spacing: .04em; color: var(--accent);
  background: rgba(10, 14, 10, .8); border: 1px solid rgba(120, 220, 140, .45); border-radius: 99px;
  padding: .42rem .9rem; transition: background .18s ease, border-color .18s ease;
}
#skip:hover, #skip:focus-visible { border-color: var(--accent); background: rgba(22, 38, 24, .92); }

/* ---------- the landing: the game ---------- */
#world { padding: 0; background: var(--night); }
#world .bar {
  display: flex; gap: .4rem 1.5rem; align-items: baseline; justify-content: center;
  flex-wrap: wrap; padding: 1rem 1.2rem .9rem; text-align: center;
  font: 13px/1.6 var(--mono); color: var(--muted);
}
/* On a wide screen the bar's text keeps clear of the skip button, on both sides so it
   stays centred. On a narrow one the button gets a strip of its own (further down). */
@media (min-width: 701px) { #world .bar { padding-inline: 10.5rem; } }
#world .bar > b { color: var(--gold); font-size: 15px; }
#world .bar a { color: var(--accent); }
#wlive i { display: inline-block; width: 8px; height: 8px; margin-right: .5rem; background: var(--dim); }
#wlive.up i { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: beat 1.6s steps(2) infinite; }
#wlive b { color: var(--cream); font-weight: 600; }
#frame-box { position: relative; height: 86vh; height: 86svh;
             border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
#frame-box iframe { width: 100%; height: 100%; border: 0; display: block; }
/* Full screen: the same frame grown over the page, with one bar to come back. */
#unfs { display: block; width: 100%; padding: .55rem; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
        background: #0b0e0a; color: var(--accent); font: 12px var(--mono); letter-spacing: .04em; }
#unfs[hidden] { display: none; }
body.full { overflow: hidden; }
body.full #frame-box { position: fixed; inset: 0; z-index: 100; height: auto; border: 0;
                       display: flex; flex-direction: column; background: var(--night); }
body.full #frame-box iframe { flex: 1; height: auto; min-height: 0; }
#enter {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 1.1rem;
  align-items: center; justify-content: center; cursor: pointer;
  background: rgba(16, 19, 14, .6); border: 0; width: 100%;
  color: var(--cream); font: 600 1.15rem var(--mono); text-shadow: 0 2px 0 #000;
}
#enter.gone { display: none; }
#enter .go {
  background: #0e6b52; border: 2px solid var(--accent); border-radius: 4px;
  color: #fff; padding: .8rem 1.7rem; box-shadow: 0 4px 0 #0a3f31;
  transition: transform .12s, box-shadow .12s;
}
#enter:hover .go { transform: translateY(-2px); box-shadow: 0 6px 0 #0a3f31; }
#enter .how {
  color: var(--muted); font-weight: 400; font-size: .82rem; line-height: 1.9;
  background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem 1.2rem; max-width: min(46rem, 92vw);
}
#enter .how b { color: var(--cream); font-weight: 600; }

/* ---------- footer ---------- */
footer { background: var(--night); color: var(--muted); }
.foot-inner { padding: 2.2rem 0 2.6rem; display: flex; justify-content: space-between;
              align-items: center; gap: 1.5rem; flex-wrap: wrap; font-size: .9rem; }
.foot-inner a { color: var(--accent); }

/* ---------- motion ---------- */
.hero-inner > * { opacity: 0; transform: translateY(18px);
                  animation: rise .7s cubic-bezier(.22,1,.36,1) forwards; }
.hero-inner > *:nth-child(2) { animation-delay: .12s; }
.hero .role   { opacity: 0; animation: rise .7s .22s cubic-bezier(.22,1,.36,1) forwards; }
.hero .chips  { opacity: 0; animation: rise .7s .34s cubic-bezier(.22,1,.36,1) forwards; }
.hero .links  { opacity: 0; animation: rise .7s .46s cubic-bezier(.22,1,.36,1) forwards; }
.reveal { opacity: 0; transform: translateY(24px);
          transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {           /* upright: the path goes down instead of across */
  .flow-line { grid-template-columns: 1fr; gap: 1.5rem; }
  .flow-line li { display: grid; grid-template-columns: 48px 1fr; column-gap: .9rem; text-align: left; padding: 0; align-items: center; }
  .flow-line .ico { margin: 0; grid-row: span 2; }
  .flow-line em { margin: 0; }
  .flow-line li + li::before { left: 23px; top: -1.5rem; width: 2px; height: 1.5rem;
    background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 10px); }
  .flow-line li + li::after, .flow-line .deny { display: none; }
}
@media (max-width: 700px) {
  .moonbox { width: 130px; right: -18px; top: 12%; opacity: .8; }
  #fall { height: 380vh; }             /* with a thumb, six screens of scrolling is a long way down */
  #world .bar { padding-top: 3.4rem; }  /* a clear strip for the skip button above the bar's text */
}
@media (max-width: 640px) {
  .tools { grid-template-columns: 1fr; }
  .tools dd { border-top: 0; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-inner > *, .hero .role, .hero .chips, .hero .links, .scroll-cue, .downlink
    { animation: none; opacity: 1; transform: none; }
  body::after { animation: none; }
  .moonbox { animation: none; transform: translateY(-50%); }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
  .flow-line li + li::after, .flow-line .deny, .flow-line .ico { animation: none; }
  #fall { height: auto; }            /* no fall: you go straight to the island */
  #stage { position: static; height: auto; touch-action: auto; }
  .sky, .cl, .faller, #isle, .blackout, .fall-hud, .mark { display: none; }
  .cap { position: static; transform: none; opacity: 1; padding: 2.5rem 0; margin: 0 auto; }
}
/* On paper this is a résumé and nothing else: no sky, no fall, no game. */
@media print {
  #rail, #skip, .moonbox, .downlink, .scroll-cue, #edge, #fall, #world, #toTop, .flow { display: none !important; }
  body { background: #fff; color: #111; font-size: 11pt; }
  body::before, body::after { display: none; }
  .hero-inner { padding: 0 0 1rem; }
  .hero-inner > *, .hero .role, .hero .chips, .hero .links, .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  h1, h2, h2 .n, .card h3, .tools dt { color: #111; text-shadow: none; }
  .hero .role, .lede, .card p, .card li, footer { color: #222; text-shadow: none; }
  section { padding-top: 1.4rem; }
  .card { background: none; border-color: #bbb; break-inside: avoid; padding: .9rem 1rem; }
  .hero .chips span, .tags span, .tools dd span, .tools dd span.core { color: #111; border: 1px solid #999; background: none; }
  .hero .links a, footer a { color: #111; border: 0; }
  .hero .links a[href^="http"]::after { content: " — " attr(href); font-size: .82em; color: #444; }
  footer { background: none; }
}
