:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #656d76;
  --border: #d0d7de;
  --link: #0969da;
  --code-bg: #f6f8fa;

  --font-sans:
    "Avenir Next",
    Avenir,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  --font-mono:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;

  --measure: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #8b949e;
    --border: #30363d;
    --link: #4493f8;
    --code-bg: #161b22;
  }
}

html {
  font-size: 17px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  font-family: var(--font-sans);
}

h1,
h2,
h3 {
  margin: 2.5rem 0 1rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  margin-top: 0;
  font-size: 2.25rem;
  letter-spacing: -0.04em;
}

h2 {
  padding-bottom: 0.35rem;
  font-size: 1.45rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

ul {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin: 0.35rem 0;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 1.25rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background: var(--code-bg);
}

pre {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;

  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--code-bg);

  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

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

svg {
  max-width: 100%;
}

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 2.5rem 1.1rem 4rem;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  pre {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }
}

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

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