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

/* ============================================================
   CSS 自定义属性
============================================================ */
:root {
  --black: #000000;
  --white: #ffffff;
  --accent: #000000;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #999999;
  --gray-700: #333333;
  --border: 1px solid var(--black);
  --border-4: 4px solid var(--black);
  --radius: 4px;
  --font-heading: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --font-body: 'Work Sans', 'Outfit', system-ui, sans-serif;
  --bottom-bar-h: 56px;
  --header-h: 60px;
  --max-w: 1200px;
  --prose-w: 740px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
  padding-bottom: var(--bottom-bar-h);
  overflow-x: hidden;
}

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

a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   排版 — 超大标题
============================================================ */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--black);
  margin-bottom: 1.5rem;
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  margin-top: 2.5rem;
}

h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

h3 a {
  text-decoration: none;
  color: var(--black);
}

h3 a:hover {
  text-decoration: underline;
}

p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.75;
}

/* 眉题 / small */
small.eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

/* ============================================================
   网格底纹 — 负空间装饰
============================================================ */
.grid-bg {
  position: relative;
}

.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   站点骨架
============================================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   顶部标题栏
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--black);
  color: var(--white);
  border-bottom: 2px solid var(--black);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--header-h);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo:hover {
  opacity: 0.8;
}

/* 汉堡按钮 */
.hamburger {
  background: none;
  border: 2px solid var(--white);
  border-radius: 2px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   全屏遮罩菜单
============================================================ */
.fullscreen-nav {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fullscreen-nav.is-open {
  opacity: 1;
  pointer-events: all;
}

.menu-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 2rem;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
  padding: 0.4rem 1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  width: 100%;
  text-align: center;
  justify-content: center;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--gray-200);
}

/* ============================================================
   主内容区 + 侧边栏布局
============================================================ */
main {
  flex: 1;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* 内容 + 侧边栏双栏 */
.site-aside {
  order: 2;
}

@media (min-width: 1024px) {
  main .wrap,
  .site-wrapper > main {
    display: block;
  }

  .site-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas:
      "header header"
      "main aside"
      "footer footer"
      "bottomnav bottomnav";
    align-items: start;
  }

  .site-header {
    grid-area: header;
  }

  main {
    grid-area: main;
  }

  .site-aside {
    grid-area: aside;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    padding: 3rem 1.5rem 3rem 0;
    align-self: start;
  }

  .site-footer {
    grid-area: footer;
  }

  .bottom-nav-bar {
    grid-area: bottomnav;
  }
}

/* ============================================================
   侧边栏内容
============================================================ */
.aside-inner {
  border: var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--white);
}

.aside-inner > * + * {
  margin-top: 0.5rem;
}

.aside-inner ul {
  margin-bottom: 1.5rem;
}

.aside-inner ul li a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
  transition: padding-left 0.15s;
}

.aside-inner ul li a:hover {
  padding-left: 0.5rem;
}

/* ============================================================
   Hero — 首页
============================================================ */
.hero-section {
  padding: 5rem 0 4rem;
  border-bottom: var(--border-4);
  position: relative;
  overflow: hidden;
  background: var(--white);
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-article {
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  min-height: 55vh;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    min-height: 65vh;
    gap: 4rem;
  }
}

.hero-media {
  order: 2;
}

@media (min-width: 768px) {
  .hero-media {
    order: 1;
  }

  .hero-text {
    order: 2;
  }
}

.hero-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: var(--border-4);
  border-radius: var(--radius);
}

.hero-text {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 8vw, 7rem);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
  color: var(--gray-700);
}

/* ============================================================
   按钮
============================================================ */
.btn-primary {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  border: 2px solid var(--black);
  transition: background 0.15s, color 0.15s;
  min-height: 48px;
}

.btn-primary:hover {
  background: var(--white);
  color: var(--black);
}

/* ============================================================
   卡片
============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-grid.two-col {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .card-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--black);
}

.card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  margin-top: 0.25rem;
  font-size: 1.05rem;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--gray-700);
  flex: 1;
  margin-bottom: 1rem;
}

.card-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 2px solid var(--black);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: opacity 0.15s;
}

.card-link:hover {
  opacity: 0.6;
}

/* ============================================================
   相关文章网格
============================================================ */
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   文章列表
============================================================ */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0 2.5rem;
}

.article-list li {
  border-top: 1px solid var(--gray-200);
}

.article-list li:last-child {
  border-bottom: 1px solid var(--gray-200);
}

.article-list li a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1rem;
  text-decoration: none;
  transition: padding-left 0.15s;
}

.article-list li a:hover {
  padding-left: 0.75rem;
}

/* ============================================================
   频道表格
============================================================ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.channel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.channel-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
  transition: background 0.12s;
}

.channel-table tbody tr:hover {
  background: var(--gray-100);
}

.channel-table td {
  padding: 0.9rem 0.75rem;
  vertical-align: top;
  line-height: 1.5;
}

.td-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--gray-400);
  width: 3rem;
  white-space: nowrap;
}

.td-title {
  font-weight: 600;
  min-width: 120px;
}

.td-title a {
  text-decoration: none;
  color: var(--black);
}

.td-title a:hover {
  text-decoration: underline;
}

.td-desc {
  color: var(--gray-700);
  font-size: 0.88rem;
}

.td-date {
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--gray-400);
  text-align: right;
}

/* 频道卡片备用（移动端优先，桌面显示表格） */
.channel-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1rem;
}

@media (min-width: 600px) {
  .channel-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .channel-table {
    display: table;
  }
  .channel-cards {
    display: none;
  }
}

@media (max-width: 899px) {
  .channel-table {
    display: none;
  }
  .channel-cards {
    display: grid;
  }
}

/* ============================================================
   页面通用标题区
============================================================ */
.page-header-section,
.about-hero-section,
.privacy-header-section,
.article-header-section {
  padding: 4rem 0 2.5rem;
  border-bottom: var(--border-4);
  background: var(--white);
  background-image:
    linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

.page-header-article,
.about-hero-article,
.privacy-header-article,
.article-header-article {
  position: relative;
  z-index: 1;
}

.page-lead {
  font-size: 1.1rem;
  color: var(--gray-700);
  max-width: 640px;
  line-height: 1.75;
  margin-top: 0.75rem;
}

/* ============================================================
   面包屑
============================================================ */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.breadcrumb a {
  color: var(--gray-400);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--black);
}

/* ============================================================
   正文 prose
============================================================ */
.content-section,
.article-body-section,
.about-content-section,
.privacy-body-section {
  padding: 3rem 0;
}

.prose {
  max-width: var(--prose-w);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--black);
}

.prose h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--black);
}

.prose h3 {
  margin-top: 2rem;
}

.prose p {
  margin-bottom: 1.3rem;
}

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

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose blockquote {
  border-left: 4px solid var(--black);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--gray-100);
  font-style: italic;
}

.prose code {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: var(--black);
  color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: none;
  border: none;
  color: inherit;
  font-size: 0.9em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.prose table th,
.prose table td {
  padding: 0.7rem 1rem;
  border: 1px solid var(--gray-200);
  text-align: left;
}

.prose table th {
  background: var(--black);
  color: var(--white);
  font-weight: 700;
}

/* ============================================================
   文章元数据
============================================================ */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--gray-400);
}

.pub-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--gray-400);
  margin: 0.5rem 0 1rem;
}

/* ============================================================
   文章英雄图
============================================================ */
.article-hero {
  margin: 2rem 0;
}

.article-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: var(--border-4);
  border-radius: var(--radius);
}

/* ============================================================
   章节间距
============================================================ */
.channels-section,
.latest-section,
.children-section,
.about-nav-section,
.privacy-links-section,
.article-footer-section {
  padding: 3rem 0;
  border-top: var(--border);
}

/* ============================================================
   页脚
============================================================ */
.site-footer {
  background: var(--black);
  color: var(--white);
  margin-top: auto;
}

.footer-cta {
  padding: 4rem 1.5rem;
  text-align: center;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-cta h2 {
  color: var(--white);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
}

.footer-cta .btn-primary {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.footer-cta .btn-primary:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 1.5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

@media (min-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand strong {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.footer-brand address {
  font-style: normal;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-brand address p {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links ul li a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  display: block;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.footer-links ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 1.2rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ============================================================
   底部固定导航条
============================================================ */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-h);
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 150;
  border-top: 2px solid rgba(255,255,255,0.2);
}

.bnb-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s;
  min-height: 44px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.bnb-item:last-child {
  border-right: none;
}

.bnb-item:hover {
  color: var(--white);
}

/* ============================================================
   Scroll Reveal 动效
============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .card,
  .article-list li,
  .channel-table tbody tr {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .card.visible,
  .article-list li.visible,
  .channel-table tbody tr.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .article-list li,
  .channel-table tbody tr {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   响应式断点补充
============================================================ */
@media (max-width: 1023px) {
  .site-aside {
    padding: 0;
    margin: 0;
    border-top: var(--border);
  }

  .aside-inner {
    border: none;
    border-top: none;
    padding: 2rem 1.5rem;
    background: var(--gray-100);
  }
}

@media (max-width: 599px) {
  h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  h2 {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  .hero-section {
    padding: 3rem 0 2.5rem;
  }

  .footer-cta {
    padding: 3rem 1.5rem;
  }

  .footer-main {
    padding: 2rem 1.5rem 1.5rem;
  }
}

/* ============================================================
   辅助
============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
