/* ===== BASE STYLES ===== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background noise + grid decoration */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--gradient-decoration);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-normal);
}

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

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

/* ===== UTILITY CLASSES ===== */

.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

.text-cyan {
  color: var(--cyan);
}

.text-emerald {
  color: var(--emerald);
}

.text-red {
  color: var(--red);
}

.text-amber {
  color: var(--amber);
}

.text-primary {
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-muted);
}

.text-dim {
  color: var(--text-dim);
}

/* ===== SCROLLBAR ===== */

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

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

/* ===== PAGE SECTIONS ===== */

.page {
  display: none;
  animation: fadeUp 0.3s ease forwards;
}

.page.active {
  display: block;
}

/* ===== FOCUS & SELECTION ===== */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

::selection {
  background: var(--cyan-dim);
  color: var(--cyan);
}
