:root {
  --bg: #f7f4ed;
  --surface: rgba(255, 255, 255, 0.72);
  --text: #18221c;
  --muted: #69736c;
  --line: rgba(24, 34, 28, 0.14);
  --accent: #e45835;
  --accent-2: #1c6b4e;
  --code: #eee9df;
  --shadow: 0 20px 60px rgba(52, 48, 38, 0.09);
}

:root[data-theme="dark"] {
  --bg: #101512;
  --surface: rgba(27, 34, 29, 0.82);
  --text: #edf2ed;
  --muted: #a1aaa4;
  --line: rgba(237, 242, 237, 0.14);
  --accent: #ff7957;
  --accent-2: #6bd3a9;
  --code: #202823;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101512;
    --surface: rgba(27, 34, 29, 0.82);
    --text: #edf2ed;
    --muted: #a1aaa4;
    --line: rgba(237, 242, 237, 0.14);
    --accent: #ff7957;
    --accent-2: #6bd3a9;
    --code: #202823;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34rem),
    radial-gradient(circle at 8% 36%, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; border-radius: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner, .site-main, .footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  font: 700 18px/1 Georgia, serif;
  transform: rotate(-4deg);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }
.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.hero { padding: 110px 0 96px; max-width: 900px; }
.eyebrow, .kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}
.hero h1 {
  margin: 20px 0 28px;
  font: 700 clamp(44px, 8vw, 86px)/1.08 Georgia, "Noto Serif SC", serif;
  letter-spacing: -.045em;
}
.hero h1 em { color: var(--accent-2); font-style: normal; }
.hero > p { max-width: 680px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.button.primary { color: white; background: var(--text); }
.button.ghost { border: 1px solid var(--line); }

.content-section { padding: 50px 0 100px; }
.content-section.compact { padding-top: 12px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.section-heading h2, .page-head h1 { margin: 4px 0 0; font: 700 36px/1.2 Georgia, "Noto Serif SC", serif; }
.section-heading > a { color: var(--muted); font-size: 14px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.post-card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12px; }
.post-card h3 { margin: 18px 0 10px; font: 700 25px/1.35 Georgia, "Noto Serif SC", serif; }
.post-card p { margin: 0; color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; color: var(--accent-2); font-size: 12px; font-weight: 700; }

.page-head { padding: 90px 0 46px; max-width: 720px; }
.page-head h1 { font-size: clamp(42px, 7vw, 68px); }
.page-head p { color: var(--muted); font-size: 17px; }
.article { max-width: 780px; margin: 0 auto; padding: 70px 0 110px; }
.back-link { color: var(--muted); font-size: 14px; }
.article-head h1 { margin: 26px 0 18px; font: 700 clamp(38px, 7vw, 64px)/1.15 Georgia, "Noto Serif SC", serif; letter-spacing: -.035em; }
.article-head > p { color: var(--muted); font-size: 18px; }
.article-meta { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-tags a { color: var(--accent-2); }
.article-body { margin-top: 54px; font-size: 17px; }
.article-body h2 { margin-top: 2.2em; font: 700 30px/1.3 Georgia, "Noto Serif SC", serif; }
.article-body h3 { margin-top: 1.8em; font-size: 22px; }
.article-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { margin: 2em 0; padding: 2px 22px; border-left: 4px solid var(--accent); color: var(--muted); }
.article-body code { padding: 2px 6px; border-radius: 6px; background: var(--code); font-size: .9em; }
.article-body pre { overflow-x: auto; padding: 20px; border-radius: 14px; background: var(--code); }
.article-body pre code { padding: 0; background: transparent; }
.article-body li { margin: .45em 0; }

.tag-cloud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 110px; }
.tag-cloud a { display: flex; justify-content: space-between; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tag-cloud strong { color: var(--accent); }
.pagination { display: flex; justify-content: center; gap: 20px; align-items: center; margin-top: 38px; color: var(--muted); font-size: 14px; }
.pagination a { color: var(--accent-2); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 90px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }

@media (max-width: 720px) {
  .header-inner, .site-main, .footer-inner { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 68px; }
  .brand small { display: none; }
  .nav { gap: 13px; }
  .nav a:nth-of-type(3) { display: none; }
  .hero { padding: 76px 0 65px; }
  .hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .hero > p { font-size: 16px; }
  .post-grid, .tag-cloud { grid-template-columns: 1fr; }
  .post-card { min-height: 0; }
  .page-head { padding-top: 65px; }
  .article { padding-top: 48px; }
  .article-body { font-size: 16px; }
  .footer-inner { flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
}

