@font-face {
  font-family: "Russo One";
  src: url("/assets/russoone-regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f7fafc;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --ink: #102a45;
  --ink-strong: #071b30;
  --muted: #617286;
  --line: #d8e3ec;
  --line-strong: #b9cad8;
  --ice: #e8f6fb;
  --cyan: #0b9bd7;
  --cyan-dark: #0875a7;
  --navy: #061827;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(22, 53, 78, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  left: 18px;
  top: -70px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink-strong);
  color: #fff;
  border-radius: 10px;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(185, 202, 216, 0.72);
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(130%);
}
.header-inner {
  width: min(1420px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand strong {
  font-family: "Russo One", "Segoe UI", sans-serif;
  font-size: 20px;
  color: var(--ink-strong);
  white-space: nowrap;
}
.primary-nav { display: flex; align-items: center; gap: 26px; }
.primary-nav a,
.header-action {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.primary-nav a:hover,
.primary-nav a:focus-visible,
.header-action:hover,
.header-action:focus-visible { color: var(--cyan-dark); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-action {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.menu-button { display: none; }

main { min-height: 64vh; }
.page-shell { width: min(1420px, calc(100% - 48px)); margin: 0 auto; }

.hero {
  position: relative;
  min-height: 620px;
  margin: 34px auto 0;
  overflow: hidden;
  border-radius: 24px;
  background-color: var(--navy);
  background-image: url("/assets/nasa-genesis-hero.png");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.hero-copy {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(700px, 60%);
  padding: clamp(34px, 4.2vw, 62px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: rgba(5, 21, 36, 0.82);
  backdrop-filter: blur(6px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero .eyebrow { color: #6ee1ff; }
.hero h1,
.page-title,
.article-header h1,
.section-title {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink-strong);
  letter-spacing: -0.035em;
}
.hero h1 {
  margin: 18px 0 20px;
  max-width: 560px;
  color: #fff;
  font-size: clamp(39px, 4vw, 58px);
  line-height: 1.01;
}
.hero-dek {
  max-width: 560px;
  margin: 0;
  color: #d8e6ee;
  font-size: 19px;
  line-height: 1.55;
}
.story-meta {
  margin-top: 22px;
  color: #b8cbd8;
  font-size: 13px;
  font-weight: 700;
}
.button-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-strong);
  font-weight: 850;
  text-decoration: none;
}
.button-link:hover,
.button-link:focus-visible { background: var(--ice); }

.edition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 38px;
  padding: 64px 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}
.section-title { margin: 6px 0 0; font-size: clamp(30px, 3vw, 44px); line-height: 1.06; }
.section-link { color: var(--cyan-dark); font-weight: 800; text-decoration: none; white-space: nowrap; }
.story-list { display: grid; gap: 22px; }
.story-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.story-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.story-card h3 { margin: 10px 0; font-family: Georgia, serif; font-size: 28px; line-height: 1.12; color: var(--ink-strong); }
.story-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.story-card > div > a { text-decoration: none; }
.story-card > div > a:hover h3 { color: var(--cyan-dark); }

.facts-panel {
  align-self: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(27, 58, 83, 0.08);
}
.facts-panel h2 { margin: 0 0 20px; font-family: Georgia, serif; font-size: 30px; color: var(--ink-strong); }
.fact { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.fact:first-of-type { border-top: 0; }
.fact b { color: var(--cyan-dark); font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.fact p { margin: 2px 0 0; color: var(--ink); line-height: 1.45; }

.human-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin: 0 0 70px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.human-band img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.human-copy { padding: clamp(34px, 5vw, 68px); }
.human-copy h2 { margin: 12px 0 18px; font-family: Georgia, serif; font-size: clamp(34px, 4vw, 54px); line-height: 1.05; color: var(--ink-strong); }
.human-copy p { color: var(--muted); font-size: 18px; line-height: 1.65; }

.page-heading { padding: 70px 0 34px; max-width: 900px; }
.page-title { margin: 12px 0 18px; font-size: clamp(48px, 6vw, 82px); line-height: 0.98; overflow-wrap: anywhere; }
.page-lede { max-width: 760px; color: var(--muted); font-size: 21px; line-height: 1.6; }

.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0 0 76px; }
.archive-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.archive-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.archive-card-body { padding: 24px; }
.archive-card h2 { margin: 10px 0 12px; font-family: Georgia, serif; font-size: 30px; line-height: 1.12; color: var(--ink-strong); }
.archive-card p { color: var(--muted); line-height: 1.55; }
.archive-card a { text-decoration: none; }
.archive-card a:hover h2 { color: var(--cyan-dark); }

.article-header { width: min(1040px, calc(100% - 48px)); margin: 0 auto; padding: 70px 0 34px; }
.article-header h1 { margin: 16px 0 20px; font-size: clamp(48px, 6vw, 82px); line-height: 1.01; }
.article-dek { max-width: 820px; margin: 0; color: var(--muted); font-size: 22px; line-height: 1.55; }
.article-hero { width: min(1420px, calc(100% - 48px)); margin: 0 auto 54px; border-radius: 24px; aspect-ratio: 16 / 8.2; object-fit: cover; box-shadow: var(--shadow); }
.article-layout { width: min(1180px, calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 80px; align-items: start; }
.article-body { font-family: Georgia, "Times New Roman", serif; color: #20364b; font-size: 20px; line-height: 1.82; }
.article-body p { margin: 0 0 26px; }
.article-body h2 { margin: 52px 0 18px; color: var(--ink-strong); font-size: 34px; line-height: 1.16; }
.article-body a { color: var(--cyan-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-aside { position: sticky; top: 112px; padding-left: 24px; border-left: 1px solid var(--line-strong); }
.article-aside h2 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 25px; }
.article-aside p { color: var(--muted); line-height: 1.55; }
.article-aside a { color: var(--cyan-dark); font-weight: 800; }
.related { width: min(1180px, calc(100% - 48px)); margin: 70px auto; padding-top: 34px; border-top: 1px solid var(--line-strong); }

.prose-page { width: min(850px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 90px; }
.prose-page h1 { margin: 10px 0 28px; font-family: Georgia, serif; font-size: clamp(46px, 6vw, 72px); line-height: 1; color: var(--ink-strong); }
.prose-page h2 { margin: 42px 0 12px; font-family: Georgia, serif; font-size: 30px; color: var(--ink-strong); }
.prose-page p, .prose-page li { color: #42576a; font-size: 18px; line-height: 1.75; }
.prose-page img { width: 100%; margin: 30px 0; border-radius: var(--radius); }

.search-dialog { width: min(660px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 18px; padding: 0; box-shadow: var(--shadow); }
.search-dialog::backdrop { background: rgba(6, 24, 39, 0.62); }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 22px; }
.search-form label { grid-column: 1 / -1; font-weight: 850; color: var(--ink-strong); }
.search-form input { min-width: 0; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; }
.search-form button { min-height: 48px; border: 0; border-radius: 12px; padding: 0 18px; background: var(--ink-strong); color: #fff; font-weight: 800; cursor: pointer; }
.search-close { grid-column: 1 / -1; justify-self: end; background: transparent !important; color: var(--muted) !important; }
.search-result { padding: 0 22px 22px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: "Russo One", sans-serif; color: var(--ink-strong); }
.footer-brand img { width: 42px; }
.footer-copy { max-width: 620px; color: var(--muted); line-height: 1.55; }
.footer-links { display: flex; flex-wrap: wrap; align-content: start; justify-content: flex-end; gap: 12px 22px; }
.footer-links a { color: var(--ink); font-size: 14px; font-weight: 750; text-decoration: none; }
.footer-links a:hover { color: var(--cyan-dark); }

@media (max-width: 1040px) {
  .primary-nav { display: none; position: fixed; inset: 82px 0 auto 0; padding: 24px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; }
  .menu-open .primary-nav { display: flex; }
  .menu-button { display: inline-block; }
  .hero { min-height: 620px; }
  .hero-copy { width: 66%; }
  .edition-grid { grid-template-columns: 1fr; }
  .facts-panel { position: static; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 46px; }
  .article-aside { position: static; padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .header-inner, .page-shell, .article-header, .article-hero, .article-layout, .related, .prose-page, .footer-inner { width: min(100% - 28px, 1420px); }
  .header-inner { min-height: 72px; gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .brand strong { font-size: 16px; }
  .header-action { min-height: 38px; padding: 0 11px; font-size: 13px; }
  .primary-nav { inset: 72px 0 auto; }
  .hero { min-height: 840px; margin-top: 14px; border-radius: 18px; background-size: auto 300px; background-position: 72% top; background-repeat: no-repeat; }
  .hero-copy { inset: auto 0 0 0; width: 100%; min-height: 72%; padding: 26px 22px; justify-content: flex-end; background: rgba(5, 21, 36, 0.88); }
  .hero h1 { font-size: clamp(38px, 12vw, 54px); }
  .hero-dek { font-size: 16px; }
  .edition-grid { padding: 44px 0; }
  .story-card { grid-template-columns: 1fr; }
  .story-card h3 { font-size: 26px; }
  .facts-panel { padding: 22px; }
  .human-band { grid-template-columns: 1fr; }
  .human-band img { min-height: 250px; }
  .human-copy { padding: 28px 22px; }
  .archive-grid { grid-template-columns: 1fr; }
  .page-heading { padding-top: 48px; }
  .page-title, .article-header h1 { font-size: clamp(36px, 11vw, 44px); }
  .article-header { padding-top: 46px; }
  .article-hero { aspect-ratio: 4 / 3; border-radius: 16px; }
  .article-body { font-size: 18px; line-height: 1.72; }
  .article-body h2 { font-size: 29px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
