/* base.css — Reset, tokens, accessibility, reduced motion */

/* ===== SELF-HOSTED FONTS ===== */
@font-face {
  font-family: Orbitron;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/orbitron-bold-700.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/inter-medium-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/roboto-mono-regular-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/roboto-mono-medium-500.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/jetbrains-mono-regular-400.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/jetbrains-mono-medium-500.woff2') format('woff2');
}

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

:root {
  /* Brand colors */
  --neon-green: #39ff14;
  --black: #000;
  --silver: #c0c0c0;
  --dark-gray: #1a1a1a;
  --matrix-green: #0f6;
  --electric-purple: #9b30ff;

  /* Semantic */
  --bg-primary: var(--black);
  --bg-secondary: var(--dark-gray);
  --text-primary: var(--neon-green);
  --text-secondary: var(--silver);
  --accent: var(--electric-purple);
  --highlight: var(--matrix-green);

  /* Typography */
  --font-headline: 'Orbitron', monospace;
  --font-body: 'Inter', sans-serif;
  --font-ui: 'Roboto Mono', monospace;
  --font-code: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* No border radius - terminal style */
  --radius: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--neon-green);
  color: var(--black);
  font-family: var(--font-ui);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: 10000;
  transition: top 0.1s;
}

.skip-link:focus {
  top: var(--space-md);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--neon-green);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

p {
  font-family: var(--font-body);
  max-width: 70ch;
}

a {
  color: var(--neon-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--highlight);
}

code,
pre {
  font-family: var(--font-code);
  background: var(--bg-secondary);
  color: var(--highlight);
}

code {
  padding: 0.1em 0.3em;
}

pre {
  padding: var(--space-md);
  overflow-x: auto;
}

/* Lists */
ul,
ol {
  padding-left: var(--space-xl);
}

li {
  margin-bottom: var(--space-xs);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons base */
button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
}

/* Selection */
::selection {
  background: var(--neon-green);
  color: var(--black);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--neon-green);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--highlight);
}

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