:root {
  --bg: #f7f4ee;
  --card: #fffdfa;
  --ink: #191712;
  --muted: #6f6a60;
  --line: #e6dfd3;
  --accent: #d4380d;
  --accent-soft: #fdece5;
  --shadow: 0 1px 2px rgba(25,23,18,.04), 0 12px 32px -12px rgba(25,23,18,.18);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 82% -12%, #ffe3d3 0%, rgba(255,227,211,0) 62%),
    radial-gradient(900px 500px at -10% 6%, #f2efe4 0%, rgba(242,239,228,0) 55%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

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

/* header */
header.site { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(10px); background: rgba(247,244,238,.82); border-bottom: 1px solid var(--line); }
.bar, header.site > .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; }
.brand svg { flex: none; }
nav.top { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
nav.top a { position: relative; padding: 4px 0; }
nav.top a:hover { color: var(--accent); }
nav.top a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--accent); transition: right .25s ease; }
nav.top a:hover::after { right: 0; }

/* hero */
.hero { padding: 84px 0 56px; }
.kicker { margin: 0 0 18px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.hero h1 {
  margin: 0 0 22px;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(38px, 6.4vw, 66px);
  line-height: 1.16;
  letter-spacing: -.02em;
  font-weight: 700;
}
.hero h1 em { font-style: normal; background: linear-gradient(180deg, transparent 62%, rgba(212,56,13,.28) 62%); }
.lede { margin: 0; max-width: 33em; color: #46423a; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chips span { font-size: 13px; color: var(--accent); background: var(--accent-soft); border: 1px solid #f7d3c4; padding: 5px 12px; border-radius: 999px; }

/* covers */
.cover { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 220px; }
.cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px); background-size: 14px 14px; opacity: .35; }
.cover-tag { position: absolute; left: 16px; top: 16px; z-index: 2; font-size: 12px; color: #fff; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.35); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.cover-num { position: absolute; right: 18px; bottom: 6px; z-index: 2; font-family: Georgia, serif; font-size: 92px; line-height: 1; color: rgba(255,255,255,.30); letter-spacing: -.04em; }
.cover-a { background: linear-gradient(135deg, #ff9a5b 0%, #e8590c 45%, #b02a05 100%); }
.cover-b { background: linear-gradient(135deg, #63b3c9 0%, #1c7ed6 55%, #0b4f8a 100%); }
.cover-c { background: linear-gradient(135deg, #b6d67f 0%, #5c940d 55%, #2b5c07 100%); }
.cover-d { background: linear-gradient(135deg, #c9b8ff 0%, #7048e8 55%, #3b1f96 100%); }
.cover-e { background: linear-gradient(135deg, #6c757d 0%, #343a40 55%, #16181b 100%); }

/* featured */
.featured { padding-bottom: 8px; }
.feature { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(25,23,18,.05), 0 22px 44px -18px rgba(25,23,18,.28); }
.feature .cover { border-radius: 0; min-height: 320px; height: 100%; }
.feature-body { padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.feature-body h2 { font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif; margin: 8px 0 12px; font-size: 27px; line-height: 1.34; letter-spacing: -.01em; }
.feature-body p { margin: 0 0 18px; color: var(--muted); }
.more { color: var(--accent); font-weight: 600; font-size: 15px; }
.more i { font-style: normal; display: inline-block; transition: transform .2s ease; }
.feature:hover .more i { transform: translateX(4px); }

/* meta */
.meta { font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* section */
.section-head { display: flex; align-items: center; gap: 18px; margin: 64px 0 26px; }
.section-head h2 { margin: 0; font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif; font-size: 25px; letter-spacing: .01em; white-space: nowrap; }
.section-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(25,23,18,.05), 0 20px 40px -16px rgba(25,23,18,.26); }
.card .cover { border-radius: 0; min-height: 170px; }
.card .cover-num { font-size: 70px; }
.card-body { padding: 20px 22px 24px; }
.card-body h3 { margin: 8px 0 8px; font-size: 18px; line-height: 1.5; }
.card-body p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* todo list */
.todo { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.todo li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.todo b { font-weight: 600; }
.todo span { color: var(--muted); font-size: 14.5px; }

/* footer */
footer.site { margin-top: 80px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13.5px; }
footer .bar, footer.site > .wrap { height: auto; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.back { display: inline-block; margin-top: 42px; color: var(--accent); font-weight: 600; }
figure { margin: 26px 0; }

/* article */
.post { max-width: 720px; margin: 0 auto; padding: 56px 0 20px; }
.post h1 { font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif; font-size: clamp(30px, 4.4vw, 42px); line-height: 1.3; letter-spacing: -.01em; margin: 0 0 14px; }
.post .meta { margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.post h2 { font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif; font-size: 25px; margin: 44px 0 14px; padding-left: 14px; border-left: 4px solid var(--accent); line-height: 1.4; }
.post h3 { font-size: 19px; margin: 30px 0 10px; }
.post p { margin: 0 0 18px; color: #2c2924; }
.post ul, .post ol { padding-left: 22px; margin: 0 0 20px; }
.post li { margin: 6px 0; }
.post blockquote { margin: 26px 0; padding: 16px 20px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; color: #5b3b2b; }
.post code { background: #efeae0; padding: 2px 6px; border-radius: 5px; font-size: .92em; }
.post pre { background: #1e1c18; color: #eee8dc; padding: 18px 20px; border-radius: 12px; overflow-x: auto; line-height: 1.6; font-size: 14px; }
.post pre code { background: none; padding: 0; color: inherit; }
.post img { border-radius: 12px; margin: 10px 0 20px; }
.post hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature .cover { min-height: 220px; }
  .feature-body { padding: 26px 24px 30px; }
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .hero { padding: 56px 0 40px; }
  .feature .cover { min-height: 180px; }
  .card .cover { min-height: 140px; }
  .card .cover-num { font-size: 56px; }
  .lede { font-size: 16.5px; }
  .grid { grid-template-columns: 1fr; }
  nav.top { gap: 14px; font-size: 13px; }
  .section-head { margin: 46px 0 20px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f; --card: #1c1a15; --ink: #ece7dc; --muted: #a09a8d; --line: #2c2922;
    --accent: #ff7a45; --accent-soft: #2a1a12; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -14px rgba(0,0,0,.7);
  }
  body { background: radial-gradient(1000px 480px at 82% -12%, #3a1f14 0%, rgba(58,31,20,0) 62%), radial-gradient(800px 420px at -10% 4%, #1d1c16 0%, rgba(29,28,22,0) 55%), var(--bg); }
  .lede { color: #c8c2b6; }
  .post p { color: #d7d1c5; }
  .post code { background: #26231d; }
  header.site { background: rgba(20,19,15,.82); }
}
