:root {
  --bg: #f6f7f6;
  --paper: #ffffff;
  --text: #171716;
  --muted: #606761;
  --soft: #777d78;
  --line: #d6dbd7;
  --line-strong: #aeb8b1;
  --accent: #0f6b5b;
  --accent-dark: #07483d;
  --accent-soft: #e1f0ec;
  --warm: #9a3412;
  --measure: 760px;
  --wide: 980px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  border-top: 5px solid var(--accent);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

::selection {
  background: var(--accent-soft);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--text);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.82rem;
}

.skip-link:focus {
  top: 12px;
}

.site-header,
.site-footer,
.site-main {
  width: min(var(--measure), calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--line);
}

.masthead {
  display: grid;
  gap: 2px;
}

.brand {
  width: fit-content;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
}

.brand::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 9px;
  background: var(--warm);
}

.site-description {
  max-width: 46ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.45;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.2;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  border-color: var(--line);
  background: var(--paper);
  color: var(--text);
}

.site-main {
  padding: 42px 0 64px;
}

.site-footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
}

.archive-header {
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-description {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.55;
}

.post-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.post-card:first-child {
  border-top-color: var(--line-strong);
}

.post-card-date {
  color: var(--soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  text-transform: uppercase;
}

.post-card-title,
.post-title,
.archive-title {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  line-height: 1.12;
}

.post-card-title {
  font-size: 1.72rem;
}

.post-card-title a {
  color: var(--text);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--accent);
}

.post-title {
  font-size: 3.1rem;
  max-width: 12.5em;
}

.archive-title {
  font-size: 2.45rem;
}

.section-title {
  margin: 44px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.meta {
  margin: 9px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
}

.meta a {
  color: var(--muted);
}

.meta a:hover {
  color: var(--accent-dark);
}

.excerpt {
  max-width: 62ch;
  margin: 12px 0 0;
  color: #333735;
  line-height: 1.62;
}

.post > header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.post-content {
  margin-top: 36px;
}

.post-content > *:first-child {
  margin-top: 0;
}

.post-content p,
.post-content li {
  max-width: 68ch;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  max-width: 64ch;
  margin: 1.9em 0 0.5em;
  font-family: var(--sans);
  line-height: 1.25;
}

.post-content h2 {
  font-size: 1.35rem;
}

.post-content h3 {
  font-size: 1.08rem;
}

.post-content img,
.post-content video,
.post-content iframe {
  max-width: 100%;
}

.post-content img {
  height: auto;
  border-radius: 2px;
}

.post-content figure {
  margin: 1.8em 0;
}

.post-content blockquote {
  margin: 1.6em 0;
  padding-left: 20px;
  border-left: 3px solid var(--warm);
  color: #343735;
}

.post-content figcaption,
.wp-caption-text {
  margin-top: 0.45em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
}

.post-content pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #edf0ee;
  font-size: 0.84rem;
  line-height: 1.5;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.taxonomy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  font-family: var(--sans);
  font-size: 0.78rem;
}

.taxonomy-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--paper);
  color: var(--accent-dark);
  text-decoration: none;
}

.taxonomy-links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.88rem;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  text-decoration: none;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.topic-card h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.25;
}

.topic-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.topic-card h3 a:hover {
  color: var(--accent);
}

.search-box {
  margin: 24px 0 0;
}

.pagefind-ui {
  --pagefind-ui-primary: var(--accent);
  --pagefind-ui-text: var(--text);
  --pagefind-ui-background: var(--paper);
  --pagefind-ui-border: var(--line);
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-font: var(--sans);
}

.pagefind-ui__search-input {
  box-shadow: none;
}

@media (min-width: 900px) {
  .site-header,
  .site-footer,
  .site-main {
    width: min(var(--wide), calc(100% - 64px));
  }

  .site-header {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: end;
  }

  .site-main > * {
    max-width: var(--measure);
  }
}

@media (max-width: 720px) {
  html {
    font-size: 17px;
  }

  .site-header {
    padding-top: 28px;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }

  .post-card-title {
    font-size: 1.35rem;
  }

  .post-title {
    font-size: 2.15rem;
  }

  .archive-title {
    font-size: 1.85rem;
  }

  .post-card-date {
    text-transform: none;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 5px;
  }
}
