/* 个人学习知识库及管理软件 —— 全站样式，零外部依赖 */
:root {
  --bg: #f6f5f1;
  --paper: #ffffff;
  --ink: #2c2b27;
  --muted: #71706a;
  --line: #e6e3dc;
  --accent: #2f6f5e;
  --accent-soft: #e7f0ec;
  --accent-deep: #245545;
  --code-bg: #f0efe9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(40, 38, 32, .05), 0 8px 24px rgba(40, 38, 32, .06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.9;
  font-size: 16px;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 0 22px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; }

/* 头部 */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 245, 241, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: .5px; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand svg { flex: none; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.site-nav a:hover { color: var(--accent-deep); background: var(--accent-soft); text-decoration: none; }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; font-size: 18px; padding: 6px 12px; color: var(--muted); cursor: pointer; }

/* 首屏 */
.hero { padding: 72px 0 40px; text-align: center; }
.hero .seal {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; padding: 6px 14px; border-radius: 999px; letter-spacing: 1px;
}
.hero h1 {
  font-family: "Songti SC", "Noto Serif SC", "SimSun", serif;
  font-size: 38px; line-height: 1.4; margin: 18px 0 14px; letter-spacing: 2px;
}
.hero .intro { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: 16px; }
.hero .motto { margin-top: 10px; color: var(--accent-deep); font-size: 14px; letter-spacing: 3px; }
.hero .rule { width: 56px; height: 3px; background: var(--accent); border-radius: 2px; margin: 26px auto 0; opacity: .7; }

/* 栏目 */
.section { padding: 34px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 22px; }
.section-head h2 { font-family: "Songti SC", "Noto Serif SC", "SimSun", serif; font-size: 24px; letter-spacing: 2px; }
.section-head .count { color: var(--muted); font-size: 14px; letter-spacing: 1px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(40, 38, 32, .06), 0 14px 32px rgba(40, 38, 32, .09); }
.card .tag { align-self: flex-start; font-size: 12px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 6px; padding: 3px 10px; letter-spacing: 1px; }
.card h3 { font-size: 18px; line-height: 1.6; margin: 12px 0 8px; font-weight: 700; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent-deep); text-decoration: none; }
.card .meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.card .excerpt { color: var(--muted); font-size: 14px; line-height: 1.8; flex: 1; }
.card .more { margin-top: 14px; font-size: 14px; font-weight: 600; }

/* 文章页 */
.crumb { font-size: 14px; margin: 26px 0 0; }
.article {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 44px 48px; margin: 18px 0 8px;
}
.article-head { border-bottom: 1px dashed var(--line); padding-bottom: 20px; margin-bottom: 26px; }
.article-head .tag { display: inline-block; font-size: 12px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 6px; padding: 3px 10px; letter-spacing: 1px; }
.article-head h1 { font-family: "Songti SC", "Noto Serif SC", "SimSun", serif; font-size: 30px; line-height: 1.5; margin: 14px 0 10px; letter-spacing: 1px; }
.article-head .meta { color: var(--muted); font-size: 14px; }
.article-body h2 { font-size: 20px; margin: 34px 0 12px; padding-left: 12px; border-left: 4px solid var(--accent); line-height: 1.5; }
.article-body p { margin: 12px 0; color: #3a3934; }
.article-body ul, .article-body ol { margin: 12px 0 12px 24px; color: #3a3934; }
.article-body li { margin: 6px 0; }
.article-body strong { color: var(--ink); }
.article-body pre { background: #2e2c27; color: #e8e6df; border-radius: 10px; padding: 18px 20px; overflow-x: auto; margin: 16px 0; font-size: 14px; line-height: 1.7; }
.article-body code { font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace; background: var(--code-bg); border-radius: 5px; padding: 2px 6px; font-size: .92em; }
.article-body pre code { background: none; padding: 0; }
.article-body blockquote { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 16px 0; color: #3d4a44; font-size: 15px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article-body th { background: #f4f2ec; font-weight: 600; }
.article-body td .ok { color: var(--accent-deep); font-weight: 600; white-space: nowrap; }
.article-body td .fix { color: #b3541e; font-weight: 600; white-space: nowrap; }
.article-body td .todo { color: #8a6d1a; font-weight: 600; white-space: nowrap; }
.article-foot { margin-top: 36px; border-top: 1px dashed var(--line); padding-top: 18px; color: var(--muted); font-size: 14px; }

/* 关于页 */
.about-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 44px; margin: 36px 0;
}
.about-panel h1 { font-family: "Songti SC", "Noto Serif SC", "SimSun", serif; font-size: 28px; margin-bottom: 6px; letter-spacing: 2px; }
.about-panel .sub { color: var(--muted); font-size: 14px; }
.about-panel h2 { font-size: 19px; margin: 28px 0 10px; padding-left: 12px; border-left: 4px solid var(--accent); }
.about-panel p { margin: 12px 0; color: #3a3934; }
.about-panel ul { margin: 12px 0 12px 24px; color: #3a3934; }
.about-panel li { margin: 6px 0; }

/* 页脚 */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: #f1efe9; }
.footer-inner { padding: 30px 22px 40px; text-align: center; color: var(--muted); font-size: 14px; line-height: 2; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--accent-deep); }

/* 返回顶部 */
.to-top {
  position: fixed; right: 26px; bottom: 26px; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  color: var(--muted); font-size: 18px; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 10px 22px 16px; gap: 2px;
  }
  .site-nav.open { display: flex; }
  .hero { padding: 52px 0 30px; }
  .hero h1 { font-size: 28px; }
  .article, .about-panel { padding: 30px 24px; }
  .article-head h1 { font-size: 24px; }
}
