/* ===== Tokens ===== */
:root {
  --paper: #fbf8f3;
  --paper-2: #f5efe5;
  --paper-3: #efe7da;
  --card: #fffdf9;
  --ink: #211d19;
  --ink-soft: #4f4840;
  --muted: #857b70;
  --line: #e3d9c9;
  --line-strong: #d3c6b2;
  --accent: #b4512f;
  --accent-deep: #8f3d21;
  --green: #33564a;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1080px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(180, 81, 47, 0.06), transparent 70%),
    radial-gradient(700px 420px at 0% 8%, rgba(51, 86, 74, 0.05), transparent 70%);
  background-repeat: no-repeat;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.28; letter-spacing: 0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 13px;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}
.brand { display: inline-flex; align-items: baseline; gap: 10px; }
.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav a { position: relative; padding: 4px 0; transition: color 0.2s ease; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.22s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { padding: 84px 0 40px; }
.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.hero-title {
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.005em;
  max-width: 15em;
}
.hero-sub {
  margin-top: 28px;
  max-width: 38em;
  font-size: 17px;
  color: var(--ink-soft);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 56px;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-meta > div { display: flex; flex-direction: column; gap: 2px; }
.meta-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta-value { font-size: 14px; }
.meta-value a { border-bottom: 1px solid var(--line-strong); transition: border-color 0.2s ease; }
.meta-value a:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-tint {
  background: linear-gradient(180deg, rgba(245, 239, 229, 0.9), rgba(245, 239, 229, 0.55));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label .rule { flex: 1; height: 1px; background: var(--line); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
}
.section-desc { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ===== Featured ===== */
.featured-section { padding-top: 48px; }
.featured {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.featured:hover {
  border-color: var(--line-strong);
  box-shadow: 0 24px 46px -34px rgba(63, 46, 30, 0.55);
  transform: translateY(-2px);
}
.featured-cover { display: block; overflow: hidden; }
.featured-cover img {
  width: 100%; height: 100%;
  min-height: 300px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.featured:hover .featured-cover img { transform: scale(1.035); }
.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 44px;
}
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(180, 81, 47, 0.32);
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  background: rgba(180, 81, 47, 0.05);
}
.featured-title {
  margin-top: 16px;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
}
.featured-title a { transition: color 0.2s ease; }
.featured-title a:hover { color: var(--accent); }
.featured-excerpt {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-soft);
}
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-size: 14px;
  color: var(--accent);
  border-bottom: 1px solid rgba(180, 81, 47, 0.35);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: gap 0.2s ease, border-color 0.2s ease;
}
.read-link:hover { gap: 12px; border-color: var(--accent); }

/* ===== Filters ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ===== Post list ===== */
.post-list { border-top: 1px solid var(--line); }
.post-item { border-bottom: 1px solid var(--line); }
.post-item.is-hidden { display: none; }
.post-row {
  display: grid;
  grid-template-columns: 78px 1fr auto 24px;
  align-items: center;
  gap: 22px;
  padding: 26px 4px;
  transition: background 0.2s ease, padding-left 0.25s ease;
}
.post-row:hover { background: rgba(255, 253, 249, 0.75); padding-left: 12px; }
.post-date {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.post-main h3 {
  font-size: 21px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.post-row:hover .post-main h3 { color: var(--accent); }
.post-main p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.post-tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}
.post-arrow {
  color: var(--muted);
  font-size: 17px;
  transition: transform 0.25s ease, color 0.2s ease;
}
.post-row:hover .post-arrow { transform: translateX(5px); color: var(--accent); }
.empty-state {
  padding: 36px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ===== Archive ===== */
.archive-group { max-width: 780px; }
.archive-year {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}
.archive-list li {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 15px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.archive-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.archive-list a { transition: color 0.2s ease; }
.archive-list a:hover { color: var(--accent); }
.archive-cat { color: var(--muted); font-size: 12px; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}
.about-copy h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  margin-bottom: 22px;
}
.about-copy p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin-bottom: 16px;
  max-width: 40em;
}
.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.about-facts h4 {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.about-facts li {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 3px 0;
}
.about-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: center;
}
.monogram {
  width: 84px; height: 84px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, #f2e9db, #fbf8f3);
  font-family: var(--serif);
  font-size: 34px;
  color: var(--accent);
}
.about-card-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.about-card-role { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.social-list {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.social-list a {
  display: inline-block;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.social-list a:hover { color: var(--accent); border-color: rgba(180, 81, 47, 0.4); }

/* ===== Subscribe ===== */
.subscribe-box {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(180, 81, 47, 0.08), transparent 70%),
    var(--card);
  padding: 52px 48px;
  text-align: center;
}
.subscribe-box h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
.subscribe-box p {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.subscribe-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}
.subscribe-form input {
  flex: 1 1 260px;
  max-width: 340px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.subscribe-form input::placeholder { color: var(--muted); }
.subscribe-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(180, 81, 47, 0.12);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -12px rgba(63, 46, 30, 0.8);
}
.form-msg {
  min-height: 22px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--green);
}
.form-msg.error { color: #b03a2e; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { font-family: var(--serif); font-size: 15px; }
.footer-left p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.footer-nav { display: flex; gap: 24px; font-size: 13px; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }

/* ICP filing link */
.footer-beian-wrap {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-beian {
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer-beian:hover { color: var(--accent); }

/* ===== Article page ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 60;
  transition: width 0.1s linear;
}
.article-header {
  padding: 64px 0 36px;
  border-bottom: 1px solid var(--line);
}
.article-wrap { max-width: 720px; margin: 0 auto; padding: 0 28px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent); }
.article-title {
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 14px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.article-body {
  padding: 42px 0 20px;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.article-body > * + * { margin-top: 24px; }
.article-body h2 {
  font-size: 24px;
  color: var(--ink);
  margin-top: 46px;
}
.article-body p { margin-top: 22px; }
.article-body blockquote {
  margin: 34px 0;
  padding: 6px 0 6px 24px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
}
.article-body ul, .article-body ol { padding-left: 1.3em; list-style: revert; }
.article-body li { margin-top: 8px; }
.article-body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(180, 81, 47, 0.35);
}
.article-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--paper-3);
  color: var(--ink);
}
.article-body figure { margin: 36px 0; }
.article-body figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.article-end {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.article-end a { color: var(--accent); border-bottom: 1px solid rgba(180, 81, 47, 0.35); }
.article-footnote { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured-cover img { min-height: 240px; max-height: 320px; }
  .featured-body { padding: 32px 30px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-card { max-width: 340px; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .hero { padding: 56px 0 26px; }
  .hero-title { font-size: clamp(34px, 9vw, 44px); }
  .hero-sub { font-size: 16px; }
  .hero-meta { gap: 18px 34px; }
  .section { padding: 56px 0; }
  .section-head { align-items: flex-start; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(251, 248, 243, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 6px 20px 14px;
    display: none;
    backdrop-filter: blur(12px);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }

  .post-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "date tag"
      "main main"
      "arrow arrow";
    gap: 8px 12px;
    padding: 22px 2px;
  }
  .post-date { grid-area: date; }
  .post-tag { grid-area: tag; } 
  .post-main { grid-area: main; }
  .post-arrow { display: none; }
  .post-main h3 { font-size: 19px; }

  .archive-list li { grid-template-columns: 92px 1fr; }
  .archive-cat { display: none; }
  .about-facts { grid-template-columns: 1fr; gap: 18px; }
  .subscribe-box { padding: 38px 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
