/* 阿文的手记 — 共用样式 */

:root {
  --bg: #fdfdfa;
  --text: #232320;
  --muted: #6f6d66;
  --accent: #2f6f4f;
  --border: #e4e2d9;
  --code-bg: #f1f0e9;
  --code-text: #33322e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b18;
    --text: #e3e1da;
    --muted: #9a978d;
    --accent: #8fc3a5;
    --border: #35342e;
    --code-bg: #262622;
    --code-text: #d8d5cb;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

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

.wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 页眉 */
header.site {
  padding: 36px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
header.site .blog-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}
header.site .blog-name:hover { text-decoration: none; }
header.site .tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
header.site nav { margin-top: 14px; font-size: 15px; }
header.site nav a { margin-right: 18px; }

/* 页脚 */
footer.site {
  margin-top: 56px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* 首页文章列表 */
.intro { color: var(--muted); margin: 0 0 28px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-list .post-date {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}
.post-list .post-title { font-size: 19px; font-weight: 600; }
.post-list .post-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* 文章页 */
article.post h1 { font-size: 24px; line-height: 1.4; margin: 0 0 6px; }
article.post .meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}
article.post h2 { font-size: 19px; margin: 32px 0 10px; }
article.post p { margin: 0 0 16px; }
article.post ul, article.post ol { margin: 0 0 16px; padding-left: 24px; }
article.post li { margin-bottom: 6px; }
.back-home { margin-top: 36px; font-size: 15px; }

/* 代码 */
code {
  font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 5px;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: 14px 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 18px;
  line-height: 1.6;
}
pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
}

/* 404 */
.notfound { text-align: center; padding: 60px 0 40px; }
.notfound .big { font-size: 72px; font-weight: 700; color: var(--muted); line-height: 1; }
.notfound p { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 15px; }
  header.site { padding-top: 24px; }
  header.site .blog-name { font-size: 22px; }
  article.post h1 { font-size: 21px; }
  .post-list .post-title { font-size: 17px; }
}
