/* ============================================================
   极简阅读
   暖白底 #FDFCFA / 墨黑 #1F1D1A / 赭石 #B5462F / 暖灰 #8A857C
   单栏窄栏，正文 17px，行高 1.9
   ============================================================ */

:root {
  --bg: #FDFCFA;
  --ink: #1F1D1A;
  --body: #3A3733;
  --muted: #6F6A62;
  --accent: #B5462F;
  --line: #ECE7E0;

  --serif: Georgia, "Songti SC", "STSong", "Noto Serif SC",
    "Source Han Serif SC", SimSun, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 正文内链接带淡下划线，不只靠颜色区分 */
.lead a,
.post-body a,
.entry-excerpt a {
  text-decoration: underline;
  text-decoration-color: rgba(181, 70, 47, .4);
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.lead a:hover,
.post-body a:hover,
.entry-excerpt a:hover {
  text-decoration-color: currentColor;
}

/* 只给读屏器 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 站点头 ---------------- */
.site-head { padding-top: 56px; }

.site-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.site-title {
  display: inline-block;
  font-size: 30px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: .01em;
}
.site-title:hover { text-decoration: none; }

.site-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  white-space: nowrap;
}
.site-nav a {
  display: inline-block;
  padding: 11px 4px;
  margin: 0 -4px;
  color: var(--muted);
}
.site-nav a:hover,
.site-nav a.current {
  color: var(--ink);
  text-decoration: none;
}
.site-nav a.current { position: relative; }
.site-nav a.current::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 6px;
  height: 1px;
  background: var(--accent);
}

main { padding: 44px 0 0; }

/* ---------------- 首页引导段 ---------------- */
.lead {
  padding: 0 0 44px;
  border-bottom: 1px solid var(--line);
}
.lead p { margin: 0 0 .55em; }
.lead p:last-child { margin-bottom: 0; }

/* ---------------- 文章列表 ---------------- */
.entry {
  padding: 46px 0;
  border-bottom: 1px solid var(--line);
}
.entry:last-child { border-bottom: none; }

.entry-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 400;
}
.entry-title a { color: var(--ink); }
.entry-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.entry-meta {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
}

.entry-excerpt {
  margin: 0 0 16px;
  color: var(--body);
}

.entry-more {
  margin: 0;
  font-size: 14px;
}
.entry-more a { color: var(--accent); }

/* ---------------- 文章页 ---------------- */
.post-head {
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--line);
}
.post-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink);
}
.post-meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
}

.post-body { padding: 6px 0 8px; }
.post-body p { margin: 1.15em 0; }
.post-body h2 {
  margin: 2em 0 .7em;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}
.post-body h3 {
  margin: 1.8em 0 .6em;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}
.post-body ul,
.post-body ol { padding-left: 1.3em; }
.post-body li { margin: .2em 0; line-height: 1.75; }

.post-body blockquote {
  margin: 1.6em 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--line);
  color: #6A645C;
}
.post-body blockquote p { margin: .45em 0; }

.post-near {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.post-near a { color: var(--accent); }

/* ---------------- 页脚 ---------------- */
.site-foot {
  padding: 64px 0 84px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }

  .site-head { padding-top: 40px; }
  .site-title { font-size: 26px; }
  .site-nav { gap: 16px; }

  main { padding-top: 34px; }
  .lead { padding-bottom: 34px; }
  .entry { padding: 36px 0; }
  .entry-title { font-size: 20px; }
  .post-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
