@font-face {
  font-family: "Berkeley Mono";
  src: url("/fonts/BerkeleyMono-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #111111;
  --panel: #242424;
  --foreground: #dedede;
  --accent: #b8b8b8;
  --copy-width: 70ch;
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--background);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

.page {
  width: min(100%, calc(var(--copy-width) + 6rem));
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(2rem, 6vh, 4.5rem) clamp(1.5rem, 5vw, 3rem);
}

.brand {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.wordmark {
  margin: 0;
  color: #c9ced0;
  font-family: "Berkeley Mono", ui-monospace, monospace;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
}

main {
  max-width: var(--copy-width);
}

.landing {
  padding: 3rem 0;
}

.landing-page {
  line-height: 1.55;
}

.landing-page .page {
  --copy-width: 80ch;
}

.landing p {
  margin: 0;
}

.landing p + p {
  margin-top: 1.5rem;
}

article {
  padding: 3rem 0;
}

h1 {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: clamp(1.1875rem, 3vw, 1.375rem);
  font-weight: 500;
  line-height: 1.35;
}

h2 {
  margin: 2.5rem 0 1rem;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
}

article p {
  margin: 0;
}

article > p:first-of-type {
  margin-bottom: 2.5rem;
}

p + p,
pre + p,
ol + p,
p + pre,
p + ol {
  margin-top: 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

code,
pre {
  font-family: "Berkeley Mono", ui-monospace, monospace;
  font-size: 0.875em;
}

:not(pre) > code {
  color: var(--accent);
}

pre {
  max-width: 100%;
  margin: 1rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  background: var(--panel);
  line-height: 1.5;
  white-space: pre;
}

ol {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

li + li {
  margin-top: 0.5rem;
}

@media (max-width: 30rem) {
  .page {
    padding-inline: 1.25rem;
  }
}
