:root {
  --bg-color: #fff;
  --text-color: #000;
  --border-color: #afafaf;
  --code-bg: #f5f5f5;
}

.dark {
  --bg-color: #0a0a0a;
  --text-color: #e5e5e5;
  --border-color: #404040;
  --code-bg: #1a1a1a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
  background-color: var(--bg-color);
}

body {
  font-family: "Geist Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

h1 {
  margin-top: 2rem;
}

h1:first-child {
  margin-top: 0;
}

h2 {
  margin-top: 2rem;
}

h3 {
  margin-top: 1.5rem;
}

p + p {
  margin-top: 0.75rem;
}

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

a:hover {
  opacity: 0.6;
}

main a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

nav {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

nav > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  margin-right: 1rem;
  opacity: 0.4;
}

nav a.active {
  opacity: 1;
}

.theme-toggle {
  cursor: pointer;
  opacity: 0.4;
  background: none;
  border: none;
  color: var(--text-color);
  font-family: "Geist Mono", monospace;
  font-size: 0.75rem;
  padding: 0;
}

.theme-toggle:hover {
  opacity: 1;
}

.dark .theme-toggle-light {
  display: inline;
}

.dark .theme-toggle-dark {
  display: none;
}

.theme-toggle-light {
  display: none;
}

.theme-toggle-dark {
  display: inline;
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  opacity: 0.6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer a {
  margin-right: 1rem;
}
