/* ============================================
   ASTROPHAGE COMMAND — Design System v2
   IMMERSIVE DEEP SPACE EXPERIENCE
   "I am going to figure this out."
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  --void: #0A0E1A;
  --deep-void: #040610;
  --surface: #0F131F;
  --surface-low: #171B28;
  --surface-mid: #1B1F2C;
  --surface-high: #262A37;
  --surface-highest: #313442;
  --surface-bright: #353946;
  --astrophage: #00E5A0;
  --astrophage-glow: #6EFFC0;
  --astrophage-dim: #005236;
  --astrophage-ultra-dim: #002A1C;
  --nebula: #3B82F6;
  --nebula-glow: #ADC6FF;
  --nebula-dim: #1E3A5F;
  --sol-orange: #FF6B35;
  --tau-ceti: #FFD580;
  --error: #FFB4AB;
  --star-white: #F9FAFB;
  --text-primary: #DFE2F3;
  --text-secondary: #BACBBF;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --outline: #84958A;
  --outline-variant: #3B4A41;
  --ghost-border: rgba(59, 74, 65, 0.2);
  --glass-bg: rgba(15, 19, 31, 0.5);
  --glass-border: rgba(110, 255, 192, 0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem;
  --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --space-20: 5rem; --space-24: 6rem;

  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem;
  --radius-xl: 1.5rem; --radius-pill: 9999px;

  --glow-sm: 0 0 10px rgba(0, 229, 160, 0.15);
  --glow-md: 0 0 20px rgba(0, 229, 160, 0.2);
  --glow-lg: 0 0 40px rgba(0, 229, 160, 0.3);
  --glow-xl: 0 0 80px rgba(0, 229, 160, 0.15);
  --shadow-ambient: 0 4px 40px rgba(0, 46, 106, 0.1);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-highest) var(--void);
}

body {
  font-family: var(--font-body);
  background: var(--deep-void);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: default;
}

/* Mouse glow follower */
.mouse-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: left 0.15s ease-out, top 0.15s ease-out;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--deep-void); }
::-webkit-scrollbar-thumb { background: var(--astrophage-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--astrophage); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--star-white);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 500; }

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

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--astrophage);
}

.mono { font-family: var(--font-mono); font-size: 0.85rem; }
.accent { color: var(--astrophage-glow); }
.accent-blue { color: var(--nebula-glow); }
.accent-orange { color: var(--sol-orange); }

/* --- Navigation (HUD Style) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-3) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--ghost-border);
  transition: all 0.4s ease;
}

.nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 160, 0.15), rgba(59, 130, 246, 0.1), transparent);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--star-white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: 0.02em;
}

.nav-logo .star {
  color: var(--astrophage-glow);
  font-size: 1.2rem;
  filter: drop-shadow(0 0 6px rgba(0, 229, 160, 0.5));
  animation: starPulse 3s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(0, 229, 160, 0.5)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 229, 160, 0.8)); transform: scale(1.1); }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-1);
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.03em;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--astrophage-glow);
  background: rgba(0, 229, 160, 0.05);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 30%;
  right: 30%;
  height: 2px;
  background: var(--astrophage);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--astrophage);
}

/* --- Hero Section — Viewport into Space --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-24) var(--space-8) var(--space-16);
  overflow: hidden;
}

#starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* HUD corners for hero */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-color: rgba(0, 229, 160, 0.12);
  border-style: solid;
  z-index: 2;
  pointer-events: none;
}

.hero::before {
  top: 80px;
  left: 40px;
  border-width: 1px 0 0 1px;
}

.hero::after {
  bottom: 40px;
  right: 40px;
  border-width: 0 1px 1px 0;
}

/* HUD scanline */
.hud-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 160, 0.15), transparent);
  z-index: 2;
  pointer-events: none;
}

/* Viewport vignette */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 6, 16, 0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 850px;
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.hero h1 .glow-text {
  background: linear-gradient(135deg, var(--astrophage-glow), var(--astrophage), #00B8D4, var(--nebula-glow));
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(0, 229, 160, 0.3));
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-4);
  line-height: 1.7;
}

/* Typed text line */
.typed-line {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--astrophage-glow);
  margin-bottom: var(--space-8);
  min-height: 1.5em;
}

.typed-text::after {
  content: '█';
  animation: blink 0.8s step-end infinite;
  color: var(--astrophage);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--astrophage);
  color: #003824;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--glow-md), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--glow-lg), var(--glow-xl);
  background: var(--astrophage-glow);
}

.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: rgba(0, 229, 160, 0.04);
  color: var(--astrophage-glow);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid rgba(0, 229, 160, 0.25);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ghost:hover {
  border-color: var(--astrophage);
  background: rgba(0, 229, 160, 0.08);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-6);
  background: rgba(15, 19, 31, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--astrophage);
  box-shadow: 0 0 8px var(--astrophage);
  animation: beacon 3s ease-in-out infinite;
}

@keyframes beacon {
  0%, 100% { box-shadow: 0 0 4px var(--astrophage); transform: scale(1); }
  50% { box-shadow: 0 0 16px var(--astrophage), 0 0 30px rgba(0,229,160,0.2); transform: scale(1.2); }
}

/* --- Section Dividers --- */
.section-divider {
  position: relative;
  height: 120px;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--astrophage-dim), var(--nebula-dim), var(--astrophage-dim), transparent);
}

.divider-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--ghost-border);
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--astrophage);
  box-shadow: var(--glow-sm);
}

/* --- Sections --- */
section {
  position: relative;
  padding: var(--space-20) var(--space-8);
  max-width: 1280px;
  margin: 0 auto;
}

/* Section particles canvas */
.particles-bg { position: relative; }

.section-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.section-header .label { display: inline-block; margin-bottom: var(--space-3); }
.section-header h2 { margin-bottom: var(--space-4); }
.section-header p { max-width: 640px; margin: 0 auto; font-size: 1.05rem; line-height: 1.7; }

/* --- Glass Cards — Ship Hull Panels --- */
.card {
  background: var(--surface-low);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--ghost-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.card:hover {
  border-color: rgba(0, 229, 160, 0.15);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--glow-sm);
}

.card-glass {
  background: rgba(23, 27, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(110, 255, 192, 0.08);
}

.card-glass:hover {
  background: rgba(23, 27, 40, 0.8);
  border-color: rgba(110, 255, 192, 0.18);
  box-shadow: var(--shadow-card), 0 0 30px rgba(0, 229, 160, 0.08);
}

.card-image-wrap {
  width: 100%;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: var(--space-6);
  border: 1px solid rgba(0, 229, 160, 0.1);
  position: relative;
}

.card-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inset 0 0 20px rgba(0,0,0,0.5);
  pointer-events: none;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card h3 { margin-bottom: var(--space-3); }
.card p { margin-bottom: var(--space-4); font-size: 0.9rem; line-height: 1.6; }

.card-stat {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--astrophage);
  padding: var(--space-1) var(--space-3);
  background: rgba(0, 229, 160, 0.06);
  border: 1px solid rgba(0, 229, 160, 0.12);
  border-radius: var(--radius-pill);
  display: inline-block;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* --- Tagline Banner --- */
.tagline {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  position: relative;
}

.tagline-inner {
  max-width: 750px;
  margin: 0 auto;
  position: relative;
}

.tagline p {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.tagline .quote-mark {
  font-size: 4rem;
  color: var(--astrophage-dim);
  font-family: Georgia, serif;
  line-height: 1;
  position: absolute;
  top: -20px;
  left: -30px;
  opacity: 0.5;
}

/* --- Pipeline Flow --- */
.pipeline-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: var(--space-12);
  overflow-x: auto;
  padding: var(--space-4) 0;
  position: relative;
  z-index: 1;
}

.pipeline-stage {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 var(--space-4);
}

.pipeline-node {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--surface-high);
  border: 2px solid var(--astrophage-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.pipeline-stage:hover .pipeline-node {
  border-color: var(--astrophage);
  box-shadow: var(--glow-lg);
  transform: scale(1.12) translateY(-4px);
  background: var(--surface-highest);
}

.pipeline-stage:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(50% + 44px);
  width: calc(100% - 88px);
  height: 2px;
  background: linear-gradient(90deg, var(--astrophage-dim), var(--astrophage) 50%, var(--astrophage-dim));
  z-index: 1;
  opacity: 0.5;
  animation: pipelinePulse 3s ease-in-out infinite;
}

@keyframes pipelinePulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.pipeline-stage h4 { margin-bottom: var(--space-2); font-size: 0.95rem; }
.pipeline-stage p { font-size: 0.78rem; color: var(--text-muted); max-width: 170px; margin-bottom: var(--space-2); }

.pipeline-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--astrophage);
  background: rgba(0, 229, 160, 0.06);
  border: 1px solid rgba(0, 229, 160, 0.12);
  padding: 2px 12px;
  border-radius: var(--radius-pill);
}

/* --- Architecture Diagram --- */
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--surface-low) 0%, var(--surface) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--ghost-border);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.arch-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 229, 160, 0.03), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.03), transparent 50%);
  pointer-events: none;
}

.arch-block {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
}

.arch-block.base {
  background: var(--surface-high);
  border: 1px solid var(--ghost-border);
}

.arch-block.adapter {
  background: rgba(0, 229, 160, 0.04);
  border: 1.5px solid rgba(0, 229, 160, 0.2);
  backdrop-filter: blur(8px);
}

.arch-block.adapter:hover {
  border-color: rgba(0, 229, 160, 0.4);
  box-shadow: var(--glow-md);
}

.arch-block.merged {
  background: var(--surface-high);
  border: 1.5px solid var(--astrophage);
  box-shadow: var(--glow-md);
}

.arch-block.merged:hover {
  box-shadow: var(--glow-lg), var(--glow-xl);
}

.arch-block h4 { margin-bottom: var(--space-2); }
.arch-block p { font-size: 0.82rem; margin-bottom: var(--space-3); }

.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--astrophage);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  min-width: 90px;
}

.arch-arrow .arrow-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--astrophage), transparent);
  position: relative;
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; box-shadow: 0 0 10px var(--astrophage); }
}

.arch-arrow .arrow-line::after {
  content: '▶';
  position: absolute;
  right: -10px;
  top: -8px;
  font-size: 0.65rem;
  color: var(--astrophage);
}

.module-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: var(--space-3);
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 3px 10px;
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: var(--radius-sm);
  color: var(--astrophage-glow);
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(0, 229, 160, 0.15);
  box-shadow: 0 0 8px rgba(0, 229, 160, 0.2);
}

/* --- Config Panels --- */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.config-panel {
  background: linear-gradient(145deg, var(--surface-low), var(--surface));
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--ghost-border);
  position: relative;
  overflow: hidden;
}

.config-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--astrophage-dim), transparent);
}

.config-panel h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: 1.05rem;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(59, 74, 65, 0.15);
}

.config-panel h3 .icon { color: var(--astrophage-glow); }

.config-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(59, 74, 65, 0.08);
  transition: background 0.2s;
}

.config-row:last-child { border-bottom: none; }
.config-row:hover { background: rgba(0, 229, 160, 0.02); margin: 0 calc(-1 * var(--space-4)); padding-left: var(--space-4); padding-right: var(--space-4); border-radius: var(--radius-sm); }

.config-label { font-size: 0.82rem; color: var(--text-muted); }

.config-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--astrophage-glow);
  font-weight: 500;
  text-align: right;
}

/* --- Schema Panel --- */
.schema-panel {
  background: linear-gradient(145deg, var(--surface-low), var(--surface));
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--ghost-border);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.schema-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nebula-dim), transparent);
}

.schema-panel h3 { margin-bottom: var(--space-6); }

.code-block {
  background: var(--deep-void);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 2;
  color: var(--text-secondary);
  overflow-x: auto;
  border: 1px solid rgba(59, 74, 65, 0.15);
  position: relative;
  margin-bottom: var(--space-6);
}

.code-block .key { color: var(--nebula-glow); }
.code-block .string { color: var(--astrophage-glow); }
.code-block .bracket { color: var(--text-dim); }
.code-block .tag-val { color: var(--sol-orange); }

.copy-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--surface-highest);
  color: var(--text-muted);
  border: 1px solid var(--ghost-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--astrophage-dim);
  color: var(--astrophage-glow);
  border-color: var(--astrophage-dim);
}

.domain-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.08);
  color: var(--nebula-glow);
  border: 1px solid rgba(59, 130, 246, 0.15);
  letter-spacing: 0.02em;
}

.badge.green {
  background: rgba(0, 229, 160, 0.06);
  color: var(--astrophage-glow);
  border-color: rgba(0, 229, 160, 0.15);
}

/* --- Notebooks --- */
.notebooks-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.notebook-card {
  background: linear-gradient(145deg, var(--surface-low), var(--surface));
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--ghost-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: all 0.35s ease;
}

.notebook-card:hover {
  border-color: rgba(0, 229, 160, 0.15);
  box-shadow: var(--glow-sm);
  transform: translateY(-4px);
}

.notebook-icon { font-size: 2rem; margin-bottom: var(--space-2); }

.notebook-card h4 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--star-white);
}

.notebook-card p { font-size: 0.82rem; flex-grow: 1; line-height: 1.6; }

.btn-colab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 229, 160, 0.08);
  color: var(--astrophage-glow);
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  width: fit-content;
}

.btn-colab:hover {
  background: rgba(0, 229, 160, 0.15);
  border-color: var(--astrophage);
  box-shadow: var(--glow-sm);
}

/* --- Evaluation Bars --- */
.eval-panel {
  background: linear-gradient(145deg, var(--surface-low), var(--surface));
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--ghost-border);
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 1;
}

.eval-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.eval-bar-row:last-child { margin-bottom: 0; }

.eval-label { font-size: 0.82rem; color: var(--text-secondary); min-width: 180px; }

.eval-track {
  flex: 1;
  height: 10px;
  background: var(--surface-highest);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.eval-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--astrophage-dim), var(--astrophage));
  transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.eval-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(110, 255, 192, 0.4));
  border-radius: 0 5px 5px 0;
}

.eval-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--astrophage-glow);
  min-width: 45px;
  text-align: right;
  font-weight: 600;
}

/* --- Repository Tree --- */
.repo-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.file-tree {
  background: var(--deep-void);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--ghost-border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 2;
  overflow-x: auto;
  position: relative;
}

.file-tree::before {
  content: 'MISSION FILE SYSTEM';
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.file-tree .dir { color: var(--astrophage-glow); font-weight: 600; }
.file-tree .file { color: var(--text-secondary); }
.file-tree .size { color: var(--text-dim); font-size: 0.68rem; }
.file-tree .indent { color: var(--surface-bright); user-select: none; }

.scripts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.script-card {
  background: var(--surface-low);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-4);
  border: 1px solid var(--ghost-border);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  transition: all 0.25s ease;
}

.script-card:hover {
  border-color: rgba(0, 229, 160, 0.12);
  background: var(--surface-mid);
  transform: translateX(4px);
}

.script-icon {
  color: var(--astrophage);
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.script-name {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--star-white);
  margin-bottom: 2px;
}

.script-desc { font-size: 0.72rem; color: var(--text-muted); }

/* --- Assets --- */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.asset-card {
  background: linear-gradient(145deg, var(--surface-low), var(--surface));
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid var(--ghost-border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.asset-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--astrophage-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.asset-card:hover {
  border-color: rgba(0, 229, 160, 0.12);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.asset-card:hover::before { opacity: 1; }

.asset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.asset-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.asset-title .icon { font-size: 1.2rem; }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--astrophage);
  box-shadow: 0 0 10px var(--astrophage);
  animation: beacon 3s ease-in-out infinite;
}

.status-dot.paused {
  background: var(--sol-orange);
  box-shadow: 0 0 6px rgba(255, 107, 53, 0.4);
}

.asset-url {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--nebula-glow);
  text-decoration: none;
  word-break: break-all;
  display: block;
  margin-bottom: var(--space-4);
  transition: color 0.2s;
}

.asset-url:hover { color: var(--astrophage-glow); }

.asset-meta { display: flex; flex-direction: column; gap: var(--space-2); }

.asset-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.asset-meta-row .key { color: var(--text-muted); }
.asset-meta-row .val { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.73rem; }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: var(--space-12) var(--space-8) var(--space-8);
  border-top: 1px solid var(--ghost-border);
  color: var(--text-dim);
  font-size: 0.82rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--astrophage-dim), transparent);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--astrophage-glow); }

.footer-quote {
  font-style: italic;
  color: var(--text-dim);
  margin-top: var(--space-4);
  font-size: 0.78rem;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.15s; }
.fade-in-delay-2 { transition-delay: 0.3s; }
.fade-in-delay-3 { transition-delay: 0.45s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav { padding: var(--space-3) var(--space-4); }
  .nav-links { display: none; }
  section { padding: var(--space-12) var(--space-4); }
  .pipeline-flow { flex-direction: column; align-items: center; }
  .pipeline-stage:not(:last-child)::after { display: none; }
  .arch-diagram { flex-direction: column; padding: var(--space-6); }
  .arch-arrow { transform: rotate(90deg); margin: var(--space-2) 0; }
  .repo-section { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .hero::before, .hero::after { display: none; }
}

@media (max-width: 600px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .mission-grid { grid-template-columns: 1fr; }
  .assets-grid { grid-template-columns: 1fr; }
  .rocky-companion { bottom: 16px; right: 16px; }
  .rocky-speech { max-width: 200px; font-size: 0.72rem; }
}

/* ═══════════════════════════════
   ROCKY — ERIDIAN GUIDE COMPANION
   ═══════════════════════════════ */

.rocky-companion {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.rocky-companion:hover {
  transform: scale(1.05);
}

/* Speech Bubble */
.rocky-speech {
  background: rgba(15, 19, 31, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(110, 255, 192, 0.2);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 16px;
  max-width: 260px;
  position: relative;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 160, 0.08);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.rocky-speech.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.rocky-text {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--astrophage-glow);
  line-height: 1.6;
  display: block;
}

.rocky-speech-tip {
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: rgba(15, 19, 31, 0.92);
  border-right: 1px solid rgba(110, 255, 192, 0.2);
  border-bottom: 1px solid rgba(110, 255, 192, 0.2);
  transform: rotate(45deg);
}

/* Rocky Body Container */
.rocky-body {
  position: relative;
  animation: rockyBob 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 15px rgba(0, 229, 160, 0.25));
  transition: filter 0.3s ease;
}

.rocky-companion:hover .rocky-body {
  filter: drop-shadow(0 4px 25px rgba(0, 229, 160, 0.5));
}

.rocky-sprite-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 229, 160, 0.4);
  background: #000;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
}

.rocky-sprite-image {
  width: 130%;
  height: 130%;
  object-fit: cover;
  position: absolute;
  top: -15%;
  left: -15%;
  mix-blend-mode: screen; /* Drops the black background if pure black */
}

@keyframes rockyBob {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-2deg); }
  50% { transform: translateY(-2px) rotate(0deg); }
  75% { transform: translateY(-8px) rotate(2deg); }
}

/* Excited state — when Rocky reacts */
.rocky-body.excited {
  animation: rockyExcited 0.6s ease-in-out;
}

@keyframes rockyExcited {
  0% { transform: translateY(0) scale(1); }
  20% { transform: translateY(-12px) scale(1.1); }
  40% { transform: translateY(-4px) scale(1.05); }
  60% { transform: translateY(-10px) scale(1.08); }
  80% { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* Musical note particles when Rocky talks */
.rocky-note {
  position: absolute;
  font-size: 0.9rem;
  color: var(--astrophage-glow);
  pointer-events: none;
  animation: noteFloat 1.5s ease-out forwards;
  z-index: 10001;
  opacity: 0;
}

@keyframes noteFloat {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
  50% { transform: translate(-20px, -30px) rotate(-20deg); opacity: 0.6; }
  100% { transform: translate(-40px, -60px) rotate(-40deg); opacity: 0; }
}
