/* ============================================================
   GHOST CITADEL — MAIN STYLESHEET
   Aesthetic: Aerospace Brutalism & Spatial Glassmorphism
   Status: 100% Complete, QA Patched, Layout Optimized
   ============================================================ */

/* ============================================================
   CORE SYSTEM & COLOR VARIABLES
   ============================================================ */

:root {
  /* Typography System (With Safe Fallbacks) */
  --font-header: 'Space Grotesk', 'Orbitron', system-ui, sans-serif;
  --font-body: 'IBM Plex Mono', 'Share Tech Mono', monospace;

  /* Atmospheric Color Palette */
  --bg-deep: #030508;
  --bg-ambient: #0a111a;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85); 
  
  /* Highly Controlled Accents */
  --neon-blue: #0088ff;
  --cyan-glow: #00e5ff;
  --accent-cyan: #00e5ff;
  --accent-cyan-glow: rgba(0, 229, 255, 0.4);

  /* GPU-Safe Spatial Glass System */
  --glass-bg: rgba(12, 18, 28, 0.6); 
  
  /* Pixel-perfect inset borders */
  --glass-border-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --glass-highlight-inset: inset 0 1px 0 0 rgba(255, 255, 255, 0.25);
  
  --glass-border-hover: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  --glass-highlight-hover: inset 0 1px 0 0 rgba(255, 255, 255, 0.6);

  --panel-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  
  color-scheme: dark;
}

/* Future-proofing for high-gamut displays */
@supports (color: oklch(0.5 0 0)) {
  :root {
    --bg-deep: oklch(0.12 0.02 240);
    --bg-ambient: oklch(0.18 0.04 240);
    --neon-blue: oklch(0.7 0.15 240);
    --cyan-glow: oklch(0.85 0.18 190);
    --accent-cyan: oklch(0.85 0.18 190);
  }
}

/* ============================================================
   GLOBAL RESET & TYPOGRAPHY LOGIC
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.5); 
  scrollbar-width: thin;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at top center, var(--bg-ambient) 0%, var(--bg-deep) 100%);
  color: var(--text-secondary);
  line-height: 1.7;
  min-height: 100svh;
  font-weight: 400;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  accent-color: var(--accent-cyan);
}

::selection { background: rgba(0, 229, 255, 0.2); color: #ffffff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* --- ARCHITECTURAL HEADERS --- */
h1, h2, h3, h4, h5,
.section-title,
.btn,
.highlight {
  font-family: var(--font-header);
  color: var(--text-primary);
  font-weight: 600; 
  text-transform: uppercase;
  letter-spacing: 0.08em; 
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

nav {
  font-family: var(--font-header);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-shimmer-playground .text,
.platform-badges .badge {
  font-family: var(--font-header);
  letter-spacing: 0.15em;
}

/* --- TELEMETRY BODY TEXT --- */
p, li, ul, ol, .tech-lede, .footer-column, .media-caption {
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.muted,
.tech-card .muted,
.media-caption {
  color: rgba(255, 255, 255, 0.6);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--text-primary); outline-offset: 4px; border-radius: 4px;
}

/* ============================================================
   PULSING OUTER GLOW TYPOGRAPHY
   ============================================================ */

/* Primary Header Glow */
.hero h1, 
.section-title {
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: initial;
  animation: neon-pulse 3s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
  0% { text-shadow: 0 0 10px rgba(0, 229, 255, 0.4), 0 0 20px rgba(0, 229, 255, 0.1); }
  100% { text-shadow: 0 0 12px rgba(0, 229, 255, 0.8), 0 0 25px rgba(0, 229, 255, 0.5), 0 0 40px rgba(0, 229, 255, 0.3); }
}

/* QA FIX: Subtle glow for body paragraphs that use the class */
p.glow-text, span.glow-text {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

/* ============================================================
   PIXEL-PERFECT SPATIAL GLASS SYSTEM (THE PANELS)
   ============================================================ */

.project-card, 
.media-card, 
.metrics-pill, 
#about-pillars .pillar-box, 
#about-responsibility .pillar-box, 
body.page-about .about-feature-card, 
body.page-about .culture-inner, 
.tech-card, 
.slide {
  position: relative; 
  border-radius: var(--panel-radius); 
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: none; 
  box-shadow: var(--glass-border-inset), var(--glass-highlight-inset), 0 24px 48px rgba(0, 0, 0, 0.8);       
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.project-card:hover, .media-card:hover, .tech-card:hover, #about-pillars .pillar-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-border-hover), var(--glass-highlight-hover), 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 80px rgba(0, 229, 255, 0.06);
}

.metrics-pill { border-radius: 999px; }

/* ============================================================
   HEADER & NAV (GRID LAYOUT)
   ============================================================ */

header {
  position: fixed; top: 0; width: 100%;
  background: rgba(3, 5, 8, 0.6); 
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform: translateZ(0); padding: 0 5%; z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
  min-height: 75px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}

.logo { justify-self: start; display: flex; align-items: center; text-decoration: none; z-index: 1002; }
.logo-img { width: auto; height: 52px; filter: brightness(0) invert(1); }
.logo-text { display: none; }
nav { justify-self: center; }

.nav-links, .nav-links ul { display: flex; flex-direction: row; align-items: center; gap: clamp(16px, 1.5vw, 28px); list-style: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: clamp(0.75rem, 1vw, 0.88rem); position: relative; padding: 6px 0; letter-spacing: 0.1em; white-space: nowrap; transition: color 0.25s ease; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 50%; width: 0%; height: 1px; background: var(--text-primary); transform: translateX(-50%); transition: width 0.3s ease; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a.active::after { width: 100%; }

.top-cta { justify-self: end; width: max-content; }

/* Mobile Nav Toggle */
.mobile-nav-toggle { display: none; background: transparent; border: none; width: 44px; height: 44px; padding: 8px; position: relative; z-index: 1002; cursor: pointer; border-radius: 10px; }
.hamburger { position: relative; width: 24px; height: 2px; border-radius: 2px; background: var(--text-primary); transition: transform .25s ease, background .25s ease; }
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; border-radius: 2px; background: var(--text-primary); transition: transform .25s ease, top .25s ease, opacity .2s ease; }
.hamburger::before { top: -7px; } .hamburger::after { top:  7px; }
.mobile-nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.mobile-nav-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* Mobile Menu */
/* 2. THE TRUE FULL-SCREEN MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1001;
  background: rgba(3, 5, 8, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s 0.4s;
}

.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s 0s;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.mobile-menu li a {
  display: block;
  text-align: center;
  font-size: 1.5rem;
  font-family: var(--font-header);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  border: none;
  box-shadow: none; /* Removed the clunky boxes */
  padding: 10px;
  transition: var(--transition);
}

.mobile-menu li a:hover, 
.mobile-menu li a:focus-visible, 
.mobile-menu li a.active {
  color: var(--accent-cyan);
  text-shadow: 0 0 15px var(--accent-cyan-glow);
  transform: scale(1.05);
  box-shadow: none;
  background: transparent;
}

.mobile-menu-close {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 2.5rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 1005;
  transition: opacity 0.25s ease;
}

.mobile-menu-close:hover {
  opacity: 0.6;
}

/* ============================================================
   BUTTONS & SHIMMER PLAYGROUND
   ============================================================ */

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; text-transform: uppercase; font-family: var(--font-header); font-weight: 600; letter-spacing: 0.1em; transition: var(--transition); position: relative; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); cursor: pointer; min-height: 48px; padding: 10px 32px; text-decoration: none; font-size: 0.85rem; }
.btn-secondary { background: rgba(255, 255, 255, 0.03); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); box-shadow: inset 0 0 0 1px var(--accent-cyan); }

.btn-shimmer-playground { --glow-hue: 180deg; --shadow-hue: 200deg; position: relative; display: inline-flex; align-items: center; padding: 0 1.5em; height: 40px; background: linear-gradient(120deg, #0a111a, #0d1624); color: var(--text-primary); font-family: var(--font-header); font-size: 0.8rem; font-weight: 600; border: none; box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.4); border-radius: 6px; letter-spacing: 0.1em; text-transform: uppercase; overflow: hidden; cursor: pointer; transition: var(--transition); transform: translateZ(0); }
@keyframes shimmer-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.btn-shimmer-playground .shimmer { position: absolute; inset: -50%; pointer-events: none; z-index: 2; background: conic-gradient(from 0deg, transparent 0deg 60deg, rgba(0, 229, 255, 0.3) 120deg 180deg, transparent 240deg 360deg); animation: shimmer-spin 3s linear infinite; will-change: transform; }
.btn-shimmer-playground .text { position: relative; z-index: 4; }
.btn-shimmer-playground:hover, .btn-shimmer-playground:focus { box-shadow: inset 0 0 0 1px var(--accent-cyan), 0 0 15px rgba(0, 229, 255, 0.3); }

/* ============================================================
   MAIN LAYOUT & HERO
   ============================================================ */

main { 
  max-width: 2400px; 
  margin: 0 auto; /* Changed from 70px to 0 to eliminate the gap */
  position: relative; 
  overflow-x: clip; 
}
section { padding: 100px 5%; position: relative; }

.section-title { font-size: clamp(2rem, 4vw, 2.8rem); text-align: center; margin-bottom: 80px; position: relative; padding-bottom: 28px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background: var(--text-primary); opacity: 0.3; }

/* QA FIX: Reduced spacing above slide deck */
#vision .section-title { margin-bottom: 40px; }

.hero {
  min-height: 100svh; 
  /* Added top padding so the text stays centered, but the background covers the top */
  padding: 110px 5% 60px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  text-align: center; 
  position: relative; 
  overflow: hidden; 
}.parallax-bg { position: absolute; inset: -5%; background: radial-gradient(circle at center, var(--bg-ambient) 0%, var(--bg-deep) 70%); background-size: cover; background-position: top center; z-index: -1; overflow: hidden; }
.hero-bg-image { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(1.1) brightness(0.89); transform: scale(1.04); }
.hero-poster, .hero-animated { position: absolute; inset: 0; }
.hero-animated { opacity: 0; transition: opacity 0.6s ease; }
.hero-animated.loaded { opacity: 1; }

.hero-content { max-width: 960px; z-index: 1; position: relative; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 16px; line-height: 1.1; letter-spacing: -0.01em; }
.hero p { font-size: clamp(1.05rem, 2vw + 0.2rem, 1.2rem); max-width: 760px; margin: 0 auto 32px; line-height: 1.6; color: var(--text-secondary); }
.cta-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.hero::before, .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero::before { background: radial-gradient(ellipse at center, rgba(3, 5, 8, 0.45) 0%, rgba(3, 5, 8, 0.85) 70%, rgba(3, 5, 8, 1) 100%); }

/* ============================================================
   SHOWCASE & MEDIA (Strict 2x2 Grid)
   ============================================================ */

#showcase, #flagship-projects { padding-block: 100px; }
#showcase .showcase-grid, #flagship-projects .showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(30px, 4vw, 60px); width: 100%; max-width: clamp(1100px, 80vw, 1400px); margin: 60px auto 0; }

.project-image { aspect-ratio: 16/9; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.project-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-content { padding: 35px; flex-grow: 1; display: flex; flex-direction: column; }
.project-title { font-size: 1.6rem; color: var(--text-primary); margin-bottom: 10px; }
.project-description { color: var(--text-secondary); margin-bottom: 25px; line-height: 1.6; flex-grow: 1; }

.project-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); color: var(--text-primary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; margin-top: auto; align-self: flex-start; }
.project-badge::before { content: ''; display: block; width: 8px; height: 8px; border-radius: 50%; }
.project-badge--active::before { background: #00ffaa; box-shadow: 0 0 8px #00ffaa; }
.project-badge--soon::before { background: var(--text-secondary); }
.project-badge--beta::before { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }

.research-label { 
  font-family: var(--font-body); color: var(--accent-cyan); font-size: 0.75rem; font-weight: 500;
  margin-bottom: 1.2rem; text-transform: uppercase; letter-spacing: 0.1em; display: inline-block; 
  padding: 6px 12px; border-radius: 4px; background: rgba(0, 229, 255, 0.08); 
  border: 1px solid rgba(0, 229, 255, 0.2); 
}

/* --- IN ACTION / MEDIA GRID --- */
#in-action::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px); background-size: 60px 60px; opacity: 0.5; z-index: -1; pointer-events: none; }
.media-container { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.media-preview { aspect-ratio: 16/9; background: rgba(0, 0, 0, 0.4); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.media-caption { padding: 15px; text-align: center; font-size: 0.95rem; font-weight: 500; color: var(--text-primary); }

.media-icon { font-size: 4rem; z-index: 2; transition: transform 0.3s ease; filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.2)); }
.media-card:hover .media-icon { transform: scale(1.1); filter: drop-shadow(0 0 40px rgba(0, 229, 255, 0.4)); }

.play-button { position: absolute; z-index: 10; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 30px rgba(0, 229, 255, 0.2); width: 70px; height: 70px; font-size: 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-primary); cursor: pointer; transition: var(--transition); }
.play-button:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 40px rgba(0, 229, 255, 0.4); }

/* ============================================================
   VISION — SLIDE DECK (FROSTED PANES)
   ============================================================ */

.slide-deck-container { max-width: 1600px; margin: 0 auto; position: relative; perspective: 1200px; height: clamp(400px, 60vh, 550px); display: flex; justify-content: center; align-items: center; }
.slide-deck { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; }

.slide { position: absolute; inset: 0; margin: auto; width: clamp(280px, 85vw, 700px); height: clamp(320px, 75%, 450px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease; transform: translateZ(0); background-size: cover; background-position: center; }

.slide::before { content: ''; position: absolute; inset: 0; background: rgba(10, 15, 25, 0.45); z-index: -1; border-radius: inherit; }
.slide > * { position: relative; z-index: 2; }
.slide h3 { font-size: clamp(1.2rem, 3vw, 2rem); color: var(--text-primary); margin-bottom: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.slide p { font-size: 0.95rem; color: var(--text-secondary); margin: 0 auto; max-width: 40ch; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }

.slide[data-state="active"] { transform: translate3d(0, 0, 0) scale(1); opacity: 1; z-index: 3; }
.slide[data-state="prev"] { transform: translate3d(-30%, 0, -100px) rotateY(10deg) scale(0.9); opacity: 0.3; z-index: 2; pointer-events: none; }
.slide[data-state="next"] { transform: translate3d(30%, 0, -100px) rotateY(-10deg) scale(0.9); opacity: 0.3; z-index: 2; pointer-events: none; }
.slide[data-state="hidden"], .slide[data-state="prev-2"], .slide[data-state="next-2"] { transform: scale(0.8); opacity: 0; z-index: 1; pointer-events: none; }

.slide-nav { position: absolute; top: 50%; left: 50%; width: clamp(300px, 95vw, 900px); transform: translate(-50%, -50%); display: flex; justify-content: space-between; z-index: 10; pointer-events: none; }
.slide-arrow { pointer-events: all; background: rgba(255, 255, 255, 0.1); border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); color: var(--text-primary); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; backdrop-filter: blur(10px); }
.slide-arrow::before { font-size: 1.2rem; line-height: 1; color: inherit; font-family: sans-serif; }
#prevSlide::before { content: "‹"; } #nextSlide::before { content: "›"; }
.slide-arrow:hover { transform: scale(1.1); background: rgba(255, 255, 255, 0.2); }

.slide-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.slide-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); cursor: pointer; border: none; transition: all 0.3s ease; }
.slide-dot.active { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); transform: scale(1.2); }

/* ============================================================
   TECHNOLOGY SECTION
   ============================================================ */

#technology { --site-max: 1600px; --pad: clamp(16px, 4vw, 40px); padding-block: 100px; }
.tech-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(30px, 4vw, 50px); max-width: 1400px; margin: 60px auto 0; }
.tech-card { padding: 30px; }
.tech-lede { color: var(--text-secondary); text-align: center; max-width: 700px; margin-inline: auto; font-size: 1rem; line-height: 1.65; }

#technology .tech-card h3, #technology .tech-card h4 { color: var(--text-primary); font-size: 1.2rem; margin-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 10px; }

.progress { background: rgba(255, 255, 255, 0.05); border-radius: 4px; margin: 25px 0 15px; height: 4px; position: relative; }
.progress > div { background: var(--text-primary); height: 100%; border-radius: 4px; position: relative; box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
.progress > div > span { position: absolute; right: 0; top: -22px; font-size: 0.75rem; color: var(--text-secondary); font-family: var(--font-body); white-space: nowrap; }

.tech-subsection { margin-top: 25px; padding-top: 15px; border-top: 1px dashed rgba(255, 255, 255, 0.1); }
.tech-subsection h4 { color: var(--text-primary); font-size: 1.05rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-header); border: none; padding: 0; }

.bullets { list-style: none; padding: 0; margin: 15px 0 0 0; display: grid; gap: 8px; }
.bullets li { color: var(--text-secondary); padding-left: 16px; font-size: 0.9rem; position: relative; line-height: 1.4; }
.bullets li::before { content: "—"; position: absolute; left: 0; color: var(--text-secondary); }

.flight { list-style: none; padding: 0; margin: 15px 0; display: grid; gap: 8px; }
.flight li { color: var(--text-secondary); padding-left: 20px; font-size: 0.9rem; position: relative; line-height: 1.4; }
.flight li::before { content: "▹"; position: absolute; left: 0; color: var(--accent-cyan); }

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 15px; color: var(--text-secondary); }
thead th { color: var(--text-primary); text-align: left; padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
tbody td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.dot.green  { background: #00ffaa; box-shadow: inset 0 0 0 1px #00ffaa, 0 0 8px rgba(0, 255, 170, 0.5); } 
.dot.yellow { background: #ffaa00; box-shadow: inset 0 0 0 1px #ffaa00, 0 0 8px rgba(255, 170, 0, 0.5); } 
.dot.blue   { background: var(--accent-cyan); box-shadow: inset 0 0 0 1px var(--accent-cyan), 0 0 8px var(--accent-cyan-glow); }

#technology .tech-diagram img { width: clamp(520px, 52vw, 900px); max-width: 100%; height: auto; aspect-ratio: 600 / 90; display: block; margin-inline: auto; }
.ai-card-inner { position: relative; z-index: 2; }
.ai-matrix-layer { position: absolute; left: 0; right: 0; top: -70%; height: 240%; z-index: 1; pointer-events: none; background-image: linear-gradient(to bottom, transparent 0, rgba(0, 229, 255, 0.15) 55%, transparent 100%), linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 0, transparent 36px), linear-gradient(to right, rgba(0, 229, 255, 0.1) 1px, transparent 1px); background-size: 100% 140px, 100% 32px, 22px 100%; opacity: 0.3; mix-blend-mode: screen; transform: translate3d(0, 0, 0); animation: aiMatrixFall 14s linear infinite; }
@keyframes aiMatrixFall { 0% { transform: translateY(0); } 100% { transform: translateY(35%); } }

/* ============================================================
   ABOUT PAGE OVERRIDES 
   ============================================================ */

body.page-about { --about-max-width: clamp(70rem, 90vw, 110rem); --about-side-pad: min(5vw, 80px); }
body.page-about .hero { min-height: calc(100vh - 70px); width: 100%; max-width: none; padding: clamp(70px, 18vh, 150px) var(--about-side-pad) 80px; }
body.page-about section:not(.hero) { padding-block: clamp(40px, 6vh, 80px); padding-inline: var(--about-side-pad); }
body.page-about .about-metrics-strip-inner, body.page-about .about-feature-card, body.page-about #about-pillars .pillars-grid, body.page-about #about-responsibility .pillars-grid, body.page-about .culture-inner { max-width: var(--about-max-width); margin-inline: auto; }
#about-metrics-strip { padding-block: 24px; }
body.page-about .about-metrics-strip-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metrics-pill { padding: 12px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.metrics-pill .metric-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-secondary); margin-bottom: 4px; }
.metrics-pill .metric-number { font-family: var(--font-header); font-size: 1.2rem; color: var(--text-primary); }

body.page-about .about-feature-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr); column-gap: clamp(24px, 4vw, 40px); row-gap: 24px; padding: clamp(30px, 4vh, 50px); align-items: center; }
body.page-about .about-feature-card.reverse { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr); }
body.page-about .about-feature-card.reverse .about-card-media { order: 2; }
.about-card-media { border-radius: 12px; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); overflow: hidden; max-width: 640px; width: 100%; aspect-ratio: 16 / 9; align-self: center; justify-self: flex-start; }
.about-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.page-about .about-feature-card .section-title { margin-bottom: 24px; text-align: left; }
body.page-about .about-feature-card .section-title::after { left: 0; transform: none; }

#about-pillars .pillars-grid, #about-responsibility .pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(24px, 3vw, 40px); margin-top: 40px; }
.pillar-box { display: flex; flex-direction: column; padding: 30px; }
.pillar-media { width: 100%; max-width: 220px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; margin-bottom: 20px; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); margin-inline: auto; }
.pillar-media img { width: 100%; height: 100%; object-fit: cover; }
.pillar-body h3 { font-size: 1.25rem; margin-bottom: 12px; text-align: center; color: var(--text-primary); }
.pillar-body p { margin: 0; text-align: center; color: var(--text-secondary); }
/* Constrains the icon container to a strict, uniform height */
.pillar-icon {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  width: 100%;
}

/* Forces the image to scale proportionally without blowing out the box */
.pillar-icon img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}
#about-responsibility .pillar-media { aspect-ratio: 3 / 4; max-width: 100%; }
#about-responsibility .pillar-media img { transition: transform 0.6s ease; }
#about-responsibility .pillar-box:hover .pillar-media img { transform: scale(1.05); }

.culture-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(30px, 4vw, 50px); padding: clamp(30px, 4vh, 50px); align-items: flex-start; }
#about-culture .section-title { text-align: left; margin-bottom: 20px; }
#about-culture .section-title::after { left: 0; transform: none; }
#about-culture .culture-left p, #about-culture .culture-right p { margin-top: 0; line-height: 1.6; }
#about-culture .culture-right { border-left: 1px solid rgba(255, 255, 255, 0.08); padding-left: 30px; }

/* ============================================================
   SCRIPTORIUM & UTILITIES
   ============================================================ */

.page-scriptorium .format-card-media { display: block; margin: 0 0 16px; border-radius: 8px; overflow: hidden; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.page-scriptorium .format-card-media img { display: block; width: 100%; height: auto; }

.tech-card.status-nominal  { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 0 0 rgba(0, 255, 170, 0.5), 0 24px 48px rgba(0, 0, 0, 0.8); }
.tech-card.status-degraded { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 0 0 rgba(255, 170, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.8); }
.tech-card.status-critical { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 0 0 rgba(255, 68, 68, 0.5), 0 24px 48px rgba(0, 0, 0, 0.8); }

.text-nominal  { color: #00ffaa !important; }
.text-degraded { color: #ffaa00 !important; }
.text-critical { color: #ff4444 !important; }

.hero-subhead { font-family: var(--font-body); color: var(--accent-cyan); letter-spacing: 1px; margin-bottom: 1rem; }

.feature-image-wrapper { margin: 40px 0; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); border-radius: 8px; overflow: hidden; }
.feature-image { width: 100%; height: auto; display: block; opacity: 0.9; }
.feature-caption { text-align: center; color: var(--text-secondary); font-size: 0.9rem; padding: 10px; background: rgba(0, 0, 0, 0.5); }

.summary-box { max-width: 900px; margin: 40px auto 0; padding: 24px 20px; border-radius: 10px; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); background: var(--glass-bg); backdrop-filter: blur(10px); }
.summary-box h3 { margin-bottom: 10px; }

/* ============================================================
   FOOTER (Flex Alignment Fixes)
   ============================================================ */

footer { padding: 60px 5% 40px; border-top: 1px solid rgba(255, 255, 255, 0.05); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: 1200px; margin-inline: auto; margin-bottom: 60px; }

.footer-column h3 { font-size: 1.05rem; margin-bottom: 20px; color: var(--text-primary); letter-spacing: 0.1em; }
.footer-column p { font-size: 0.95rem; line-height: 1.6; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { 
  display: flex; align-items: flex-start; gap: 10px; 
  margin-bottom: 14px; font-size: 0.95rem; color: var(--text-secondary); 
}
.footer-links a { 
  text-decoration: none; color: inherit; transition: color 0.2s; 
  display: inline-flex; align-items: center; 
}
.footer-links a:hover { color: var(--text-primary); }
.footer-icon { font-size: 1.1rem; line-height: 1.4; } 

.social-links { display: flex; gap: 15px; margin-top: 25px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); color: var(--text-primary); font-size: 0.9rem; font-weight: 600; transition: var(--transition); }
.social-links a:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }

.footer-bottom { text-align: center; padding-top: 40px; border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.9rem; color: var(--text-secondary); max-width: 1200px; margin-inline: auto; }

/* ============================================================
   RESPONSIVE BREAKPOINTS (AND MOBILE OVERRIDES)
   ============================================================ */

@media (max-width: 1119px) {
  header { display: flex; justify-content: space-between; padding: 0 5%; min-height: 60px; }
  .nav-links, .top-cta { display: none; }
  .mobile-nav-toggle { display: flex; right: 0; }
  
  section { padding: 80px 5%; }
  .hero { min-height: calc(100svh - 60px); padding: 80px 5%; }
  
  #showcase .showcase-grid, .tech-grid { grid-template-columns: 1fr; max-width: 600px; margin-top: 40px; }
  
  body.page-about .about-feature-card, body.page-about .about-feature-card.reverse { grid-template-columns: 1fr; }
  body.page-about .about-feature-card.reverse .about-card-media { order: -1; }
  body.page-about .about-feature-card .about-card-media { justify-self: center; }
  
  body.page-about .culture-inner { grid-template-columns: 1fr; }
  #about-culture .section-title { text-align: center; }
  #about-culture .section-title::after { left: 50%; transform: translateX(-50%); }
  #about-culture .culture-right { border-left: none; padding-left: 0; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
}

@media (max-width: 1280px) {
  .nav-links ul { gap: 12px; }
  .nav-links a { font-size: 0.8rem; letter-spacing: 0.08em; }
}

@media (max-width: 720px) {
  section { padding: 60px 5%; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .slide { padding: 30px 20px; }
  
  body.page-about .about-metrics-strip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #about-pillars .pillar-media { max-width: 100%; }
}

@media (max-width: 480px) {
  .cta-buttons { flex-direction: column; width: 100%; }
  .hero .cta-buttons .btn { width: 100%; } 
  body.page-about .about-metrics-strip-inner { grid-template-columns: 1fr; }
}

@media (min-width: 1120px) {
  .mobile-menu, .mobile-nav-toggle { display: none !important; }
}

@media (min-width: 1600px) {
  section { padding-inline: max(5%, calc((100vw - 1400px) / 2)); }
  .hero-content { max-width: 1060px; }
}

@media (min-width: 2000px) {
  section { padding-inline: max(8%, calc((100vw - 1600px) / 2)); }
  .slide-deck-container { height: clamp(500px, 45vh, 700px); }
  .slide { width: clamp(300px, 50vw, 900px); height: clamp(400px, 80%, 600px); }
  .slide h3 { font-size: 2.4rem; } 
  .slide p { font-size: 1.3rem; }
  .project-content { padding: 40px; } 
  .project-title { font-size: 2rem; } 
  .section-title { font-size: 3rem; }
  .tech-grid { gap: 50px; } 
  .footer-grid { max-width: 1600px; } 
  .footer-bottom { max-width: 1600px; }
}

@media (min-width: 2560px) {
  section { padding-inline: max(12%, calc((100vw - 1800px) / 2)); }
  .tech-grid { gap: 50px; } 
  .media-container { max-width: 1600px; }
}

@media (hover: none) {
  .project-card:hover, .media-card:hover, #about-pillars .pillar-box:hover, #about-responsibility .pillar-box:hover, .tech-card:hover {
    transform: none !important; box-shadow: var(--glass-border-inset), var(--glass-highlight-inset), 0 24px 48px rgba(0, 0, 0, 0.8) !important; 
  }
}

/* ============================================================
   CODE BLOCKS & TERMINAL OUTPUT
   ============================================================ */
.summary-box pre,
.tech-card pre {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.55); /* Deepens the contrast inside the glass panel */
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto; /* Crucial for preventing mobile layout breaks */
  white-space: pre-wrap; 
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.8);
  margin-top: 15px;
  line-height: 1.5;
}

/* Optional: To restore the specific neon green from your original simulation loop */
.summary-box pre.console-green {
  color: #00ffaa;
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.2);
}

/* --- 3-Column Tech Grid Overrides --- */
.tech-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .tech-grid.three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Ensure the 3rd card spans full width on tablets so it doesn't look broken */
  .tech-grid.three-col .tech-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .tech-grid.three-col {
    grid-template-columns: 1fr;
  }
  .tech-grid.three-col .tech-card:last-child {
    grid-column: auto;
  }
}
.social-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  opacity: 0.6; /* Keeps them slightly muted until hovered */
  transition: all 0.3s ease;
  will-change: transform, filter, opacity; /* Performance optimization */
}

/* Assuming your SVG files are white by default.
  This adds a lift and a double-layered cyan glow on hover. 
*/
.social-links {
  display: flex;
  flex-wrap: wrap;        /* Allows icons to flow to a new line */
  gap: 1.25rem;           /* Slightly tighter gap to fit more on one line */
  align-items: center;
  max-width: 100%;        /* Prevents container from pushing past parent */
}

/* Optional: Center the icons if the footer column centers on mobile */
@media (max-width: 768px) {
  .social-links {
    justify-content: center; 
  }
}
/* Base Desktop Layout */
.footer-grid {
  display: grid;
  /* 2fr gives the first column (with the 8 social icons) twice the space of the others */
  grid-template-columns: 2fr 1fr 1fr 1fr; 
  gap: 3rem;
  padding: 4rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-column h3 {
  margin-bottom: 0.5rem;
  /* Assuming your headers have a glow or specific color, apply it here */
}

/* -------------------------------------------
   Responsive Breakpoints
------------------------------------------- */

/* Tablet (Medium screens) */
@media (max-width: 992px) {
  .footer-grid {
    /* Collapses to a 2x2 grid */
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* Mobile (Narrow screens) */
@media (max-width: 600px) {
  .footer-grid {
    /* Stacks everything into a single column */
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Optional: Center everything on mobile for a cleaner look */
  .footer-grid {
    text-align: center;
  }
  
  .footer-column {
    align-items: center; 
  }
  
  /* Overrides the flex-start default for the footer-links on mobile */
  .footer-links li {
    justify-content: center;
  }
}