@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@300;400&display=swap");

:root {
  --bg: #0F1011;
  --surface: #1C1E20;
  --surface-2: #26292C;
  --line: #3A3D40;
  --text-muted: #8C9195;
  --text: #ECEDEE;

  --accent-sound: #8FB4C6;
  --accent-image: #C9A98F;
  --accent: var(--accent-sound);

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.5rem;
  --fs-xl: clamp(2rem, 5vw, 3.5rem);

  --space-1: 4px;  --space-2: 8px;  --space-3: 16px;
  --space-4: 24px; --space-5: 40px; --space-6: 72px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F4F5F6;
  --surface: #E8EAEC;
  --surface-2: #DCDFE2;
  --line: #B9BDC1;
  --text-muted: #4A4E52;
  --text: #121315;

  --accent-sound: #3F6F86;
  --accent-image: #8A5F3F;
  color-scheme: light;
}

:root[data-mode="image"] { --accent: var(--accent-image); }
:root[data-mode="sound"] { --accent: var(--accent-sound); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 var(--space-3); }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); font-weight: 500; letter-spacing: -0.01em; }
p { color: var(--text-muted); margin: 0 0 var(--space-3); max-width: 62ch; }
a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); transition: text-decoration-color .2s var(--ease); }
a:hover { text-decoration-color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }
::selection { background: var(--accent); color: var(--bg); }

.mono, code, .readout {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.label { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.btn {
  font: inherit; font-size: var(--fs-sm);
  color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn--primary:hover { background: transparent; color: var(--accent); }
.btn:focus-visible, input:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; transition: none; }
}
