/* === BASE: Reset · Variables · Typography ===
   Aesthetic: Cryptographic Signal
   Fonts: Space Grotesk (display) + DM Mono (body/code)
*/

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

:root {
  /* Color system — one dominant, one accent, one neutral */
  --bg:          #0A0C0F;
  --surface:     #111318;
  --surface-2:   #161A21;
  --border:      #1E2229;
  --border-2:    #252C36;
  --signal:      #00E87A;
  --signal-dim:  rgba(0, 232, 122, 0.07);
  --signal-mid:  rgba(0, 232, 122, 0.14);
  --text:        #E8EDF2;
  --text-muted:  #5A6270;
  --text-dim:    #2A3040;
  --red:         #FF3B30;
  --amber:       #FF9500;

  /* Type scale */
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Spacing — 8px grid */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  40px;
  --sp-8:  56px;
  --sp-9:  72px;
  --sp-10: 96px;
  --sp-11: 128px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: clamp(44px, 5.5vw, 76px); font-weight: 700; }
h2 { font-size: clamp(30px, 3.8vw, 52px); font-weight: 600; }
h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; }
h4 { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }

p {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
}

a {
  color: var(--signal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

strong {
  font-weight: 500;
  color: var(--text);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--signal);
  background: var(--signal-dim);
  padding: 1px 5px;
  border-radius: 2px;
}

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
