:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --primary: #c2562f;
  --accent: #e0a03a;
  --line: rgba(43, 33, 24, 0.14);
  --line-soft: rgba(43, 33, 24, 0.08);
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(43, 33, 24, 0.06);
  --shadow-2: 0 8px 24px rgba(43, 33, 24, 0.08);
  --font-head: "Fraunces", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(43, 33, 24, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
  overflow-x: hidden;
}

img, video, iframe, pre { max-width: 100%; }

a { color: var(--primary); }

::selection { background: rgba(224, 160, 58, 0.35); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.skip:focus { left: 8px; top: 8px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 232, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  position: relative;
  padding-bottom: 2px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.brand:hover::after,
.brand:focus-visible::after { transform: scaleX(1); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  padding: 6px 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--primary);
}

.nav-toggle {
  display: none;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

main { display: block; min-height: 55vh; }

.hero { padding: 64px 0 24px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.lede {
  max-width: 60ch;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}
.hero-meta {
  max-width: 60ch;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.section { padding: 32px 0 8px; }
.list-card {
  padding: 8px 32px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
}
.more {
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.more:hover { text-decoration: underline; }

.post-list { margin: 0; padding: 0; list-style: none; }
.post-item { padding: 28px 0; border-bottom: 1px solid var(--line-soft); }
.post-item:last-child { border-bottom: 0; }
.post-meta { margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
.post-meta time { color: #8a4a1f; }
.post-item h3,
.post-title {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.35;
}
.post-item h3 a,
.post-title a { color: var(--ink); text-decoration: none; }
.post-item h3 a:hover,
.post-title a:hover { color: var(--primary); }
.excerpt { max-width: 68ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }

.about-teaser {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 48px;
  padding-top: 40px;
  padding-bottom: 16px;
  border-top: 1px solid var(--line);
}
.about-teaser img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: var(--shadow-2);
}
.about-teaser h2 { margin: 4px 0 8px; font-family: var(--font-head); font-weight: 700; font-size: 24px; line-height: 1.3; }
.about-teaser p { max-width: 62ch; margin: 0 0 16px; color: var(--muted); font-size: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: #a84524; border-color: #a84524; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: rgba(194, 86, 47, 0.08); color: var(--primary); border-color: var(--primary); }

.article-card {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 48px 56px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.article-head { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-date {
  display: inline-block;
  margin-bottom: 16px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(224, 160, 58, 0.18);
  color: #8a4a1f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.article-head h1 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.25;
}
.article-desc { max-width: 66ch; margin: 0 0 12px; color: var(--muted); font-size: 17px; }
.article-byline { margin: 0; color: var(--muted); font-size: 14px; }
.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.article-foot a { color: var(--primary); font-size: 16px; font-weight: 600; text-decoration: none; }
.article-foot a:hover { text-decoration: underline; }

.prose { max-width: 70ch; font-size: 18px; line-height: 1.8; }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  margin: 2em 0 0.6em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
}
.prose h3 { margin: 1.6em 0 0.5em; font-size: 22px; line-height: 1.4; }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: rgba(224, 160, 58, 0.1);
  color: var(--muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img {
  display: block;
  height: auto;
  margin: 1.6em auto;
  border-radius: 8px;
  box-shadow: var(--shadow-1);
}
.prose img[src*="avatar-tianguohu"] {
  width: 160px;
  height: 160px;
  margin: 0 0 1.4em;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: var(--shadow-2);
}
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose code {
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: #f1e7d8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  word-break: break-word;
}
.prose pre {
  margin: 1.4em 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 10px;
  background: #2b2118;
  color: #f7f1e8;
  font-size: 15px;
  line-height: 1.6;
}
.prose pre code { padding: 0; background: none; color: inherit; font-size: 1em; }
.prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.prose table { display: block; margin: 1.4em 0; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }

.page-head { margin: 48px 0 8px; }
.page-head h1 { margin: 0 0 16px; font-family: var(--font-head); font-weight: 700; font-size: 40px; line-height: 1.2; }
.page-head .lede { margin-bottom: 0; }
.archive-list .post-title { font-size: 22px; }
.archive-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 24px 0 0; }
.archive-foot .sep { color: var(--muted); }
.legal-card .prose h2 { margin-top: 1.6em; }

.site-footer {
  margin-top: 64px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.6);
}
.footer-inner { text-align: center; }
.tagline { margin: 0 0 12px; font-family: var(--font-head); font-size: 18px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.footer-links a { padding: 4px 2px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }
.copyright { margin: 0; color: var(--muted); font-size: 13px; }

.notfound { max-width: 640px; padding: 96px 24px 120px; text-align: center; }
.notfound h1 { margin: 0 0 12px; font-family: var(--font-head); font-weight: 700; font-size: 40px; line-height: 1.2; }
.notfound p { color: var(--muted); }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 820px) {
  .hero { padding: 48px 0 16px; }
  .hero h1 { font-size: 38px; }
  .article-card { margin-top: 24px; padding: 32px 28px; }
  .article-head h1 { font-size: 32px; }
  .page-head { margin-top: 36px; }
  .page-head h1 { font-size: 34px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .header-inner { min-height: 60px; }
  .brand { font-size: 20px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 20px; border-bottom: 0; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero { padding: 40px 0 12px; }
  .hero h1 { font-size: 32px; }
  .lede { font-size: 17px; }
  .list-card { padding: 4px 20px 8px; }
  .section-head { padding: 16px 0 10px; }
  .section-head h2 { font-size: 24px; }
  .post-item { padding: 22px 0; }
  .post-item h3, .post-title { font-size: 20px; }
  .excerpt { font-size: 15px; }
  .about-teaser { flex-direction: column; align-items: center; gap: 16px; text-align: center; }
  .about-teaser p { margin-left: auto; margin-right: auto; }
  .article-card { margin-top: 16px; padding: 24px 20px; border-radius: 10px; }
  .article-head h1 { font-size: 26px; }
  .article-desc { font-size: 16px; }
  .article-foot { flex-direction: column; }
  .prose { font-size: 18px; }
  .prose h2 { font-size: 23px; }
  .prose h3 { font-size: 19px; }
  .prose blockquote { padding: 10px 14px; }
  .prose pre { padding: 14px 16px; }
  .page-head { margin-top: 28px; }
  .page-head h1 { font-size: 28px; }
  .footer-links { flex-direction: column; gap: 2px; }
  .footer-links span[aria-hidden] { display: none; }
  .notfound { padding: 72px 16px 96px; }
  .notfound h1 { font-size: 30px; }
}

.blog-intro { padding-top: 40px; }
.blog-intro .prose { max-width: 72ch; }
.blog-intro h2,
.topics h2,
.faq h2 { margin: 0 0 16px; font-family: var(--font-head); font-weight: 700; font-size: 28px; line-height: 1.3; }
.topics .topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topics .topic-list li {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.topics .topic-list strong { display: block; margin-bottom: 4px; font-family: var(--font-head); font-size: 18px; }
.topics .topic-list span { color: var(--muted); font-size: 15px; line-height: 1.7; }
.faq { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.faq-item { max-width: 70ch; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.faq-item h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.faq-item p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 640px) {
  .topics .topic-list { grid-template-columns: 1fr; }
}
