/* ==========================================================================
   WARG.COM — Personal Hub & Deep-Sky Astrophotography Observatory
   ========================================================================== */

:root {
  --bg-void: #06080d;
  --bg-deep: #0b0f19;
  --bg-card: rgba(16, 22, 36, 0.75);
  --bg-card-hover: rgba(22, 31, 50, 0.88);
  --bg-elevated: #131b2e;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-highlight: rgba(96, 165, 250, 0.42);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #60a5fa;
  --accent-cyan: #38bdf8;
  --accent-nebula: #f43f5e;
  --accent-gold: #fbbf24;
  --accent-emerald: #34d399;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-glow: 0 20px 50px -15px rgba(2, 6, 23, 0.85), 0 0 28px -8px rgba(56, 189, 248, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Interactive Starfield Canvas */
#starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Ambient Nebula Glow */
.nebula-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 82% 28%, rgba(244, 63, 94, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
}

.site-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Top Telemetry Bar & Navigation Header
   ========================================================================== */
.telemetry-bar {
  background: rgba(6, 8, 13, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.45rem 0;
  backdrop-filter: blur(8px);
}

.telemetry-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.telemetry-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.telemetry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.telemetry-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.telemetry-value {
  color: var(--text-primary);
  font-weight: 500;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 11, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(244, 63, 94, 0.2));
  border: 1px solid rgba(96, 165, 250, 0.4);
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.brand-name span {
  color: var(--accent-cyan);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.nav-cta {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--text-primary);
  margin-left: 0.35rem;
}

.nav-links a.nav-cta:hover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.24);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 5.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.35rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.85rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 58ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.82rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.35);
  box-shadow: 0 10px 25px -6px rgba(2, 132, 199, 0.5);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -6px rgba(56, 189, 248, 0.65);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Hero Featured Plate Showcase Card */
.hero-grid-pano {
  grid-template-columns: 1fr;
  gap: 2.25rem;
}

.hero-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
  position: relative;
}

.hero-showcase-pano {
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow:
    0 24px 60px -15px rgba(2, 6, 23, 0.92),
    0 0 38px -8px rgba(52, 211, 153, 0.22),
    0 0 24px -10px rgba(251, 191, 36, 0.18);
}

.hero-showcase-img-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #05070b;
}

.hero-showcase-img-wrap.hero-pano-wrap {
  aspect-ratio: 2272 / 833;
}

.hero-showcase-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-showcase-card:hover .hero-showcase-img-wrap img {
  transform: scale(1.03);
}

.plate-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  background: rgba(6, 8, 13, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.plate-badge-headliner {
  background: rgba(6, 12, 16, 0.88);
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--accent-emerald);
  font-weight: 600;
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.25);
}

.hero-showcase-meta {
  padding: 1.35rem 1.6rem;
}

.hero-showcase-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}

.hero-showcase-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section Layout & Cards
   ========================================================================== */
.section {
  padding: 4.5rem 0;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 60ch;
  margin-top: 0.4rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--accent-cyan);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}

.glass-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.glass-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.spec-list {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.14);
}

.spec-list li span:first-child {
  color: var(--text-muted);
}

.spec-list li span:last-child {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ==========================================================================
   Astrophotography Gallery Grid & Filter Controls
   ========================================================================== */
.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.38);
}

.search-box {
  position: relative;
  min-width: 240px;
  flex: 0 1 280px;
}

.search-box input {
  width: 100%;
  background: rgba(6, 8, 13, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.astro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}

.astro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.astro-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-glow);
}

.astro-card.astro-card-pano {
  grid-column: 1 / -1;
  border-color: rgba(52, 211, 153, 0.36);
  box-shadow:
    0 20px 55px -15px rgba(2, 6, 23, 0.9),
    0 0 32px -8px rgba(52, 211, 153, 0.18);
}

.astro-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #04060a;
}

.astro-card.astro-card-pano .astro-thumb {
  aspect-ratio: 2272 / 833;
}

.astro-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.astro-card:hover .astro-thumb img {
  transform: scale(1.05);
}

.astro-card.astro-card-pano:hover .astro-thumb img {
  transform: scale(1.025);
}

.astro-catalog-tag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: rgba(6, 8, 13, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.astro-catalog-tag.astro-headliner-tag {
  background: rgba(6, 12, 16, 0.9);
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--accent-emerald);
}

.astro-category-tag {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(8px);
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.astro-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.astro-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.astro-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
  flex: 1;
}

.astro-telemetry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 0.85rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
}

.telemetry-cell .label {
  color: var(--text-muted);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.telemetry-cell .val {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Contact Section (Sends to JUNK@warg.com)
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin: 1.25rem 0;
  word-break: break-all;
}

.contact-form {
  display: grid;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: rgba(6, 8, 13, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.78rem 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Honeypot field hidden from human visitors */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

.form-status.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

/* ==========================================================================
   Full-Screen Lightbox Modal (Astrophotography Technical Plate)
   ========================================================================== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 9, 0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-dialog {
  width: 100%;
  max-width: 1140px;
  max-height: 90vh;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
  position: relative;
}

.lightbox-media {
  background: #020306;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 360px;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(6, 8, 13, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}

.lightbox-nav-btn:hover {
  background: rgba(56, 189, 248, 0.3);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-details {
  padding: 2rem;
  overflow-y: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
}

.lightbox-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.lightbox-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.lightbox-table th {
  text-align: left;
  padding: 0.55rem 0.5rem 0.55rem 0;
  color: var(--text-muted);
  font-weight: 500;
  width: 42%;
}

.lightbox-table td {
  padding: 0.55rem 0;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  background: rgba(6, 8, 13, 0.9);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 920px) {
  .hero-grid,
  .contact-layout,
  .lightbox-dialog {
    grid-template-columns: 1fr;
  }

  .lightbox-media img {
    max-height: 48vh;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 0.9rem 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .astro-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   GENEALOGY PAGE — "The Warg: Ancestry of a Legend"
   Distinctive Nocturnal Forest & Ancient Field-Guide Identity
   ========================================================================== */

body.theme-genealogy {
  --bg-void: #040706;
  --bg-deep: #070c0a;
  --bg-card: rgba(11, 18, 15, 0.84);
  --bg-card-hover: rgba(16, 26, 22, 0.92);
  --border-subtle: rgba(168, 162, 158, 0.16);
  --border-parchment: rgba(217, 155, 38, 0.34);
  --text-primary: #f5f2eb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-amber: #f59e0b;
  --accent-gold-soft: #e2c07d;
  --accent-moss: #34d399;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-cinzel: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  background-color: var(--bg-void);
}

body.theme-genealogy .nebula-backdrop {
  background:
    radial-gradient(circle at 50% 12%, rgba(245, 158, 11, 0.07) 0%, transparent 48%),
    radial-gradient(circle at 15% 40%, rgba(16, 185, 129, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(148, 163, 184, 0.05) 0%, transparent 50%);
}

body.theme-genealogy .site-header {
  background: rgba(5, 9, 8, 0.86);
  border-bottom-color: rgba(226, 192, 125, 0.18);
}

body.theme-genealogy .brand-mark {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(16, 185, 129, 0.16));
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.18);
}

body.theme-genealogy .brand-mark svg {
  color: var(--accent-amber);
}

body.theme-genealogy .brand-name span {
  color: var(--accent-gold-soft);
}

body.theme-genealogy .nav-links a.active {
  color: var(--accent-gold-soft);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* --------------------------------------------------------------------------
   Opening Encounter: Deep Forest Stage
   -------------------------------------------------------------------------- */
.forest-encounter-section {
  padding: 2.25rem 0 1.5rem;
  position: relative;
}

.forest-intro-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.eyebrow-ancient {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold-soft);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(226, 192, 125, 0.32);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.genealogy-hero-title {
  font-family: var(--font-cinzel);
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #f8f5ee;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.genealogy-hero-title span {
  background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 55%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.genealogy-hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  font-style: italic;
  color: #cbd5e1;
  max-width: 62ch;
  margin-top: 0.45rem;
}

.scene-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.scene-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(12, 20, 17, 0.88);
  border: 1px solid rgba(226, 192, 125, 0.3);
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.52rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.scene-toggle-btn:hover,
.scene-toggle-btn[aria-pressed="true"] {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.16);
  color: #fef3c7;
}

/* Interactive Forest Stage Container */
.warg-forest-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 440px;
  max-height: 680px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #030605;
  border: 1px solid rgba(226, 192, 125, 0.28);
  box-shadow:
    0 28px 75px -15px rgba(0, 0, 0, 0.95),
    0 0 50px -12px rgba(245, 158, 11, 0.16),
    inset 0 0 80px rgba(0, 0, 0, 0.75);
  isolation: isolate;
}

.warg-illustration-layer {
  position: absolute;
  inset: -2.5%;
  width: 105%;
  height: 105%;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
  will-change: transform;
  z-index: 1;
}

.warg-illustration-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  filter: contrast(1.04) brightness(0.94);
  animation: wargSubtleBreath 9s ease-in-out infinite;
}

@keyframes wargSubtleBreath {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.016);
  }
}

/* Shifting Moonbeam & Canopy Shadow Overlay */
.forest-canopy-shadows {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 20%, rgba(148, 163, 184, 0.07) 34%, transparent 48%),
    linear-gradient(124deg, transparent 52%, rgba(226, 192, 125, 0.05) 63%, transparent 76%),
    radial-gradient(circle at 50% 42%, transparent 35%, rgba(2, 5, 4, 0.72) 100%);
  animation: canopyShift 16s ease-in-out infinite alternate;
}

@keyframes canopyShift {
  0% {
    opacity: 0.78;
    transform: translateX(-1.2%) scale(1.02);
  }
  100% {
    opacity: 0.96;
    transform: translateX(1.2%) scale(1.04);
  }
}

/* Lantern / Watchful Presence Highlight Mode */
.warg-lantern-glow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    circle 320px at var(--spotlight-x, 50%) var(--spotlight-y, 42%),
    rgba(245, 158, 11, 0.16) 0%,
    rgba(245, 158, 11, 0.04) 48%,
    rgba(2, 5, 4, 0.52) 100%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
}

.warg-forest-stage.lantern-active .warg-lantern-glow,
.warg-forest-stage:hover .warg-lantern-glow {
  opacity: 1;
}

.warg-forest-stage.lantern-active .warg-illustration-layer img {
  filter: contrast(1.08) brightness(1.06);
}

/* Foreground Framed Pine & Bough Silhouette Vignette (SVG Layer) */
.forest-foreground-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

/* Drifting Ground Mist Canvas */
#forest-mist-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* CSS Drifting Mist Ribbons (Fallback & Layered Depth) */
.mist-layer {
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: 0;
  height: 46%;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 42% at 28% 82%, rgba(203, 213, 225, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 48% at 72% 88%, rgba(148, 163, 184, 0.11) 0%, transparent 72%);
  filter: blur(14px);
  animation: mistDrift 24s ease-in-out infinite alternate;
}

@keyframes mistDrift {
  0% {
    transform: translateX(-6%) translateY(0);
  }
  100% {
    transform: translateX(6%) translateY(-6px);
  }
}

/* Scene Bottom Overlay & Field Sighting Caption */
.forest-stage-hud {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 6;
  padding: 2.5rem 1.75rem 1.4rem;
  background: linear-gradient(to top, rgba(3, 6, 5, 0.95) 0%, rgba(3, 6, 5, 0.68) 58%, transparent 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
}

.sighting-caption {
  max-width: 64ch;
}

.sighting-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-amber);
  margin-bottom: 0.35rem;
}

.sighting-quote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #f8f5ee;
  line-height: 1.45;
}

.sighting-telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.sighting-pill {
  background: rgba(8, 14, 12, 0.85);
  border: 1px solid rgba(226, 192, 125, 0.25);
  backdrop-filter: blur(8px);
  padding: 0.38rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: #e2e8f0;
}

.sighting-pill strong {
  color: var(--accent-gold-soft);
}

/* --------------------------------------------------------------------------
   Transition: Discovering an Ancient Field Guide
   -------------------------------------------------------------------------- */
.field-guide-transition {
  position: relative;
  margin: 2.25rem auto 1rem;
  text-align: center;
  padding: 1.75rem 1rem 0.75rem;
}

.runic-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  color: var(--accent-gold-soft);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  margin-bottom: 0.9rem;
}

.runic-rule::before,
.runic-rule::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 220px;
  background: linear-gradient(90deg, transparent, rgba(226, 192, 125, 0.45), transparent);
}

.field-guide-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-amber);
}

.field-guide-lead {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-style: italic;
  color: #cbd5e1;
  max-width: 58ch;
  margin: 0.4rem auto 0;
}

/* --------------------------------------------------------------------------
   Ancient Field Guide / Scholarly Research Report Container
   -------------------------------------------------------------------------- */
.codex-wrapper {
  padding: 1.5rem 0 4.5rem;
}

.codex-folio {
  background: linear-gradient(180deg, rgba(12, 19, 16, 0.95) 0%, rgba(8, 13, 11, 0.98) 100%);
  border: 1px solid rgba(226, 192, 125, 0.28);
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(254, 243, 199, 0.12);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  position: relative;
}

.codex-header {
  border-bottom: 1px solid rgba(226, 192, 125, 0.24);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.codex-classification {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold-soft);
  margin-bottom: 0.75rem;
}

.codex-title {
  font-family: var(--font-cinzel);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  color: #f8f5ee;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.codex-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 2vw, 1.4rem);
  font-style: italic;
  color: #cbd5e1;
  max-width: 64ch;
  margin: 0 auto 1.5rem;
}

/* Quick-Jump Chapter Bar */
.codex-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.codex-toc a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 192, 125, 0.22);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.codex-toc a:hover {
  border-color: var(--accent-amber);
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.12);
}

/* Two-Column Report Body + Specimen Sidebar */
.codex-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.75rem;
  align-items: start;
}

.codex-article {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.codex-section h3 {
  font-family: var(--font-cinzel);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fef3c7;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(226, 192, 125, 0.16);
  padding-bottom: 0.55rem;
}

.codex-section h3 .sec-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.18rem 0.52rem;
  border-radius: 4px;
}

.codex-section p {
  font-size: 1.03rem;
  line-height: 1.82;
  color: #e2e8f0;
  margin-bottom: 1.1rem;
}

.codex-section p:last-child {
  margin-bottom: 0;
}

.codex-section a {
  color: var(--accent-gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.codex-section a:hover {
  color: #fef3c7;
}

/* Etymological Cognate Grid */
.etymology-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.35rem 0;
}

.etym-card {
  background: rgba(5, 9, 8, 0.78);
  border: 1px solid rgba(226, 192, 125, 0.22);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}

.etym-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
}

.etym-term {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: #f8f5ee;
  margin: 0.15rem 0 0.35rem;
}

.etym-gloss {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* Manuscript Blockquote / Primary Text Excerpt */
.codex-quote {
  margin: 1.35rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.codex-quote p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: #f8f5ee;
  line-height: 1.65;
  margin-bottom: 0.45rem;
}

.codex-quote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-style: normal;
  color: var(--accent-gold-soft);
}

/* Epistemic Evidence Matrix (Documented vs. Parallels vs. Uncertain) */
.evidence-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.evidence-filter-btn {
  background: rgba(5, 9, 8, 0.8);
  border: 1px solid rgba(226, 192, 125, 0.24);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.42rem 0.82rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.evidence-filter-btn:hover,
.evidence-filter-btn.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--accent-amber);
  color: #fef3c7;
}

.evidence-list {
  display: grid;
  gap: 1rem;
}

.evidence-item {
  background: rgba(5, 9, 8, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.35rem;
  transition: border-color 0.2s ease;
}

.evidence-item:hover {
  border-color: rgba(226, 192, 125, 0.4);
}

.evidence-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.evidence-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8f5ee;
}

.evidence-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.badge-documented {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.badge-parallel {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.badge-uncertain {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

/* Field Guide Specimen Sidebar */
.codex-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 92px;
}

.specimen-card {
  background: rgba(5, 9, 8, 0.88);
  border: 1px solid rgba(226, 192, 125, 0.26);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.specimen-card h4 {
  font-family: var(--font-cinzel);
  font-size: 1.05rem;
  color: var(--accent-gold-soft);
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(226, 192, 125, 0.18);
  padding-bottom: 0.45rem;
}

.specimen-dl {
  display: grid;
  gap: 0.65rem;
  font-size: 0.86rem;
}

.specimen-dl div {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.14);
}

.specimen-dl dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.specimen-dl dd {
  color: #f1f5f9;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Scholarly References List */
.references-list {
  list-style: decimal;
  padding-left: 1.35rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.references-list li::marker {
  font-family: var(--font-mono);
  color: var(--accent-amber);
}

/* Reduced Motion & Manual Pause Support */
@media (prefers-reduced-motion: reduce) {
  .warg-illustration-layer img,
  .forest-canopy-shadows,
  .mist-layer {
    animation: none !important;
    transition: none !important;
  }
}

.warg-forest-stage.motion-paused .warg-illustration-layer img,
.warg-forest-stage.motion-paused .forest-canopy-shadows,
.warg-forest-stage.motion-paused .mist-layer {
  animation-play-state: paused !important;
}

@media (max-width: 960px) {
  .codex-grid {
    grid-template-columns: 1fr;
  }

  .codex-sidebar {
    position: static;
  }

  .warg-forest-stage {
    aspect-ratio: 4 / 3;
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .warg-forest-stage {
    aspect-ratio: 1 / 1;
    min-height: 340px;
  }

  .forest-stage-hud {
    padding: 1.5rem 1rem 1rem;
  }
}

