/* ============================================
   Base — reset, typography, defaults
   ============================================ */

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

* { margin: 0; padding: 0; }

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

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

body {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg);
  background-color: var(--bg);
  background-image: var(--bg-radial);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: contextual;
  font-feature-settings: 'calt' 1, 'ss01' 1;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle terminal scanline effect over the body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 2px,
    rgba(0, 255, 65, 0.015) 2px,
    rgba(0, 255, 65, 0.015) 3px
  );
  z-index: var(--z-overlay);
  mix-blend-mode: overlay;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--accent-soft); text-shadow: 0 0 8px var(--accent-glow); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--fg-bright);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: clamp(var(--fs-3xl), 6vw, var(--fs-5xl)); }
h2 { font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }

p { color: var(--fg); }

::selection { background: var(--accent); color: var(--bg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-elev); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: var(--r-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.container {
  width: 100%;
  max-width: var(--w-container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section {
  padding-block: var(--sp-20);
}

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