/* ==========================================================================
   CKV PO1 — Prototype 02: Canvas ('The Flashlight Gallery')
   Author: Matthijs van der Elst (VWO 4 CKV, 2026-2027)
   Theme: Mysterious Atmospheric Darkroom / Cyber-Gallery
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-space: #06080d;
  --bg-surface: #0b0f19;
  --bg-card: rgba(12, 18, 32, 0.82);
  --bg-card-hover: rgba(18, 27, 48, 0.92);
  --bg-glass: rgba(10, 15, 26, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.35);
  --border-active: rgba(129, 140, 248, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Neon Art Accents */
  --neon-cyan: #38bdf8;
  --neon-indigo: #818cf8;
  --neon-emerald: #34d399;
  --neon-amber: #fbbf24;
  --neon-rose: #f43f5e;
  --neon-purple: #c084fc;

  /* Dynamic Flashlight State */
  --spot-x: 50%;
  --spot-y: 50%;
  --spotlight-radius: 220px;
  --spotlight-fade: 70px;

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-display: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global Reset & Box Sizing --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-space);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar for text panels */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(6, 8, 13, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
}

.brand-title-group {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  background: linear-gradient(135deg, #ffffff 40%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 15, 25, 0.7);
  padding: 0.3rem 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

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

.nav-tab.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.tab-icon {
  font-size: 1rem;
}

.tab-pill {
  font-size: 0.68rem;
  font-family: var(--font-sans);
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 20px;
  color: var(--neon-cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.nav-tab.active .tab-pill {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  background: rgba(16, 23, 38, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-glow);
  background: rgba(22, 33, 56, 0.9);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.toggle-light-btn {
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--neon-cyan);
}

.toggle-light-btn.active-light {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.btn-kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  color: var(--text-muted);
}

.info-btn {
  padding: 0.48rem 0.65rem;
}

/* ==========================================================================
   Canvas Viewport & Flashlight System
   ========================================================================== */
.canvas-viewport {
  position: relative;
  width: 100vw;
  height: calc(100vh - 68px);
  margin-top: 68px;
  overflow: hidden;
  cursor: crosshair;
}

/* Background Generative Art Canvas */
.art-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Dark Flashlight Mask Overlay */
.flashlight-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    circle var(--spotlight-radius, 220px) at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(6, 8, 13, 0) 0%,
    rgba(6, 8, 13, 0.25) 42%,
    rgba(6, 8, 13, 0.82) 74%,
    rgba(6, 8, 13, 0.98) 100%
  );
  transition: opacity 0.5s ease;
}

/* When reveal-all is triggered */
body.reveal-all .flashlight-overlay {
  opacity: 0.18;
  background: rgba(6, 8, 13, 0.35);
}

/* Cursor Reticle / Spotlight Follower */
.cursor-reticle {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  transform: translate3d(var(--spot-x, 50vw), var(--spot-y, 50vh), 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.04s linear, opacity 0.3s ease;
}

body.reveal-all .cursor-reticle {
  opacity: 0.4;
}

.reticle-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan), 0 0 24px rgba(56, 189, 248, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.reticle-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.6);
  animation: reticleSpin 12s linear infinite;
}

@keyframes reticleSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.reticle-coords-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--neon-cyan);
  white-space: nowrap;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  background: rgba(6, 8, 13, 0.65);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ==========================================================================
   Hotspots / Beacons Container
   ========================================================================== */
.beacons-container {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none; /* individual beacons re-enable pointer-events */
}

/* Individual Beacon Node */
.beacon {
  position: absolute;
  left: calc(var(--bx) * 1%);
  top: calc(var(--by) * 1%);
  transform: translate(-50%, -50%) scale(0.92);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.28s var(--ease-spring), opacity 0.25s ease, filter 0.25s ease;
  z-index: 10;
  outline: none;
}

/* Unilluminated State (Mysterious faint clue in the darkroom) */
.beacon {
  opacity: 0.22;
  filter: grayscale(70%) brightness(0.7);
}

/* Hover or Illuminated by Spotlight Beam */
.beacon.illuminated,
.beacon:hover,
.beacon:focus-visible {
  opacity: 1;
  filter: grayscale(0%) brightness(1.2);
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 25;
}

/* In Reveal All Mode */
body.reveal-all .beacon {
  opacity: 0.88;
  filter: grayscale(0%) brightness(1);
}
body.reveal-all .beacon:hover,
body.reveal-all .beacon:focus-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 30;
}

/* Beacon Core / Orb */
.beacon-orb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.4), rgba(11, 15, 25, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3), inset 0 0 10px rgba(56, 189, 248, 0.2);
  transition: all 0.3s ease;
}

.beacon:hover .beacon-orb,
.beacon.illuminated .beacon-orb {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 30px var(--neon-cyan), 0 0 60px rgba(56, 189, 248, 0.5), inset 0 0 15px rgba(56, 189, 248, 0.6);
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.7), rgba(16, 24, 40, 0.98));
}

/* Outer Pulsing Radar Ring */
.beacon-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
  opacity: 0.4;
  animation: beaconPing 3s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes beaconPing {
  0% {
    transform: scale(0.85);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.65);
    opacity: 0;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

/* Category Accent Modifiers */
.beacon.category-vision .beacon-orb {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.4);
}
.beacon.category-vision:hover .beacon-orb,
.beacon.category-vision.illuminated .beacon-orb {
  border-color: var(--neon-amber);
  box-shadow: 0 0 35px var(--neon-amber), 0 0 70px rgba(251, 191, 36, 0.5);
}
.beacon.category-vision .beacon-pulse {
  border-color: var(--neon-amber);
}

.beacon.category-portfolio .beacon-orb {
  border-color: rgba(129, 140, 248, 0.6);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.4);
}
.beacon.category-portfolio:hover .beacon-orb,
.beacon.category-portfolio.illuminated .beacon-orb {
  border-color: var(--neon-indigo);
  box-shadow: 0 0 35px var(--neon-indigo), 0 0 70px rgba(129, 140, 248, 0.5);
}
.beacon.category-portfolio .beacon-pulse {
  border-color: var(--neon-indigo);
}

.beacon.category-process .beacon-orb {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.4);
}
.beacon.category-process:hover .beacon-orb,
.beacon.category-process.illuminated .beacon-orb {
  border-color: var(--neon-emerald);
  box-shadow: 0 0 35px var(--neon-emerald), 0 0 70px rgba(52, 211, 153, 0.5);
}
.beacon.category-process .beacon-pulse {
  border-color: var(--neon-emerald);
}

/* Beacon Text Card / Label */
.beacon-card {
  position: absolute;
  top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: max-content;
  max-width: 200px;
  padding: 0.45rem 0.75rem;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 12px rgba(56, 189, 248, 0.15);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s var(--ease-spring);
}

.beacon.illuminated .beacon-card,
.beacon:hover .beacon-card,
.beacon:focus-visible .beacon-card,
body.reveal-all .beacon .beacon-card {
  opacity: 1;
  transform: translateY(0);
}

.beacon-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 2px;
}

.beacon-title {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.beacon-discovered-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--neon-emerald);
  color: #06080d;
  font-size: 0.65rem;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--neon-emerald);
}

.beacon.discovered .beacon-discovered-badge {
  display: flex;
}

/* ==========================================================================
   HUD Context Banner (Top-Left)
   ========================================================================== */
.hud-context-banner {
  position: absolute;
  top: 1.5rem;
  left: 1.75rem;
  z-index: 15;
  pointer-events: none;
  max-width: 420px;
  animation: fadeInDown 0.6s var(--ease-spring);
}

.hud-tab-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  padding: 0.2rem 0.5rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.hud-tab-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.hud-tab-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Bottom Status HUD
   ========================================================================== */
.bottom-hud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(6, 8, 13, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.hud-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-emerald);
  box-shadow: 0 0 8px var(--neon-emerald);
  animation: blinkIndicator 2s ease-in-out infinite alternate;
}

@keyframes blinkIndicator {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.status-label {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.status-value {
  color: var(--text-secondary);
}

.status-value.highlight {
  color: var(--neon-cyan);
  font-weight: 700;
}

.status-value.mono {
  color: var(--text-primary);
}

/* Discovery Progress Bar */
.discovery-progress-bar {
  width: 90px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 0.25rem;
}

.discovery-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-emerald));
  border-radius: 3px;
  transition: width 0.4s var(--ease-spring);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.hud-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
}

/* ==========================================================================
   Interactive Discovery HUD Panel / Modal
   ========================================================================== */
.discovery-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(6, 8, 13, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-smooth);
}

.discovery-panel-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.discovery-panel {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-glow);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.2);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s var(--ease-spring);
  overflow: hidden;
}

.discovery-panel-backdrop.active .discovery-panel {
  transform: translateY(0) scale(1);
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem 0.5rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-category-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  color: var(--neon-cyan);
}

.panel-status-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.55rem;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 4px;
  color: var(--neon-emerald);
}

.panel-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-close-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--neon-rose);
  color: #fff;
  transform: rotate(90deg);
}

/* Panel Title Area */
.panel-title-area {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.75rem 1.25rem 1.75rem;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.04) 0%, transparent 100%);
}

.panel-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.3), rgba(16, 24, 40, 0.9));
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.panel-heading-group {
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.panel-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Scrollable Content Container */
.panel-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem 1.75rem 1.75rem;
  user-select: text; /* Allow user to select and copy text easily */
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Content Blocks & Typography */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.section-label-icon {
  font-size: 1rem;
}

.content-quote-box {
  position: relative;
  padding: 1.1rem 1.35rem;
  background: rgba(16, 24, 40, 0.65);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 0 10px 10px 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.content-quote-box.accent-gold {
  border-left-color: var(--neon-amber);
  background: rgba(251, 191, 36, 0.05);
}

.content-quote-box.accent-purple {
  border-left-color: var(--neon-indigo);
  background: rgba(129, 140, 248, 0.05);
}

.content-quote-box.accent-emerald {
  border-left-color: var(--neon-emerald);
  background: rgba(52, 211, 153, 0.05);
}

/* Two Column Grid for Compare / Cards */
.cards-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.info-card {
  padding: 1.1rem;
  background: rgba(16, 24, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.info-card-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Examples Cards (for Domains) */
.examples-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

.example-item {
  padding: 0.85rem 1rem;
  background: rgba(11, 17, 30, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.example-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
}

.example-city {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--neon-cyan);
  display: inline-block;
}

.example-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.2rem;
}

/* Highlights List (Portfolio) */
.highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.highlights-list li::before {
  content: "✔";
  color: var(--neon-emerald);
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Tech Stack Badges */
.tech-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-badge {
  padding: 0.25rem 0.6rem;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #c7d2fe;
}

/* Panel Footer */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  background: rgba(8, 12, 20, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 24, 40, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-nav-btn:hover {
  color: #fff;
  border-color: var(--border-glow);
  background: rgba(24, 36, 60, 0.9);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.panel-counter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Quick Index Drawer (Side Panel)
   ========================================================================== */
.index-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(6, 8, 13, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.index-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.index-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-glow);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-spring);
}

.index-drawer-backdrop.active .index-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--neon-cyan);
  letter-spacing: 0.1em;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.drawer-close-btn:hover {
  color: #fff;
}

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

.drawer-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(16, 24, 40, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-secondary);
}

.drawer-item:hover {
  background: rgba(24, 36, 60, 0.85);
  border-color: var(--border-glow);
  color: #fff;
  transform: translateX(-4px);
}

.drawer-item-icon {
  font-size: 1.3rem;
}

.drawer-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.drawer-item-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.drawer-item-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.drawer-item-status {
  font-size: 0.75rem;
  opacity: 0.4;
}

.drawer-item.is-discovered .drawer-item-status {
  opacity: 1;
  color: var(--neon-emerald);
}

/* ==========================================================================
   Info Modal (CKV Assignment Context)
   ========================================================================== */
.info-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(6, 8, 13, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.info-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.info-modal {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg-glass);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

.info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .navbar {
    padding: 0 1rem;
    height: auto;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .canvas-viewport {
    height: calc(100vh - 110px);
    margin-top: 110px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-tab .tab-pill {
    display: none;
  }

  .hud-context-banner {
    left: 1rem;
    top: 1rem;
    max-width: 320px;
  }

  .hud-tab-title {
    font-size: 1.3rem;
  }

  .cards-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-brand .brand-sub {
    display: none;
  }

  .btn-kbd {
    display: none;
  }

  .toggle-light-btn .btn-text {
    display: none;
  }

  .coords-tracker {
    display: none;
  }

  .bottom-hud {
    padding: 0 1rem;
  }

  .discovery-panel {
    max-height: 92vh;
  }

  .panel-title-area {
    padding: 0.85rem 1.25rem;
  }

  .panel-content-scroll {
    padding: 1rem 1.25rem;
  }

  .panel-footer {
    padding: 0.85rem 1.25rem;
  }
}
