/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: var(--lh-normal); }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; }

/* Font loading */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}

/* Root */
html { background: var(--bg-primary); color-scheme: dark; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--fg-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Typography defaults */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
p { max-width: 65ch; }

/* Links */
a { color: var(--link); transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--link-hover); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Containers */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 28px var(--space-6);
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 28px var(--space-6);
}
.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 28px var(--space-6);
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.mono { font-family: var(--font-mono); }
.text-secondary { color: var(--fg-secondary); }
.text-accent { color: var(--accent-1); }

/* Sections */
section { padding: var(--space-32) 0; }
@media (max-width: 768px) {
  section { padding: var(--space-24) 0; }
}
