/* ===== palette & tokens ===== */
:root {
  --space: #0a0e1a;
  --space-2: #0e1426;
  --card: #0e1426;
  --card-line: #243152;
  --text: #c5cee0;
  --bright: #f4f7ff;
  --muted: #5a688a;
  --amber: #e8a838;
  --amber-deep: #c98a22;
  --cyan: #5dd9e8;
  --ok: #7fd99a;
  --display: "Fraunces", Georgia, serif;
  --body: "Spectral", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

body {
  background: radial-gradient(ellipse at 50% -10%, #131a2e 0%, #0a0e1a 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--amber); color: var(--space); }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

/* ===== background starfield ===== */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > *:not(#sky):not(#intro) { position: relative; z-index: 1; }

/* ===== intro overlay ===== */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #05070d;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: opacity 0.8s ease;
}
#intro.done { opacity: 0; pointer-events: none; }
#ignition { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-title { position: relative; width: 100%; padding: 16vh 6vw 12vh; text-align: center; opacity: 0; transition: opacity 1s ease; }
.intro-title.show { opacity: 1; }
.intro-est { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--amber); }
.intro-title h1 { font-family: var(--display); font-size: clamp(52px, 11vw, 100px); font-weight: 600; color: var(--bright); line-height: 1; margin: 14px 0 6px; letter-spacing: 1px; }
.intro-sub { font-family: var(--mono); font-size: clamp(12px, 2.5vw, 14px); letter-spacing: 1px; color: var(--cyan); }
.intro-motto { font-family: var(--body); font-style: italic; font-size: clamp(15px, 2.6vw, 17px); line-height: 1.6; color: var(--text); opacity: 0; max-width: 30ch; margin: 18px auto 0; transition: opacity 0.75s ease; }
.intro-title.show .intro-motto { opacity: 0.9; transition-delay: 0.45s; }
.intro-skip {
  position: absolute;
  bottom: 28px;
  right: 28px;
  background: none;
  border: 1px solid var(--card-line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.intro-skip:hover { color: var(--amber); border-color: var(--amber); }

/* ===== hero ===== */
.hero { text-align: center; padding: 15vh 6vw 9vh; border-bottom: 1px solid rgba(36,49,82,0.6); }
.hero-est { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--amber); }
.hero h1 { font-family: var(--display); font-size: clamp(54px, 11vw, 104px); font-weight: 600; color: var(--bright); line-height: 1; margin: 14px 0 0; letter-spacing: 1px; }
.hero-motto { font-family: var(--body); font-style: italic; font-size: clamp(15px, 2.6vw, 17px); line-height: 1.6; color: var(--text); opacity: 0.9; max-width: 30ch; margin: 18px auto 0; }

.stats { display: flex; justify-content: center; flex-wrap: wrap; margin: 30px auto 0; border: 1px solid var(--card-line); border-radius: 8px; overflow: hidden; max-width: 560px; }
.stat { flex: 1; min-width: 120px; padding: 11px 8px; border-right: 1px solid var(--card-line); }
.stat:last-child { border-right: none; }
.stat-val { display: block; font-family: var(--mono); font-size: 18px; color: var(--bright); }
.stat-key { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }

.hero-cta { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ship-cta { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px; }
.ship-svg { display: block; transition: transform 0.2s ease; }
.ship-cta:hover .ship-svg { transform: translateY(4px); }
.ship-cta .thrust { transform-origin: 30px 46px; transition: opacity 0.2s ease, transform 0.2s ease; }
.ship-cta:hover .thrust { opacity: 0.9; transform: scaleY(1.18); }
.ship-label { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--amber); }
.ship-cta.launch .ship-svg { animation: launch 0.7s cubic-bezier(0.5,0,0.9,0.4) forwards; }
@keyframes launch { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(60vh); opacity: 0; } }

/* ===== navbar ===== */
.navbar { position: sticky; top: 0; z-index: 20; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; padding: 13px 6vw; background: rgba(10,14,26,0.82); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(36,49,82,0.6); font-family: var(--mono); font-size: 12.5px; }
.navbar a { color: var(--muted); }
.navbar a:hover { color: var(--amber); text-decoration: none; }

/* ===== sections ===== */
.section { max-width: 760px; margin: 0 auto; padding: 72px 6vw; }
.section-label { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--amber); text-transform: uppercase; margin-bottom: 30px; }
.section-note { text-transform: none; color: var(--muted); letter-spacing: 0; font-size: 13px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== flight path / mission timeline ===== */

.tl-meta-row { display: flex; justify-content: flex-end; margin-bottom: 12px; }

.timeline { position: relative; background: var(--card); border: 1px solid var(--card-line); border-radius: 8px; padding: 14px 16px 12px; overflow: hidden; margin-bottom: 14px; }
.timeline::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; filter: blur(70px); opacity: 0.1; background: var(--amber); top: -130px; right: -70px; pointer-events: none; }

.tl-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.tl-meta-hi { color: var(--cyan); }

.tl-grid { position: relative; display: grid; grid-template-columns: 80px 1fr; column-gap: 12px; }
.tl-rail, .tl-tracks { display: flex; flex-direction: column; gap: 16px; }
.tl-tracks { position: relative; }
.tl-rail-spacer { height: 20px; }
.tl-rail-label { height: 34px; display: flex; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.tl-rail-edu { color: var(--cyan); }
.tl-rail-career { color: var(--amber); }

.tl-axis { position: relative; height: 14px; margin-bottom: 6px; border-bottom: 1px solid #1c2438; }
.tl-axis span { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }

.tl-row { position: relative; height: 34px; }
.tl-bar { position: absolute; top: 4px; height: 24px; display: flex; align-items: center; padding: 0 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.5px; border-radius: 5px; border: 1px solid; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; }
.tl-bar-edu { color: #9fe7f2; border-color: #5dd9e8; background: #0e3138; }
.tl-bar-career { color: #f4c775; border-color: #e8a838; background: #3a2c12; }
.tl-bar-now { color: #3a2402; background: var(--amber); border-color: var(--amber); font-weight: 500; }
.tl-bar:hover, .tl-bar.is-active { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); filter: brightness(1.08); }

.tl-note { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 12px; letter-spacing: 0.3px; }

/* ===== mission briefings ===== */
.briefings { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.brief { background: var(--card); border: 1px solid var(--card-line); border-radius: 6px; padding: 18px 20px; transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; }
.brief:hover { transform: translateY(-3px); border-color: var(--amber-deep); }
.brief.is-focus { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 10px 30px rgba(0,0,0,0.4); }
.brief.is-dim { opacity: 0.4; }
.brief-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.brief-kind { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.brief-kind-career { color: var(--amber); }
.brief-kind-edu { color: var(--cyan); }
.brief h3 { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--bright); line-height: 1.3; }
.brief h3 em { font-weight: 400; font-style: italic; color: var(--muted); font-size: 15px; }
.brief-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: 0.3px; }
.brief-desc { font-size: 15px; color: var(--text); opacity: 0.85; margin-top: 12px; }
.brief-tags { font-family: var(--mono); font-size: 12px; color: var(--cyan); margin-top: 14px; }
.status-active { color: var(--ok); border: 1px solid var(--ok); text-transform: uppercase; }
.status-complete { color: var(--muted); border: 1px solid var(--card-line); text-transform: uppercase; }

/* desktop: full-width stacked layouts above 2-column detail grids */
@media (min-width: 768px) {
  .briefings, .missions-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1080px) {
  .section { max-width: 960px; }
  .flightpath { display: flex; flex-direction: column; gap: 20px; }
}

/* ===== mission log ===== */
.missions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.mission { background: var(--card); border: 1px solid var(--card-line); border-radius: 6px; padding: 18px 20px; transition: transform 0.15s ease, border-color 0.15s ease; }
.mission:hover { transform: translateY(-3px); border-color: var(--amber-deep); }
.mission-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mission h3 { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--bright); }
.mission h3 em { font-weight: 400; font-style: italic; color: var(--muted); font-size: 15px; }
.mission p { font-size: 15px; color: var(--text); opacity: 0.82; margin-top: 8px; }
.mission-stack { font-family: var(--mono); font-size: 12px; color: var(--cyan); opacity: 1; margin-top: 12px; }
.mission-links { margin-top: 12px; display: flex; gap: 16px; font-family: var(--mono); font-size: 12.5px; }
.status { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; border-radius: 11px; padding: 2px 9px; white-space: nowrap; }
.status-orbit { color: var(--ok); border: 1px solid var(--ok); }
.status-landed { color: var(--cyan); border: 1px solid var(--cyan); }
.status-thesis { color: var(--amber); border: 1px solid var(--amber); }
.mission-next { border-style: dashed; background: rgba(14,20,38,0.4); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.mission-next p { font-style: italic; }

/* ===== payload ===== */
.payload { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 12px; 
  border: 1px solid #1c2438; 
  border-radius: 10px; 
  background: radial-gradient(ellipse at 75% -10%, #131a2e 0%, #0a0e1a 60%); 
  padding: 18px;
}
.bay { 
  background: #0c1322; 
  border: 1px solid #243152; 
  border-radius: 8px; 
  padding: 13px; 
}
.bay-cat { 
  font-family: var(--mono); 
  font-size: 11px; 
  letter-spacing: 1px; 
  color: #7a86a3; 
  margin: 0 0 10px 0;
  display: flex; 
  align-items: center; 
  gap: 7px; 
}
.kit { display: flex; flex-wrap: wrap; gap: 7px; }
.item { 
  font-family: var(--mono); 
  font-size: 12px; 
  background: #13203a; 
  border: 1px solid #2a3552; 
  color: #c5cee0; 
  border-radius: 5px; 
  padding: 5px 11px; 
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease; 
}
.item:hover { 
  transform: translateY(-2px); 
  border-color: var(--amber); 
  box-shadow: 0 4px 12px rgba(232, 168, 56, 0.15);
}
.mission-clock { margin-top: 40px; text-align: center; padding: 26px; border-top: 1px dashed var(--card-line); border-bottom: 1px dashed var(--card-line); }
.mc-num { font-family: var(--display); font-size: 64px; font-weight: 600; color: var(--amber); line-height: 1; display: block; }
.mc-label { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }

/* ===== comms ===== */
.section-comms { text-align: center; }
.comms-quote { font-family: var(--display); font-style: italic; font-size: 21px; color: var(--text); opacity: 0.85; margin-bottom: 28px; }
.comms-form { max-width: 460px; margin: 0 auto; text-align: left; display: flex; flex-direction: column; gap: 16px; }
.comms-form label { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); display: flex; flex-direction: column; gap: 7px; }
.comms-form input, .comms-form textarea { font-family: var(--body); font-size: 16px; color: var(--bright); background: var(--card); border: 1px solid var(--card-line); border-radius: 5px; padding: 11px 13px; resize: vertical; }
.comms-form input:focus, .comms-form textarea:focus { border-color: var(--amber); outline: none; }
.comms-form button { align-self: flex-start; font-family: var(--mono); font-size: 13px; color: var(--space); background: var(--amber); border: none; border-radius: 5px; padding: 11px 22px; cursor: pointer; transition: transform 0.14s ease, background 0.14s ease; }
.comms-form button:hover { transform: translateY(-2px); background: #f2b94e; }
.comms-status { font-family: var(--mono); font-size: 12px; color: var(--ok); min-height: 1.4em; letter-spacing: 0.5px; }
.channels { margin-top: 30px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.channels-accent { display: flex; justify-content: center; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.channel-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--card-line); border-radius: 8px; padding: 20px 30px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; color: var(--text); text-decoration: none; min-width: 140px; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.channel-btn:hover { transform: translateY(-4px); border-color: var(--amber); box-shadow: 0 8px 24px rgba(232, 168, 56, 0.15); text-decoration: none; }

/* ===== footer ===== */
.footer { text-align: center; padding: 34px 6vw 50px; font-family: var(--mono); font-size: 11px; color: var(--muted); border-top: 1px solid rgba(36,49,82,0.6); margin-top: 30px; }

/* ===== responsive ===== */
@media (max-width: 540px) {
  .navbar { gap: 16px; font-size: 11.5px; }
  .stat { min-width: 50%; }
  .timeline { padding: 12px 12px 10px; }
  .tl-grid { grid-template-columns: 64px 1fr; column-gap: 8px; }
  .tl-rail-label { font-size: 9px; letter-spacing: 0.5px; }
  .tl-axis span { font-size: 9px; }
  .tl-bar { font-size: 10px; padding: 0 6px; }
}

/* ===== reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .item, .mission, .comms-form button { transition: none; }
  .ship-cta.launch .ship-svg { animation: none; }
  .ship-cta:hover .ship-svg { transform: none; }
}
