/* 博客样式：和流量页面同一套设计——暖白底、白色卡片、宋体标题、等宽数字。
   颜色和字体都在 :root 里改；标题用的宋体由服务器在发布时按标题用到的字自动生成（css/font.css）。 */
:root {
  --bg: #f4f3ef;
  --panel: #ffffff;
  --text: #1a1a19;
  --muted: #6c6b67;
  --faint: #a3a19b;
  --line: #e5e3dd;
  --line2: #efede8;
  --accent: #5a46cc;
  --accent-bg: #eeebfc;
  --code-bg: #f6f5f1;
  --fill: #1d1d1c;
  --maxw: 46rem;
  --serif: "VPS Serif", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, "Roboto Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --panel: #1b1b1a;
    --text: #ecebe7;
    --muted: #a5a39d;
    --faint: #6f6e69;
    --line: #2c2b29;
    --line2: #242321;
    --accent: #a99bf6;
    --accent-bg: #231f3b;
    --code-bg: #222220;
    --fill: #ecebe7;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.8 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; }
time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(30, 25, 10, .035); }
.eyebrow { display: block; margin-bottom: 12px; font: 500 11px/1 var(--font); letter-spacing: .3em; color: var(--faint); }

/* 页头 */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 20px; padding-top: 26px; padding-bottom: 8px;
}
.brand { font-size: 24px; line-height: 1.3; color: var(--text); }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.site-nav a {
  padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--text); font-size: 14px;
}
.site-nav a:hover { text-decoration: none; border-color: var(--faint); }
.site-nav a[aria-current] { background: var(--fill); border-color: var(--fill); color: var(--bg); }

main.wrap { padding-top: 34px; padding-bottom: 56px; min-height: 70vh; }

/* 首页 */
.intro { margin: 16px 0 38px; }
.intro h1 { font-size: 42px; line-height: 1.2; margin: 0; }
.intro p { color: var(--muted); margin: 12px 0 0; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.post-card { padding: 20px 22px; transition: border-color .15s; }
.post-card:hover { border-color: var(--faint); }
.post-card h2 { font-size: 22px; line-height: 1.45; margin: 6px 0; }
.post-card h2 a { color: var(--text); }
.post-card .summary { margin: 0; color: var(--muted); font-size: 15px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--faint); font-size: 13px; }
.meta time { color: var(--muted); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 0 10px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-size: 12.5px; line-height: 22px; }
.tag:hover { text-decoration: none; }
.empty { color: var(--faint); padding: 30px; text-align: center; }

/* 文章页 */
.post { padding: 34px 40px 40px; }
.post-header { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line2); }
.post-header h1 { font-size: 34px; line-height: 1.35; margin: 0 0 12px; }
.content { font-size: 17px; line-height: 1.9; overflow-wrap: break-word; }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.content h2 { font-size: 24px; line-height: 1.4; margin: 2em 0 .7em; }
.content h3 { font-size: 19px; line-height: 1.4; margin: 1.7em 0 .6em; }
.content p { margin: 0 0 1.2em; }
.content ul, .content ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.content li { margin: .25em 0; }
.content img { display: block; max-width: 100%; height: auto; margin: 1.6em auto; border-radius: 12px; }
.content blockquote { margin: 1.5em 0; padding: .3em 1.2em; border-left: 3px solid var(--line); color: var(--muted); }
.content blockquote p:last-child { margin-bottom: 0; }
.content code {
  font-family: var(--mono); font-size: .86em; background: var(--code-bg);
  padding: .15em .4em; border: 1px solid var(--line2); border-radius: 6px;
}
.content pre {
  background: var(--code-bg); border: 1px solid var(--line2); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.65;
}
.content pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.content table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 8px 14px; text-align: left; }
.content th { font-weight: 600; border-bottom-width: 1.5px; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.post-nav a { padding: 16px 20px; color: var(--text); font-size: 15px; }
.post-nav a:hover { text-decoration: none; border-color: var(--faint); }
.post-nav span { display: block; margin-bottom: 2px; color: var(--faint); font-size: 12px; letter-spacing: .1em; }
.post-nav .next { grid-column: 2; text-align: right; }

/* 归档 / 标签 */
.page-header { margin: 16px 0 28px; }
.page-header h1 { font-size: 38px; line-height: 1.25; margin: 0; }
.page-header .content { margin-top: 10px; color: var(--muted); font-size: 16px; }
.archive-year { margin-bottom: 24px; }
.archive-year h2 { font-size: 20px; margin: 0 0 10px 4px; }
.archive-list { list-style: none; margin: 0; padding: 6px 0; }
.archive-list li { display: flex; align-items: baseline; gap: 18px; padding: 10px 22px; }
.archive-list li + li { border-top: 1px solid var(--line2); }
.archive-list time { flex: none; color: var(--faint); font-size: 13.5px; }
.archive-list a { color: var(--text); }
.tag-cloud { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 15px;
}
.tag-cloud a:hover { text-decoration: none; border-color: var(--faint); }
.tag-cloud span { color: var(--faint); font-family: var(--mono); font-size: 12.5px; }

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; color: var(--muted); font-size: 14px; }
.pagination a { padding: 5px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); }
.pagination a:hover { text-decoration: none; border-color: var(--faint); }
.notfound { text-align: center; padding: 70px 0; }
.notfound h1 { font-size: 76px; line-height: 1; margin: 0 0 10px; }
.notfound p { color: var(--muted); }

/* 页脚 */
.site-footer { color: var(--faint); font-size: 13px; }
.site-footer .wrap { padding-top: 20px; padding-bottom: 36px; }
.site-footer .wrap::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 20px; }
.site-footer a { color: var(--muted); }

.uptime b { font-family: var(--mono); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 动效：打开页面时各块依次从下往上浮出；电脑上鼠标移到文章卡片上会轻轻抬起。
   系统设置里开了"减少动态效果"就全部不动 */
@media (prefers-reduced-motion: no-preference) {
  .intro, .page-header, .post-list > li, .post, .post-nav a, .archive-year, .tag-cloud li, .notfound {
    animation: rise .55s cubic-bezier(.2, .7, .2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
  .post-card, .post-nav a, .tag-cloud a { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .post-card:hover, .post-nav a:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(30, 25, 10, .09); }
  .tag-cloud a:hover { transform: translateY(-2px); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { padding-top: 18px; }
  .brand { font-size: 21px; }
  main.wrap { padding-top: 22px; }
  .intro h1, .page-header h1 { font-size: 32px; }
  .post { padding: 24px 20px 28px; border-radius: 16px; }
  .post-header h1 { font-size: 27px; }
  .content { font-size: 16.5px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; }
}
