/* 个人博客的样式，刻意做得很轻。
   只有一个断点、一套字号、一组颜色变量，改起来不用翻来翻去。 */

:root {
  --bg:      #fdfdfc;
  --fg:      #24231f;
  --muted:   #8a8880;
  --rule:    #e6e4de;
  --link:    #3f6b4f;
  --measure: 34rem;   /* 正文宽度，中文一行 30 字上下最舒服 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:    #1b1a18;
    --fg:    #ddd9d0;
    --muted: #85817a;
    --rule:  #33312d;
    --link:  #8fb89b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
  max-width: var(--measure);
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover { border-bottom-color: currentColor; }

/* ---- 页头 ---- */

.site-header { margin-bottom: 3rem; }

.site-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.site-title a { color: inherit; }

.site-desc {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- 首页文章列表 ---- */

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

.post-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list li:first-child { border-top: 1px solid var(--rule); }

.post-list time {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.post-list a { font-size: 1.02rem; }

/* ---- 文章页 ---- */

.post h1 {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.5;
}

.post .date {
  display: block;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.post p { margin: 0 0 1.25rem; }

.post-nav {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

/* ---- 页脚 ---- */

.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.9;
}
.site-footer a { color: var(--muted); }

@media (max-width: 30rem) {
  body { padding-top: 2.25rem; font-size: 16px; }
}
