/* blog 皮肤 — M5 精修。
   气质：干净、留白多、有点性格的极简中文文字站——冷灰底 + 无衬线 + 一点朱红，
   刻意不与 fiction（暖纸衬线）像。中文正文走系统字体栈，不进自托管字体
   （orbit 家规）；等宽字体只用来排数字（日期），同样是系统栈，不算例外。 */

:root {
  --bg: #fcfcfb;
  --bg-raised: #f2f2f0;
  --ink: #1a1a1a;
  --muted: #82868a;
  --line: rgba(20, 20, 20, 0.11);
  --accent: #b3261e;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --measure: 40rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --bg-raised: #1c1c1b;
    --ink: #e6e6e5;
    --muted: #8d9094;
    --line: rgba(230, 230, 229, 0.14);
    --accent: #e2685f;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .post-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

main { max-width: var(--measure); margin: 0 auto; padding: 3.5rem 1.25rem 4rem; }

/* —— 首页 —— */
.site-head h1 { margin: 0; font-size: 1.7rem; font-weight: 700; letter-spacing: 0.01em; }
.tagline { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.95rem; }

.post-list { list-style: none; margin: 2.75rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }

.post-row {
  display: flex;
  align-items: baseline;
  gap: 1.5em;
  padding: 1.05em 0.3em;
  margin: 0 -0.3em;
  color: inherit;
  border-radius: 8px;
  transition: background-color 0.15s ease, padding-left 0.15s ease;
}
.post-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); text-decoration: none; padding-left: 0.75em; }
.post-row time {
  flex: 0 0 auto;
  min-width: 5.2em;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
}
.post-title { font-weight: 500; }
.post-row:hover .post-title { color: var(--accent); }
.post-row::after {
  content: "→";
  margin-left: auto;
  padding-left: 1em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.post-row:hover::after { opacity: 1; transform: translateX(0); }

/* 空列表：不是一行可怜的小字，是个占地方的空信箱。 */
.post-list .empty {
  border-bottom: none;
  margin-top: 0.25rem;
  padding: 3.25rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
.post-list .empty p { margin: 0; font-size: 1.05rem; line-height: 2; color: var(--ink); }
.post-list .empty p::before,
.post-list .empty p::after { color: var(--muted); }
.post-list .empty p::before { content: "「"; margin-right: 0.05em; }
.post-list .empty p::after { content: "」"; margin-left: 0.05em; }

/* —— 文章页 —— */
.article-head { margin-bottom: 2.75rem; }
.article-head .crumb { margin: 0 0 1.5rem; font-size: 0.85rem; }
.article-head .crumb a { color: var(--muted); }
.article-head .crumb a:hover { color: var(--accent); }
.article-head h1 { margin: 0 0 0.5rem; font-size: 1.65rem; line-height: 1.4; }
.article-head time { color: var(--muted); font-family: var(--mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

.prose { font-size: 1.02rem; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.3em; }

.prose h2, .prose h3, .prose h4 { font-weight: 700; line-height: 1.4; }
.prose h2 { margin: 2.2em 0 0.7em; padding-top: 1.4em; border-top: 1px solid var(--line); font-size: 1.3rem; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { margin: 1.9em 0 0.6em; font-size: 1.14rem; }
.prose h4 { margin: 1.6em 0 0.6em; font-size: 1.02rem; color: var(--muted); }

.prose ul { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--muted); }

.prose hr { margin: 2.5em auto; width: 3rem; border: none; border-top: 1px dashed var(--line); }

.prose blockquote {
  margin: 1.5em 0;
  padding: 0.2em 0 0.2em 1.1em;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}
.prose blockquote p { margin: 0.4em 0; }

.prose pre {
  margin: 1.5em 0;
  padding: 1em 1.1em;
  overflow-x: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.6;
}
.prose pre code { padding: 0; background: none; border: none; font-size: 0.88em; }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  background: var(--bg-raised);
  border-radius: 4px;
}
.prose img { display: block; max-width: 100%; margin: 1.8em auto; border-radius: 6px; }
.prose a { text-underline-offset: 0.15em; }

/* —— 404 —— */
.notfound { padding-top: 3rem; text-align: center; }
.notfound-code {
  margin: 0 0 -0.5rem;
  font-family: var(--mono);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--line);
  letter-spacing: 0.05em;
}
.notfound h1 { margin: 0 0 0.75rem; font-size: 1.4rem; }
.notfound p { color: var(--muted); }

.site-foot { text-align: center; padding: 3rem 0 2.5rem; font-size: 0.8rem; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent); }

@media (max-width: 26rem) {
  .post-row { flex-wrap: wrap; row-gap: 0.3em; }
  .post-row time { min-width: auto; }
  .post-row::after { display: none; }
}
