/* Base = teal radar console with diagonal corner stripes and a light About section.
   Five options (o1–o5) at the end change palette, type size and layout. */
:root {
  --night: #071722;
  --deep: #0b2230;
  --rule: #18394b;
  --fg: #dcebf0;
  --dim: #8ba8b4;
  --sky: #7fe0d0;
  --sun: #ff7a3d;
  --gold: #f4c14f;
  --pink: #f5a3b4;
  --h2c: var(--gold);
  --paper: #eef3f2;
  --paper-rule: #cfdcdc;
  --ink: #0b2230;
  --ink-dim: #4b6470;
  --ink-accent: #0f7a6c;
  --gold-ink: #a8650f;
  --radius: 6px;
  --btn-radius: 4px;
  --base: 16px;
  --h2: clamp(28px, 3.4vw, 40px);
  --name1: clamp(34px, 5vw, 64px);
  --name2: clamp(34px, 5.5vw, 70px);
  --gap: 96px;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--night); color: var(--fg); font-family: var(--body); font-size: var(--base); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible, .cv-pages:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
p { margin: 0 0 14px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
.band { padding-block: var(--gap); border-top: 1px solid var(--rule); }
.band.deep { background: var(--deep); }
.band > .fold { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
.eyebrow, .label { display: block; margin: 0 0 10px; font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sky); }
.lede { color: var(--dim); max-width: 62ch; }

/* Collapsible sections */
.fold-head { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.fold-head::-webkit-details-marker { display: none; }
.fold-title { display: block; min-width: 0; }
.h2 { display: block; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: var(--h2); line-height: 1; color: var(--h2c); letter-spacing: .01em; text-wrap: balance; }
.chev { flex: none; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: var(--btn-radius); position: relative; transition: transform .2s ease, border-color .2s ease; }
.chev::before { content: ""; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: translateY(-2px) rotate(45deg); }
.fold-head:hover .chev { border-color: var(--gold); }
.fold:not([open]) .chev { transform: rotate(-90deg); }
.fold:not([open]) .fold-head { margin-bottom: 0; }
.band:has(.fold:not([open])) { padding-block: 28px; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-block; font: 500 14px var(--mono); text-decoration: none; padding: 10px 16px; border-radius: var(--btn-radius); border: 1px solid var(--gold); color: var(--gold); transition: transform .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.fill { background: var(--sun); border-color: var(--sun); color: #071722; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px 24px; background: color-mix(in srgb, var(--night) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.logo { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 21px; color: var(--gold); text-decoration: none; letter-spacing: .02em; }
nav { display: flex; flex-wrap: wrap; gap: 2px; font: 500 13px var(--mono); }
nav a { text-decoration: none; padding: 6px 12px; border-radius: var(--btn-radius); border: 1px solid transparent; }
nav a:hover, nav a.on { border-color: var(--gold); color: var(--gold); }
.menu-btn { display: none; font: 500 14px var(--mono); background: none; color: var(--fg); border: 1px solid var(--dim); border-radius: var(--btn-radius); padding: 6px 12px; cursor: pointer; }

/* Header */
.hero { position: relative; overflow: hidden; padding: 88px 24px 176px; }
.hero-in { position: relative; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9; margin: 12px 0 18px; }
.hero h1 .first { display: block; font-size: var(--name1); color: var(--fg); }
.hero h1 .last { display: block; white-space: nowrap; font-size: var(--name2); color: var(--gold); }
.tagline { font-size: 18px; margin: 0; max-width: 34ch; color: var(--dim); }
.stripes { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; background: repeating-linear-gradient(180deg, var(--sun) 0 14px, transparent 14px 21px, var(--gold) 21px 35px, transparent 35px 42px, var(--pink) 42px 56px, transparent 56px 63px); }
.corner { position: absolute; top: -40px; right: -160px; width: 520px; height: 260px; transform: rotate(-32deg); background: repeating-linear-gradient(180deg, var(--sun) 0 18px, transparent 18px 28px, var(--gold) 28px 46px, transparent 46px 56px, var(--pink) 56px 74px, transparent 74px 84px); opacity: .9; pointer-events: none; }
.art { display: none; position: relative; aspect-ratio: 1; width: 100%; max-width: 380px; justify-self: center; }
.art .planet { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold), var(--sun) 55%, #c4452a); }
.art .ring { position: absolute; left: -4%; right: -4%; top: 42%; height: 20%; border: 5px solid var(--pink); border-radius: 50%; transform: rotate(-14deg); }
.scope { margin: 40px 0 0; padding: 12px; border: 1px solid var(--rule); background: var(--deep); border-radius: var(--radius); position: relative; }
.scope canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; }
.ax { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 8px; font: 11px var(--mono); color: var(--dim); }

/* Apophis */
.apophis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.apo-txt p { max-width: 44ch; }
.count { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 28px; }
.count div { display: flex; flex-direction: column; align-items: center; min-width: 88px; padding: 10px 12px; border: 1px solid var(--sky); border-radius: var(--btn-radius); }
.num { font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1; color: var(--sky); font-variant-numeric: tabular-nums; }
.count small { font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.orbit svg { width: 100%; height: auto; display: block; }
.orbit text { font: 11px var(--body); fill: var(--dim); }
.o-moon { fill: none; stroke: var(--rule); stroke-width: 1.5; stroke-dasharray: 2 5; }
.o-geo { fill: none; stroke: var(--sky); stroke-opacity: .7; stroke-dasharray: 3 4; }
.o-earth { fill: #3f7fd1; }
.o-path { fill: none; stroke: var(--gold); stroke-width: 2; }
.o-apo { fill: var(--sun); }
.orbit .t-geo { fill: var(--sky); }
.orbit .t-apo { fill: var(--gold); }
.dash-preview { display: block; max-width: 520px; margin-top: 40px; text-decoration: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: #0f172a; position: relative; transition: transform .15s ease; }
.dash-preview:hover { transform: translateY(-3px); }
.dash-preview img { width: 100%; height: auto; }
.dash-bar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: #0b2230; font: 12px var(--mono); color: #8ba8b4; }
.dash-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.dash-bar i:nth-child(2) { background: var(--gold); }
.dash-bar i:nth-child(3) { background: var(--sky); }
.dash-bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-cta { position: absolute; right: 12px; bottom: 12px; background: var(--sun); color: #071722; font: 500 13px var(--mono); padding: 7px 12px; border-radius: var(--btn-radius); }

/* Planetary Defense Watch */
.watch { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; margin-top: 28px; align-items: start; }
.watch-main { min-width: 0; display: grid; gap: 16px; }
.map-card { --fg: #dcebf0; --dim: #8ba8b4; --rule: #18394b; --deep: #0b2230; background: #071722; color: var(--fg); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; min-width: 0; }
.map-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; font: 13px var(--mono); }
.map-head label { color: var(--dim); }
.map-head select { font: 500 14px var(--mono); color: var(--fg); background: var(--deep); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 10px; max-width: 100%; }
.map-when { color: var(--gold); }
#watch-map { width: 100%; height: auto; display: block; }
#watch-map .sphere { fill: #0d2a3a; }
#watch-map .grat { fill: none; stroke: #ffffff; stroke-opacity: .06; }
#watch-map .land { fill: #2f5566; stroke: #0d2a3a; stroke-width: .4; }
#watch-map .night { fill: #000; fill-opacity: .38; }
#watch-map .vis { fill: #7fe0d0; fill-opacity: .45; stroke: #7fe0d0; stroke-width: 1; }
#watch-map .dot { fill: var(--sun); stroke: #071722; stroke-width: 2; }
#watch-map .ast { fill: var(--gold); stroke: #071722; stroke-width: 1.5; cursor: pointer; }
#watch-map .ast.near { fill: var(--sun); }
#watch-map .ast.dim { fill-opacity: .35; stroke-opacity: .35; }
#watch-map .ast:hover { stroke: #fff; }
#watch-map .lbl { font: 12px var(--mono); fill: #dcebf0; paint-order: stroke; stroke: #071722; stroke-width: 3px; pointer-events: none; }
#watch-map .fire { fill: var(--pink); stroke: #071722; stroke-width: 1.5; }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font: 12px var(--mono); color: var(--dim); }
.map-key i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.k-vis { background: rgba(127, 224, 208, .55); border: 1px solid #7fe0d0; }
.k-night { background: #06141c; border: 1px solid #18394b; }
.k-dot { background: var(--sun); border-radius: 50% !important; }
.k-fire { background: var(--pink); border-radius: 50% !important; }
.map-note { margin: 10px 0 0; font-size: 14px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
table.ca { width: 100%; border-collapse: collapse; font: 13px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.ca caption { text-align: left; padding: 12px 12px 4px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ca th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ca td { padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ca tr:last-child td { border-bottom: 0; }
.ca .r { text-align: right; }
.ca tr.near td { color: var(--sun); }
.ca tr.sel td { background: color-mix(in srgb, var(--sky) 10%, transparent); }
.ca tbody tr { cursor: pointer; }
.ca .badge { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; margin-left: 6px; color: var(--sky); }
.more-row td { text-align: center; color: var(--sky); }
.src { margin: 0; font-size: 13px; color: var(--dim); }
.panel { border: 1px solid var(--rule); border-top: 3px solid var(--gold); border-radius: var(--radius); background: var(--night); min-width: 0; }
.panel-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--rule); }
.panel-head h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 22px; line-height: 1.1; margin: 0; color: var(--fg); }
.panel-head span { font: 12px var(--mono); color: var(--dim); }
.blk { padding: 12px 16px; border-bottom: 1px solid var(--rule); display: grid; gap: 6px; }
.blk:last-child { border-bottom: 0; }
.blk h4 { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 0; }
.big { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1.05; color: var(--gold); font-variant-numeric: tabular-nums; }
.big small { display: block; font: 13px/1.4 var(--body); color: var(--dim); margin-top: 2px; }
.risk, .alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.obj { font: 500 13px var(--mono); }
.meta { font: 12px/1.5 var(--mono); color: var(--dim); }
.foot-n { font-size: 12px; color: var(--dim); }
.blk.foot-n { display: block; }
.risk li { line-height: 1.35; }
.foot-n a { color: var(--fg); }
.chip { display: inline-block; font: 500 11px var(--mono); letter-spacing: .06em; padding: 2px 8px; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; }

/* Space News */
.news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.news-txt > p { max-width: 44ch; }
.heads { list-style: none; margin: 20px 0 24px; padding: 0; border-top: 1px solid var(--rule); }
.heads li { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.heads a { text-decoration: none; font-weight: 500; }
.heads a:hover { color: var(--gold); }
.heads small { display: inline-block; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--sky); margin-bottom: 2px; }
.heads .t { font: 11px var(--mono); color: var(--gold); margin-right: 10px; }
.pilot { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--sky); border: 1px dashed var(--sky); border-radius: var(--btn-radius); padding: 8px 12px; display: inline-block; margin: 0 0 20px; }
.cast-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 10px; }
.cast-head h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 24px; line-height: 1; margin: 0; color: var(--h2c); }
.cast-head span { font: 12px var(--mono); color: var(--dim); }
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.episodes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.episodes button { all: unset; cursor: pointer; display: grid; gap: 4px; font: 11px var(--mono); color: var(--dim); min-width: 0; }
.episodes img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 2px solid transparent; }
.episodes button[aria-current="true"] img, .episodes button:hover img { border-color: var(--gold); }
.episodes button[aria-current="true"] { color: var(--gold); }

/* Shop */
.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.item { background: var(--night); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.item h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 22px; line-height: 1; margin: 12px 0 8px; color: var(--fg); }
.item p { margin: 0; font-size: 14px; color: var(--dim); }
.tag { display: inline-block; font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--sun); color: #071722; padding: 2px 8px; border-radius: 3px; }

/* Talks */
.talks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.talks article { min-width: 0; }
.yt { all: unset; cursor: pointer; position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 12px; border: 1px solid var(--rule); }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.yt:hover img { transform: scale(1.04); }
.yt:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.yt .play { position: absolute; inset: 0; margin: auto; width: 50px; height: 50px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; box-shadow: 0 4px 18px rgba(0,0,0,.4); }
.yt .play::after { content: ""; margin-left: 4px; border-left: 15px solid #071722; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.year { font: 500 13px var(--mono); color: var(--gold); }
.talks h3 { font-size: 17px; line-height: 1.3; margin: 2px 0; font-weight: 600; }
.talks p { margin: 0; font-size: 14px; color: var(--dim); }

/* About (light section) */
.light { background: var(--paper); color: var(--ink); border-top-color: var(--paper-rule); --rule: var(--paper-rule); --dim: var(--ink-dim); --h2c: var(--ink); --fg: var(--ink); --sky: var(--ink-accent); }
.light .year, .light .heads .t, .light .big, .light .chip { color: var(--gold-ink); }
.light .chip { border-color: var(--gold-ink); }
.light .o-path { stroke: var(--gold-ink); }
.light .orbit .t-apo { fill: var(--gold-ink); }
.light .item { background: #fff; }
.light .heads a:hover { color: var(--gold-ink); }
.light .label { color: var(--ink-accent); }
.light .btn { border-color: var(--ink); color: var(--ink); }
.light .chev::before { border-color: var(--ink-dim); }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.about-txt p { max-width: 44ch; font-size: 18px; }
.about-txt .btn { margin-top: 12px; }
.cv-view { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cv-bar { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; background: #0b2230; color: #8ba8b4; font: 12px var(--mono); }
.cv-bar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-pages { max-height: 520px; overflow-y: auto; display: grid; gap: 6px; background: #b9c7cc; }
.cv-pages img { width: 100%; height: auto; }

/* Footer */
.foot { padding-block: 28px; font: 12px var(--mono); color: var(--dim); border-top: 1px solid var(--rule); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ========== Daylight page with dark header and alternating dark sections ========== */
.o4 {
  --night: #f3f6f5; --deep: #e7eeec; --rule: #d0dbd9; --fg: #0f2530; --dim: #4d6672; --sky: #0f7a6c;
  --h2c: #0f2530; --paper: #ffffff;
  color-scheme: light;
}
.o4 .hero, .o4 .topbar, .o4 .dark { --night: #071722; --deep: #0b2230; --rule: #18394b; --fg: #dcebf0; --dim: #8ba8b4; --sky: #7fe0d0; --h2c: var(--gold); color: var(--fg); }
.o4 .hero, .o4 .topbar { background: #071722; }
.o4 .dark { background: #0b2230; border-top-color: #18394b; }
.o4 .btn { border-color: var(--fg); color: var(--fg); }
.o4 .hero .btn, .o4 .dark .btn { border-color: var(--gold); color: var(--gold); }
.o4 .btn.fill, .o4 .hero .btn.fill, .o4 .dark .btn.fill { border-color: var(--sun); color: #071722; }
.o4 .year, .o4 .heads .t, .o4 .big, .o4 .chip { color: var(--gold-ink); }
.o4 .chip { border-color: var(--gold-ink); }
.o4 .o-path { stroke: var(--gold-ink); }
.o4 .orbit .t-apo { fill: var(--gold-ink); }
.o4 .heads a:hover { color: var(--gold-ink); }
.o4 .panel { background: #fff; border-top-color: var(--sun); }
.o4 .item { background: #fff; }
.o4 .dark .year, .o4 .dark .heads .t, .o4 .dark .big, .o4 .dark .chip { color: var(--gold); }
.o4 .dark .chip { border-color: var(--gold); }
.o4 .dark .o-path { stroke: var(--gold); }
.o4 .dark .orbit .t-apo { fill: var(--gold); }
.o4 .dark .heads a:hover { color: var(--gold); }
.o4 .dark .panel, .o4 .dark .item { background: #071722; }
.o4 .dark .cv-pages { background: #3b5561; }

/* Responsive */
@media (max-width: 900px) {
  .talks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --gap: 64px; }
  .wrap, .hero, .band > .fold { padding-inline: 16px; }
  .topbar { padding: 10px 16px; }
  .menu-btn { display: block; }
  nav { display: none; width: 100%; flex-direction: column; padding-bottom: 8px; }
  nav.open { display: flex; }
  .hero { padding-top: 56px; padding-bottom: 120px; }
  .stripes { height: 63px; }
  .hero-in, .about, .apophis, .news { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .art { max-width: 240px; }
  .scope { margin-top: 0; }
  .corner { width: 300px; height: 200px; top: -70px; right: -190px; opacity: .45; }
  .hero h1 .first { font-size: clamp(32px, 9vw, 52px); }
  .hero h1 .last { font-size: clamp(32px, 9.6vw, 56px); }
  .talks, .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .cv-pages { max-height: 420px; }
  .dash-cta { right: 10px; bottom: 10px; font-size: 13px; padding: 7px 12px; }
  .about-txt p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
