/* ============================================
   BASE.CSS — Global stylesheet
   Reusable across all pages
   ============================================ */

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

/* ── Variables ── */
:root {
  --bg-base:       #0c0c0d;
  --bg-surface:    #111113;
  --bg-elevated:   #1a1a1e;
  --bg-overlay:    #222228;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light:  rgba(255, 255, 255, 0.12);
  --border-focus:  rgba(255, 255, 255, 0.35);

  --text-primary:  #e8e8e6;
  --text-secondary:#8a8a85;
  --text-muted:    #4a4a48;
  --text-inverse:  #0c0c0d;

  --accent:        #a78bfa;
  --accent-dim:    rgba(167, 139, 250, 0.12);
  --accent-glow:   rgba(167, 139, 250, 0.28);

  --danger:        #f55a5a;
  --danger-dim:    rgba(245, 90, 90, 0.1);

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     16px;

  --font-display:  'Syne', sans-serif;
  --font-mono:     'DM Mono', monospace;

  --transition:    180ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: #0c0c0d;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 100vh;
  transition: opacity 150ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

img, svg {
  display: block;
}

/* ── Typography ── */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

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

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bg-overlay);
  border-radius: 2px;
}

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