:root {
  color-scheme: dark;

  --bg: #171a1e;
  --surface: #1c2025;
  --surface-raised: #23282e;
  --line: #2c3138;
  --line-strong: #3b414a;
  --ink: #e9ebee;
  --ink-muted: #d1d5db;
  --ink-faint: #9ca3af;
  --accent: #7289da;
  --accent-strong: #8fa2e3;
  --accent-wash: rgba(114, 137, 218, 0.12);
  --success: #5fae7e;
  --danger: #e06c64;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --text-xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --text-sm: clamp(0.84rem, 0.81rem + 0.15vw, 0.92rem);
  --text-base: clamp(0.97rem, 0.93rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.3rem, 1.15rem + 0.7vw, 1.75rem);
  --text-2xl: clamp(1.7rem, 1.35rem + 1.6vw, 2.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;

  --tap: 44px;

  --gutter: 16px;
  --header-offset: 100px;
  --sidebar-width: 100%;
  --avatar-size: 44px;
  --content-max: 50rem;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
