:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-alt: #f3efe6;
  --ink: #1e2421;
  --muted: #5f6c65;
  --border: #e6e0d4;
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --accent-soft: #e9f3ee;
  --shadow: 0 2px 12px rgba(30, 36, 33, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --surface: #181e1b;
    --surface-alt: #1f2723;
    --ink: #eef2ef;
    --muted: #9aa8a0;
    --border: #28322d;
    --accent: #74c69d;
    --accent-hover: #95d5b2;
    --accent-soft: rgba(116, 198, 157, 0.13);
    --shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo svg {
  width: 24px;
  height: 24px;
}

.menu {
  display: flex;
  gap: 24px;
  font-size: 0.93rem;
  color: var(--muted);
}

.menu a:hover,
.menu a.active {
  color: var(--accent);
  font-weight: 500;
}

.hero {
  padding: 54px 0 32px;
  border-bottom: 1px dashed var(--border);
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  line-height: 1.3;
  font-weight: 700;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 600px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 20px;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover,
.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.featured {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.featured:hover {
  transform: translateY(-2px);
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.post-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.cat {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 9px;
  border-radius: 5px;
  font-weight: 500;
}

.featured h2,
.post-item h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 1.24rem;
  line-height: 1.4;
}

.featured p,
.post-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.shelf {
  margin-top: 38px;
  padding: 24px 26px;
  background: var(--surface-alt);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.shelf h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.05rem;
}

.shelf ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.shelf li {
  margin-bottom: 6px;
}

article.essay {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 34px;
  margin: 34px 0;
  box-shadow: var(--shadow);
}

.essay h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 1.75rem;
  line-height: 1.35;
}

.essay h2 {
  margin: 28px 0 10px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.2rem;
}

.essay p,
.essay li {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.essay blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface-alt);
  color: var(--muted);
  border-radius: 0 8px 8px 0;
}

.back {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
}

.back:hover {
  text-decoration: underline;
}

footer {
  margin-top: 52px;
  padding: 24px 0 38px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  article.essay {
    padding: 24px 20px;
  }
}
