:root {
  color-scheme: light;
  --page-bg: #fffcfb;
  --text: #000;
  --muted: rgb(0 0 0 / 80%);
  background: var(--page-bg);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #1a1818;
  --text: #fff;
  --muted: rgb(255 255 255 / 80%);
}

:root[data-theme="dark"] :is(h1, h2, h3, h4, h5, h6) {
  color: #f2f2f2;
}

body {
  max-width: 40em;
  margin: 0 auto;
  padding: 0 1em;
  font-family:
    "Neue Haas Grotesk Text Pro", "Neue Haas Grotesk", Helvetica, Arial,
    sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

a:link,
a:visited {
  color: var(--muted);
}

nav {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.2em;
  row-gap: 0.35em;
}

nav a {
  text-decoration: none;
  color: var(--muted);
}

nav a:hover {
  text-decoration: underline;
}

nav a.current {
  color: var(--text);
  font-weight: bold;
}

#theme-toggle {
  flex: none;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

#theme-toggle:hover {
  text-decoration: underline;
}

#theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
