:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --paper: #ffffff;
  --text: #202124;
  --muted: #6a6f76;
  --line: #dedbd2;
  --accent: #16635b;
  --accent-strong: #0d4942;
  --code: #f0eee8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-serif, Georgia, "Noto Serif SC", "Songti SC", serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.78;
}

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

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.site-header,
.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.home {
  max-width: 760px;
  margin-bottom: 56px;
}

.eyebrow,
.post-date,
.article-header time,
.back-link {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.home h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.2rem, 8vw, 4.8rem);
  line-height: 1.05;
}

.lede {
  max-width: 680px;
  font-size: 1.15rem;
  color: var(--muted);
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  display: block;
  max-width: 760px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.post-card h2 {
  margin: 6px 0 8px;
  font-size: 1.6rem;
  line-height: 1.35;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.article {
  max-width: 760px;
}

.article-header {
  margin-bottom: 48px;
}

.article-header h1 {
  margin: 16px 0;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.15;
}

.article-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.article-body h2 {
  margin-top: 3rem;
  font-size: 1.75rem;
  line-height: 1.35;
}

.article-body h3 {
  margin-top: 2.2rem;
  font-size: 1.28rem;
  line-height: 1.45;
}

.article-body p,
.article-body li {
  font-size: 1.04rem;
}

.article-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  color: #4c535a;
  border-left: 3px solid var(--accent);
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

figure {
  margin: 32px 0;
}

figcaption {
  margin-top: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 6px;
  background: #242424;
  color: #f4f1ea;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

p code,
li code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--code);
}

.site-footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  main {
    padding-top: 36px;
  }

  .site-header,
  .site-footer {
    padding-inline: 18px;
  }

  main {
    padding-inline: 18px;
  }
}
