@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/* ===== 变量 ===== */
:root {
  --c-dark: #1A1A2E;
  --c-accent: #E94560;
  --c-light: #F5F5F5;
  --c-dark-2: #16213E;
  --c-dark-3: #0F3460;
  --c-glass-bg: rgba(26,26,46,0.72);
  --c-glass-border: rgba(245,245,245,0.12);
  --c-text: #F5F5F5;
  --c-text-muted: rgba(245,245,245,0.6);
  --c-accent-dim: rgba(233,69,96,0.18);
  --nav-h: 64px;
  --radius: 10px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
  --prose-w: 780px;
  --sidebar-w: 280px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--c-dark);
  color: var(--c-text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
table { border-collapse: collapse; }

/* ===== 通用工具 ===== */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 侧边导航（ASIDE > NAV > UL > LI > A） ===== */
.site-aside {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
}

.main-nav {
  height: 100%;
  background: rgba(26,26,46,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-glass-border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-light);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  line-height: var(--nav-h);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-brand:hover { text-decoration: none; color: var(--c-accent); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-list li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(245,245,245,0.8);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  min-height: 40px;
  white-space: nowrap;
}
.nav-list li a:hover {
  color: var(--c-light);
  background: var(--c-accent-dim);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-light);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== 页面主体偏移 ===== */
.page-body {
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HERO — 首页 100vh 视差 ===== */
.parallax-hero {
  position: relative;
  height: calc(100vh - var(--nav-h));
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-layers {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-layer-bg {
  z-index: 0;
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-dark-3) 60%, #1a0a1e 100%);
}
.hero-layer-bg .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-layer-mid {
  z-index: 1;
  background: radial-gradient(ellipse at 70% 50%, rgba(233,69,96,0.15) 0%, transparent 65%);
}

.hero-layer-fg {
  z-index: 2;
  background: linear-gradient(to right, rgba(26,26,46,0.8) 0%, rgba(26,26,46,0.2) 50%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 580px;
  text-align: right;
  padding: 40px 48px 80px 24px;
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--c-light);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--c-accent);
  color: var(--c-light);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  min-height: 48px;
  transition: background var(--transition), transform var(--transition);
}
.hero-cta:hover {
  background: #c73450;
  text-decoration: none;
  transform: translateY(-2px);
}

/* 弧形底切 */
.hero-arc {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 15;
  background: var(--c-dark);
  clip-path: ellipse(60% 100% at 50% 100%);
}

/* ===== HERO — 频道页 ===== */
.channel-hero,
.tag-hero,
.inner-hero {
  position: relative;
  padding: 80px 24px 100px;
  background: linear-gradient(135deg, var(--c-dark-2) 0%, var(--c-dark-3) 100%);
  overflow: hidden;
}

.channel-hero::before,
.tag-hero::before,
.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(233,69,96,0.12) 0%, transparent 60%);
}

.channel-hero-inner,
.tag-hero-inner,
.inner-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
}

.channel-h1,
.tag-h1,
.inner-h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.channel-desc,
.tag-desc,
.inner-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 640px;
}

.inner-hero-sm { padding: 60px 24px 80px; }

.inner-date {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

/* ===== 文章 Hero ===== */
.article-hero-bar {
  position: relative;
  height: 320px;
  overflow: hidden;
  will-change: transform;
}

.article-hero-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(26,26,46,0.3) 0%, rgba(26,26,46,0.85) 100%);
}

/* ===== section eyebrow ===== */
.section-eyebrow,
.tag-eyebrow,
.card-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 10px;
}

/* ===== Main layout ===== */
main {
  flex: 1;
  padding: 60px 0;
}

/* ===== content-with-sidebar ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 40px;
  align-items: start;
  margin-top: 48px;
}

/* ===== 正文主容器 main > article.wrap > section > div ===== */
.section-inner,
.channel-article,
.about-main-section > div,
.privacy-section > div,
.tag-content-section > div,
.default-section > div,
.article-body {
  /* div 直接在 section 下 */
}

/* ===== Sections ===== */
.channels-section,
.articles-section,
.channel-content-section,
.channel-children-section,
.tag-content-section,
.tag-list-section,
.about-main-section,
.privacy-section,
.default-section,
.article-main-section {
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  color: var(--c-light);
}

/* ===== 卡片网格 ===== */
.cards-grid {
  display: grid;
  gap: 24px;
}

.channels-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

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

.child-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 32px;
}

/* ===== 玻璃拟态卡片 ===== */
.glass-card {
  background: var(--c-glass-bg);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(233,69,96,0.2);
}

.card-media {
  height: 160px;
  overflow: hidden;
  background: var(--c-dark-3);
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.glass-card:hover .card-thumb {
  transform: scale(1.05);
}

.card-body {
  padding: 20px 22px 24px;
}

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.card-body h3 a {
  color: var(--c-light);
}
.card-body h3 a:hover { color: var(--c-accent); text-decoration: none; }

.card-desc,
.card-body p {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: 0.02em;
}
.card-link:hover { text-decoration: underline; }

.card-meta {
  margin-bottom: 8px;
}

.card-meta time,
.article-meta time {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

/* ===== 文章卡片 ===== */
.article-card {
  padding: 24px;
}

.article-meta { margin-bottom: 8px; }

.article-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-title a {
  color: var(--c-light);
}
.article-title a:hover { color: var(--c-accent); text-decoration: none; }

.article-desc {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-accent);
}

/* ===== 页面正文区域 ===== */
.page-content-area {
  margin-bottom: 32px;
}

/* ===== 散文排版 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(245,245,245,0.88);
  max-width: var(--prose-w);
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 0.75em;
  color: var(--c-light);
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.75em 0 0.6em;
  color: var(--c-light);
}

.prose p { margin-bottom: 1.25em; }

.prose ul, .prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li { margin-bottom: 0.5em; }

.prose a { color: var(--c-accent); }
.prose a:hover { text-decoration: underline; }

.prose strong { font-weight: 700; color: var(--c-light); }

.prose blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(233,69,96,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-text-muted);
  font-style: italic;
}

/* ===== 文章详情页 ===== */
.article-main-section {
  grid-column: 1;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-accent); }

.article-header {
  margin-bottom: 40px;
}

.article-h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--c-light);
  margin: 12px 0 16px;
}

.article-summary {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-dates {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pub-date, .mod-date {
  font-size: 0.85rem;
  color: var(--c-text-muted);
}

.article-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--c-glass-border);
}

.article-footer-nav a {
  font-size: 0.9rem;
  color: var(--c-text-muted);
}
.article-footer-nav a:hover { color: var(--c-accent); }

/* ===== 侧边栏 ===== */
.content-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-block {
  padding: 20px 22px 24px;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-light);
  margin-bottom: 14px;
}

.sidebar-links li {
  border-bottom: 1px solid rgba(245,245,245,0.06);
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links li a {
  display: block;
  padding: 9px 0;
  font-size: 0.875rem;
  color: var(--c-text-muted);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.sidebar-links li a:hover {
  color: var(--c-accent);
  text-decoration: none;
}

/* ===== 表格 ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--c-glass-border);
  margin-bottom: 32px;
}

.child-table,
.tag-table {
  width: 100%;
  font-size: 0.9rem;
}

.child-table th,
.tag-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  background: rgba(15,52,96,0.4);
  border-bottom: 1px solid var(--c-glass-border);
}

.child-table td,
.tag-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(245,245,245,0.05);
  vertical-align: top;
  line-height: 1.5;
}

.child-table tr:last-child td,
.tag-table tr:last-child td {
  border-bottom: none;
}

.child-table tr:hover td,
.tag-table tr:hover td {
  background: rgba(233,69,96,0.05);
}

.child-table td a,
.tag-table td a {
  color: var(--c-light);
  font-weight: 500;
}

.child-table td a:hover,
.tag-table td a:hover {
  color: var(--c-accent);
  text-decoration: none;
}

.td-desc { color: var(--c-text-muted); }
.td-date, .td-channel {
  white-space: nowrap;
  color: var(--c-text-muted);
  font-size: 0.85rem;
}

/* ===== 面包屑导航 ===== */
nav.breadcrumb span[aria-hidden] {
  color: var(--c-text-muted);
}

/* ===== 页脚（极简：仅 p + small） ===== */
#site-footer {
  background: rgba(10,10,20,0.95);
  border-top: 1px solid var(--c-glass-border);
  text-align: center;
  padding: 60px 24px 40px;
  margin-top: auto;
}

.footer-brand {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(245,245,245,0.08);
  margin-bottom: 16px;
  line-height: 1;
  user-select: none;
}

#site-footer p {
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

#site-footer small {
  font-size: 0.8rem;
}

#site-footer small a {
  color: var(--c-text-muted);
  transition: color var(--transition);
}
#site-footer small a:hover { color: var(--c-accent); }

/* ===== 动效：视差 + Reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* stagger */
[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
[data-reveal]:nth-child(4) { transition-delay: 0.24s; }
[data-reveal]:nth-child(5) { transition-delay: 0.32s; }
[data-reveal]:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-layer, .article-hero-bar {
    will-change: auto;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 56px;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(22,33,62,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--c-glass-border);
    gap: 2px;
  }

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

  .nav-list li a {
    padding: 12px 16px;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content {
    padding: 32px 24px 60px;
    max-width: 100%;
    text-align: left;
  }

  .channels-grid,
  .articles-grid,
  .child-cards-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    font-size: 0.82rem;
  }

  .td-desc { display: none; }

  .channel-hero, .tag-hero, .inner-hero {
    padding: 60px 20px 80px;
  }

  .article-hero-bar {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero-content { padding: 24px 16px 48px; }
  .card-body { padding: 16px 16px 20px; }
  main { padding: 40px 0; }
}
