/* css/base.css */
/* Design tokens, reset, typography, and global styles */

/* ====== CSS Custom Properties ====== */
:root {
  /* Dark theme (default) */
  --bg: #0a0a0c;
  --surface: #16161a;
  --text: #e0e0e0;
  --accent: #00e5ff;
  --secondary: #ffb300;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Font sizes using clamp() for responsive scaling */
  --text-xs: clamp(0.75rem, 1vw + 0.5rem, 0.875rem);
  --text-sm: clamp(0.875rem, 1.2vw + 0.5rem, 1rem);
  --text-base: clamp(1rem, 1.5vw + 0.5rem, 1.125rem);
  --text-lg: clamp(1.25rem, 2vw + 0.75rem, 1.75rem);
  --text-xl: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
  --text-2xl: clamp(2.25rem, 4vw + 1rem, 3.5rem);
  --text-3xl: clamp(3rem, 6vw + 1rem, 5rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders & Shadows */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* Light theme overrides (applied via data attribute) */
body[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --accent: #0077cc;
  --secondary: #c77d00;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--secondary);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

/* Monospace accent */
code, pre, .mono {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Images and media */
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: var(--bg);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Surface card base */
.surface-card {
  background-color: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}