:root {
  --bg: #f4f0e7;
  --surface: rgba(255,255,255,.72);
  --surface-solid: #fffdf8;
  --ink: #17211d;
  --muted: #66716b;
  --brand: #173f35;
  --brand-soft: #dce9df;
  --accent: #d99b42;
  --line: rgba(23,63,53,.13);
  --shadow: 0 18px 55px rgba(35,49,42,.09);
  --radius: 22px;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 0%, rgba(217,155,66,.14), transparent 25rem),
    radial-gradient(circle at 100% 12%, rgba(59,119,98,.13), transparent 30rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 99; padding: 9px 14px; background: var(--brand); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(244,240,231,.86); border-bottom: 1px solid transparent; backdrop-filter: blur(18px); }
.site-header.scrolled { border-color: var(--line); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #f8d58d; background: var(--brand); font-family: Georgia, serif; font-size: 17px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a, .theme-toggle { padding: 8px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.nav-links a:hover, .nav-links a.active, .theme-toggle:hover { color: var(--brand); background: rgba(255,255,255,.58); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 24px; cursor: pointer; }

.hero { padding: 94px 0 74px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.hero h1 { max-width: 760px; margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(45px, 7vw, 84px); line-height: 1.08; letter-spacing: -.045em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero-lead { max-width: 670px; margin: 28px 0 0; color: var(--muted); font-size: 18px; }
.hero-note { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.hero-note strong { display: block; margin-bottom: 10px; color: var(--brand); font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.hero-note p { margin: 0; color: var(--muted); font-size: 14px; }

.section { padding: 48px 0 82px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-title { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(30px, 4vw, 45px); line-height: 1.2; }
.section-desc { max-width: 500px; margin: 8px 0 0; color: var(--muted); }
.text-link { color: var(--brand); font-weight: 750; white-space: nowrap; }
.text-link:hover { color: var(--accent); }

.featured-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.post-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 290px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 35px rgba(35,49,42,.05); transition: transform .25s ease, box-shadow .25s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card.featured { min-height: 440px; padding: 42px; background: var(--brand); color: #fff; }
.post-card.featured::after { content: "雪"; position: absolute; right: -25px; bottom: -85px; color: rgba(255,255,255,.055); font-family: serif; font-size: 260px; line-height: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 9px 14px; color: var(--muted); font-size: 13px; }
.featured .card-meta { color: rgba(255,255,255,.68); }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 750; }
.featured .tag { color: #ffdda0; background: rgba(255,255,255,.1); }
.post-card h3 { margin: 28px 0 10px; font-family: Georgia, "Noto Serif SC", serif; font-size: 26px; line-height: 1.35; }
.post-card.featured h3 { max-width: 560px; margin-top: auto; font-size: clamp(32px, 4vw, 48px); }
.post-card p { margin: 0 0 26px; color: var(--muted); }
.featured p { max-width: 570px; color: rgba(255,255,255,.72); }
.card-arrow { margin-top: auto; color: var(--brand); font-weight: 800; }
.featured .card-arrow { color: #ffdda0; }
.side-posts { display: grid; gap: 20px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-grid .post-card { min-height: 330px; }
.post-grid .post-card h3 { font-size: 23px; }
.category-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.category-pill { padding: 11px 17px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.5); color: var(--muted); }
.category-pill:hover { color: var(--brand); border-color: var(--brand); }

.page-hero { padding: 72px 0 44px; }
.page-hero h1 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(40px, 6vw, 66px); line-height: 1.12; }
.page-hero p { max-width: 680px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.search-wrap { margin: 30px 0 10px; }
.search-input { width: min(100%, 520px); padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: rgba(255,255,255,.7); color: var(--ink); font: inherit; }
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,63,53,.08); }

.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 220px; justify-content: center; gap: 70px; padding: 64px 0 90px; }
.article-header { margin-bottom: 42px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: 18px 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(38px, 6vw, 60px); line-height: 1.22; letter-spacing: -.025em; }
.article-summary { color: var(--muted); font-size: 18px; }
.article-content { font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 18px; line-height: 1.95; }
.article-content h2 { margin: 2.2em 0 .7em; color: var(--brand); font-size: 29px; line-height: 1.4; }
.article-content h3 { margin-top: 1.8em; font-size: 22px; }
.article-content p { margin: 1.1em 0; }
.article-content ul, .article-content ol { padding-left: 1.5em; }
.article-content blockquote { margin: 1.7em 0; padding: 18px 24px; border-left: 4px solid var(--accent); background: rgba(255,255,255,.55); color: var(--muted); }
.article-content code { padding: 2px 6px; border-radius: 5px; background: rgba(23,63,53,.08); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.article-content pre { overflow-x: auto; padding: 22px; border-radius: 16px; background: #14231e; color: #e9f4ed; }
.article-content pre code { padding: 0; background: transparent; }
.article-aside { position: sticky; top: 110px; align-self: start; padding: 20px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.article-aside strong { display: block; margin-bottom: 10px; color: var(--ink); }
.article-aside a { display: block; padding: 6px 0; }
.article-aside a:hover { color: var(--brand); }

.prose-page { width: min(calc(100% - 40px), 780px); margin: 0 auto; padding: 70px 0 100px; }
.prose-page h1 { margin: 0 0 30px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(40px, 6vw, 62px); }
.prose-page h2 { margin-top: 42px; color: var(--brand); }
.prose-page p, .prose-page li { color: #46524c; }
.notice { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.58); }

.site-footer { padding: 48px 0 30px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 30px; }
.footer-brand { margin: 0 0 8px; font-weight: 850; }
.footer-note, .footer-legal { margin: 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 20px; color: var(--muted); font-size: 14px; }
.footer-legal { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }

.empty { display: none; padding: 40px; text-align: center; color: var(--muted); }
body.dark { --bg: #101814; --surface: rgba(25,38,32,.78); --surface-solid: #17231e; --ink: #edf3ef; --muted: #aab6af; --brand: #9fcdb5; --brand-soft: #263f34; --line: rgba(226,240,232,.12); --shadow: 0 18px 55px rgba(0,0,0,.22); }
body.dark .site-header { background: rgba(16,24,20,.86); }
body.dark .post-card.featured { background: #1d4a3c; }
body.dark .article-content pre { background: #07100c; }

@media (max-width: 900px) {
  .hero-grid, .featured-grid, .article-shell { grid-template-columns: 1fr; }
  .hero { padding-top: 68px; }
  .hero-note { max-width: 420px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .article-aside { display: none; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--content)); }
  .nav { min-height: 66px; }
  .menu-toggle { display: block; }
  .nav-links { position: absolute; top: 66px; left: 14px; right: 14px; display: none; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-solid); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .hero { padding: 55px 0 50px; }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: 46px; }
  .section { padding: 36px 0 60px; }
  .section-head, .footer-grid { display: block; }
  .section-head .text-link { display: inline-block; margin-top: 12px; }
  .featured-grid, .post-grid { grid-template-columns: 1fr; }
  .post-card, .post-card.featured { min-height: 320px; padding: 26px; }
  .footer-links { justify-content: flex-start; margin-top: 22px; }
  .article-shell { padding-top: 34px; }
  .article-content { font-size: 17px; }
}

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