:root {
  color-scheme: light dark;
  --bg: #f8f7f3;
  --text: #24211d;
  --muted: #6b6258;
  --line: #d8d1c7;
  --link: #175f78;
  --link-hover: #0e3d4e;
  --code-bg: #ebe6df;
  --content: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151817;
    --text: #ece7df;
    --muted: #b9afa4;
    --line: #353b38;
    --link: #79c8de;
    --link-hover: #a8ddec;
    --code-bg: #252a28;
  }
}

* {
  box-sizing: border-box;
}

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

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

a:hover {
  color: var(--link-hover);
}

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

.site-header {
  padding: 32px 0 18px;
  border-bottom: 1px solid var(--line);
}

.site-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
  font-weight: 700;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

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

.site-description {
  margin: 8px 0 0;
}

main {
  padding: 36px 0 64px;
}

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

.post-list li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.post-list h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.post-list p {
  margin: 8px 0 0;
  color: var(--muted);
}

.post-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.18;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
}

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

.post-body h2,
.post-body h3,
.post-body h4 {
  margin-top: 2.2em;
  line-height: 1.35;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre {
  margin: 1.15em 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body code {
  padding: 0.12em 0.28em;
  border-radius: 4px;
  background: var(--code-bg);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.post-body pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 6px;
  background: var(--code-bg);
}

.post-body pre code {
  padding: 0;
  background: transparent;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
}

.site-footer {
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }

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

  main {
    padding-top: 28px;
  }
}
