/* ─── DESIGN TOKENS ───────────────────────────── */
:root {
  --bg-base:       #ffffff;
  --bg-surface:    #f4f4f6;
  --bg-elevated:   #ebebef;
  --bg-border:     #d4d4d8;

  --accent:        #1d6af5;
  --accent-glow:   rgba(29, 106, 245, 0.10);
  --accent-dim:    rgba(29, 106, 245, 0.55);

  --text-primary:  #09090b;
  --text-secondary:#3f3f46;
  --text-muted:    #71717a;

  --green:         #3fb950;
  --purple:        #7c3aed;
  --orange:        #f0883e;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;

  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --shadow-card:   0 0 0 1px var(--bg-border), 0 4px 24px rgba(0,0,0,.08);
  --shadow-glow:   0 0 40px var(--accent-glow);

  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── FOCUS VISIBLE ──────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Remove outline for mouse/touch users */
:focus:not(:focus-visible) { outline: none; }

/* ─── SKIP NAVIGATION ────────────────────────── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--accent);
  color: var(--bg-base);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-nav:focus {
  top: 0;
}

/* ─── PAGE LOADING OVERLAY ───────────────────── */
#page-loading {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
#page-loading::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 2px solid var(--bg-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
#page-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
