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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ===== CSS VARIABLES / TOKENS — DARK FUTURISTIC THEME ===== */
:root {
  /* Colors — Dark Theme */
  --bg-primary: hsl(224, 47%, 5%);          /* #0b0e17 deep navy-black */
  --bg-secondary: hsl(224, 47%, 8%);        /* #111729 */
  --bg-surface: hsl(224, 47%, 7%);          /* #0f1320 */
  --bg-card: hsl(224, 47%, 8%);             /* #111729 dark card */
  --bg-card-hover: hsl(224, 47%, 10%);
  --bg-elevated: hsl(224, 47%, 10%);
  --bg-input: hsl(224, 47%, 8%);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(0, 163, 255, 0.2);
  --border-accent-strong: rgba(0, 163, 255, 0.4);

  /* Accent — Bright Cyan-Blue */
  --accent: hsl(199, 100%, 50%);            /* #00a3ff */
  --accent-hover: hsl(199, 100%, 40%);
  --accent-muted: rgba(0, 163, 255, 0.15);
  --accent-bg: rgba(0, 163, 255, 0.08);

  /* Secondary accents */
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --yellow: #fbbf24;
  --yellow-bg: rgba(251, 191, 36, 0.12);
  --purple: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.12);
  --orange: #fb923c;

  /* Text */
  --text-primary: hsl(210, 40%, 98%);       /* #f8fafc near-white */
  --text-secondary: hsl(215, 20%, 65%);     /* #8b9ab5 gray-blue */
  --text-muted: hsl(215, 15%, 50%);         /* #6b7a94 */
  --text-faint: hsl(215, 10%, 35%);
  --text-inverse: hsl(224, 47%, 5%);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Orbitron', sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.75rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-7xl: 4.5rem;

  --leading-tight: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;

  /* Spacing - 4px system */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows — glowing dark theme shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 8px 30px rgba(0, 0, 0, 0.6);

  /* Glow shadows */
  --glow-sm: 0 0 10px rgba(0, 163, 255, 0.15);
  --glow-md: 0 0 20px rgba(0, 163, 255, 0.2);
  --glow-lg: 0 0 30px rgba(0, 163, 255, 0.3);

  /* Layout */
  --max-width: 1200px;
  --content-width: 700px;
  --sidebar-left: 220px;
  --sidebar-right: 300px;
  --header-height: 60px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;
}

/* ===== BASE TYPOGRAPHY ===== */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: var(--leading-normal);
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); font-weight: var(--weight-medium); }

/* Display font class for Orbitron headings */
.font-display,
.page-title,
.section-title {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

p {
  color: var(--text-secondary);
}

code, pre {
  font-family: var(--font-mono);
}

pre {
  background: hsl(224, 47%, 8%);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border-default);
  font-size: var(--text-sm);
}

code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

pre code {
  background: none;
  padding: 0;
}

::selection {
  background: rgba(0, 163, 255, 0.3);
  color: var(--text-primary);
}

/* Scrollbar — dark theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) var(--bg-primary);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  z-index: 9999;
  font-weight: var(--weight-semibold);
}

.skip-link:focus {
  top: var(--sp-2);
}

/* Utility */
.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;
}

/* ===== GLASS EFFECTS ===== */
.glass-panel {
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(0, 163, 255, 0.3);
}

/* ===== GLOW EFFECTS ===== */
.glow-text {
  text-shadow: 0 0 10px rgba(0, 163, 255, 0.5), 0 0 20px rgba(0, 163, 255, 0.3);
}

.glow-box {
  box-shadow: 0 0 15px rgba(0, 163, 255, 0.2), inset 0 0 10px rgba(0, 163, 255, 0.1);
  transition: all 0.3s ease;
}

.glow-box:hover {
  box-shadow: 0 0 25px rgba(0, 163, 255, 0.4), inset 0 0 15px rgba(0, 163, 255, 0.2);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
