/* MARS Catalog v5 — typography + structure */
@import url("https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&family=Scheherazade+New:wght@400;500;600;700&family=Syne:wght@500;600;700;800&display=swap");

:root {
  --void: #030203;
  --panel: rgba(12, 8, 9, 0.72);
  --panel-solid: rgba(14, 10, 11, 0.88);
  --panel-hard: #110c0d;
  --line: rgba(232, 210, 180, 0.11);
  --line-strong: rgba(180, 70, 42, 0.45);
  --mars: #b8452c;
  --mars-hot: #e35d3a;
  --gold: #c9a85c;
  --gold-soft: #e8d6a8;
  --cream: #f4ebe0;
  --sand: #c9b7a2;
  --mute: #8a796e;
  --white: #faf7f2;
  --max: 1180px;
  --nav-h: 72px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-display-alt: "Syne", system-ui, sans-serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 16.5px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* ========== FIXED FULL-BLEED MARS SPIN (stays while scrolling) ========== */
.cosmos-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000;
}
.cosmos-bg video,
.cosmos-bg .cosmos-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(140vmax, 1600px);
  height: min(140vmax, 1600px);
  transform: translate(-50%, -50%);
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(1.05) contrast(1.05);
  box-shadow:
    0 0 120px rgba(184, 69, 44, 0.2),
    0 0 0 1px rgba(255,255,255,0.04);
}
.cosmos-fallback {
  background: center / cover no-repeat;
  animation: cosmos-spin 90s linear infinite;
}
@keyframes cosmos-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.cosmos-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 50% 48%, transparent 0%, rgba(3,2,3,0.25) 42%, rgba(3,2,3,0.78) 72%, rgba(3,2,3,0.96) 100%),
    linear-gradient(180deg, rgba(3,2,3,0.45) 0%, transparent 28%, transparent 55%, rgba(3,2,3,0.75) 100%),
    linear-gradient(90deg, rgba(3,2,3,0.55) 0%, transparent 40%, transparent 60%, rgba(3,2,3,0.4) 100%);
}
.cosmos-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Content sits above cosmos */
.site-shell {
  position: relative;
  z-index: 1;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
}
.site-header.scrolled {
  background: rgba(3, 2, 3, 0.72);
  backdrop-filter: blur(22px) saturate(1.2);
  border-bottom-color: var(--line);
}
.header-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 4px 16px rgba(0,0,0,0.4);
  background: #1a0a08;
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-word {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.22em;
}
.live-pill { display: none; }
.live-pill {
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8fbf96;
  border: 1px solid rgba(143, 191, 150, 0.3);
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.live-pill::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: #8fbf96;
  box-shadow: 0 0 8px #8fbf96;
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  margin-left: auto;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
}
.nav a {
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover, .nav a.active {
  color: var(--gold-soft);
  border-bottom-color: var(--mars);
}
.search-wrap { position: relative; flex-shrink: 0; }
.search-wrap input {
  width: 140px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 0.45rem 0.75rem;
  font-size: 0.76rem;
  transition: width 0.25s var(--ease), border-color 0.2s;
}
.search-wrap input:focus {
  outline: none;
  width: 200px;
  border-color: var(--gold);
}
.search-results {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  width: min(340px, 90vw);
  max-height: 360px;
  overflow: auto;
  background: #120d0e;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 200;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--sand);
}
.search-results a:hover { background: rgba(184,69,44,0.1); color: var(--cream); }
.search-results .sr-era {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mars-hot);
  margin-bottom: 0.15rem;
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + 3rem) 0 4.5rem;
}
.hero-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}
.hero-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
  font-weight: 500;
}
.hero-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-bottom: 1.5rem;
}
.hero-title-en {
  font-family: var(--font-display-alt);
  font-weight: 800;
  font-size: clamp(5.2rem, 14vw, 10.5rem);
  line-height: 0.86;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: uppercase;
  text-shadow: 0 16px 60px rgba(0,0,0,0.55);
}
/* Arabic title: exact spelling المريخ via Unicode + classical display fonts */
.hero-title-ar {
  display: block;
  font-family: "Aref Ruqaa", "Scheherazade New", "Traditional Arabic", "Arabic Typesetting", serif;
  font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 5.25rem);
  line-height: 1.35;
  color: #f0d090;
  margin: 0.15rem 0 0.1rem;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.35),
    0 8px 28px rgba(0,0,0,0.55);
  letter-spacing: 0;
  font-feature-settings: "liga" 1, "calt" 1;
}
.foot-ar-text {
  font-family: "Aref Ruqaa", "Scheherazade New", "Traditional Arabic", serif;
  font-weight: 700;
  font-size: 2rem;
  color: #f0d090;
  margin: 0.4rem 0 1rem;
  line-height: 1.35;
}
.hero-lede {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-style: italic;
  color: var(--sand);
  max-width: 32em;
  line-height: 1.45;
  margin-bottom: 2rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.95rem 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  color: var(--cream);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(0,0,0,0.4);
}
.btn-primary {
  background: linear-gradient(135deg, #c44b2f, #8e2e16);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 36px rgba(184, 69, 44, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.08);
  color: #fff;
  border-color: transparent;
}
.btn-dl {
  background: rgba(184, 69, 44, 0.14);
  border-color: var(--line-strong);
  color: var(--mars-hot);
}
.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  max-width: 40rem;
}
.hero-meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--gold-soft);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.hero-meta-item span {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ========== SCROLL SECTIONS (glass panels over cosmos) ========== */
.section {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto 2.5rem;
}
.section-panel {
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}
.section-panel.tight { padding: clamp(1.25rem, 3vw, 2rem); }
.section-label {
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mars-hot);
  font-weight: 500;
  margin-bottom: 0.7rem;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
}
h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: 0 0 0.9rem;
  letter-spacing: 0.03em;
}
h3 { font-size: 1.35rem; margin: 0 0 0.5rem; }
p { margin-bottom: 1rem; color: var(--sand); }
.lede {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--sand);
  max-width: 38em;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Bento / editorial grid */
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
}
.bento-wide {
  grid-column: 1 / -1;
}
.bento-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  min-height: 280px;
}
.bento-card.photo {
  min-height: 420px;
}
.bento-card.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.bento-card.photo .bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.88));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.bento-card .inner {
  padding: 1.75rem 1.6rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bento-card h3 {
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}
.bento-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mute);
}

/* Image rail */
.image-rail {
  margin: 0 0 2.5rem;
  width: 100%;
  overflow: hidden;
}
.image-rail-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(1.25rem, calc((100% - var(--max)) / 2)) 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--mars) transparent;
}
.rail-card {
  flex: 0 0 min(82vw, 460px);
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #100808;
}
.rail-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.rail-card:hover img { transform: scale(1.04); }
.rail-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1rem 0.9rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
  margin: 1.25rem 0 0;
}
.card {
  background: rgba(10, 7, 8, 0.55);
  border: 1px solid var(--line);
  padding: 1.45rem 1.35rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 190px;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
  backdrop-filter: blur(12px);
}
a.card:hover {
  border-color: rgba(201, 168, 92, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card-tag {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mars-hot);
  font-weight: 500;
}
.card h3 { color: var(--cream); font-size: 1.4rem; }
.card p { margin: 0; flex: 1; font-size: 0.9rem; color: var(--mute); }
.card-arrow {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.45rem;
}

.era-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}
@media (max-width: 760px) { .era-split { grid-template-columns: 1fr; } }
.era-panel {
  padding: 1.85rem 1.55rem;
  border: 1px solid var(--line);
  background: rgba(10, 7, 8, 0.5);
  backdrop-filter: blur(12px);
}
.era-panel.pre {
  background: linear-gradient(160deg, rgba(184,69,44,0.16), transparent 55%), rgba(10,7,8,0.5);
}
.era-panel.post {
  background: linear-gradient(160deg, rgba(90,70,120,0.14), transparent 55%), rgba(10,7,8,0.5);
}
.era-panel h2 { margin-bottom: 0.65rem; font-size: 1.85rem; }
.era-panel ul {
  margin: 0.9rem 0 0 1.1rem;
  color: var(--mute);
  font-size: 0.9rem;
}
.era-panel li { margin-bottom: 0.35rem; }

.table-wrap {
  overflow-x: auto;
  margin: 1.1rem 0 0;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--sand);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(184, 69, 44, 0.05); }
td:first-child { color: var(--cream); font-weight: 500; }

.entry {
  background: rgba(10, 7, 8, 0.55);
  border: 1px solid var(--line);
  padding: 1.45rem 1.45rem 1.3rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 5.5rem;
  backdrop-filter: blur(10px);
}
.entry:target { border-color: var(--mars); }
.entry.hidden { display: none; }
.entry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.entry-head h3 { margin: 0; flex: 1; min-width: 12rem; }
.entry-id { font-family: var(--font-mono); font-size: 0.68rem; color: var(--mute); }
.entry-meta { font-size: 0.8rem; color: var(--mute); margin-bottom: 0.7rem; }
.badge {
  display: inline-block;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.48rem;
  border: 1px solid var(--line);
  color: var(--mute);
  margin-right: 0.3rem;
}
.badge-pre { border-color: var(--line-strong); color: var(--mars-hot); background: rgba(184,69,44,0.1); }
.badge-post { border-color: #5a4a68; color: #c4b0d8; background: rgba(100,80,120,0.12); }
.badge-obj { border-color: rgba(201,168,92,0.4); color: var(--gold); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.9rem;
}
.media-card {
  background: rgba(10, 7, 8, 0.6);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.25s var(--ease);
  backdrop-filter: blur(10px);
}
.media-card:hover {
  border-color: rgba(201,168,92,0.35);
  transform: translateY(-2px);
}
.media-card.hidden { display: none; }
.media-thumb {
  aspect-ratio: 4/3;
  background: #100808;
  cursor: zoom-in;
  overflow: hidden;
}
.media-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.media-card:hover .media-thumb img { transform: scale(1.05); }
.media-thumb .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--mute);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
.media-body {
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.media-tag {
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mars-hot);
}
.media-body h3 { font-size: 1.05rem; margin: 0; }
.media-meta { font-size: 0.72rem; color: var(--mute); }
.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.media-actions .btn { padding: 0.48rem 0.7rem; font-size: 0.62rem; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 1rem 0 1.25rem;
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  padding: 0.55rem 0;
  background: linear-gradient(rgba(3,2,3,0.9) 60%, transparent);
}
.filter-btn {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  color: var(--mute);
  padding: 0.38rem 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--mars);
  color: var(--cream);
  background: rgba(184,69,44,0.16);
}
.filter-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--mute);
}

.timeline {
  position: relative;
  margin: 1.5rem 0 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line-strong);
}
.tl-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.4rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mars-hot);
  box-shadow: 0 0 0 4px rgba(3,2,3,0.9);
}
.tl-date {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mars-hot);
  margin-bottom: 0.25rem;
}
.tl-item h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }

.toc {
  background: rgba(10, 7, 8, 0.5);
  border: 1px solid var(--line);
  padding: 1.3rem 1.4rem;
  margin: 1.25rem 0 1.5rem;
  backdrop-filter: blur(10px);
}
.toc h2 {
  font-family: var(--font-ui);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 0.8rem;
  font-weight: 500;
}
.toc ol {
  margin: 0 0 0 1.1rem;
  columns: 2;
  column-gap: 2rem;
  color: var(--sand);
}
@media (max-width: 600px) { .toc ol { columns: 1; } }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 78vh;
  object-fit: contain;
  box-shadow: var(--shadow);
}
.lightbox-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  color: var(--sand);
  font-size: 0.85rem;
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #120d0e;
  color: var(--cream);
  cursor: pointer;
  font-size: 1.2rem;
}

.page-hero {
  padding: calc(var(--nav-h) + 3.5rem) 0 2.5rem;
  position: relative;
}
.page-hero-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}
.section-note {
  font-size: 0.88rem;
  color: var(--mute);
  border: 1px dashed var(--line);
  background: rgba(0,0,0,0.25);
  padding: 1rem 1.15rem;
  margin: 1.1rem 0 1.5rem;
}
.movie-card {
  background: rgba(10, 7, 8, 0.55);
  border: 1px solid var(--line);
  padding: 1.3rem 1.35rem;
  margin-bottom: 0.8rem;
  backdrop-filter: blur(10px);
}
.movie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

main {
  width: 100%;
  padding: 1rem 0 4rem;
  position: relative;
  z-index: 1;
}
main.padded-top {
  padding-top: calc(var(--nav-h) + 1.5rem);
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 3rem 1.25rem 3.5rem;
  text-align: center;
  font-size: 0.76rem;
  color: var(--mute);
  background: linear-gradient(transparent, rgba(3,2,3,0.85));
}
.site-footer .foot-mars {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.28em;
  color: var(--cream);
  margin-bottom: 0.35rem;
}
.site-footer .foot-ar-img {
  width: min(200px, 48vw);
  margin: 0.5rem auto 1.1rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
  background: transparent;
}
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: var(--gold-soft); }

.quote-strip {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto 2.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.quote-strip blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  font-style: italic;
  color: var(--cream);
  max-width: 28em;
  margin: 0 auto;
  line-height: 1.4;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.quote-strip cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 0.5rem; }
  .nav {
    order: 3;
    width: 100%;
    gap: 0.1rem 0.65rem;
    margin-left: 0;
  }
  .search-wrap { margin-left: auto; }
  .cosmos-bg video,
  .cosmos-bg .cosmos-fallback {
    width: min(160vmax, 1200px);
    height: min(160vmax, 1200px);
  }
}

/* v-ar-text-1 */

/* rooms — one reading path */
.site-header { height: auto; min-height: var(--nav-h); }
main.padded-top {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}
main.padded-top .page-intro,
main.padded-top .lede,
main.padded-top > p,
main.padded-top section > p,
main.padded-top li {
  max-width: 40rem;
}
.room-path {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1.2rem;
}
.room-path a { color: var(--gold); }
.page-intro { margin-bottom: 0.5rem; }
.page-intro h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.read-order {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
  max-width: 40rem;
}
.read-order a {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.read-order a span:first-child {
  font-family: var(--font-display);
  color: var(--mars-hot);
  font-size: 1.35rem;
}
.read-order strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--cream);
  font-weight: 600;
}
.read-order em {
  display: block;
  margin-top: 0.2rem;
  color: var(--sand);
  font-style: normal;
  font-size: 0.98rem;
}
.read-order a:hover strong { color: var(--gold-soft); }
.voice-card {
  background: rgba(10, 7, 8, 0.55);
  border: 1px solid var(--line);
  padding: 1.2rem 1.25rem 0.4rem;
  margin: 0 0 0.9rem;
}
.voice-card h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
main .meta { color: var(--gold); font-size: 0.92rem; }
main .note { color: var(--mute); font-size: 0.92rem; }
main .country-head, main .essay .country-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 0.4rem;
}
main .country-head span { color: var(--mute); letter-spacing: 0.04em; }
main .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
}
main blockquote {
  margin: 0.8rem 0 1rem;
  padding-left: 0.9rem;
  border-left: 2px solid rgba(184, 69, 44, 0.7);
}
main blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--cream);
  margin-bottom: 0.35rem;
}
main blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--mute);
}
.fig-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 0.8rem 0 1.2rem;
}
.read-fig img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.read-fig figcaption {
  font-size: 0.8rem;
  color: var(--mute);
  margin-top: 0.35rem;
}
.read-fig figcaption strong {
  display: block;
  color: var(--sand);
  font-weight: 500;
}
.next-room {
  margin: 2rem 0 1rem;
  max-width: 40rem;
}
.next-room a {
  display: inline-block;
  color: var(--cream);
  border-bottom: 1px solid var(--mars);
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  justify-content: center;
  margin: 0.8rem 0;
}
.foot-links a { color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.68rem; }
main.padded-top .table-wrap,
main.padded-top .gallery,
main.padded-top .toc,
main.padded-top .voice-card,
main.padded-top .movie-card,
main.padded-top .read-order,
main.padded-top .fig-row,
main.padded-top .card-grid,
main.padded-top .room-path,
main.padded-top .next-room { max-width: none; }
main.padded-top .toc { max-width: 100%; }
@media (max-width: 900px) {
  main.padded-top { padding-top: 8.5rem; }
}
