@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&family=Roboto+Mono:wght@300;400;500;700&display=swap');

/* ── 设计令牌 ── */
:root {
  --c-blue:   #c8e0f4;
  --c-pink:   #f5e0e8;
  --c-dark:   #171f26;
  --c-dark2:  #1e2935;
  --c-dark3:  #243040;
  --c-blue-d: #8ab8d8;
  --c-pink-d: #d8a8bc;
  --c-text:   #e8f0f8;
  --c-muted:  #8fa8bc;
  --c-mono:   #a8c8e0;

  --shadow-out: -5px -5px 15px rgba(30,60,90,0.35), 5px 5px 15px rgba(0,0,0,0.55);
  --shadow-in:  inset 3px 3px 8px rgba(0,0,0,0.5), inset -3px -3px 8px rgba(50,90,130,0.2);
  --shadow-card: -4px -4px 12px rgba(30,55,80,0.3), 4px 4px 12px rgba(0,0,0,0.6);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;

  --ff-head: 'Exo', 'Segoe UI', system-ui, sans-serif;
  --ff-mono: 'Roboto Mono', 'Courier New', monospace;

  --nav-h: 60px;
  --max-w: 1100px;
  --prose-w: 740px;
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--c-dark);
  color: var(--c-text);
  font-family: var(--ff-head);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 8px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { color: var(--c-pink); }
button, input { font-family: inherit; }
ul, ol { list-style: none; }

/* ── 辅助 ── */
.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;
}

/* ── 整体骨架 ── */
.site-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.site-main  { flex: 1; width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 24px 16px 48px; }

/* ── 底部固定导航 ── */
.site-header {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--c-dark2);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
  height: var(--nav-h);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 8px;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--ff-mono);
  font-weight: 500;
  color: var(--c-muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
  flex: 1;
}
.nav-link:hover, .nav-link.nav-current {
  color: var(--c-blue);
  background: rgba(200,224,244,0.08);
}
.nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 14px;
  flex-shrink: 0;
  order: 0;
}
.nav-link--left  { order: -1; }
.nav-link--right { order: 1; }
.brand-text {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--c-blue);
  letter-spacing: 0.5px;
}
.brand-logo { height: 32px; width: auto; }

/* ── 面包屑 ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.bc-link { color: var(--c-muted); }
.bc-link:hover { color: var(--c-blue); }
.bc-sep { color: var(--c-dark3); }
.bc-current { color: var(--c-blue-d); }

/* ── Neumorphism 卡片基础 ── */
.neu-card {
  background: linear-gradient(145deg, var(--c-dark2), var(--c-dark3));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

/* ── 按钮 ── */
.neu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--c-dark3), var(--c-dark2));
  box-shadow: var(--shadow-out);
  color: var(--c-blue);
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, color 0.2s;
  border: none;
  text-align: center;
}
.neu-btn:hover {
  color: var(--c-pink);
  box-shadow: -3px -3px 10px rgba(30,55,80,0.4), 3px 3px 10px rgba(0,0,0,0.7);
}
.neu-btn:active {
  box-shadow: var(--shadow-in);
  transform: scale(0.97);
}

/* ── 首页 Hero ── */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 70vh;
  padding: 48px 16px 32px;
  text-align: center;
  justify-content: center;
  gap: 24px;
}
.hero-text { order: 1; }
.hero-figure { order: 2; width: 100%; max-width: 560px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.hero-img { width: 100%; height: auto; }
.hero-h1 {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: clamp(24px, 5vw, 46px);
  line-height: 1.25;
  color: var(--c-blue);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}
.hero-sub {
  font-size: 16px;
  color: var(--c-muted);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.feature-btn {
  font-size: 13px;
  padding: 10px 18px;
}

/* ── 正文容器 ── */
.content-section {
  margin: 32px 0;
}
.content-body {
  max-width: var(--prose-w);
  margin: 0 auto;
}

/* ── Prose 排版 ── */
.prose h2 {
  font-family: var(--ff-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-blue);
  margin: 36px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--c-blue-d);
}
.prose h3 {
  font-family: var(--ff-head);
  font-size: 18px;
  font-weight: 500;
  color: var(--c-pink);
  margin: 28px 0 10px;
}
.prose p {
  font-size: 16px;
  line-height: 1.8;
  color: #c8d8e8;
  margin-bottom: 16px;
}
.prose ul, .prose ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { font-size: 16px; line-height: 1.8; color: #c8d8e8; margin-bottom: 6px; }
.prose a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--c-pink); }
.prose strong { color: var(--c-text); font-weight: 600; }
.prose code {
  font-family: var(--ff-mono);
  font-size: 14px;
  background: var(--c-dark3);
  color: var(--c-pink);
  padding: 2px 6px;
  border-radius: 4px;
}
.prose pre {
  background: var(--c-dark3);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 20px;
  box-shadow: var(--shadow-in);
}
.prose pre code { background: none; padding: 0; color: var(--c-mono); font-size: 14px; }
.prose blockquote {
  border-left: 3px solid var(--c-pink-d);
  padding: 12px 16px;
  margin: 20px 0;
  background: rgba(245,224,232,0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-muted);
  font-style: italic;
}
.prose time { font-family: var(--ff-mono); font-size: 13px; color: var(--c-muted); }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 15px; }
.prose th { background: var(--c-dark3); color: var(--c-blue); padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-dark3); }
.prose td { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #c0d0e0; }
.prose tr:hover td { background: rgba(200,224,244,0.04); }
.prose figure { margin: 20px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.prose figcaption { font-size: 13px; color: var(--c-muted); text-align: center; padding: 8px; font-family: var(--ff-mono); }

/* ── 区块标题 ── */
.section-heading {
  font-family: var(--ff-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-pink);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245,224,232,0.15);
}

/* ── 卡片列表（首页） ── */
.cards-section { margin: 40px 0; }
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
}
.card-item {
  background: linear-gradient(145deg, var(--c-dark2), var(--c-dark3));
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-item:hover {
  transform: translateY(-3px);
  box-shadow: -6px -6px 18px rgba(30,55,80,0.35), 6px 6px 18px rgba(0,0,0,0.65);
}
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.card-figure { margin: 0; overflow: hidden; max-height: 160px; }
.card-thumb { width: 100%; height: 160px; object-fit: cover; }
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--c-pink-d);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.card-title {
  font-family: var(--ff-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.4;
}
.card-desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
  flex: 1;
}
.card-date {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--c-blue-d);
  margin-top: 4px;
}

/* ── 栏目页 Hero ── */
.cat-hero {
  padding: 48px 16px 32px;
  text-align: center;
}
.cat-h1 {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: clamp(22px, 4vw, 38px);
  color: var(--c-blue);
  margin-bottom: 12px;
}
.cat-desc {
  font-size: 16px;
  color: var(--c-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── 子页列表（栏目页） ── */
.children-section { margin: 40px 0; }
.child-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  counter-reset: child-counter;
}
.child-item {
  background: linear-gradient(145deg, var(--c-dark2), var(--c-dark3));
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, box-shadow 0.18s;
}
.child-item:hover {
  transform: translateX(4px);
  box-shadow: -3px -3px 10px rgba(30,55,80,0.3), 5px 5px 14px rgba(0,0,0,0.65);
}
.child-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  color: inherit;
  text-decoration: none;
}
.child-figure { flex-shrink: 0; width: 80px; border-radius: var(--radius-sm); overflow: hidden; }
.child-thumb { width: 80px; height: 60px; object-fit: cover; }
.child-body { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.child-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-pink-d);
  letter-spacing: 1px;
}
.child-title {
  font-family: var(--ff-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.4;
}
.child-desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
}
.child-date {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--c-blue-d);
}

/* ── 文章页 ── */
.article-main { max-width: var(--max-w); }
.article-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.article-hero-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin: 0;
}
.article-hero-img { width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.article-meta-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-cat-tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--c-dark2);
  background: var(--c-pink);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  width: fit-content;
}
.article-h1 {
  font-family: var(--ff-head);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  color: var(--c-blue);
  line-height: 1.3;
}
.article-desc {
  font-size: 16px;
  color: var(--c-muted);
  line-height: 1.7;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--c-muted);
}
.article-date, .article-modified {
  color: var(--c-muted);
  font-family: var(--ff-mono);
  font-size: 13px;
}

/* ── 相关文章 ── */
.related-aside {
  margin: 40px 0;
  padding: 24px;
  background: linear-gradient(145deg, var(--c-dark2), var(--c-dark3));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}
.related-item {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 10px;
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-text);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.18s;
}
.related-link:hover { color: var(--c-blue); }
.related-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-pink-d);
  flex-shrink: 0;
  width: 24px;
}
.related-title { font-size: 14px; flex: 1; }
.related-date { font-family: var(--ff-mono); font-size: 12px; color: var(--c-muted); flex-shrink: 0; }

/* ── 关于页 ── */
.about-main { max-width: var(--prose-w); }
.about-hero {
  padding: 40px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.about-hero-figure { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); width: 100%; }
.about-hero-img { width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.about-intro-aside { display: flex; flex-direction: column; gap: 12px; }
.about-eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--c-pink-d);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.about-h1 {
  font-family: var(--ff-head);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  color: var(--c-blue);
}
.about-tagline { font-size: 16px; color: var(--c-muted); line-height: 1.7; }
.about-links-aside {
  margin: 32px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.about-ext-link { font-size: 13px; }

/* ── 隐私页 ── */
.privacy-main { max-width: var(--prose-w); }
.privacy-hero {
  padding: 48px 0 24px;
  text-align: center;
}
.privacy-badge-aside {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.privacy-icon { font-size: 32px; }
.privacy-eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--c-pink-d);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.privacy-h1 {
  font-family: var(--ff-head);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
  color: var(--c-blue);
  margin-bottom: 12px;
}
.privacy-desc { font-size: 16px; color: var(--c-muted); line-height: 1.7; margin-bottom: 16px; }
.privacy-date { font-family: var(--ff-mono); font-size: 13px; color: var(--c-muted); display: block; }
.privacy-nav-aside {
  margin: 32px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.privacy-back-link { font-size: 13px; }

/* ── 页脚 ── */
.site-footer {
  background: var(--c-dark2);
  border-top: 1px solid rgba(200,224,244,0.08);
  padding: 40px 16px 16px;
  margin-bottom: var(--nav-h);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: var(--max-w);
  margin: 0 auto 28px;
}
.footer-heading {
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-blue-d);
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.footer-brand {
  font-family: var(--ff-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-blue);
  margin-bottom: 8px;
}
.footer-tagline { font-size: 13px; color: var(--c-muted); line-height: 1.6; margin-bottom: 12px; }
.footer-link {
  display: block;
  font-size: 14px;
  color: var(--c-muted);
  padding: 4px 0;
  transition: color 0.18s;
  min-height: 28px;
}
.footer-link:hover { color: var(--c-blue); }
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sub-input {
  background: var(--c-dark3);
  border: 1px solid rgba(200,224,244,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--c-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-in);
}
.sub-input:focus {
  border-color: var(--c-blue-d);
  box-shadow: 0 0 0 2px rgba(200,224,244,0.15);
}
.sub-input::placeholder { color: var(--c-muted); }
.sub-btn { width: 100%; }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-copy { font-family: var(--ff-mono); font-size: 12px; color: var(--c-muted); }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links .footer-link { display: inline; padding: 0; font-size: 12px; }

/* ── 动效：Stagger List ── */
.stagger-item {
  opacity: 0;
  transform: translateY(18px);
  animation: staggerIn 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 80ms + 120ms);
}
@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ── 媒体查询：768px+ ── */
@media (min-width: 768px) {
  .site-main { padding: 32px 24px 64px; }

  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }

  .subscribe-form { flex-direction: row; }
  .sub-btn { width: auto; flex-shrink: 0; }

  .hero-section { padding: 64px 24px 48px; }

  .card-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

  .article-top { flex-direction: row; align-items: flex-start; }
  .article-hero-figure { flex: 0 0 45%; max-width: 45%; }
  .article-meta-aside { flex: 1; padding-left: 20px; }

  .about-hero { flex-direction: row; text-align: left; align-items: flex-start; }
  .about-intro-aside { align-items: flex-start; }

  .nav-link { font-size: 13px; padding: 8px 14px; flex: 0; }
  .brand-text { font-size: 17px; }
}

/* ── 媒体查询：1024px+ ── */
@media (min-width: 1024px) {
  .site-main { padding: 40px 32px 80px; }
  .nav-link { font-size: 14px; padding: 8px 18px; }
  .hero-h1 { font-size: 48px; }
  .card-list { grid-template-columns: repeat(3, 1fr); }
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .stagger-item { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
