@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: oklch(0.965 0.008 75);
  --bg-alt: oklch(0.94 0.012 75);
  --bg-card: oklch(0.975 0.006 75);
  --text: oklch(0.18 0.02 55);
  --text-secondary: oklch(0.45 0.015 55);
  --accent: oklch(0.55 0.16 40);
  --accent-light: oklch(0.75 0.10 40);
  --accent-hover: oklch(0.48 0.18 40);
  --sage: oklch(0.50 0.08 165);
  --sage-light: oklch(0.85 0.04 165);
  --border: oklch(0.88 0.01 75);
  --border-hover: oklch(0.75 0.02 75);
  --mono: 'JetBrains Mono', monospace;
  --display: 'Syne', sans-serif;
  --body: 'Space Grotesk', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --page-pad: clamp(1.5rem, 5vw, 4rem);
  --max-width: 1280px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

[data-theme="dark"] {
  --bg: oklch(0.14 0.015 260);
  --bg-alt: oklch(0.17 0.018 260);
  --bg-card: oklch(0.19 0.015 260);
  --text: oklch(0.92 0.008 75);
  --text-secondary: oklch(0.60 0.012 75);
  --accent: oklch(0.65 0.16 40);
  --accent-light: oklch(0.45 0.10 40);
  --accent-hover: oklch(0.72 0.18 40);
  --sage: oklch(0.60 0.08 165);
  --sage-light: oklch(0.25 0.04 165);
  --border: oklch(0.25 0.01 260);
  --border-hover: oklch(0.35 0.02 260);
}

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

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

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

::selection {
  background: var(--accent);
  color: white;
}

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

img { max-width: 100%; display: block; }

/* Typography scales */
.display-xl {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.display-lg {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display-md {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.body-lg {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-secondary);
}

.body-md {
  font-size: 1rem;
  line-height: 1.6;
}

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Utility */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section {
  padding: clamp(4rem, 10vh, 8rem) 0;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* Noise overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
