:root {
  --bg: #faf9f5;
  --surface: #fffefa;
  --soft: #f1f0e9;
  --ink: #242d29;
  --muted: #72776f;
  --line: #dddfd6;
  --accent: #244d40;
  --accent-soft: #e8eee7;
  --on-accent: #fffefa;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #171d1a;
  --surface: #1d2520;
  --soft: #252e27;
  --ink: #e9ece3;
  --muted: #a9b2a6;
  --line: #39433a;
  --accent: #b8d2a5;
  --accent-soft: #2a382b;
  --on-accent: #19211a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { color: var(--on-accent); background: var(--accent); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; }
svg.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; background: var(--accent); color: var(--on-accent); padding: 12px 20px; z-index: 20; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { max-width: 1200px; margin: auto; padding: 0 36px; min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 600; letter-spacing: .05em; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--on-accent); background: var(--accent); border-radius: 3px; font: 1.625rem/1 Georgia, serif; }
.brand-mark span { font-size: 1.5rem; margin-left: 1px; }
.desktop-nav { display: flex; align-items: stretch; gap: 32px; align-self: stretch; }
.desktop-nav a { position: relative; display: flex; align-items: center; font-size: .9375rem; color: var(--muted); }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--accent); }
.desktop-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); }
.header-actions { display: flex; gap: 8px; }
.icon-button { border: 1px solid transparent; background: transparent; padding: 10px; min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.icon-button:hover { background: var(--soft); border-color: var(--line); }
.mobile-only { display: none; }
.mobile-nav { border-top: 1px solid var(--line); padding: 12px 20px; }
.mobile-nav a { display: block; padding: 12px 16px; border-radius: 4px; color: var(--muted); }
.mobile-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
main { max-width: 1200px; margin: auto; padding: 0 36px 64px; min-height: calc(100vh - 204px); outline: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 64px; align-items: center; padding: 70px 0 64px; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 12px; font: .75rem/1.5 var(--sans); letter-spacing: .18em; color: var(--muted); }
.eyebrow::before { content: ""; display: block; width: 26px; height: 1px; background: currentColor; }
.hero h1 { font: 500 clamp(2.6rem, 5.5vw, 4.25rem)/1.35 var(--serif); letter-spacing: .04em; margin: 25px 0 24px; overflow-wrap: anywhere; }
.hero .description { color: var(--muted); max-width: 38em; margin-bottom: 26px; }
.hero-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 10px 19px; font-size: .875rem; min-height: 44px; transition: background .18s, border-color .18s; }
.button:hover { border-color: var(--accent); background: var(--accent-soft); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.12); }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: .875rem; color: var(--muted); min-height: 44px; }
.text-link:hover { color: var(--accent); }
.profile-card { border: 1px solid var(--line); padding: 28px; border-radius: 5px; background: var(--surface); position: relative; }
.profile-card::before { content: ""; position: absolute; top: -1px; left: 28px; width: 32px; height: 3px; background: var(--accent); }
.small-label { font-size: .75rem; letter-spacing: .14em; color: var(--muted); }
.profile-identity { display: flex; align-items: center; gap: 15px; margin: 22px 0 16px; }
.avatar { background: var(--accent-soft); color: var(--accent); width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.avatar svg { width: 25px; height: 25px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 1rem; }
.placeholder-text { color: var(--muted); font-size: .875rem; }
.profile-card .text-link { border-top: 1px solid var(--line); width: 100%; margin-top: 12px; padding-top: 12px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 64px; padding-top: 38px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title h2 { font: 500 1.5rem/1.5 var(--serif); }
.count { color: var(--muted); font: .75rem/1.4 var(--sans); margin-left: 10px; vertical-align: middle; }
.empty-state { padding: 46px 24px 42px; min-height: 255px; border: 1px dashed var(--line); border-radius: 5px; text-align: center; background: var(--surface); }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 20px; background: var(--soft); border-radius: 50%; color: var(--muted); }
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h2, .empty-state h3 { font-size: 1.0625rem; margin-bottom: 7px; }
.empty-state p { font-size: .875rem; color: var(--muted); }
.empty-state .button { margin-top: 23px; }
.side-section { margin-bottom: 30px; }
.side-title { display: block; font-size: .875rem; margin-bottom: 17px; }
.statistics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 25px; }
.statistics strong { display: block; font: 2rem/1.35 Georgia, serif; font-weight: 400; }
.statistics span { color: var(--muted); font-size: .8125rem; }
.side-route { display: flex; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.side-route span:last-child { color: var(--muted); font-size: .8125rem; }
.side-route:hover { color: var(--accent); }
.side-note { color: var(--muted); font-size: .8125rem; padding-left: 13px; border-left: 2px solid var(--line); }
.tag { display: inline-block; border: 1px solid var(--line); background: var(--soft); color: var(--muted); border-radius: 3px; font-size: .75rem; line-height: 1.5; padding: 3px 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.page-heading { padding: 58px 0 32px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.page-heading h1 { font: 500 clamp(2.25rem, 5vw, 3.25rem)/1.4 var(--serif); margin: 16px 0 12px; }
.page-heading p { color: var(--muted); font-size: .9375rem; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 64px; }
.post-list { display: grid; }
.post-card { position: relative; padding: 25px 0 28px; border-bottom: 1px solid var(--line); }
.post-card:first-child { padding-top: 0; }
.post-meta { color: var(--muted); font-size: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.post-meta .separator { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.post-card h2 { font: 500 1.5rem/1.55 var(--serif); margin: 12px 0 10px; overflow-wrap: anywhere; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); font-size: .9375rem; margin-bottom: 15px; overflow-wrap: anywhere; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-card .read-link { font-size: .8125rem; color: var(--accent); min-height: 32px; display: inline-flex; align-items: center; }
.preview-banner { margin-top: 28px; padding: 15px 19px; border: 1px solid var(--line); background: var(--accent-soft); display: flex; justify-content: space-between; align-items: center; gap: 16px; border-radius: 4px; }
.preview-banner p { font-size: .875rem; }
.preview-banner span { color: var(--muted); margin-left: 10px; }
.preview-banner a { font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 64px; margin-top: 38px; }
.preview-card { padding: 25px 0; border-bottom: 1px solid var(--line); }
.preview-card h2 { font: 500 1.5rem/1.6 var(--serif); margin: 14px 0 15px; }
.skeleton { display: block; height: 8px; width: 100%; max-width: 560px; background: var(--line); opacity: .5; border-radius: 2px; margin: 12px 0; }
.skeleton.short { width: 68%; }
.skeleton.tiny { width: 42%; }
.preview-card .tag { margin-top: 8px; }
.archive-group { padding: 0 0 32px; }
.archive-year { display: flex; align-items: center; gap: 18px; margin: 4px 0 25px; font: 1.875rem/1.4 Georgia, serif; color: var(--accent); }
.archive-year span { font: .8125rem/1.5 var(--sans); color: var(--muted); }
.archive-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 22px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.archive-row time { color: var(--muted); font-size: .8125rem; padding-top: 4px; }
.archive-row a { overflow-wrap: anywhere; }
.archive-row a:hover { color: var(--accent); }
.about-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 70px; margin-top: 45px; }
.about-identity .avatar { width: 104px; height: 104px; margin-bottom: 24px; }
.about-identity .avatar svg { width: 40px; height: 40px; }
.about-identity h2 { font: 500 1.75rem/1.5 var(--serif); margin-bottom: 10px; overflow-wrap: anywhere; }
.about-links { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.about-links a { font-size: .875rem; color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.about-body { padding-top: 7px; }
.about-body .empty-state { padding: 45px 24px; }
.about-body p { margin-bottom: 22px; line-height: 1.9; overflow-wrap: anywhere; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: var(--muted); margin: 34px 0 24px; }
.breadcrumbs a:hover { color: var(--accent); }
.article-layout { display: grid; grid-template-columns: minmax(0, 740px) 220px; gap: 70px; }
.article-header { padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.article-header h1 { font: 500 clamp(2rem, 4vw, 3rem)/1.5 var(--serif); margin: 18px 0 22px; overflow-wrap: anywhere; }
.article-header .post-meta { font-size: .8125rem; }
.article-body { line-height: 1.95; overflow-wrap: anywhere; }
.article-body h2 { font: 500 1.625rem/1.6 var(--serif); margin: 38px 0 18px; }
.article-body h3 { font: 500 1.25rem/1.6 var(--serif); margin: 28px 0 14px; }
.article-body p, .article-body ul, .article-body ol { margin-bottom: 24px; }
.article-body li { padding-left: 4px; margin: 6px 0; }
.article-body blockquote { margin: 28px 0; padding: 18px 24px; background: var(--accent-soft); border-left: 3px solid var(--accent); color: var(--muted); }
.article-body pre { overflow-x: auto; border: 1px solid var(--line); background: var(--soft); border-radius: 4px; padding: 22px; font: .875rem/1.75 Consolas, monospace; }
.article-body figure { margin: 30px 0; }
.article-body figure img { display: block; border-radius: 4px; max-height: 600px; object-fit: contain; }
.article-body figcaption { color: var(--muted); font-size: .8125rem; text-align: center; margin-top: 9px; }
.article-end { margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); }
.toc { position: sticky; top: 30px; border-left: 1px solid var(--line); padding-left: 22px; }
.toc-title { display: block; font-size: .8125rem; letter-spacing: .05em; margin-bottom: 18px; }
.toc button { display: block; width: 100%; text-align: left; border: none; background: transparent; color: var(--muted); padding: 9px 0; font-size: .8125rem; line-height: 1.6; }
.toc button:hover { color: var(--accent); }
.toc button.sub { padding-left: 12px; }
.article-template .skeleton { height: 9px; margin: 17px 0; max-width: none; }
.site-footer { max-width: 1128px; margin: 0 auto; padding: 29px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .8125rem; color: var(--muted); }
.footer-brand { color: var(--ink); }
.site-footer a:hover { color: var(--accent); }
.noscript { padding: 40px; text-align: center; }
@media (min-width: 1600px) { .hero { padding-top: 90px; padding-bottom: 80px; } }
@media (max-width: 1000px) {
  .hero { gap: 36px; grid-template-columns: minmax(0, 1fr) 270px; }
  .content-layout, .page-layout, .preview-grid { gap: 36px; grid-template-columns: minmax(0, 1fr) 210px; }
  .article-layout { gap: 36px; grid-template-columns: minmax(0, 1fr) 180px; }
  .site-footer { margin: 0 36px; }
}
@media (max-width: 760px) {
  .header-inner { min-height: 76px; padding: 0 22px; gap: 12px; }
  .brand { font-size: .9375rem; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
  .desktop-nav { display: none; }
  .mobile-only { display: inline-flex; }
  .header-actions { gap: 2px; }
  main { padding: 0 22px 44px; }
  .hero { padding: 43px 0 35px; grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero h1 { margin: 18px 0 22px; }
  .profile-card { padding: 20px 22px; }
  .profile-identity { margin: 14px 0 6px; }
  .profile-card .small-label { font-size: .75rem; }
  .content-layout, .page-layout, .preview-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .content-layout { padding-top: 30px; }
  .content-layout aside, .page-layout aside, .preview-grid aside { border-top: 1px solid var(--line); padding-top: 24px; }
  .statistics { max-width: 300px; }
  .section-title h2 { font-size: 1.375rem; }
  .empty-state { padding: 34px 20px; min-height: 230px; }
  .page-heading { padding-top: 38px; margin-bottom: 26px; }
  .preview-banner { align-items: flex-start; padding: 13px 16px; }
  .preview-banner span { display: block; margin-left: 0; font-size: .8125rem; }
  .preview-banner a { padding-top: 2px; }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 30px; }
  .about-identity { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
  .about-identity .avatar { width: 80px; height: 80px; margin-bottom: 16px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .article-layout > aside { grid-row: 1; }
  .toc { position: static; padding-left: 16px; }
  .toc button { display: inline-block; width: auto; margin-right: 18px; padding: 5px 0; }
  .toc-title { margin-bottom: 5px; }
  .toc button.sub { padding-left: 0; }
  .article-header { padding-bottom: 24px; margin-bottom: 25px; }
  .article-header h1 { margin-top: 14px; }
  .site-footer { margin: 0 22px; flex-wrap: wrap; padding: 24px 0; }
  .site-footer #copyright { order: 3; width: 100%; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
