/* ============================================================
   水哲学 · Aqua Philosophy — 学术站样式
   设计原则：水墨质感 / 学术克制 / 信息层级清晰
   ============================================================ */

:root {
  --c-ink: #0f1e2e;
  --c-ink-soft: #2c3e50;
  --c-water: #1e5a8a;
  --c-water-deep: #0a3d62;
  --c-water-light: #4a8bbf;
  --c-water-pale: #e8f1f8;
  --c-paper: #fbfaf6;
  --c-paper-warm: #f5f1e8;
  --c-line: #d4cfc4;
  --c-accent: #b85c38;
  --c-accent-soft: #d4856a;
  --c-text: #1a1a1a;
  --c-text-soft: #555;
  --c-text-mute: #888;
  --shadow-soft: 0 2px 16px rgba(15, 30, 46, 0.08);
  --shadow-card: 0 4px 24px rgba(15, 30, 46, 0.12);
  --font-cn: 'Noto Serif SC', 'Source Han Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
  --font-en: 'EB Garamond', 'Crimson Pro', Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-paper);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(74, 139, 191, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(184, 92, 56, 0.03) 0%, transparent 40%);
}

a { color: var(--c-water); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--c-water-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ============== 顶部导航 ============== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.site-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--c-ink);
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-water) 0%, var(--c-water-deep) 100%);
  color: white;
  border-radius: 50%;
  font-size: 22px;
  font-family: var(--font-en);
  font-style: italic;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text-zh { font-size: 17px; letter-spacing: 0.05em; }
.brand-text-en { font-size: 11px; color: var(--c-text-mute); letter-spacing: 0.08em; font-family: var(--font-en); font-style: italic; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  color: var(--c-ink-soft);
  font-size: 14.5px;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--c-water-pale); color: var(--c-water-deep); text-decoration: none; }
.nav-links a.active { background: var(--c-water); color: white; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary { background: var(--c-water); color: white; }
.btn-primary:hover { background: var(--c-water-deep); }
.btn-outline { background: transparent; border-color: var(--c-water); color: var(--c-water); }
.btn-outline:hover { background: var(--c-water); color: white; }
.btn-ghost { background: transparent; color: var(--c-ink-soft); border-color: var(--c-line); }
.btn-ghost:hover { background: var(--c-paper-warm); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============== 通用排版 ============== */
.page { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }

h1, h2, h3, h4 { font-family: var(--font-cn); color: var(--c-ink); font-weight: 600; letter-spacing: 0.02em; }
h1 { font-size: 44px; line-height: 1.25; margin: 0 0 16px; }
h2 { font-size: 32px; line-height: 1.35; margin: 0 0 12px; }
h3 { font-size: 22px; line-height: 1.4; margin: 0 0 10px; }
h4 { font-size: 17px; line-height: 1.5; margin: 0 0 8px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-water);
  font-family: var(--font-en);
  font-style: italic;
  margin-bottom: 12px;
}

.lead {
  font-size: 19px;
  line-height: 1.75;
  color: var(--c-ink-soft);
  max-width: 720px;
}

/* ============== Hero ============== */
.hero {
  position: relative;
  padding: 120px 0 80px;
  background:
    linear-gradient(180deg, rgba(232, 241, 248, 0.5) 0%, transparent 70%),
    var(--c-paper);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(74, 139, 191, 0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: 60px;
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--c-water) 0%, var(--c-water-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 22px;
  color: var(--c-text-soft);
  margin-bottom: 24px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-top: 32px;
  font-size: 14.5px;
  color: var(--c-text-soft);
}
.hero-meta .label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-en);
}

/* ============== 卡片 ============== */
.card {
  background: white;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s;
}
.card:hover { box-shadow: var(--shadow-card); }
.card h3 { color: var(--c-water-deep); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
}

/* ============== 三层条件网络可视化 ============== */
.layers-viz {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin: 40px 0;
  position: relative;
}
.layer-card {
  background: white;
  border: 2px solid var(--c-line);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}
.layer-card:not(:last-child) {
  border-right: none;
}
.layer-card:first-child { border-radius: 8px 0 0 8px; }
.layer-card:last-child { border-radius: 0 8px 8px 0; }
.layer-card:hover { background: var(--c-water-pale); }
.layer-card.active {
  background: var(--c-water);
  color: white;
  border-color: var(--c-water-deep);
}
.layer-card.active .layer-tag { background: rgba(255,255,255,0.25); color: white; }
.layer-card.active .layer-name { color: white; }
.layer-num {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 32px;
  background: var(--c-water);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-style: italic;
  font-weight: 600;
}
.layer-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--c-water-pale);
  color: var(--c-water-deep);
  margin-bottom: 12px;
  font-family: var(--font-en);
}
.layer-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 6px;
}
.layer-en {
  font-family: var(--font-en);
  font-style: italic;
  color: var(--c-text-mute);
  font-size: 13px;
  margin-bottom: 12px;
}
.layer-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--c-text-soft);
}

/* ============== 双向传导流程图 ============== */
.transmission-viz {
  background: white;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 40px;
  margin: 32px 0;
}
.transmission-row {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
}
.transmission-row + .transmission-row { border-top: 1px dashed var(--c-line); }
.transmission-label {
  text-align: center;
  font-family: var(--font-en);
  font-style: italic;
  color: var(--c-water-deep);
}
.transmission-arrow {
  font-size: 28px;
  color: var(--c-water);
  text-align: center;
}
.transmission-text h4 { color: var(--c-ink); margin-bottom: 6px; }
.transmission-text p { margin: 0; color: var(--c-text-soft); font-size: 14.5px; }

@media (max-width: 700px) {
  .transmission-row { grid-template-columns: 1fr; gap: 12px; }
  .transmission-row > .transmission-label,
  .transmission-row > .transmission-arrow { text-align: left; }
}

/* ============== 同行交流 ============== */
.thread-list { display: flex; flex-direction: column; gap: 12px; }
.thread-item {
  background: white;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.15s;
}
.thread-item:hover { border-color: var(--c-water); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.thread-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 8px;
}
.thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--c-text-mute);
}
.thread-meta .tag {
  background: var(--c-water-pale);
  color: var(--c-water-deep);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.thread-meta .tag.pinned { background: var(--c-accent-soft); color: white; }

/* ============== 表单 ============== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  color: var(--c-ink-soft);
  font-weight: 500;
}
.field input, .field textarea, .field select {
  padding: 10px 14px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: white;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-water);
  box-shadow: 0 0 0 3px rgba(30, 90, 138, 0.12);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .help { font-size: 12.5px; color: var(--c-text-mute); }
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-soft);
}
.consent-row input { margin-top: 4px; }

.form-msg {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2c0; }
.form-msg.success { background: #e7f5ee; color: #1a7f3c; border: 1px solid #b8e6c8; }

/* ============== Modal ============== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 46, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: white;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
}
.modal h3 { color: var(--c-water-deep); margin-bottom: 16px; }
.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--c-text-mute);
  line-height: 1;
}

/* ============== 页脚 ============== */
.site-footer {
  border-top: 1px solid var(--c-line);
  background: var(--c-paper-warm);
  padding: 60px 0 30px;
  margin-top: 80px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h5 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-water-deep);
  margin-bottom: 12px;
  font-family: var(--font-en);
  font-weight: 600;
}
.footer-col a { display: block; padding: 4px 0; color: var(--c-ink-soft); }
.footer-col p { color: var(--c-text-soft); margin: 4px 0; }
.footer-bottom {
  border-top: 1px solid var(--c-line);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--c-text-mute);
}

/* ============== 引用 / 时间线 ============== */
.quote-block {
  border-left: 3px solid var(--c-water);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--c-water-pale);
  font-family: var(--font-en);
  font-style: italic;
  color: var(--c-ink-soft);
}
.quote-block .cite { display: block; margin-top: 8px; font-size: 13px; color: var(--c-text-mute); }

.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: var(--c-line);
}
.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-water);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--c-water);
}
.timeline-year {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 14px;
  color: var(--c-water);
  font-weight: 600;
}

/* ============== 比较表 ============== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14.5px;
}
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--c-line);
}
.compare-table th {
  background: var(--c-water-pale);
  color: var(--c-water-deep);
  font-weight: 600;
}
.compare-table tr:hover td { background: rgba(232, 241, 248, 0.4); }

/* ============== Toast ============== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.success { background: #1a7f3c; color: white; }
.toast.error { background: #b3261e; color: white; }
.toast.info { background: var(--c-water-deep); color: white; }

/* ============== 工具类 ============== */
.text-center { text-align: center; }
.text-soft { color: var(--c-text-soft); }
.text-mute { color: var(--c-text-mute); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.divider { height: 1px; background: var(--c-line); margin: 32px 0; }
.serif-en { font-family: var(--font-en); font-style: italic; }
.tag-pill {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--c-paper-warm);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-line);
  margin-right: 6px;
}

/* ============== 加载态 ============== */
.skeleton {
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }