/* ═══════════════════════════════════════════════════════════════
   THEME SYSTEM
═══════════════════════════════════════════════════════════════ */
:root {
  --void:        #050508;
  --deep:        #090912;
  --panel:       #0d0d1a;
  --border:      #1a1a2e;
  --border2:     #252540;
  --cyan:        #06b6d4;
  --cyan-glow:   #67e8f9;
  --cyan-dim:    rgba(6,182,212,0.08);
  --purple:      #7c3aed;
  --purple-glow: #c084fc;
  --gold:        #f59e0b;
  --gold-glow:   #fcd34d;
  --pink:        #ec4899;
  --green:       #10b981;
  --green-glow:  #6ee7b7;
  --text:        #e2e8f0;
  --text2:       #94a3b8;
  --muted:       #475569;
  --node-def:    #0f172a;
  --node-stroke: #1e293b;
  --edge-def:    #1e293b;
}

[data-theme="light"] {
  --void:        #f0ede8;
  --deep:        #e8e4de;
  --panel:       #ffffff;
  --border:      #d4d0c8;
  --border2:     #c0bab0;
  --cyan:        #0369a1;
  --cyan-glow:   #0284c7;
  --cyan-dim:    rgba(3,105,161,0.07);
  --purple:      #6d28d9;
  --purple-glow: #7c3aed;
  --gold:        #b45309;
  --gold-glow:   #d97706;
  --pink:        #be185d;
  --green:       #15803d;
  --green-glow:  #16a34a;
  --text:        #1a1a18;
  --text2:       #4a4a46;
  --muted:       #8a8a84;
  --node-def:    #f5f3ef;
  --node-stroke: #d4d0c8;
  --edge-def:    #c4b9a8;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--void);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.04) 2px, rgba(0,0,0,0.04) 4px);
  animation: scanroll 12s linear infinite;
}
@keyframes scanroll { to { background-position: 0 100px; } }

/* Grid background */
.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--cyan-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--cyan-dim) 1px, transparent 1px);
  background-size: 44px 44px;
  transition: background-image 0.4s;
}

/* ═══════════════════════════════════════════════════════════════
   THEME TOGGLE
═══════════════════════════════════════════════════════════════ */
.theme-toggle {
  position: fixed; bottom: 22px; right: 18px; z-index: 9999;
  font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 1px;
  padding: 0 14px; height: 38px; border-radius: 999px;
  border: 1px solid var(--border2); background: var(--panel);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  transition: all 0.25s; white-space: nowrap; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { border-color: var(--cyan); color: var(--cyan-glow); }
@media (max-width: 480px) {
  .theme-toggle { bottom: 14px; right: 12px; font-size: 10px; padding: 0 11px; height: 34px; }
}

/* ═══════════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 54px;
  border-bottom: 1px solid var(--border);
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(12px);
  transition: background 0.4s, border-color 0.4s;
}
[data-theme="light"] nav { background: rgba(240,237,232,0.88); }

.nav-brand {
  font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700;
  letter-spacing: 4px; color: var(--text); text-decoration: none;
  transition: color 0.2s;
}
.nav-brand span { color: var(--cyan); }
.nav-brand:hover { color: var(--cyan-glow); }

.nav-links {
  display: flex; gap: 4px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 12px; color: var(--text2);
  text-decoration: none; border: 1px solid transparent;
  transition: all 0.2s; white-space: nowrap; border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
}
.nav-link:hover { color: var(--cyan); border-color: var(--border2); }
.nav-link.active { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }

@media (max-width: 480px) {
  nav { padding: 0 14px; }
  .nav-link { font-size: 9px; padding: 5px 9px; }
}

/* ═══════════════════════════════════════════════════════════════
   SECTION WRAPPER
═══════════════════════════════════════════════════════════════ */
.section {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 80px 24px;
}
@media (max-width: 600px) { .section { padding: 56px 16px; } }

.section-header {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 48px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 9px; letter-spacing: 5px; color: var(--cyan);
  text-transform: uppercase;
}
.section-title {
  font-family: 'Rajdhani', sans-serif; font-size: clamp(20px, 4vw, 32px);
  font-weight: 700; letter-spacing: 3px; color: var(--text);
}
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand {
  font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 4px; color: var(--text2);
}
.footer-brand span { color: var(--cyan); }
.footer-right {
  display: flex; align-items: center; gap: 16px; font-size: 10px;
  color: var(--muted); letter-spacing: 1px;
}
.footer-right a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-right a:hover { color: var(--cyan); }

/* ═══════════════════════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════════════════════ */
.separator {
  height: 1px; background: var(--border);
  position: relative; z-index: 1;
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
