:root {
  color-scheme: light;
  --ink: #272727;
  --muted: #777;
  --rule: #deded8;
  --paper: #fcfcf9;
  --link: #245a76;
  --text-measure: 25em;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0 auto;
  max-width: calc(var(--text-measure) + 56px);
  padding: 48px 28px 64px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: #111;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
  padding-bottom: 24px;
}

.site-title {
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.site-title a {
  color: var(--ink);
  text-decoration: none;
}

.tagline {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  margin: 8px 0 16px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.78rem;
  gap: 8px 20px;
}

.post {
  margin-bottom: 72px;
}

.post h2,
.archive h1,
.tag-header h1 {
  font-family: var(--sans);
  font-size: 1.55rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 26px;
}

.post h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body figure {
  margin-bottom: 1.35em;
  margin-top: 0;
}

.post-body h3 {
  font-family: var(--sans);
  font-size: 1.08rem;
  margin: 2.2em 0 0.8em;
}

.post-body img {
  display: block;
  height: auto;
  margin: 1.8em auto;
  max-width: 100%;
}

.post-body figure {
  margin-left: 0;
  margin-right: 0;
}

.post-body figcaption,
.caption {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.76rem;
  margin-top: -1.2em;
  text-align: center;
}

blockquote {
  border-left: 3px solid var(--rule);
  color: #505050;
  margin-left: 0;
  padding-left: 1.4em;
}

.quote-post {
  font-size: 1.2rem;
}

.question {
  background: #f1f1ec;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 18px 20px 2px;
}

.link-title {
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 650;
}

.footnotes {
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  margin-top: 3em;
  padding-top: 1.5em;
}

.footnotes > hr {
  display: none;
}

.post-meta {
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.7rem;
  gap: 7px 16px;
  margin-top: 32px;
  padding-top: 12px;
}

.post-meta .date,
.post-meta .comments {
  color: var(--muted);
}

.tags {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 4px 12px;
}

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

.read-more {
  font-family: var(--sans);
  font-size: 0.82rem;
}

.pagination {
  border-top: 1px solid var(--rule);
  display: grid;
  font-family: var(--sans);
  font-size: 0.76rem;
  grid-template-columns: 1fr auto 1fr;
  margin: 32px 0 72px;
  padding-top: 18px;
}

.pagination span:last-child {
  text-align: right;
}

.archive ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive li {
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 2px;
  grid-template-columns: 1fr;
  padding: 12px 0;
}

.archive time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
}

.comments-section {
  border-top: 1px solid var(--rule);
  margin: 80px 0 48px;
  padding-top: 32px;
}

.post-navigation {
  border-top: 1px solid var(--rule);
  display: grid;
  font-family: var(--sans);
  font-size: 0.76rem;
  grid-template-columns: 1fr auto 1fr;
  margin: 48px 0 72px;
  padding-top: 18px;
}

.post-navigation span:last-child {
  text-align: right;
}

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.68rem;
  margin-top: 72px;
  padding-top: 20px;
}

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

  body {
    max-width: calc(var(--text-measure) + 38px);
    padding: 30px 19px 48px;
  }

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

  .post {
    margin-bottom: 58px;
  }

  .archive li {
    gap: 2px;
    grid-template-columns: 1fr;
  }
}
