:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #333333;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --text: #e5e5e5;
    --text-muted: #cccccc;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100%;
  display: grid;
  align-items: start;
  justify-items: center;
  padding-top: 6rem;
  padding-bottom: 4.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  width: 100%;
  max-width: 65ch;
  text-align: left;
  padding: 0 0.75rem;
  margin: 0 auto;
  position: relative;
}

main:has(.prose) {
  max-width: 65ch;
}

.back-link {
  position: absolute;
  top: -2rem;
  left: 0;
  font-size: 0.75rem;
  margin: 0;
  padding: 0 0.75rem;
}

h1 {
  font-size: 2rem;
  font-weight: 450;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  font-size: 1.125rem;
  color: var(--text);
  font-weight: 450;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

nav {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.1em;
  transition: color 0.2s ease;
}

nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

a:hover {
  color: #3b82f6;
}

@media (prefers-color-scheme: dark) {
  a:hover {
    color: #60a5fa;
  }
}

a svg {
  width: 20px;
  height: 20px;
}

ul {
  list-style: none;
  margin: 1.5rem 0 2.5rem 0;
  padding: 0;
}

li {
  margin-bottom: 0.75rem;
}

li a {
  display: inline;
}

.prose {
  max-width: 65ch;
  text-align: left;
  color: var(--text);
}

.prose h1 {
  font-size: 2rem;
  font-weight: 450;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 450;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 450;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose li > p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

.prose em {
  font-style: italic;
}

.prose code {
  font-size: 0.875em;
  font-weight: 500;
  background: var(--bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--text);
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
  background: var(--bg);
  border-radius: 0.375rem;
  font-size: 0.875em;
  line-height: 1.7142857;
}

.prose pre code {
  background: transparent;
  padding: 0;
  font-weight: 400;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

.prose blockquote {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 0.25rem solid var(--text-muted);
  font-style: italic;
  color: var(--text-muted);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--text-muted);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.prose a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.1em;
}

.prose img {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
  height: auto;
}
