:root {
  color-scheme: light dark;
  --background: #f8f6f1;
  --foreground: #24211c;
  --muted: #6b655c;
  --link: #235a92;
  --border: #d7d0c4;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #181714;
    --foreground: #e7e1d7;
    --muted: #aaa296;
    --link: #82b8eb;
    --border: #454038;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
}

body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem;
  color: var(--foreground);
  background: var(--background);
}

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

a:hover,
a:focus-visible {
  text-decoration-thickness: 0.15em;
}

.site-header,
.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-color: var(--border);
}

.site-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination {
  justify-content: space-between;
  margin-top: 2rem;
}

main {
  min-height: 65vh;
  padding: 2rem 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

img,
table,
pre {
  max-width: 100%;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85em;
}

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

.post-list {
  padding: 0;
  list-style: none;
}

.post-list > li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list h2,
.post-list h3 {
  margin-bottom: 0.25rem;
}

.post-meta,
.tags,
.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-body {
  overflow-wrap: anywhere;
}

.site-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

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

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
