/* ============================================
   厨子邓 · Jason Deng — 个人站样式表
   风格：Forte Labs 浅色调 + 东方质感
   ============================================ */

/* ---------- 重置与变量 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 强制让 HTML hidden 属性生效，避免后台 section 的 display:grid/flex 覆盖它 */
[hidden] {
  display: none !important;
}

:root {
  /* 配色：暖米底 + 深林绿 + 陶土橙 */
  --bg: #f3eddf;
  --bg-soft: #ebe3d0;
  --card: #fbf6ea;
  --card-hover: #f7f1e2;
  --ink: #1f2a1c;
  --ink-soft: #4a4a3f;
  --muted: #7a7264;
  --line: #d8cdb4;
  --green: #2d4a2b;
  --green-soft: #4a6b46;
  --terracotta: #c97b3a;
  --terracotta-soft: #d89968;

  /* 字体：全站收敛到同一套中文无衬线，避免宋体/黑体混搭 */
  --font-sans: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: var(--font-sans);
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* 容器 */
  --max-w: 1180px;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-feature-settings: "kern", "liga", "palt";
  text-rendering: optimizeLegibility;
}

/* 装饰：背景颗粒纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(31, 42, 28, 0.025) 1px,
    transparent 1px
  );
  background-size: 3px 3px;
  z-index: 0;
}

.wechat-share-image {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 300px;
  height: 300px;
  opacity: 0.01;
  pointer-events: none;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
a:hover {
  color: var(--terracotta);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- 容器 ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  position: relative;
  z-index: 1;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 237, 223, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(216, 205, 180, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0;
}

.logo {
  display: block;
  height: 38px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  border-bottom: 1.5px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  border-bottom-color: var(--terracotta);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  background: var(--green);
  color: var(--bg) !important;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-cta:hover {
  background: var(--terracotta);
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--terracotta);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--terracotta);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.hero-title em {
  font-style: normal;
  color: var(--green);
  position: relative;
  white-space: nowrap;
}
.hero-title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 8px;
  background: rgba(201, 123, 58, 0.22);
  z-index: -1;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-soft);
  line-height: 1.78;
  margin-bottom: 1.8rem;
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--green);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--terracotta);
  color: var(--bg);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-ghost:hover {
  background: var(--green);
  color: var(--bg);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero-meta-item .label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.hero-meta-item .value {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
}

/* Hero 照片：原图 + 滤镜润色 */
.hero-photo {
  position: relative;
  justify-self: end;
  max-width: 460px;
  width: 100%;
}
.hero-photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg-soft);
  box-shadow:
    0 30px 60px -28px rgba(31, 42, 28, 0.35),
    0 12px 24px -16px rgba(31, 42, 28, 0.25);
}
.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  /* 关键：CSS 滤镜润色 —— 让普通自拍呈现高级布光 */
  filter:
    brightness(1.05)
    contrast(1.08)
    saturate(0.92)
    sepia(0.08);
  transition: filter 0.4s ease, transform 0.6s ease;
}
.hero-photo-frame:hover img {
  filter:
    brightness(1.08)
    contrast(1.12)
    saturate(0.95)
    sepia(0.04);
  transform: scale(1.02);
}
/* 暖色光晕叠加，模拟柔光箱 */
.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 30% 25%,
      rgba(255, 232, 198, 0.28) 0%,
      transparent 55%
    ),
    linear-gradient(
      135deg,
      rgba(45, 74, 43, 0.02) 0%,
      rgba(31, 42, 28, 0.18) 100%
    );
  pointer-events: none;
}
/* 照片左下角装饰标签 */
.hero-photo-badge {
  position: absolute;
  left: -14px;
  bottom: 28px;
  background: var(--green);
  color: var(--bg);
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 20px -10px rgba(31, 42, 28, 0.5);
}
.hero-photo-stamp {
  position: absolute;
  right: -10px;
  top: 28px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 22px -8px rgba(201, 123, 58, 0.6);
  transform: rotate(-8deg);
}

/* ---------- 首页重塑：知识站架构 ---------- */
.home-hero {
  padding-top: clamp(3.6rem, 8vw, 7rem);
}

.home-hero-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.82fr);
}

.identity-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow:
    0 28px 70px -42px rgba(31, 42, 28, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.identity-card::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 12%;
  width: 68px;
  height: 1px;
  background: var(--terracotta);
  transform: rotate(-18deg);
  opacity: 0.75;
}

.identity-card-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.2rem 0.2rem 0.8rem;
}

.identity-card .hero-photo-frame {
  border-radius: 12px;
  box-shadow: none;
}

.identity-note {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 0.2rem 0.15rem;
}

.identity-note strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
}

.identity-note span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.route-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 1.2rem;
}

.route-card {
  min-height: 235px;
  background: var(--card);
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.55rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.22s ease, border-color 0.22s ease,
    box-shadow 0.22s ease, background 0.22s ease;
}

.route-card:hover {
  color: inherit;
  transform: translateY(-3px);
  border-color: var(--green-soft);
  background: var(--card-hover);
  box-shadow: 0 18px 36px -28px rgba(31, 42, 28, 0.35);
}

.route-featured {
  grid-row: span 2;
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(45, 74, 43, 0.94), rgba(31, 42, 28, 0.96)),
    var(--green);
  color: var(--bg);
  justify-content: flex-end;
}

.route-featured:hover {
  background:
    linear-gradient(145deg, rgba(45, 74, 43, 0.98), rgba(31, 42, 28, 1)),
    var(--green);
}

.route-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--terracotta);
  letter-spacing: 0.12em;
  margin-bottom: 2.2rem;
}

.route-featured .route-num {
  color: var(--terracotta-soft);
}

.route-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

.route-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

.route-featured p {
  color: rgba(243, 237, 223, 0.78);
  font-size: 1rem;
}

.route-link {
  margin-top: auto;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 600;
}

.route-featured .route-link {
  color: var(--terracotta-soft);
}

.route-research {
  background:
    linear-gradient(145deg, rgba(52, 24, 18, 0.98), rgba(18, 16, 12, 0.98)),
    var(--ink);
  color: var(--bg);
}

.route-research:hover {
  color: var(--bg);
  border-color: var(--terracotta);
  background:
    linear-gradient(145deg, rgba(72, 29, 20, 0.98), rgba(20, 17, 13, 1)),
    var(--ink);
}

.route-research p {
  color: rgba(243, 237, 223, 0.72);
}

.route-research .route-link {
  color: var(--terracotta-soft);
}

.split-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.75fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  margin-bottom: 2.8rem;
}

/* ---------- 川味工程研究 ---------- */
.flavor-research {
  overflow: hidden;
  color: #e9ddc3;
  background:
    radial-gradient(circle at 20% 40%, rgba(130, 30, 21, 0.3), transparent 28rem),
    #0b0c09;
}

.flavor-research-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.flavor-research-preview {
  position: relative;
  min-width: 0;
  color: inherit;
}

.flavor-research-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent 76%, #0b0c09);
}

.flavor-research-preview img {
  width: 100%;
  aspect-ratio: 1.38;
  object-fit: cover;
  object-position: left top;
  border: 1px solid rgba(233, 221, 195, 0.16);
  box-shadow: 0 34px 80px -42px rgba(0, 0, 0, 0.9);
}

.flavor-research .section-eyebrow {
  color: #d46045;
}

.flavor-research .section-title {
  color: #f0e4c9;
  margin-bottom: 1.25rem;
}

.flavor-research-copy > p {
  color: #9f9786;
  line-height: 1.85;
  margin-bottom: 1.8rem;
}

.flavor-research-facts {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(233, 221, 195, 0.16);
}

.flavor-research-facts span {
  display: grid;
  color: #746e61;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

.flavor-research-facts strong {
  color: #c9a76a;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
}

.flavor-research .btn-primary {
  border-color: #9d2b20;
  background: #9d2b20;
}

.split-head p,
.section-copy {
  color: var(--ink-soft);
  line-height: 1.78;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1.4rem;
  align-items: stretch;
}

.article-card-large {
  min-height: 430px;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(251, 246, 234, 0.7), rgba(251, 246, 234, 1)),
    var(--card);
}

.article-card-large h3 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.32;
}

.article-stack {
  display: grid;
  gap: 1rem;
}

.article-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  transition: background 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}

.article-row:hover {
  background: var(--card-hover);
  border-color: var(--green-soft);
  transform: translateX(3px);
}

.article-row span {
  display: block;
  color: var(--terracotta);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 0.45rem;
}

.article-row h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.article-row h3 a {
  color: var(--ink);
}

.article-row p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ---------- 音频与视频 ---------- */
.media-section {
  background:
    linear-gradient(180deg, rgba(243, 237, 223, 0.92), rgba(243, 237, 223, 1)),
    var(--bg);
}

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr);
  gap: 1.35rem;
  align-items: stretch;
}

.media-feature,
.media-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.24s ease, border-color 0.24s ease,
    box-shadow 0.24s ease, background 0.24s ease;
}

.media-feature:hover,
.media-item:hover {
  transform: translateY(-3px);
  border-color: var(--green-soft);
  background: var(--card-hover);
  box-shadow: 0 18px 38px -30px rgba(31, 42, 28, 0.35);
}

a.media-feature,
a.media-item {
  color: inherit;
}

.media-feature {
  min-height: 440px;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
}

.media-frame {
  position: relative;
  min-height: 240px;
  background:
    linear-gradient(135deg, rgba(45, 74, 43, 0.95), rgba(31, 42, 28, 0.98)),
    var(--green);
  overflow: hidden;
}

.media-frame.has-upload {
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--ink);
}

.media-frame video,
.media-frame audio,
.media-inline-player video,
.media-inline-player audio,
.admin-media-preview video,
.admin-media-preview audio {
  width: 100%;
  max-width: 100%;
  display: block;
}

.media-frame video {
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.media-inline-player {
  margin-top: 0.9rem;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(243, 237, 223, 0.18);
  border-radius: 10px;
}

.media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(243, 237, 223, 0.36);
  background: rgba(243, 237, 223, 0.12);
  transform: translate(-50%, -50%);
}

.media-play::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 23px;
  border-left: 20px solid var(--terracotta-soft);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}

.media-wave {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 30px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.media-wave span {
  flex: 1;
  height: 38%;
  border-radius: 999px;
  background: rgba(243, 237, 223, 0.72);
}

.media-wave span:nth-child(2) {
  height: 72%;
  background: var(--terracotta-soft);
}

.media-wave span:nth-child(3) {
  height: 52%;
}

.media-wave span:nth-child(4) {
  height: 84%;
  background: rgba(201, 123, 58, 0.85);
}

.media-wave span:nth-child(5) {
  height: 44%;
}

.media-copy {
  padding: 1.55rem 1.6rem 1.7rem;
}

.media-list {
  display: grid;
  gap: 1rem;
}

.media-item {
  padding: 1.25rem 1.35rem;
}

.media-type {
  display: inline-flex;
  color: var(--terracotta);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.55rem;
}

.media-feature h3,
.media-item h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.media-feature h3 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.media-item h3 {
  font-size: 1.12rem;
}

.media-feature p,
.media-item p {
  color: var(--ink-soft);
  line-height: 1.68;
  font-size: 0.95rem;
}

.media-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: center;
}

.home-tools .section-title {
  margin-bottom: 1rem;
}

.home-tools .section-copy {
  max-width: 48ch;
  margin-bottom: 1.5rem;
}

.tool-showcase {
  color: inherit;
  display: block;
  background:
    linear-gradient(135deg, rgba(235, 227, 208, 0.82), rgba(251, 246, 234, 0.96)),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.3rem);
  box-shadow: 0 24px 54px -40px rgba(31, 42, 28, 0.42);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.tool-showcase:hover {
  transform: translateY(-4px);
  border-color: var(--green);
}

.tool-showcase-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.8rem;
}

.tool-showcase-top span {
  color: var(--terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.tool-showcase-top strong {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.2;
  max-width: 6em;
  text-align: right;
}

.tool-showcase p {
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 42ch;
  margin-bottom: 2rem;
}

.tool-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.tool-steps span {
  border: 1px solid var(--line);
  background: rgba(251, 246, 234, 0.75);
  border-radius: 8px;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  padding: 0.52rem 0.45rem;
}

.about-strip {
  padding-top: clamp(2.8rem, 6vw, 4.5rem);
}

.about-strip-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr) auto;
  gap: 1.5rem;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.about-strip h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.35;
  font-weight: 600;
}

.about-strip p {
  color: var(--ink-soft);
  line-height: 1.75;
  font-size: 0.98rem;
}

/* ---------- 文章详情 ---------- */
.article-detail-hero {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.article-detail-hero .container {
  max-width: 860px;
}

.article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  color: var(--terracotta);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.article-detail-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  max-width: 20ch;
}

.article-body {
  margin-top: 2.4rem;
}

.article-body p {
  font-size: 1.08rem;
}

.article-detail-actions {
  margin-top: 2.4rem;
}

/* ---------- 管理后台 ---------- */
.admin-body {
  min-height: 100vh;
  background: var(--bg-soft);
}

.admin-shell {
  min-height: 100vh;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--pad-x);
}

.admin-panel,
.admin-console {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
}

.admin-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: 0 30px 80px -55px rgba(31, 42, 28, 0.5);
}

.admin-panel h1,
.admin-topbar h1,
.admin-section h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
}

.admin-panel h1 {
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  margin-bottom: 0.7rem;
}

.admin-panel p,
.admin-section-head p,
.admin-note {
  color: var(--ink-soft);
  line-height: 1.7;
}

.admin-note {
  font-size: 0.86rem;
  margin-top: 1.1rem;
}

.admin-console {
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.admin-topbar h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.admin-actions,
.editor-actions,
.admin-data-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: start;
}

.admin-sidebar,
.admin-workspace {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-sidebar {
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.admin-tab {
  text-align: left;
  color: var(--ink-soft);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font-size: 0.94rem;
}

.admin-tab:hover,
.admin-tab.active {
  background: var(--bg-soft);
  color: var(--green);
}

.admin-workspace {
  min-height: 620px;
  padding: clamp(1rem, 3vw, 1.6rem);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.admin-section h2 {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.admin-section-head p {
  font-size: 0.92rem;
}

.admin-editor-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 1rem;
}

.admin-list {
  display: grid;
  gap: 0.55rem;
  max-height: 650px;
  overflow: auto;
  padding-right: 0.2rem;
}

.admin-list-item {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(235, 227, 208, 0.35);
  padding: 0.8rem;
  color: var(--ink);
}

.admin-list-item:hover,
.admin-list-item.active {
  border-color: var(--green-soft);
  background: var(--bg-soft);
}

.admin-list-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.96rem;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.admin-list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-form {
  display: grid;
  gap: 0.9rem;
}

.admin-form label {
  display: grid;
  gap: 0.38rem;
}

.admin-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.data-preview {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(251, 246, 234, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.72rem 0.85rem;
  outline: none;
}

.upload-status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
  background: rgba(235, 227, 208, 0.52);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}

.admin-media-preview {
  display: grid;
  gap: 0.7rem;
}

.admin-media-preview:empty {
  display: none;
}

.admin-media-preview video,
.admin-media-preview audio {
  background: var(--ink);
  border-radius: 10px;
}

.admin-form textarea,
.data-preview {
  resize: vertical;
  line-height: 1.65;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 74, 43, 0.08);
}

.admin-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.editor-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(251, 246, 234, 0.45);
}

.danger {
  border-color: rgba(201, 123, 58, 0.7);
  color: var(--terracotta);
}

.danger:hover {
  background: var(--terracotta);
  color: var(--bg);
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.data-preview {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: pre;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 120%);
  background: var(--ink);
  color: var(--bg);
  border-radius: 14px;
  padding: 1rem 1.6rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  max-width: min(520px, 90vw);
  text-align: center;
  opacity: 0;
  z-index: 200;
  box-shadow: 0 16px 36px -16px rgba(31, 42, 28, 0.55);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.admin-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 章节通用 ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.section-alt {
  background: var(--bg-soft);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.8rem;
  flex-wrap: wrap;
}
.section-eyebrow {
  font-size: 0.78rem;
  color: var(--terracotta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  max-width: 22ch;
}
.section-link {
  color: var(--green);
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1.5px solid var(--terracotta);
  padding-bottom: 2px;
}

/* ---------- 文章卡片网格 ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 1.7rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -25px rgba(31, 42, 28, 0.3);
  border-color: var(--green-soft);
  background: var(--card-hover);
}

.article-card .tag {
  align-self: flex-start;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
}
.article-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 600;
}
.article-card h3 a {
  color: inherit;
}
.article-card h3 a:hover {
  color: var(--green);
}
.article-card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.7;
  flex: 1;
}
.article-card .meta {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
  display: flex;
  gap: 1rem;
}

/* ---------- 三柱 / 探索方向 ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}
.pillar {
  background: var(--card);
  border-radius: 12px;
  padding: 1.8rem 1.6rem;
  border-left: 4px solid var(--green);
  transition: all 0.25s ease;
}
.pillar:hover {
  border-left-color: var(--terracotta);
  transform: translateY(-2px);
}
.pillar .pillar-num {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--terracotta);
  margin-bottom: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.pillar h4 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.pillar p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- 数字花园（金句条） ---------- */
.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.garden-item {
  background: var(--card);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  position: relative;
  border-top: 3px solid var(--terracotta);
}
.garden-item::before {
  content: "「";
  position: absolute;
  top: -0.4rem;
  left: 0.4rem;
  font-size: 2.4rem;
  color: var(--terracotta);
  opacity: 0.4;
  font-family: var(--font-serif);
}
.garden-item .src {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 订阅栏 ---------- */
.subscribe {
  background: var(--green);
  color: var(--bg);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.subscribe::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 80% 30%,
    rgba(201, 123, 58, 0.25),
    transparent 50%
  );
}
.subscribe-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.subscribe h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  margin-bottom: 0.85rem;
  line-height: 1.3;
}
.subscribe p {
  font-size: 1.02rem;
  opacity: 0.88;
  margin-bottom: 1.8rem;
  line-height: 1.7;
}
.subscribe-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(243, 237, 223, 0.12);
  padding: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 237, 223, 0.3);
}
.subscribe-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--bg);
  padding: 0.6rem 1.2rem;
  font: inherit;
  font-size: 0.95rem;
}
.subscribe-form input::placeholder {
  color: rgba(243, 237, 223, 0.6);
}
.subscribe-form button {
  background: var(--terracotta);
  color: var(--bg);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.2s ease;
}
.subscribe-form button:hover {
  background: var(--terracotta-soft);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: var(--bg-soft);
  padding: 3rem 0 1.8rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.4rem;
  margin-bottom: 2.5rem;
}
.footer-brand h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--bg);
}
.footer-brand p {
  font-size: 0.92rem;
  color: rgba(243, 237, 223, 0.65);
  line-height: 1.7;
  max-width: 28ch;
}
.footer-col h5 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-soft);
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: rgba(243, 237, 223, 0.78);
  font-size: 0.92rem;
}
.footer-col a:hover {
  color: var(--terracotta-soft);
}
.footer-bottom {
  border-top: 1px solid rgba(243, 237, 223, 0.12);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(243, 237, 223, 0.5);
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------- 关于页 ---------- */
.page-hero {
  padding: clamp(4rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.2;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 1.2rem;
  max-width: 18ch;
}
.page-hero .lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.8;
}

.prose {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--ink);
  margin: 3rem 0 1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 2.2rem 0 0.8rem;
  font-weight: 600;
}
.prose p {
  margin-bottom: 1.1rem;
}
.prose blockquote {
  border-left: 3px solid var(--terracotta);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.5rem 0;
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: 1.08rem;
  background: var(--card);
  border-radius: 0 8px 8px 0;
}
.prose ul,
.prose ol {
  margin: 1rem 0 1.4rem 1.4rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.95rem;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--ink);
  background: var(--bg-soft);
  font-weight: 700;
}
.prose code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08rem 0.32rem;
  font-size: 0.92em;
}
.prose pre {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.7;
}
.prose pre code {
  display: block;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

/* 书单 */
.bookshelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0 2rem;
}
.book {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.book-cover {
  width: 48px;
  height: 64px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-soft) 100%);
  border-radius: 3px;
  display: grid;
  place-items: center;
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.1;
  padding: 0.4rem;
  flex-shrink: 0;
  box-shadow: 1px 1px 0 var(--terracotta);
}
.book-info h4 {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
  font-weight: 600;
  line-height: 1.35;
}
.book-info .author {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- 文章列表页 ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.filter-tab {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-tab:hover {
  border-color: var(--green);
  color: var(--green);
}
.filter-tab.active {
  background: var(--green);
  color: var(--bg);
  border-color: var(--green);
}

.writing-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.writing-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.6rem;
  align-items: center;
  transition: all 0.25s ease;
}
.writing-item:hover {
  border-color: var(--green-soft);
  background: var(--card-hover);
  transform: translateX(4px);
}
.writing-item .date {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.writing-item .body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.writing-item .body h3 a:hover {
  color: var(--green);
}
.writing-item .body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}
.writing-item .category {
  align-self: start;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  text-transform: uppercase;
  font-weight: 600;
  padding-top: 0.3rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-photo {
    justify-self: center;
    max-width: 380px;
    margin-top: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .writing-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .writing-item:hover {
    transform: none;
  }
  .home-hero-grid,
  .split-head,
  .featured-layout,
  .media-grid,
  .flavor-research-grid,
  .workbench-grid,
  .about-strip-inner,
  .admin-grid,
  .admin-editor-layout {
    grid-template-columns: 1fr;
  }
  .route-grid {
    grid-template-columns: 1fr 1fr;
  }
  .route-featured {
    grid-row: auto;
    grid-column: 1 / -1;
    min-height: 260px;
  }
  .about-strip-inner .btn {
    justify-self: start;
  }

  .flavor-research-preview::after {
    background: linear-gradient(180deg, transparent 76%, #0b0c09);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  .nav-links.open li {
    padding: 0.6rem var(--pad-x);
  }
  .hero-meta {
    gap: 1rem;
  }
  .identity-card::before {
    display: none;
  }
  .identity-card {
    padding: 0.75rem;
  }
  .route-grid,
  .tool-steps {
    grid-template-columns: 1fr;
  }
  .route-card,
  .route-featured {
    min-height: auto;
  }
  .route-num {
    margin-bottom: 1.2rem;
  }
  .article-card-large {
    min-height: auto;
  }
  .media-feature {
    min-height: auto;
  }
  .media-frame {
    min-height: 210px;
  }
  .media-copy,
  .media-item {
    padding: 1.2rem;
  }
  .admin-two {
    grid-template-columns: 1fr;
  }
  .admin-topbar,
  .admin-section-head {
    display: grid;
  }
  .admin-actions {
    justify-content: start;
  }
  .admin-workspace {
    min-height: auto;
  }
  .admin-list {
    max-height: 320px;
  }
  .admin-toast {
    width: calc(100vw - 2rem);
    text-align: center;
    border-radius: 12px;
  }
  .article-row:hover {
    transform: none;
  }
  .tool-showcase-top {
    display: grid;
  }
  .tool-showcase-top strong {
    max-width: none;
    text-align: left;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.4rem;
  }
  .subscribe-form {
    flex-direction: column;
    border-radius: 14px;
    padding: 0.6rem;
  }
  .subscribe-form button {
    border-radius: 12px;
    padding: 0.7rem 1rem;
  }
}

/* ---------- 工具类 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
