@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
}

body {
  background: #fdfbf7;
  color: #1a1a1a;
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* 纸张质感噪点 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

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

a {
  color: #1a1a1a;
  text-decoration: none;
  transition: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

ul {
  list-style: none;
}

/* ===== 页面壳体布局 ===== */
.page-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* ===== 左侧边栏 ===== */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: #1a1a1a;
  color: #fdfbf7;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  border-right: 2px solid #1a1a1a;
}

.sidebar-brand {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(253,251,247,0.15);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fdfbf7;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-slogan {
  font-size: 0.72rem;
  color: rgba(253,251,247,0.5);
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.sidebar nav {
  flex: 1;
  padding: 16px 0;
}

.sidebar nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar nav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(253,251,247,0.8);
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 44px;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a[aria-current="page"] {
  background: rgba(253,251,247,0.08);
  color: #fdfbf7;
  border-left-color: #fdfbf7;
  text-decoration: none;
}

.nav-icon {
  font-size: 0.75rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  line-height: 1.3;
}

.sidebar-footer-links {
  padding: 16px 20px;
  border-top: 1px solid rgba(253,251,247,0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer-links a {
  color: rgba(253,251,247,0.45);
  font-size: 0.75rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-footer-links a:hover {
  color: #fdfbf7;
  text-decoration: none;
}

/* ===== 主内容区 ===== */
.main-wrap {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== Hero（首页） ===== */
.hero-section {
  width: 100%;
}

.hero-inner {
  position: relative;
  min-height: 70vh;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,0.55);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px 32px;
  max-width: 680px;
}

.hero-h1 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fdfbf7;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.1rem;
  color: rgba(253,251,247,0.85);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== 频道 Header ===== */
.channel-header {
  background: #f5f5f5;
  border-bottom: 2px solid #1a1a1a;
  position: relative;
  overflow: hidden;
}

.channel-hero-wrap {
  position: absolute;
  inset: 0;
}

.channel-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.channel-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245,245,245,0.7);
}

.channel-title-block {
  position: relative;
  z-index: 2;
  padding: 48px 40px 36px;
  max-width: 760px;
}

.channel-title-block h1 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}

.channel-lead {
  font-size: 1rem;
  color: rgba(26,26,26,0.7);
  line-height: 1.6;
}

/* ===== 文章 Header ===== */
.article-header {
  padding: 40px 40px 0;
  max-width: 800px;
}

.article-h1 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}

.article-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta-date {
  font-size: 0.8rem;
  color: rgba(26,26,26,0.5);
  letter-spacing: 0.03em;
}

.article-hero {
  margin-top: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

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

/* ===== About / Privacy Header ===== */
.about-header,
.privacy-header {
  padding: 40px 40px 24px;
  border-bottom: 2px solid #1a1a1a;
  background: #f5f5f5;
}

.about-h1,
.privacy-h1 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
}

.about-lead {
  font-size: 1rem;
  color: rgba(26,26,26,0.65);
  line-height: 1.6;
  max-width: 600px;
}

.privacy-updated {
  font-size: 0.8rem;
  color: rgba(26,26,26,0.5);
  margin-top: 8px;
}

/* ===== 面包屑 ===== */
.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(26,26,26,0.55);
  min-height: 40px;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.breadcrumb-back:hover {
  color: #1a1a1a;
  text-decoration: none;
}

.article-breadcrumb {
  font-size: 0.8rem;
  color: rgba(26,26,26,0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-bottom: 4px;
}

.article-breadcrumb a {
  color: rgba(26,26,26,0.55);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

/* ===== 正文内容区 ===== */
main {
  flex: 1;
}

.content-section {
  padding: 40px 40px 0;
  max-width: 960px;
}

.article-main .content-section,
.about-main .content-section,
.privacy-main .content-section {
  max-width: 800px;
}

/* ===== 装饰线 ===== */
.section-deco {
  margin: 0 0 24px;
  border: none;
}

.deco-line {
  display: block;
  height: 3px;
  width: 48px;
  background: #1a1a1a;
}

/* ===== 正文排版 ===== */
.prose-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #1a1a1a;
}

.prose-body h2 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  margin: 2rem 0 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.prose-body h3 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.4rem;
}

.prose-body p {
  margin-bottom: 1.2rem;
}

.prose-body ul,
.prose-body ol {
  margin: 0 0 1.2rem 1.5rem;
  list-style: disc;
}

.prose-body ol {
  list-style: decimal;
}

.prose-body li {
  margin-bottom: 0.4rem;
}

.prose-body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose-body strong {
  font-weight: 700;
}

.prose-body code {
  font-size: 0.875em;
  background: #f0ede8;
  padding: 2px 5px;
  border-radius: 2px;
  font-family: 'Courier New', monospace;
}

.prose-body pre {
  background: #f0ede8;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

.prose-body blockquote {
  border-left: 4px solid #1a1a1a;
  padding-left: 16px;
  margin: 1.2rem 0;
  color: rgba(26,26,26,0.7);
  font-style: italic;
}

.article-prose {
  font-size: 1.05rem;
}

/* ===== h2 + subtitle 配对 ===== */
h2 + .subtitle,
h2 + p.subtitle,
h2 + p.subhead,
h2 + p.desc,
h2 + p.lead {
  font-size: 0.9rem;
  color: rgba(26,26,26,0.55);
  margin-bottom: 20px;
  margin-top: 4px;
  line-height: 1.5;
}

/* ===== inline aside ===== */
.inline-aside,
.about-channels-aside,
.article-tags-aside,
.privacy-nav-aside,
.contact-aside,
.articles-aside,
.sub-cards-aside,
.related-aside,
.sibling-aside,
.default-aside {
  margin-top: 32px;
  padding: 24px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 40px;
}

.inline-aside h2,
.about-channels-aside h2,
.article-tags-aside h2,
.privacy-nav-aside h2,
.contact-aside h2,
.articles-aside h2,
.sub-cards-aside h2,
.related-aside h2,
.sibling-aside h2,
.default-aside h2 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* ===== 频道卡片（首页 & 栏目页） ===== */
.channel-grid,
.sub-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.channel-card,
.sub-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: rgba(253,251,247,0.9);
  overflow: hidden;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 2px 2px 0 rgba(26,26,26,0.06);
}

.channel-card:hover,
.sub-card:hover {
  border-color: #1a1a1a;
  box-shadow: 3px 3px 0 rgba(26,26,26,0.15);
  text-decoration: none;
}

.card-media {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f0ede8;
  border-bottom: 1px solid #e0e0e0;
  margin: 0;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-body strong {
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  color: #1a1a1a;
}

.card-desc {
  font-size: 0.78rem;
  color: rgba(26,26,26,0.6);
  line-height: 1.5;
}

.card-date {
  font-size: 0.72rem;
  color: rgba(26,26,26,0.45);
  margin-top: auto;
}

/* ===== 近期文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e8e5e0;
  text-decoration: none;
}

.article-link:last-child {
  border-bottom: none;
}

.article-link strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  flex: 1;
}

.article-link .article-meta {
  font-size: 0.75rem;
  color: rgba(26,26,26,0.45);
  flex-shrink: 0;
  white-space: nowrap;
}

.article-link:hover strong {
  text-decoration: underline;
}

/* ===== 相关频道行 ===== */
.related-links-row,
.related-ch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.related-link,
.related-ch-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  font-size: 0.82rem;
  text-decoration: none;
  background: #fdfbf7;
  min-height: 40px;
}

.related-link strong,
.related-ch-link strong {
  font-weight: 600;
}

.related-link:hover,
.related-ch-link:hover {
  background: #1a1a1a;
  color: #fdfbf7;
  text-decoration: none;
}

.related-link:hover strong,
.related-ch-link:hover strong {
  color: #fdfbf7;
}

/* ===== 频道标签（文章页） ===== */
.channel-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #1a1a1a;
  color: #fdfbf7;
  border-radius: 4px;
  font-size: 0.82rem;
  text-decoration: none;
  margin-bottom: 12px;
  min-height: 40px;
}

.channel-badge strong {
  font-weight: 600;
  color: #fdfbf7;
}

.channel-badge:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ===== 兄弟文章链接 ===== */
.sibling-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sibling-link {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid #e8e5e0;
  text-decoration: none;
}

.sibling-link:last-child {
  border-bottom: none;
}

.sibling-link strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.sibling-desc {
  font-size: 0.78rem;
  color: rgba(26,26,26,0.55);
  line-height: 1.5;
  margin-top: 4px;
}

.sibling-link:hover strong {
  text-decoration: underline;
}

/* ===== About 频道链接 ===== */
.about-channel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.about-channel-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  font-size: 0.82rem;
  text-decoration: none;
  min-height: 40px;
  background: #fdfbf7;
}

.about-channel-link strong {
  font-weight: 600;
}

.about-channel-link:hover {
  background: #1a1a1a;
  color: #fdfbf7;
  text-decoration: none;
}

.about-channel-link:hover strong {
  color: #fdfbf7;
}

/* ===== Privacy 链接 ===== */
.priv-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  font-size: 0.82rem;
  text-decoration: none;
  min-height: 40px;
  margin-right: 10px;
  margin-top: 12px;
  background: #fdfbf7;
}

.priv-link strong {
  font-weight: 600;
}

.priv-link:hover {
  background: #1a1a1a;
  color: #fdfbf7;
  text-decoration: none;
}

.priv-link:hover strong {
  color: #fdfbf7;
}

/* ===== 各 section 分区 ===== */
.recent-section,
.sub-pages-section,
.related-section,
.sibling-section,
.about-contact-section {
  padding: 40px 40px 0;
  max-width: 960px;
}

.recent-section h2,
.sub-pages-section h2,
.related-section h2,
.sibling-section h2,
.about-contact-section h2 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 4px;
}

/* ===== 日期输出 ===== */
.pub-date {
  font-size: 0.8rem;
  color: rgba(26,26,26,0.5);
  margin-top: 16px;
  margin-bottom: 0;
}

/* ===== 页脚 ===== */
footer {
  margin-top: auto;
  padding: 40px 40px 32px;
  border-top: 2px solid #1a1a1a;
  background: #fdfbf7;
}

.footer-brand {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  margin-bottom: 12px;
}

footer p {
  font-size: 0.85rem;
  color: rgba(26,26,26,0.6);
  line-height: 1.6;
  margin-bottom: 8px;
}

footer small {
  font-size: 0.75rem;
  color: rgba(26,26,26,0.45);
  display: block;
  margin-top: 16px;
}

footer small a {
  color: rgba(26,26,26,0.55);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

footer small a:hover {
  color: #1a1a1a;
}

/* ===== Scroll Reveal 动画 ===== */
.reveal-item,
.reveal-section {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal-item.is-visible,
.reveal-section.is-visible {
  opacity: 1;
  transform: none;
}

/* stagger */
.channel-grid .reveal-item:nth-child(1),
.sub-card-grid .reveal-item:nth-child(1) { transition-delay: 0s; }
.channel-grid .reveal-item:nth-child(2),
.sub-card-grid .reveal-item:nth-child(2) { transition-delay: 0.06s; }
.channel-grid .reveal-item:nth-child(3),
.sub-card-grid .reveal-item:nth-child(3) { transition-delay: 0.12s; }
.channel-grid .reveal-item:nth-child(4),
.sub-card-grid .reveal-item:nth-child(4) { transition-delay: 0.18s; }
.channel-grid .reveal-item:nth-child(5),
.sub-card-grid .reveal-item:nth-child(5) { transition-delay: 0.24s; }
.channel-grid .reveal-item:nth-child(6),
.sub-card-grid .reveal-item:nth-child(6) { transition-delay: 0.3s; }

.article-list .reveal-item:nth-child(1) { transition-delay: 0s; }
.article-list .reveal-item:nth-child(2) { transition-delay: 0.07s; }
.article-list .reveal-item:nth-child(3) { transition-delay: 0.14s; }
.article-list .reveal-item:nth-child(4) { transition-delay: 0.21s; }
.article-list .reveal-item:nth-child(5) { transition-delay: 0.28s; }
.article-list .reveal-item:nth-child(6) { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-item,
  .reveal-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .sidebar {
    width: 200px;
    min-width: 200px;
  }
  .main-wrap {
    margin-left: 200px;
  }
  .brand-name {
    font-size: 0.75rem;
  }
}

@media (max-width: 680px) {
  .sidebar {
    position: fixed;
    left: -240px;
    width: 240px;
    transition: none;
    z-index: 200;
  }
  .sidebar.is-open {
    left: 0;
  }
  .main-wrap {
    margin-left: 0;
  }

  /* 汉堡按钮 */
  .nav-toggle {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 300;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
  }

  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fdfbf7;
  }

  /* 移动端遮罩 */
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,26,26,0.5);
    z-index: 150;
  }
  .nav-backdrop.is-open {
    display: block;
  }

  .hero-inner {
    min-height: 55vh;
  }
  .hero-h1 {
    font-size: 1.75rem;
  }
  .channel-title-block {
    padding: 32px 20px 24px;
  }
  .channel-title-block h1 {
    font-size: 1.5rem;
  }
  .article-header {
    padding: 24px 20px 0;
  }
  .article-h1 {
    font-size: 1.35rem;
  }
  .content-section,
  .recent-section,
  .sub-pages-section,
  .related-section,
  .sibling-section,
  .about-contact-section {
    padding: 28px 20px 0;
  }
  .about-header,
  .privacy-header {
    padding: 28px 20px 20px;
  }
  .footer-brand {
    font-size: 1.75rem;
  }
  footer {
    padding: 28px 20px 24px;
  }
  .channel-grid,
  .sub-card-grid {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding: 32px 20px;
  }
  .hero-lead {
    font-size: 0.95rem;
  }
}

/* ===== 小工具 ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
