/* 简洁个人博客 · 无外部依赖 · 支持深色模式 */
:root {
  --bg: #fdfdfb;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --faint: #9ca3af;
  --border: #e8e8e3;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --code-bg: #f4f4f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
[data-theme="dark"] {
  --bg: #16181d;
  --surface: #1d2026;
  --text: #e6e8eb;
  --muted: #9aa1ab;
  --faint: #6b7280;
  --border: #2b2f36;
  --accent: #7aa5ff;
  --accent-soft: #232c42;
  --code-bg: #24272e;
  --shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .02em;
}
.logo:hover { text-decoration: none; color: var(--accent); }
nav.main { display: flex; align-items: center; gap: 22px; }
nav.main a { color: var(--muted); font-size: 15px; }
nav.main a:hover, nav.main a.active { color: var(--text); text-decoration: none; }
#theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  width: 34px; height: 34px; cursor: pointer; font-size: 15px;
  color: var(--text); display: grid; place-items: center;
}
#theme-toggle:hover { border-color: var(--faint); }

/* 主页头图区 */
.hero { padding: 64px 0 40px; }
.hero h1 {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 34px; line-height: 1.3; font-weight: 700; margin-bottom: 14px;
}
.hero p { color: var(--muted); font-size: 17px; max-width: 560px; }
.hero .avatar {
  width: 72px; height: 72px; border-radius: 50%; margin-bottom: 22px;
  background: linear-gradient(135deg, var(--accent), #7c5cff);
  display: grid; place-items: center; color: #fff;
  font-family: Georgia, serif; font-size: 30px; font-weight: 700;
  box-shadow: var(--shadow);
}

/* 文章列表 */
.section-title {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin: 8px 0 6px;
}
.post-item {
  display: block; padding: 22px 4px; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.post-item:hover { text-decoration: none; }
.post-item:hover .post-title { color: var(--accent); }
.post-meta { font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.post-title {
  font-size: 20px; font-weight: 650; line-height: 1.45; margin-bottom: 6px;
  transition: color .15s;
}
.post-excerpt { color: var(--muted); font-size: 15px; }
.tags { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px; color: var(--muted); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 999px;
}

/* 文章页 */
article.post { padding: 48px 0 8px; }
article.post h1 {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 30px; line-height: 1.35; margin-bottom: 12px;
}
article.post .post-meta { margin-bottom: 30px; }
article.post .body { font-size: 17px; line-height: 1.85; }
article.post .body p { margin-bottom: 1.2em; }
article.post .body h2 { font-size: 22px; margin: 1.6em 0 .7em; line-height: 1.4; }
article.post .body h3 { font-size: 19px; margin: 1.4em 0 .6em; }
article.post .body ul, article.post .body ol { margin: 0 0 1.2em 1.4em; }
article.post .body li { margin-bottom: .4em; }
article.post .body blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 16px;
  color: var(--muted); margin: 0 0 1.2em;
}
article.post .body code {
  background: var(--code-bg); padding: 2px 6px; border-radius: 5px;
  font-size: .88em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
article.post .body pre {
  background: var(--code-bg); border-radius: 10px; padding: 16px 18px;
  overflow-x: auto; margin-bottom: 1.2em;
}
article.post .body pre code { background: none; padding: 0; }
article.post .body img { max-width: 100%; border-radius: 10px; }
article.post .body hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.back-link { display: inline-block; margin-top: 34px; font-size: 15px; }

/* 关于页 */
.about-body { padding: 48px 0 8px; font-size: 17px; line-height: 1.85; }
.about-body h1 {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 30px; margin-bottom: 24px;
}
.about-body p { margin-bottom: 1.2em; }
.about-body ul { margin: 0 0 1.2em 1.4em; }

/* 页脚 */
footer.site {
  margin-top: 72px; padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--faint); font-size: 14px;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 404 */
.notfound { padding: 90px 0; text-align: center; }
.notfound h1 {
  font-family: Georgia, serif; font-size: 56px; margin-bottom: 10px;
}
.notfound p { color: var(--muted); margin-bottom: 24px; }

@media (max-width: 560px) {
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: 27px; }
  article.post h1, .about-body h1 { font-size: 25px; }
  nav.main { gap: 16px; }
}
