:root {
  color-scheme: light dark;
  --bg: #f2f2f2;
  --fg: #111111;
  --heading: #000000;
  --muted: #414141;
  --link: #0b6ec5;
  --selection-bg: rgba(30, 157, 231, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --fg: rgba(255, 255, 255, 0.92);
    --heading: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.72);
    --link: #7aa2ff;
    --selection-bg: rgba(122, 162, 255, 0.24);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
}

html {
  background: var(--bg);
  color: var(--fg);
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  font-family: "JetBrains Mono", monospace;
}

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

h1 {
  color: var(--heading);
}

h2 {
  color: var(--heading);
  margin-top: 28px;
}

p {
  line-height: 1.6;
}

a {
  color: var(--link);
}

a:hover {
  text-decoration: underline;
}

footer.footer-links {
  margin-top: 48px;
  padding: 24px 0 32px;
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 15px;
}

footer.footer-links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

@media (max-width: 768px) {
  body {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0 12px;
  }
}
