/* ============================================
   凯哥的博客 · 全站样式（简约清爽，移动优先）
   改配色只动 :root 里的变量就行
   ============================================ */

:root {
  --bg: #faf9f6;          /* 页面底色（暖白） */
  --card: #ffffff;        /* 卡片底色 */
  --text: #2c2c2c;        /* 正文色 */
  --muted: #8c8c8c;       /* 次要文字 */
  --line: #ecebe6;        /* 分隔线 */
  --accent: #a0731f;      /* 凤临金 */
  --accent-light: #f5ead6;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

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

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

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

/* ---- 首页头部 ---- */
.site-header { margin: 8px 0 24px; }
.site-title { margin: 0; font-size: 1.5rem; letter-spacing: .02em; }
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); text-decoration: none; }

/* ---- 简介卡 ---- */
.profile {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 36px;
}
.avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b98a2f, #8a5f16);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-name { margin: 0; font-weight: 600; font-size: 1.05rem; }
.profile-bio { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }

/* ---- 首页文章列表 ---- */
.section-title { margin: 0 0 4px; font-size: .95rem; color: var(--muted); font-weight: 500; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 18px 2px; border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: none; }
.post-item .post-title { margin: 0; font-size: 1.12rem; line-height: 1.6; }
.post-item .post-title a { color: var(--text); }
.post-item .post-title a:hover { color: var(--accent); }
.post-meta { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.post-excerpt { margin: 8px 0 0; color: #666; font-size: .95rem; line-height: 1.75; }

/* ---- 文章页 ---- */
.post-nav { margin: 4px 0 20px; font-size: .9rem; }
.post-heading { font-size: 1.45rem; line-height: 1.5; margin: 0 0 8px; }
.post-content { margin-top: 18px; }
.post-content h2 { font-size: 1.15rem; margin: 1.8em 0 .7em; }
.post-content p { margin: 0 0 1.1em; }
.post-content ul, .post-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.post-content blockquote {
  margin: 1.2em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: #faf3e3;
  border-radius: 0 8px 8px 0;
  color: #6b5b3a;
}
.post-content code {
  background: #f1efe9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  font-family: Consolas, "Courier New", monospace;
}
.post-content pre {
  background: #f6f5f1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; }
.post-content hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---- 页脚（两行：版权 + 备案号） ---- */
.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.9;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---- 小屏微调 ---- */
@media (max-width: 480px) {
  .container { padding: 22px 16px 32px; }
  .site-title { font-size: 1.35rem; }
  .post-heading { font-size: 1.3rem; }
}

::selection { background: var(--accent-light); }
