:root {
  --bg: #f4efe7;
  --bg-soft: rgba(255, 255, 255, 0.52);
  --paper: #fffaf2;
  --ink: #1d2a2f;
  --muted: #5f6e73;
  --line: rgba(29, 42, 47, 0.12);
  --accent: #b65a33;
  --accent-deep: #893d1c;
  --accent-soft: rgba(182, 90, 51, 0.14);
  --forest: #4f6b4f;
  --shadow: 0 18px 50px rgba(43, 50, 43, 0.12);
  --radius: 24px;
  --font-display: "LXGW WenKai", "Kaiti SC", "STKaiti", serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(182, 90, 51, 0.16), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(79, 107, 79, 0.18), transparent 24%),
    linear-gradient(180deg, #f6f0e8 0%, #f0e8dd 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 42, 47, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 42, 47, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 95%);
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header,
.hero,
.section,
.site-footer {
  backdrop-filter: blur(16px);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 28px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff6ee;
  font-family: var(--font-display);
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--forest) 100%);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-copy small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-deep);
}

.menu-toggle {
  display: none;
  padding: 10px 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero,
.section,
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  padding: 52px;
  border-radius: calc(var(--radius) + 8px);
}

.hero::after,
.section::after {
  content: "";
  position: absolute;
  inset: auto auto -60px -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 90, 51, 0.12), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.section h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  max-width: 12ch;
}

.hero-text {
  max-width: 60ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.button-primary {
  color: #fff7f1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-tags li {
  padding: 8px 12px;
  color: var(--forest);
  background: rgba(79, 107, 79, 0.11);
  border-radius: 999px;
}

.hero-card {
  align-self: end;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(250, 242, 230, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
}

.card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.card-top span,
.meta-grid dt,
.card-note {
  color: var(--muted);
}

.card-top strong {
  font-family: var(--font-display);
  font-size: 1.85rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-grid div,
.topic-card,
.post-card,
.intro-grid article,
.rhythm-grid article {
  padding: 18px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
}

.meta-grid dt,
.meta-grid dd {
  margin: 0;
}

.meta-grid dd {
  margin-top: 8px;
  font-weight: 700;
}

.card-note {
  margin: 18px 0 0;
  line-height: 1.7;
}

.section {
  padding: 34px;
  margin-top: 24px;
  border-radius: var(--radius);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 14ch;
}

.intro-grid,
.topics-grid,
.rhythm-grid,
.post-list {
  display: grid;
  gap: 16px;
}

.intro-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.topic-card span,
.post-card .post-type {
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.topic-card h3,
.post-card h3,
.intro-grid h3 {
  margin: 12px 0 10px;
  font-size: 1.18rem;
}

.topic-card p,
.post-card p,
.intro-grid p,
.rhythm-grid p,
.filing-panel p,
.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.post-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card h3 {
  margin: 0;
  font-family: var(--font-display);
}

.post-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.rhythm-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rhythm-grid strong {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 1.06rem;
}

.filing-panel {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.84), rgba(255, 250, 242, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  margin-top: 24px;
  border-radius: var(--radius);
}

.site-footer strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: right;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .topics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-grid,
  .post-list,
  .rhythm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .site-header {
    align-items: flex-start;
    padding: 16px;
    border-radius: 26px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 16px;
    background: rgba(255, 250, 242, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .section,
  .site-footer {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .intro-grid,
  .topics-grid,
  .post-list,
  .rhythm-grid,
  .meta-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }

  .footer-meta {
    text-align: left;
  }
}
