/* ══════════════════════════════════════════════════════════════════════════════
   APEX · Reset & Base
   ══════════════════════════════════════════════════════════════════════════════ */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Animated Grid Background ────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  animation: gridShift 60s linear infinite;
}

@keyframes gridShift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 40px 40px, 40px 40px; }
}

/* ── Subtle Radial Gradient Overlay ──────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,229,200,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── App Shell ───────────────────────────────────────────────────────────────── */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Selection ───────────────────────────────────────────────────────────────── */
::selection {
  background: var(--teal-dim);
  color: var(--teal);
}

/* ── Scrollbar ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--teal2); }

/* ── Page Section Animations ─────────────────────────────────────────────────── */
.page {
  display: none;
  padding: 28px;
  animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.page.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section Headers ─────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-header .sh-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border2), transparent);
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--white);
  text-transform: uppercase;
  white-space: nowrap;
}
.section-header .sh-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal2);
  background: var(--teal-dim);
  border: 1px solid rgba(0,229,200,0.2);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}
