/*  ————————————————————————————————————————
    余白 · 站点样式
    纸色背景、宋体正文、朱红点缀
    ———————————————————————————————————————— */

:root {
  --paper: #FBFAF6;
  --paper-2: #F4F1E9;
  --ink: #1E1C18;
  --ink-soft: #4B4740;
  --muted: #8C8578;
  --line: #E4DFD2;
  --accent: #9C3B2E;
  --serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15140F;
    --paper-2: #1D1B15;
    --ink: #E9E3D6;
    --ink-soft: #C0B9A9;
    --muted: #8B8474;
    --line: #2F2C24;
    --accent: #D4755F;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; }

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

/* ——— 布局 ——— */

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

.wrap-wide { max-width: 860px; }

/* ——— 页头 ——— */

.site-header { padding-top: 34px; }

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .22em;
  text-indent: .22em;
  color: var(--ink);
  text-decoration: none;
}

.nav { display: flex; gap: 22px; }

.nav a {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.nav a:hover { color: var(--accent); }

.nav a.on { color: var(--ink); }

/* ——— 首页 Hero ——— */

.hero { padding: 84px 0 60px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .32em;
  color: var(--muted);
  margin: 0 0 26px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 50px);
  letter-spacing: .3em;
  text-indent: .3em;
  line-height: 1.3;
  margin: 0 0 22px;
}

.hero .lead {
  font-size: 18px;
  color: var(--ink);
  letter-spacing: .04em;
  margin: 0 0 26px;
}

.hero .intro {
  font-size: 15.5px;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0;
}

.hero .rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 44px 0 0;
  opacity: .8;
}

/* ——— 区块标题 ——— */

.sec {
  padding: 44px 0 0;
}

.sec + .sec {
  border-top: 1px solid var(--line);
}

.sec-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .34em;
  color: var(--muted);
  margin: 0 0 6px;
}

/* ——— 作品列表 ——— */

.work-list { list-style: none; margin: 0; padding: 0; }

.work-item { border-bottom: 1px solid var(--line); }

.work-item a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 30px 0 28px;
  text-decoration: none;
  transition: opacity .25s ease;
}

.work-item a:hover .work-title { color: var(--accent); }

.work-item .idx {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .08em;
}

.work-title {
  font-size: 22px;
  letter-spacing: .08em;
  margin: 0 0 10px;
  font-weight: 400;
  transition: color .2s ease;
}

.work-blurb {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin: 0;
  max-width: 34em;
}

.work-side {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.work-side .count { display: block; margin-top: 6px; font-size: 11px; opacity: .8; }

/* ——— 文章条目 ——— */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-list li { border-bottom: 1px solid var(--line); }

.post-list li:last-child { border-bottom: 0; }

.post-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  text-decoration: none;
  transition: color .2s ease;
}

.post-row:hover .post-t { color: var(--accent); }

.post-t {
  font-size: 16.5px;
  letter-spacing: .04em;
  transition: color .2s ease;
}

.post-r {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .08em;
  white-space: nowrap;
  flex: none;
}

/* ——— 作品页 ——— */

.work-head { padding: 76px 0 52px; border-bottom: 1px solid var(--line); }

.work-head .kind {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .28em;
  color: var(--accent);
  margin: 0 0 22px;
}

.work-head h1 {
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1.4;
  margin: 0 0 24px;
}

.work-head .blurb {
  font-size: 16px;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0;
}

.toc { padding: 24px 0 0; }

.toc-label {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .3em;
  color: var(--muted);
  margin: 20px 0 4px;
}

/* ——— 文章页 ——— */

.article { padding: 62px 0 0; }

.crumb {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 34px;
  transition: color .2s ease;
}

.crumb:hover { color: var(--accent); }

.article h1 {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .05em;
  margin: 0 0 22px;
}

.article-meta {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.article-meta .sep { margin: 0 10px; opacity: .5; }

.prose {
  padding-top: 38px;
  font-size: 19px;
  line-height: 2.05;
  letter-spacing: .012em;
}

.prose p {
  text-indent: 2em;
  margin: 0 0 .75em;
  text-align: justify;
}

.prose h2 {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .12em;
  margin: 2.6em 0 1.1em;
  text-indent: 0;
}

.prose h3 {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .1em;
  margin: 2.2em 0 1em;
  text-indent: 0;
  color: var(--ink-soft);
}

.prose blockquote {
  margin: 2em 1.6em;
  padding: 2px 0 2px 1.3em;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.95;
}

.prose blockquote p { text-indent: 0; margin: 0 0 .4em; text-align: left; }

.prose blockquote p:last-child { margin-bottom: 0; }

.divider {
  text-indent: 0;
  text-align: center;
  letter-spacing: .7em;
  color: var(--muted);
  margin: 2.6em 0;
  font-size: 15px;
}

.prose em { font-style: normal; color: var(--accent); }

.prose a { color: var(--accent); text-underline-offset: 3px; }

/* ——— 上下篇 ——— */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 72px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}

.pager a {
  text-decoration: none;
  color: var(--ink-soft);
  max-width: 46%;
  transition: color .2s ease;
}

.pager a:hover { color: var(--accent); }

.pager .dir {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--muted);
  margin-bottom: 8px;
}

.pager .right { text-align: right; }

/* ——— 关于页 ——— */

.page-head { padding: 76px 0 40px; }

.page-head h1 {
  font-size: clamp(28px, 5.5vw, 38px);
  font-weight: 400;
  letter-spacing: .16em;
  margin: 0;
}

.about .prose { font-size: 17.5px; line-height: 2.05; padding-top: 34px; }

.mail {
  margin-top: 54px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .06em;
}

.mail a { color: var(--accent); text-decoration: none; }

/* ——— 页脚 ——— */

.site-footer {
  margin-top: 96px;
  padding: 30px 0 60px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--muted);
  letter-spacing: .06em;
}

.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.site-footer a { color: var(--muted); text-decoration: none; }

.site-footer a:hover { color: var(--accent); }

/* ——— 焦点 ——— */

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

/* ——— 手机 ——— */

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  .site-header { padding-top: 26px; }
  .nav { gap: 16px; }
  .hero { padding: 58px 0 44px; }
  .hero h1 { letter-spacing: .26em; text-indent: .26em; }
  .hero .lead { font-size: 16.5px; }
  .hero .intro { font-size: 15px; }
  .sec { padding-top: 34px; }
  .work-item a { grid-template-columns: 34px 1fr; gap: 14px; padding: 24px 0 22px; }
  .work-side { display: none; }
  .work-title { font-size: 19.5px; }
  .work-blurb { font-size: 14px; }
  .post-t { font-size: 15.5px; }
  .work-head { padding: 54px 0 40px; }
  .article { padding: 44px 0 0; }
  .prose { font-size: 17.5px; line-height: 2; padding-top: 30px; }
  .prose blockquote { margin: 1.8em .6em; }
  .pager { margin-top: 56px; flex-direction: column; gap: 18px; }
  .pager a { max-width: 100%; }
  .pager .right { text-align: left; }
  .site-footer { margin-top: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
