/* ═══════════════════════════════════════════════
   base.css — Reset, layout, typography
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

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

/* ── Root ─────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Dot grid background ──────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

/* ── CRT scanlines ────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    var(--scanline) 2px,
    var(--scanline) 4px
  );
  pointer-events: none;
  z-index: 999;
  animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

/* ── Typography ───────────────────────────────── */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  opacity: 0.75;
  text-decoration: underline;
}

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

/* ── Dragon Scrollbar replaces default scrollbar ── */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
}

::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0px;
  height: 0px;
  background: transparent;
}

/* ── Utility classes ──────────────────────────── */
.accent  { color: var(--accent); }
.dim     { color: var(--fg-dim); }
.hidden  { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Page wrapper ─────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  padding-top: 4rem; /* nav height */
}

/* ── Sections ─────────────────────────────────── */
.section {
  min-height: 100vh;
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Section titles ───────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--fg-dim);
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

.section-title::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 1.5rem;
}

/* ── Responsive base ──────────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: 4rem 1.25rem;
    min-height: auto;
  }
}
