@font-face {
  font-family: "MiHand";
  src: url("assets/fonts/hand.woff2") format("woff2");
  font-display: swap;
}

:root {
  --hand: "MiHand", "ZCOOL KuaiLe", "KaiTi", "STKaiti", cursive;
  --ink: #04060c;
  --night: #070b16;
  --deep: #0c1428;
  --star: #f4efe2;
  --dim: rgba(244, 239, 226, 0.58);
  --faint: rgba(244, 239, 226, 0.16);
  --hair: rgba(244, 239, 226, 0.28);
  --brass: #e8c27f;
  --brass-dim: rgba(232, 194, 127, 0.45);
  --tide: #8cc4e0;
  --py: #ffd65c;
  --ts: #5fa5ff;
  --js: #ff9e57;
  --serif: "Palatino Linotype", Palatino, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --kai: "KaiTi", "STKaiti", "Kaiti SC", var(--serif);
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --tape-w: 150px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  background: var(--ink);
}

html::-webkit-scrollbar { width: 0; height: 0; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--star);
  font-family: var(--serif);
  background:
    radial-gradient(1400px 900px at 70% -10%, rgba(64, 92, 160, 0.28), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(120, 70, 140, 0.14), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--deep) 45%, #0d1426 80%, #1b1a24 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--ink); }

a { color: inherit; }

.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: var(--grain, none);
  background-size: 160px 160px;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
}

section {
  position: relative;
  width: min(1120px, calc(100% - var(--tape-w) - 64px));
  margin: 0 auto;
  padding: 18vh 0 6vh;
  margin-left: max(32px, calc((100% - var(--tape-w) - 1120px) / 2));
}

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px calc(var(--tape-w) + 32px) 22px 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--dim);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.92), rgba(5, 7, 14, 0.6) 60%, transparent);
}

.topbar > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--star);
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 12px var(--brass);
  animation: pulse 2.6s ease-in-out infinite;
}

.clock { margin: 0; }
.clock b { color: var(--star); font-weight: 400; }

@keyframes pulse {
  50% { opacity: 0.35; box-shadow: 0 0 2px var(--brass); }
}

/* ---------- tape dial ---------- */

.tape {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--tape-w);
  z-index: 7;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  opacity: 0.72;
  transition: opacity 0.5s ease;
  background: linear-gradient(90deg, transparent, rgba(4, 6, 12, 0.55) 40%, rgba(4, 6, 12, 0.7));
}

.tape.active,
.tape:hover { opacity: 1; }

.tape-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}

.tape-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tape-mark {
  position: absolute;
  right: 12px;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 0 0 6px;
  border: 0;
  background: none;
  color: var(--brass);
  font: 11px/1 var(--mono);
  letter-spacing: 0.12em;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
}

.tape-mark span {
  padding: 3px 6px;
  background: rgba(4, 6, 12, 0.88);
  border-left: 1px solid var(--brass-dim);
}

.tape-mark::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border: 1px solid var(--brass);
  background: var(--ink);
  transform: rotate(45deg);
}

.tape-mark:hover,
.tape-mark.on { color: #fff; }
.tape-mark.on::after { background: var(--brass); box-shadow: 0 0 10px var(--brass); }

.tape-read {
  position: absolute;
  right: 46px;
  top: 50%;
  width: max-content;
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  column-gap: 6px;
  padding: 10px 12px 8px;
  transform: translateY(-50%);
  background: rgba(6, 9, 18, 0.92);
  border: 1px solid var(--brass-dim);
  box-shadow: 0 0 0 4px rgba(6, 9, 18, 0.6), 0 10px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.tape-read::after {
  content: "";
  position: absolute;
  right: -46px;
  top: 50%;
  width: 45px;
  height: 1px;
  background: var(--brass);
  box-shadow: 0 0 8px var(--brass);
}

.tape-read::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  border: 6px solid transparent;
  border-left-color: var(--brass);
  border-right: 0;
  transform: translateY(-50%);
}

.odo {
  display: flex;
  height: 30px;
  overflow: hidden;
  font: 500 24px/30px var(--mono);
  color: #fff;
  font-variant-numeric: tabular-nums;
  -webkit-mask: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  mask: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}

.odo-col {
  display: flex;
  flex-direction: column;
  width: 0.62em;
  text-align: center;
  will-change: transform;
}

.odo-col span { height: 30px; }

.odo-col.frac { color: var(--brass); }

.odo-dot { width: 0.36em; text-align: center; color: var(--brass); }

.odo-unit {
  font: 10px/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--brass);
  padding-bottom: 4px;
}

.tape-sec {
  grid-column: 1 / -1;
  margin-top: 4px;
  font: 12px/1.4 var(--kai);
  letter-spacing: 0.3em;
  color: var(--dim);
}

.tape-hint {
  position: absolute;
  right: 18px;
  bottom: 22px;
  font: 10px/1 var(--mono);
  letter-spacing: 0.24em;
  color: var(--dim);
  writing-mode: vertical-rl;
}

/* ---------- section heads ---------- */

.sec-head { margin-bottom: 8vh; max-width: 640px; }

.sec-code {
  margin: 0 0 14px;
  font: 11px/1 var(--mono);
  letter-spacing: 0.42em;
  color: var(--brass);
}

.sec-head h2 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: 0.18em;
  line-height: 1;
}

.sec-sub {
  margin: 18px 0 0;
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.sec-sub a { color: var(--brass); text-decoration: none; margin-left: 10px; }

/* ---------- reveal ---------- */

.rv { opacity: 0; }

.rv.in { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s) both; }

@keyframes rise {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}

.pull, .pull * { user-select: none; cursor: grabbing; }

/* ---------- 00 harbor ---------- */

.harbor {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 24px;
  padding-top: 12vh;
}

.eyebrow {
  margin: 0 0 26px;
  font: 11px/1.6 var(--mono);
  letter-spacing: 0.36em;
  color: var(--dim);
}

.greet {
  position: relative;
  padding-top: 132px;
}

.title {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-family: var(--hand);
  font-weight: 400;
  line-height: 1;
}

.t-row { display: flex; align-items: center; gap: 0.28em; font-size: clamp(60px, 8.6vw, 128px); }

.t-hi { letter-spacing: 0.04em; }

.t-sm {
  font-size: clamp(20px, 2.2vw, 30px);
  letter-spacing: 0.14em;
  color: rgba(244, 239, 226, 0.86);
}

.t-row .t-sm { align-self: flex-end; padding-bottom: 0.5em; font-size: clamp(20px, 2.2vw, 30px); }

.harbor-text { container-type: inline-size; }

.t-name {
  margin: 0.1em 0 0.12em;
  white-space: nowrap;
  font-size: min(clamp(50px, 7.4vw, 108px), 19cqi);
  letter-spacing: 0.03em;
  filter: drop-shadow(0 0 18px rgba(159, 243, 228, 0.32));
}

.t-name .ch {
  background: linear-gradient(180deg, #ffffff 10%, #ffe7b0 55%, #9ff3e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.t-tail { position: relative; padding-bottom: 14px; }

.swoosh {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 16px;
  overflow: visible;
}

.swoosh path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 1.4s 1.6s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.ch {
  display: inline-block;
  animation:
    beam-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 70ms + 0.25s) backwards,
    float 3.4s ease-in-out calc(var(--i) * -0.37s) infinite alternate;
  transition: translate 0.7s cubic-bezier(0.3, 1.4, 0.4, 1) calc(var(--i) * 35ms), color 0.3s ease;
}

.ch:hover { color: var(--brass); }

.title.lift .ch { translate: 0 -0.32em; }

@keyframes beam-in {
  from { opacity: 0; translate: 0 -1.2em; scale: 0.3 1.8; filter: blur(6px); }
  to { opacity: 1; translate: 0 0; scale: 1 1; filter: blur(0); }
}

@keyframes float {
  from { transform: translateY(-0.035em) rotate(-2deg); }
  to { transform: translateY(0.035em) rotate(2deg); }
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a3b66, #0c1222);
  box-shadow: 0 0 0 2px var(--brass), 0 0 30px rgba(232, 194, 127, 0.35);
}

.avatar::after {
  content: "";
  position: absolute;
  inset: -0.09em;
  border: 1px dashed var(--brass-dim);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avatar-fallback { font-size: 0.34em; color: var(--brass); }

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ufo */

.ufo {
  position: absolute;
  top: -6px;
  left: clamp(150px, 34%, 300px);
  z-index: 0;
  width: 150px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  translate: var(--ux, 0px) 0;
  transition: translate 0.9s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.ufo svg { display: block; width: 100%; height: auto; overflow: visible; }

.ufo:focus-visible { outline: 1px dashed #9ff3e4; outline-offset: 6px; }

.ufo-body {
  transform-box: fill-box;
  transform-origin: center;
  animation: ufo-bob 3.2s ease-in-out infinite alternate;
}

@keyframes ufo-bob {
  from { transform: translateY(-5px) rotate(-3deg); }
  to { transform: translateY(5px) rotate(3deg); }
}

.ufo-beam { opacity: 0.6; animation: ufo-beam 2.6s ease-in-out infinite alternate; transform-origin: 80px 62px; transition: opacity 0.4s ease; }

@keyframes ufo-beam {
  from { opacity: 0.42; transform: scaleX(0.94); }
  to { opacity: 0.78; transform: scaleX(1.04); }
}

.beam-motes circle { fill: #c9fff5; animation: mote 3.6s linear infinite; }
.beam-motes circle:nth-child(2) { animation-duration: 4.4s; animation-delay: -1.2s; }
.beam-motes circle:nth-child(3) { animation-duration: 3.1s; animation-delay: -2.1s; }
.beam-motes circle:nth-child(4) { animation-duration: 5s; animation-delay: -0.6s; }
.beam-motes circle:nth-child(5) { animation-duration: 3.8s; animation-delay: -2.8s; }
.beam-motes circle:nth-child(6) { animation-duration: 4.2s; animation-delay: -3.3s; }

@keyframes mote {
  0% { transform: translateY(30px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-120px); opacity: 0; }
}

.saucer { fill: #18213a; stroke: #dfe7f5; stroke-width: 1.4; }
.rim { fill: none; stroke: rgba(223, 231, 245, 0.45); }
.dome { stroke: rgba(223, 255, 248, 0.8); stroke-width: 1.2; }
.belly { fill: #9ff3e4; opacity: 0.8; }
.lights circle { fill: #ffd65c; animation: lamp-blink 1.5s steps(1) infinite; }
.lights circle:nth-child(2) { animation-delay: 0.3s; }
.lights circle:nth-child(3) { animation-delay: 0.6s; }
.lights circle:nth-child(4) { animation-delay: 0.9s; }
.lights circle:nth-child(5) { animation-delay: 1.2s; }

@keyframes lamp-blink { 50% { fill: #ff77d9; } }

.alien line { stroke: #8fe08a; stroke-width: 1.6; stroke-linecap: round; }
.alien-head { fill: #8fe08a; }
.alien-eye { fill: #0c1222; }
.alien-tip { fill: #ff77d9; animation: pulse 1.4s ease-in-out infinite; }
.alien-hand { transform-box: fill-box; transform-origin: 0 100%; opacity: 0; transition: opacity 0.3s ease; }
.alien-hand circle { fill: #8fe08a; }

.ufo.abduct .ufo-beam { opacity: 1; animation-duration: 0.3s; }
.ufo.abduct .alien-hand { opacity: 1; animation: wave 0.35s ease-in-out infinite alternate; }

@keyframes wave { from { transform: rotate(-20deg); } to { transform: rotate(25deg); } }

.ufo-say {
  position: absolute;
  top: 4px;
  left: 100%;
  padding: 7px 12px;
  border-radius: 14px 14px 14px 2px;
  background: #9ff3e4;
  color: #0c1222;
  font: 15px/1 var(--hand);
  white-space: nowrap;
  opacity: 0;
  translate: -6px 6px;
  transition: opacity 0.3s ease, translate 0.3s ease;
  pointer-events: none;
}

.ufo.abduct .ufo-say { opacity: 1; translate: 0 0; }

.aka {
  margin: 30px 0 0;
  font-family: var(--kai);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.12em;
  color: rgba(244, 239, 226, 0.88);
}

.motto {
  position: relative;
  margin: 22px 0 0;
  padding: 4px 0 4px 18px;
  max-width: 34em;
  border-left: 2px solid rgba(232, 194, 127, 0.55);
}

.motto p {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: #ffe7b0;
}

.motto .en {
  margin-top: 6px;
  font: italic 12px/1.6 var(--mono);
  letter-spacing: 0.04em;
  color: var(--dim);
}

.motto cite {
  display: block;
  margin-top: 8px;
  font: normal 11px/1 var(--mono);
  letter-spacing: 0.24em;
  color: var(--brass);
}

.bio {
  margin: 20px 0 0;
  min-height: 1.6em;
  font: 14px/1.6 var(--mono);
  letter-spacing: 0.04em;
  color: var(--dim);
}

.bio-mark { color: var(--brass); margin-right: 8px; }

.caret {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: var(--brass);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.langs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.langs-inline li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--faint);
  border-radius: 999px;
  font: 12px/1 var(--mono);
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.02);
}

.langs-inline li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}

.runner {
  margin: 36px 0 0;
  max-width: 520px;
  padding-top: 14px;
  border-top: 1px solid var(--faint);
}

.runner-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 10px/1 var(--mono);
  letter-spacing: 0.28em;
  color: var(--dim);
}

.runner-bar b {
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--star);
  font-variant-numeric: tabular-nums;
}

#runner-cv {
  display: block;
  width: 100%;
  height: 148px;
  margin-top: 8px;
  border-radius: 12px;
  background: rgba(4, 8, 18, 0.45);
  cursor: pointer;
  touch-action: manipulation;
}

.runner-hint {
  margin: 8px 0 0;
  font: 11px/1.4 var(--mono);
  letter-spacing: 0.12em;
  color: var(--dim);
}

.vessel {
  position: relative;
  margin: 0;
}

.vessel-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.sail {
  stroke: rgba(255, 250, 238, 0.9);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.battens {
  fill: none;
  stroke: rgba(20, 30, 50, 0.35);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.mast,
.boom {
  stroke: #f4efe2;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.boom { stroke-width: 2; }

.hull {
  fill: #0c1222;
  stroke: #f4efe2;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.hull-line { stroke: var(--brass); stroke-width: 1; opacity: 0.7; }

.flag { fill: var(--brass); }

.sail-stars circle { fill: #fff; }

.sail-stars circle:nth-child(odd) { animation: twinkle 2.4s ease-in-out infinite; }
.sail-stars circle:nth-child(3n) { animation: twinkle 3.2s 0.6s ease-in-out infinite; }

.dipper polyline,
.dipper .pointer {
  fill: none;
  stroke: rgba(244, 239, 226, 0.22);
  stroke-width: 1;
}

.dipper .pointer { stroke-dasharray: 3 5; stroke: rgba(232, 194, 127, 0.4); }

.dipper-stars circle { fill: #fff; animation: twinkle 3s ease-in-out infinite; }
.dipper-stars circle:nth-child(2n) { animation-delay: 1.1s; }
.dipper-stars circle:nth-child(3n) { animation-delay: 2s; }

.polaris { fill: var(--brass); filter: drop-shadow(0 0 6px var(--brass)); animation: pulse 3s ease-in-out infinite; }

.dipper text {
  font: 9px var(--mono);
  letter-spacing: 0.3em;
  fill: var(--brass);
  opacity: 0.8;
}

@keyframes twinkle { 50% { opacity: 0.3; } }

.waves path {
  fill: none;
  stroke: rgba(160, 200, 230, 0.35);
  stroke-width: 1;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  font: 10px/1 var(--mono);
  letter-spacing: 0.4em;
  color: var(--dim);
  text-decoration: none;
}

.scroll-cue i {
  width: 1px;
  height: 54px;
  background: linear-gradient(var(--star), transparent);
  animation: drip 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes drip {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

.emblem { fill: none; stroke: var(--brass); stroke-width: 1.3; opacity: 0.75; }
.cabin { fill: #141c30; stroke: #f4efe2; stroke-width: 1.2; }
.porthole { fill: #ffd58a; animation: flicker 3.4s ease-in-out infinite; }
.plank { fill: none; stroke: rgba(244, 239, 226, 0.22); stroke-width: 1; }
.lamp-post, .lamp-arm { fill: none; stroke: #f4efe2; stroke-width: 1.6; stroke-linecap: round; }
.lamp { fill: #ffd58a; }
.lamp-glow { animation: flicker 2.2s ease-in-out infinite; }

@keyframes flicker {
  0%, 100% { opacity: 1; }
  40% { opacity: 0.72; }
  60% { opacity: 0.92; }
  80% { opacity: 0.66; }
}

.ringed path { fill: none; stroke: #ffd3ec; stroke-width: 2; }
.ringed .ring-back { opacity: 0.35; }
.ringed .ring-front { opacity: 0.8; }

.sailor { cursor: pointer; }
.sailor .hit, .gull .hit { fill: transparent; }
.coat { fill: #2b3b66; stroke: #f4efe2; stroke-width: 0.9; }
.leg, .arm { fill: none; stroke: #f4efe2; stroke-width: 1.7; stroke-linecap: round; }
.hand, .face { fill: #f6e2cc; }
.face { stroke: #f4efe2; stroke-width: 0.7; }
.hat { fill: var(--brass); }
.pom { fill: #fff; }
.eye { fill: #0c1222; }
.blush { fill: #ff9fb0; opacity: 0.65; }
.scarf { fill: none; stroke: #ff6b6b; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

.gull { cursor: pointer; }
.gull .wing { fill: none; stroke: #f4efe2; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gull .body { fill: #f4efe2; }
.gull .beak { fill: var(--brass); }

.crumb { fill: var(--brass); }

.squawks text {
  font: 15px var(--hand);
  fill: #fff;
  text-anchor: middle;
  animation: squawk 1.1s ease-out forwards;
}

@keyframes squawk {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-26px); }
}

.bubble { opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.bubble.on { opacity: 1; }
.bubble rect, .bubble-tail { fill: #f4efe2; }
.bubble text { font: 15px var(--hand); fill: #0c1222; text-anchor: middle; }

.sec-head h2,
.name,
.reel-title,
.end-line,
.end-sub {
  font-family: var(--hand);
  font-weight: 400;
}

/* ---------- 01 voyage ---------- */

.route {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  --progress: 0;
}

.route::before,
.route::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--hair) 0 6px, transparent 6px 12px);
}

.route::after {
  background: linear-gradient(180deg, var(--brass), var(--star));
  box-shadow: 0 0 10px rgba(232, 194, 127, 0.6);
  transform: scaleY(var(--progress));
  transform-origin: top;
}

.skiff {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  width: 34px;
  height: 38px;
  margin: -19px 0 0 -17px;
  transform: translateY(var(--skiff-y, 0px)) rotate(var(--skiff-r, 0deg));
  filter: drop-shadow(0 0 10px rgba(232, 194, 127, 0.7));
}

.skiff svg { width: 100%; height: 100%; fill: var(--star); }
.skiff svg path:last-child { fill: var(--brass); }

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 34vh;
}

.label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  padding: 22px 26px;
  border: 1px solid var(--faint);
  background: linear-gradient(160deg, rgba(20, 28, 48, 0.82), rgba(10, 15, 28, 0.72));
  transition: border-color 0.6s ease, box-shadow 0.6s ease, transform 0.6s ease;
}

.stop.left .label { grid-column: 1; justify-self: end; align-items: flex-end; text-align: right; margin-right: 64px; }
.stop.right .label { grid-column: 2; justify-self: start; align-items: flex-start; text-align: left; margin-left: 64px; }

.label::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 64px;
  height: 1px;
  background: var(--hair);
  transition: background 0.6s ease;
}

.stop.left .label::before { right: -65px; }
.stop.right .label::before { left: -65px; }

.node {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin: -6px 0 0 -6px;
  border: 1px solid var(--star);
  border-radius: 50%;
  background: var(--deep);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.stop.passed .node {
  background: var(--brass);
  border-color: var(--brass);
  box-shadow: 0 0 0 6px rgba(232, 194, 127, 0.12), 0 0 18px var(--brass);
}

.stop.passed .label { border-color: var(--brass-dim); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.stop.passed .label::before { background: var(--brass); }

.stop.future .label { border-style: dashed; background: none; }

.stop.repo .label {
  border-color: rgba(95, 165, 255, 0.38);
  background: linear-gradient(160deg, rgba(24, 44, 86, 0.86), rgba(10, 16, 30, 0.8));
  color: inherit;
  text-decoration: none;
}

.stop.repo .label:hover,
.stop.repo .label:focus-visible {
  border-color: var(--ts);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(95, 165, 255, 0.3);
}

.stop.repo .node { border-radius: 2px; transform: rotate(45deg); border-color: var(--ts); }
.stop.repo.passed .node { background: var(--ts); border-color: var(--ts); box-shadow: 0 0 0 6px rgba(95, 165, 255, 0.14), 0 0 18px var(--ts); }
.stop.repo.passed .label::before { background: var(--ts); }
.stop.repo .code { color: var(--tide); }
.stop.repo .code b { font-weight: 400; color: #fff; }
.repo-go { margin-top: 4px; font: 11px/1 var(--mono); letter-spacing: 0.16em; color: var(--tide); }
.stop.future .name { color: var(--dim); }

.code { font: 10.5px/1.4 var(--mono); letter-spacing: 0.24em; color: var(--brass); }

.name { font-size: 30px; letter-spacing: 0.2em; line-height: 1.1; }

.detail { font: 13px/1 var(--mono); letter-spacing: 0.06em; color: rgba(244, 239, 226, 0.82); }

.note { font-family: var(--kai); font-size: 15px; line-height: 1.75; letter-spacing: 0.04em; color: rgba(244, 239, 226, 0.88); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: inherit; margin-top: 4px; }

.tags i,
.topics li {
  font-style: normal;
  padding: 4px 9px;
  border: 1px solid var(--c, var(--faint));
  border-radius: 999px;
  font: 11px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--c, var(--dim));
}

.stop.left .tags { justify-content: flex-end; }

/* ---------- 02 orbit ---------- */

.orbit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.orrery-wrap { position: relative; }

.orrery {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  overflow: hidden;
}

.orrery .ring { fill: none; stroke: var(--faint); stroke-dasharray: 2 6; }
.orrery .ring.on { stroke: var(--c); stroke-dasharray: none; opacity: 0.6; }

.orrery .sun { fill: #fff6e0; }
.orrery .sun-glow { fill: url(#sun-g); }

.orrery .planet { cursor: pointer; }
.orrery .planet circle.body { fill: var(--c); transition: r 0.3s ease; }
.orrery .planet circle.halo { fill: var(--c); opacity: 0.16; }
.orrery .planet text {
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  fill: var(--star);
  pointer-events: none;
}
.orrery .planet text.pct { fill: var(--dim); font-size: 9.5px; }
.orrery .planet.on circle.halo { opacity: 0.35; }

.orrery .moon { fill: var(--dim); }
.orrery .center-label { font: 10px var(--mono); letter-spacing: 0.32em; fill: var(--ink); text-anchor: middle; }

.lang-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font: 11px/1 var(--mono);
  color: var(--dim);
}

.lang-legend li { display: flex; align-items: center; gap: 6px; }
.lang-legend li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

.console {
  border: 1px solid var(--faint);
  background: rgba(5, 8, 16, 0.82);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --c: var(--py);
  transition: border-color 0.5s ease;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--faint);
  font: 11px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--dim);
}

.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.dots i:first-child { background: var(--c); }

.console-file { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-lang { color: var(--c); letter-spacing: 0.24em; }

.console-code {
  margin: 0;
  min-height: 330px;
  padding: 20px 22px;
  overflow-x: auto;
  font: 13px/1.75 var(--mono);
  color: #d9d4c6;
  tab-size: 2;
}

.console-code .k { color: #c9a0ff; }
.console-code .s { color: #a5d6a7; }
.console-code .c { color: rgba(244, 239, 226, 0.38); font-style: italic; }
.console-code .n { color: #ffb38a; }
.console-code .d { color: var(--py); }
.console-code .f { color: var(--tide); }
.console-code .cur { display: inline-block; width: 7px; height: 1.2em; vertical-align: -0.25em; background: var(--c); animation: blink 1s steps(1) infinite; }

.console-note {
  margin: 0;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--faint);
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1.7;
  color: var(--dim);
}

.stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 9vh 0 0;
  padding: 0;
  list-style: none;
  background: var(--faint);
  border: 1px solid var(--faint);
}

.stack li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: rgba(7, 11, 22, 0.92);
  transition: background 0.4s ease;
}

.stack li:hover { background: rgba(30, 38, 60, 0.92); }
.stack b { font: 500 15px/1 var(--mono); letter-spacing: 0.04em; }
.stack span { font-family: var(--kai); font-size: 13px; color: var(--dim); }

/* ---------- 03 dock ---------- */

.source-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border: 1px solid var(--faint);
  font: 10px/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--dim);
  vertical-align: 2px;
}

.source-badge.live { color: #7ee2a8; border-color: rgba(126, 226, 168, 0.5); }
.source-badge.live::before { content: "● "; }

.flagship,
.runtime {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--faint);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.008));
  margin-bottom: 40px;
}

.flagship-media {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--faint);
}

.flagship-media img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  image-rendering: pixelated;
  border-bottom: 1px solid var(--faint);
}

.sandbox { position: relative; flex: 1; min-height: 260px; background: #03050a; }
.sandbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }

.sandbox-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  margin: 0;
  font: 10px/1 var(--mono);
  letter-spacing: 0.2em;
  color: #6fe0c8;
  pointer-events: none;
}

.flagship-body,
.runtime-body { padding: 34px 36px; }

.repo-kicker { margin: 0; font: 10.5px/1 var(--mono); letter-spacing: 0.32em; color: var(--brass); }

.flagship h3,
.runtime h3 {
  margin: 16px 0 0;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: 0.1em;
}

.flagship h3 a,
.runtime h3 a { text-decoration: none; background: linear-gradient(var(--brass), var(--brass)) 0 100% / 0 1px no-repeat; transition: background-size 0.4s ease; }
.flagship h3 a:hover,
.runtime h3 a:hover { background-size: 100% 1px; }

.repo-slogan { margin: 10px 0 0; font-family: var(--kai); font-size: 18px; letter-spacing: 0.12em; color: #ff77d9; }

.repo-desc { margin: 16px 0 0; font-family: var(--kai); font-size: 15px; line-height: 1.85; color: rgba(244, 239, 226, 0.82); }

.langbar {
  display: flex;
  height: 6px;
  margin: 24px 0 8px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--faint);
}

.langbar i { height: 100%; background: var(--c); transform-origin: left; transform: scaleX(0); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.in .langbar i, .langbar.in i { transform: scaleX(1); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.facts li { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 1px solid var(--faint); }
.facts b { font: 400 22px/1 var(--mono); font-variant-numeric: tabular-nums; }
.facts span { font: 10px/1.3 var(--mono); letter-spacing: 0.16em; color: var(--dim); }

.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; padding: 0; list-style: none; }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.shots figure { margin: 0; overflow: hidden; border: 1px solid var(--faint); }
.shots img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.8s ease; }
.shots figure:hover img { transform: scale(1.08); }
.shots figcaption { padding: 7px 9px; font: 10px/1.4 var(--mono); color: var(--dim); }

.repo-actions { display: flex; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border: 1px solid var(--brass);
  background: var(--brass);
  color: var(--ink);
  font: 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn:hover { background: transparent; color: var(--brass); }
.btn.ghost { background: transparent; color: var(--star); border-color: var(--hair); }
.btn.ghost:hover { border-color: var(--star); }

.runtime { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.pipeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 34px 36px;
  border-left: 1px solid var(--faint);
  background: radial-gradient(circle at 50% 40%, rgba(255, 214, 92, 0.06), transparent 70%);
}

.pl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pl-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--faint);
  background: rgba(5, 8, 16, 0.7);
  font: 11px/1.3 var(--mono);
  color: var(--dim);
  text-align: center;
  transition: border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.pl-node b { font-weight: 500; font-size: 14px; color: var(--star); letter-spacing: 0.08em; }
.pl-node.core { border-color: var(--py); }
.pl-node.hot { border-color: var(--py); color: var(--star); box-shadow: 0 0 0 1px var(--py), 0 0 24px rgba(255, 214, 92, 0.25); }

.pl-pulse {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--py);
  box-shadow: 0 0 12px var(--py), 0 0 2px #fff;
  transition: transform 0.55s cubic-bezier(0.5, 0, 0.3, 1);
  pointer-events: none;
}

.logbook {
  margin-top: 70px;
  padding: 30px 34px;
  border: 1px solid var(--faint);
  background: rgba(5, 8, 16, 0.6);
}

.logbook-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 30px; }
.logbook-head h3 { margin: 0; font-weight: 500; font-size: 22px; letter-spacing: 0.2em; }
.logbook-head p { margin: 0; font-family: var(--kai); font-size: 14px; color: var(--dim); }

.commit-sky { position: relative; height: 220px; margin-top: 24px; }
.commit-sky svg { width: 100%; height: 100%; overflow: visible; }
.commit-sky .axis { font: 9.5px var(--mono); fill: var(--dim); letter-spacing: 0.1em; }
.commit-sky .grid { stroke: var(--faint); stroke-dasharray: 2 5; }
.commit-sky .dot { cursor: pointer; transition: r 0.2s ease; }
.commit-sky .dot:hover { r: 6; }
.commit-sky .halo { opacity: 0.18; pointer-events: none; }
.commit-sky .trail { fill: none; stroke-width: 1; opacity: 0.28; }

.commit-tip {
  position: absolute;
  z-index: 3;
  max-width: 300px;
  padding: 10px 12px;
  border: 1px solid var(--brass-dim);
  background: rgba(4, 6, 12, 0.95);
  font: 11px/1.5 var(--mono);
  color: var(--star);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.2s ease;
}

.commit-tip.on { opacity: 1; }
.commit-tip em { display: block; font-style: normal; color: var(--brass); margin-bottom: 4px; }

.loglist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 30px;
  margin: 26px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid var(--faint);
}

.loglist li { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font: 12px/1.5 var(--mono); }
.loglist .sha { color: var(--c); }
.loglist .msg { color: rgba(244, 239, 226, 0.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loglist .when { grid-column: 2; font-size: 10px; color: var(--dim); letter-spacing: 0.1em; }

/* ---------- 04 gallery ---------- */

.reel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "stage info" "thumbs thumbs";
  gap: 18px 32px;
  outline: none;
}

.reel-stage {
  grid-area: stage;
  position: relative;
  height: clamp(360px, 72vh, 680px);
  overflow: hidden;
  border: 1px solid var(--faint);
  background: #05080f;
  touch-action: pan-y;
}

.reel-slides { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.3s ease, visibility 0s linear 1.3s;
}

.slide.on { opacity: 1; visibility: visible; transition: opacity 1.3s ease; }

.slide-bg {
  position: absolute;
  inset: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  object-fit: cover;
  filter: blur(46px) saturate(1.25) brightness(0.5);
}

.slide a {
  position: absolute;
  inset: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: scale(1.06);
  filter: blur(6px);
  transition: transform 7s cubic-bezier(0.2, 0.6, 0.3, 1), filter 1.2s ease;
}

.slide.on .slide-img { transform: scale(1); filter: blur(0); }

.reel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: rgba(4, 6, 12, 0.6);
  color: var(--star);
  font: 26px/1 var(--serif);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.reel-nav.prev { left: 14px; }
.reel-nav.next { right: 14px; }
.reel-nav:hover { background: rgba(232, 194, 127, 0.2); border-color: var(--brass); }
.reel-stage:hover .reel-nav,
.reel:focus-within .reel-nav { opacity: 1; }

@media (hover: none) { .reel-nav { opacity: 0.85; } }

.reel-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 6px;
}

.reel-info > * { transition: opacity 0.45s ease, translate 0.45s ease; }
.reel-info.swap > *:not(.reel-progress) { opacity: 0; translate: 0 10px; }

.reel-count { margin: 0; font: 12px/1 var(--mono); letter-spacing: 0.2em; color: var(--dim); }
.reel-count b { font: 400 46px/1 var(--hand); color: var(--star); letter-spacing: 0.02em; }

.reel-title { margin: 0; font-size: 34px; line-height: 1.25; letter-spacing: 0.04em; }

.reel-meta { margin: 0; font: 12px/1.9 var(--mono); color: var(--dim); }

.reel-tags { margin: 0; }

.reel-progress { align-self: stretch; height: 2px; margin-top: 8px; background: var(--faint); }
.reel-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brass), #9ff3e4); }
.reel-progress i.run { animation: reel-run var(--dur, 5.5s) linear forwards; }
.reel.paused .reel-progress i { animation-play-state: paused; }

@keyframes reel-run { to { width: 100%; } }

.reel-thumbs {
  grid-area: thumbs;
  display: flex;
  gap: 10px;
  padding: 6px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.reel-thumbs::-webkit-scrollbar { display: none; }

.reel-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--faint);
  background: #0a0f1c;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.reel-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel-thumb:hover { opacity: 0.8; }
.reel-thumb.on { opacity: 1; border-color: var(--brass); transform: translateY(-3px); }

.wall-empty {
  padding: 40px;
  border: 1px dashed var(--hair);
  font-family: var(--kai);
  color: var(--dim);
  text-align: center;
}

/* ---------- 05 signal ---------- */

.beacons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.beacon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 230px;
  padding: 22px 20px;
  overflow: hidden;
  border: 1px solid var(--faint);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  color: var(--star);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.4s ease, transform 0.4s ease;
}

.beacon::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--brass-dim);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
}

.beacon:hover { border-color: var(--brass-dim); transform: translateY(-6px); }
.beacon:hover::before { animation: ping 1.6s ease-out infinite; }

@keyframes ping {
  0% { opacity: 0.9; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.4); }
}

.bc-ch { font: 10px/1 var(--mono); letter-spacing: 0.3em; color: var(--brass); }

.bc-avatar,
.bc-glyph {
  width: 46px;
  height: 46px;
  margin: 14px 0 10px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  object-fit: cover;
}

.bc-glyph { display: grid; place-items: center; font: 20px/1 var(--mono); }

.beacon b { font-weight: 500; font-size: 20px; letter-spacing: 0.14em; }
.bc-id { font: 12px/1.4 var(--mono); color: rgba(244, 239, 226, 0.85); word-break: break-all; }
.bc-extra { margin-top: auto; font-family: var(--kai); font-size: 13px; color: var(--dim); }

/* ---------- 06 end ---------- */

.end {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 14vh;
  overflow: clip;
}

.lighthouse { position: relative; width: 40px; height: 140px; margin-bottom: 40px; }

.tower {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 110px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, var(--star) 0 18px, #c34b4b 18px 36px);
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.tower::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 10px;
  height: 14px;
  transform: translateX(-50%);
  background: var(--brass);
}

.lighthouse .beam {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 70vw;
  height: 120px;
  margin-top: -60px;
  background: linear-gradient(90deg, rgba(255, 233, 180, 0.42), transparent 80%);
  clip-path: polygon(0 48%, 100% 0, 100% 100%, 0 52%);
  transform-origin: 0 50%;
  animation: sweep 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes sweep {
  0% { transform: rotate(-172deg) scaleX(1); opacity: 0.9; }
  50% { transform: rotate(-90deg) scaleX(0.15); opacity: 0.5; }
  100% { transform: rotate(-8deg) scaleX(1); opacity: 0.9; }
}

.end-code { margin: 0; font: 11px/1 var(--mono); letter-spacing: 0.5em; color: var(--brass); }
.end-line { margin: 22px 0 0; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: 0.16em; }
.end-sub { margin: 14px 0 0; font-size: 19px; letter-spacing: 0.24em; color: #9ff3e4; }
.end-meta { margin: 30px 0 0; font: 10px/1.8 var(--mono); letter-spacing: 0.2em; color: var(--dim); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 10;
  padding: 12px 20px;
  border: 1px solid var(--brass-dim);
  background: rgba(4, 6, 12, 0.94);
  font: 12px/1 var(--mono);
  letter-spacing: 0.14em;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .beacons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flagship, .runtime { grid-template-columns: 1fr; }
  .flagship-media { border-right: 0; border-bottom: 1px solid var(--faint); }
  .pipeline { border-left: 0; border-top: 1px solid var(--faint); }
}

@media (max-width: 860px) {
  :root { --tape-w: 64px; }
  section { width: calc(100% - var(--tape-w) - 32px); margin-left: 16px; padding-top: 14vh; }
  .topbar { padding: 16px; }
  .clock span { display: none; }
  .harbor { grid-template-columns: 1fr; padding-top: 16vh; }
  .vessel { order: -1; max-width: 460px; margin: 0 auto; }
  .runner { max-width: none; }
  .orbit-grid { grid-template-columns: minmax(0, 1fr); }
  .greet { padding-top: 118px; }
  .t-name { font-size: min(88px, 19cqi); }
  .ufo { left: 46%; width: 132px; }
  .reel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "info" "thumbs"; }
  .reel-stage { height: clamp(300px, 62vh, 560px); }
  .reel-info { padding-bottom: 0; }
  .loglist { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beacons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tape-read { right: 10px; padding: 8px 6px 6px; }
  .tape-read::after, .tape-read::before, .tape-sec, .odo-unit, .tape-hint { display: none; }
  .odo { font-size: 13px; height: 20px; line-height: 20px; }
  .odo-dot, .odo-col.frac { display: none; }
  .odo-col span { height: 20px; }
  .tape-mark span { display: none; }

  .route::before, .route::after, .skiff { left: 14px; }
  .stop { grid-template-columns: 1fr; min-height: 0; padding: 4vh 0; }
  .node { left: 14px; }
  .stop.left .label, .stop.right .label { grid-column: 1; justify-self: stretch; align-items: flex-start; text-align: left; margin: 0 0 0 46px; max-width: none; min-width: 0; }
  .stop.left .label::before, .stop.right .label::before { left: -33px; right: auto; width: 32px; }
  .stop.left .tags { justify-content: flex-start; }
  .flagship-body, .runtime-body, .pipeline, .logbook { padding: 24px 20px; }
}

@media (max-width: 480px) {
  :root { --tape-w: 40px; }
  section { width: calc(100% - var(--tape-w) - 24px); margin-left: 12px; }
  .topbar { padding: 14px calc(var(--tape-w) + 12px) 14px 12px; letter-spacing: 0.2em; }
  .tape-read, .tape-hint { display: none; }
  .tape-mark { right: 6px; }
  .eyebrow { letter-spacing: 0.2em; }
  .aka { font-size: 15px; letter-spacing: 0.06em; }
  .greet { padding-top: 96px; }
  .ufo { left: 40%; width: 106px; }
  .ufo-say { left: auto; right: 70%; top: -18px; }
  .t-row { font-size: 54px; }
  .t-name { font-size: min(48px, 19cqi); }
  .t-sm, .t-row .t-sm { font-size: 17px; letter-spacing: 0.08em; }
  .reel-title { font-size: 26px; }
  .slide a { inset: 12px; }
  #runner-cv { height: 132px; }
  .sec-head h2 { letter-spacing: 0.1em; }
  .name { font-size: 24px; letter-spacing: 0.12em; }
  .label { padding: 18px; }
  .stop.left .label, .stop.right .label { margin-left: 38px; }
  .stop.left .label::before, .stop.right .label::before { left: -25px; width: 24px; }
  .console-code { font-size: 11.5px; padding: 16px; min-height: 0; }
  .stack li { padding: 16px; }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .shots { grid-template-columns: 1fr; }
  .repo-actions { flex-wrap: wrap; }
  .commit-sky { height: 260px; }
  .beacons { grid-template-columns: minmax(0, 1fr); }
  .beacon { min-height: 0; display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; align-items: center; }
  .beacon .bc-ch { grid-column: 1 / -1; }
  .beacon .bc-avatar, .beacon .bc-glyph { grid-row: span 3; margin: 6px 0 0; }
  .bc-extra { margin-top: 0; }
}

@media (max-width: 380px) {
  .clock { display: none; }
}

@media (min-width: 861px) and (max-height: 760px) {
  .harbor { padding-top: 10vh; padding-bottom: 4vh; }
  .vessel-svg { max-height: 74vh; margin: 0 auto; }
  .scroll-cue { display: none; }
  .runner { margin-top: 22px; }
  .langs-inline { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .rv { opacity: 1; transform: none; }
}
