/* Art direction: Audio developer / musician personal site → focused, warm-dark
   Palette: Dark surfaces, warm neutrals, teal primary accent
   Typography: Instrument Serif (display) + Satoshi (body) — refined but grounded
   Density: Balanced — spacious prose, dense player UI */

:root {
  --bg:          #0e1117;
  --bg-surface:  #161922;
  --bg-elevated: #1d2130;
  --text:        #e2dfd8;
  --text-muted:  #7a7d90;
  --primary:     #4f98a3;
  --primary-h:   #61adb9;
  --border:      #252839;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Satoshi', system-ui, -apple-system, sans-serif;

  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  --radius:    6px;
  --radius-lg: 12px;
  --max-w:     720px;
}

.theme-light {
  --bg:          #f4f1ec;
  --bg-surface:  #ffffff;
  --bg-elevated: #eae7e0;
  --text:        #1c1f2e;
  --text-muted:  #6b6e80;
  --primary:     #3a7d87;
  --primary-h:   #4f98a3;
  --border:      #d8d4cb;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); text-decoration: underline; }

img, video { max-width: 100%; height: auto; display: block; }

code {
  font-size: 0.875em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-family: 'JetBrains Mono', 'Cascadia Code', ui-monospace, monospace;
}

pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

pre code { background: none; padding: 0; }

blockquote {
  border-left: 3px solid var(--primary);
  padding-left: var(--sp-4);
  color: var(--text-muted);
  font-style: italic;
}

hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-8) 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

ul, ol { padding-left: var(--sp-6); }
