/* 个人学习笔记 — 简洁清新博客样式 */
:root {
  --bg: #ffffff;
  --bg-soft: #f7faf8;
  --ink: #374047;
  --ink-strong: #1f272d;
  --muted: #8a9199;
  --accent: #42b983;
  --accent-dark: #35a372;
  --border: #e8eeeb;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-dark); }

/* ---------- 顶栏 ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-strong);
}
.brand .leaf { color: var(--accent); }
.nav { display: flex; gap: 24px; }
.nav a {
  color: var(--ink);
  font-size: 15px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 主体 ---------- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* 站点简介 */
.intro {
  text-align: center;
  padding: 26px 0 34px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 36px;
}
.intro h1 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: 0.5px;
}
.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- 文章列表 ---------- */
.section-label {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 8px;
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.post-item:hover {
  border-color: #cfe9dc;
  box-shadow: 0 4px 16px rgba(66, 185, 131, 0.08);
}
.post-item h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}
.post-item h2 a { color: var(--ink-strong); }
.post-item h2 a:hover { color: var(--accent); }
.post-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.post-meta .tag {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 12px;
  padding: 0 10px;
  margin-left: 8px;
}
.post-excerpt {
  margin: 0;
  font-size: 15px;
  color: #5c666e;
}

/* ---------- 文章正文 ---------- */
.article-header { margin-bottom: 30px; }
.article-header h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 28px;
  color: var(--ink-strong);
  line-height: 1.45;
}
.article-content h2 {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 21px;
  color: var(--ink-strong);
  margin: 34px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.5;
}
.article-content p { margin: 14px 0; }
.article-content ul, .article-content ol { padding-left: 24px; }
.article-content li { margin: 6px 0; }
.article-content blockquote {
  margin: 18px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  color: #5c666e;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-content pre {
  background: #2d333b;
  color: #d8dee6;
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}
.article-content code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.article-content p code,
.article-content li code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-dark);
}
.article-footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* ---------- 关于页 ---------- */
.about-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.about-card p { margin: 12px 0; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 20px 34px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .beian { margin-top: 4px; }

@media (max-width: 560px) {
  .nav { gap: 16px; }
  .intro h1 { font-size: 25px; }
  .container { padding-top: 28px; }
}
