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

/* ============================================================
   CSS 变量 & 重置
   ============================================================ */
:root {
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #999999;
  --gray-600: #555555;
  --gray-800: #222222;
  --accent: #000000;
  --radius: 18px;
  --shadow: 0 4px 32px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 48px rgba(0,0,0,0.16), 0 2px 10px rgba(0,0,0,0.10);
  --font-display: 'Libre Bodoni', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --nav-width: 260px;
  --header-announce-h: 40px;
  --header-inner-h: 64px;
  --header-total: 104px;
  --transition: 0.22s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* ============================================================
   排版基础
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--black);
}

h1 { font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 1.2rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-weight: 600; margin-bottom: 0.6rem; }

p { margin-bottom: 1.1rem; font-size: 1rem; line-height: 1.75; }
a { color: var(--black); text-decoration: underline; text-underline-offset: 3px; transition: opacity var(--transition); }
a:hover { opacity: 0.6; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
time { font-size: 0.85rem; color: var(--gray-600); }

small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

/* ============================================================
   顶部公告条
   ============================================================ */
.header-announce {
  height: var(--header-announce-h);
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 0 1rem;
  text-align: center;
}

/* ============================================================
   Header & 导航（左侧固定竖排 → 顶部横排响应式兼容）
   注：结构抽签要求 header > nav > p > a，这里用 sticky 顶部横排
   并在宽屏用伪"左侧"视觉（左对齐 + 竖向 padding）
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--black);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-inner-h);
  padding: 0 2rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-name:hover { opacity: 0.7; }

.site-nav {
  flex: 1;
  overflow-x: auto;
}

.site-nav p {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.site-nav p a {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.01em;
  border-right: 1px solid var(--gray-200);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-nav p a:last-child { border-right: none; }
.site-nav p a:hover,
.site-nav p a[aria-current="page"] {
  background: var(--black);
  color: var(--white);
}

/* ============================================================
   页面主体布局（左侧 aside + 右侧 main）
   ============================================================ */
.page-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--header-total));
}

/* aside 在内容左侧 */
.site-aside {
  width: var(--nav-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-total);
  max-height: calc(100vh - var(--header-total));
  overflow-y: auto;
  border-right: 1.5px solid var(--gray-200);
  padding: 2.5rem 1.5rem;
}

.aside-inner {}

.aside-inner h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.aside-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.aside-links li { margin-bottom: 0; }

.aside-links a {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--gray-800);
  text-decoration: none;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
}
.aside-links a:hover {
  background: var(--black);
  color: var(--white);
  opacity: 1;
}

.aside-section-links {
  margin-top: 1.8rem;
}

/* ============================================================
   page-main
   ============================================================ */
.page-main {
  flex: 1;
  min-width: 0;
  padding: 3rem 3rem 4rem;
}

.page-article {}
.page-section {
  margin-bottom: 4rem;
}
.page-section:last-child { margin-bottom: 0; }

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--gray-600); font-size: 0.8rem; }
.breadcrumb span[aria-hidden] { color: var(--gray-400); }

/* ============================================================
   首页 Hero
   ============================================================ */
.home-hero {
  position: relative;
  min-height: 70vh;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg-text {
  position: absolute;
  bottom: -0.15em;
  left: -0.05em;
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 18rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 70vh;
}

.hero-media {
  flex: 0 0 45%;
  max-width: 45%;
  min-height: 70vh;
  overflow: hidden;
}

.hero-media img.hero-img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  display: block;
}

.hero-media-empty {
  background: linear-gradient(135deg, #111 0%, #222 100%);
}

.hero-content {
  flex: 1;
  padding: 4rem 4rem 4rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-eyebrow {
  color: rgba(255,255,255,0.55) !important;
  margin-bottom: 1rem;
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 1.2rem;
  line-height: 1.1;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 420px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 2rem;
  background: var(--white);
  color: var(--black);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 9999px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn-primary:hover {
  background: var(--gray-100);
  opacity: 1;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 2rem;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(255,255,255,0.45);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  opacity: 1;
  transform: translateY(-1px);
}

/* ============================================================
   首页分类卡片 & 文章卡片
   ============================================================ */
.home-body {
  /* page-layout 继承，不额外加 */
}

.home-cats-section small,
.home-articles-section small {
  margin-bottom: 0.5rem;
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.cat-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.cat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.cat-card-inner {
  padding: 1.8rem;
}
.cat-eyebrow { margin-bottom: 0.5rem; }
.cat-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.cat-card h3 a { text-decoration: none; color: var(--black); }
.cat-card h3 a:hover { opacity: 0.65; }
.cat-desc { font-size: 0.88rem; color: var(--gray-600); margin-bottom: 1rem; line-height: 1.6; }
.cat-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }
.cat-count { color: var(--gray-600); }
.cat-link { font-weight: 600; color: var(--black); text-decoration: none; }
.cat-link:hover { opacity: 0.6; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.article-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.article-card-inner {
  padding: 1.8rem;
}
.article-eyebrow, .article-eyebrow { margin-bottom: 0.5rem; }
.article-card h3 { font-size: 1.05rem; margin-bottom: 0.55rem; }
.article-card h3 a { text-decoration: none; color: var(--black); }
.article-card h3 a:hover { opacity: 0.65; }
.article-desc { font-size: 0.86rem; color: var(--gray-600); margin-bottom: 0.8rem; line-height: 1.6; }
.article-date { margin-bottom: 0.8rem; }
.article-link { font-size: 0.84rem; font-weight: 600; color: var(--black); text-decoration: none; }
.article-link:hover { opacity: 0.6; }

/* ============================================================
   分类页 Hero
   ============================================================ */
.cat-hero-section {}
.cat-hero-text { margin-top: 1rem; }
.cat-page-eyebrow { margin-bottom: 0.5rem; }
.cat-hero-desc {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 640px;
  margin-top: 1rem;
}

/* 子页列表（article > div×n 抽签结构） */
.children-list {}
.child-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 2rem;
  margin-bottom: 1.2rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.child-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.child-card-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-200);
  line-height: 1;
  flex-shrink: 0;
  min-width: 3rem;
  letter-spacing: -0.04em;
}
.child-card-body { flex: 1; min-width: 0; }
.child-eyebrow { margin-bottom: 0.3rem; }
.child-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.child-card h3 a { text-decoration: none; color: var(--black); }
.child-card h3 a:hover { opacity: 0.65; }
.child-desc { font-size: 0.87rem; color: var(--gray-600); margin-bottom: 0.7rem; line-height: 1.6; }
.child-date { margin-bottom: 0.5rem; }
.child-link { font-size: 0.83rem; font-weight: 600; color: var(--black); text-decoration: none; }
.child-link:hover { opacity: 0.6; }

.no-content { color: var(--gray-600); font-style: italic; }

/* ============================================================
   文章页
   ============================================================ */
.article-meta-row {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.8rem;
}

.article-eyebrow { margin-bottom: 0.4rem; }
.article-h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
}

.article-lead {
  font-size: 1.08rem;
  color: var(--gray-600);
  max-width: 680px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.article-hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0.5rem;
}

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

.article-body-section {}

.article-content {
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.8;
}

.article-content h2 { font-size: clamp(1.3rem, 3vw, 2rem); margin-top: 2.5rem; margin-bottom: 0.8rem; }
.article-content h3 { font-size: clamp(1.1rem, 2.2vw, 1.4rem); margin-top: 2rem; margin-bottom: 0.6rem; }
.article-content p { margin-bottom: 1.2rem; }
.article-content ul, .article-content ol { margin-bottom: 1.2rem; }
.article-content a { font-weight: 500; }

.article-nav-block {}
.related-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
.related-links li {}
.related-links a {
  display: block;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--black);
  transition: background var(--transition), border-color var(--transition);
}
.related-links a:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  opacity: 1;
}

/* ============================================================
   关于页
   ============================================================ */
.about-hero-section {
  position: relative;
  overflow: hidden;
  padding-bottom: 2rem;
}
.about-hero-bg {
  position: absolute;
  right: -0.05em;
  bottom: -0.15em;
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--gray-100);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.about-eyebrow { position: relative; z-index: 1; }
.about-h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
.about-lead {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 560px;
}
.about-content { max-width: 700px; font-size: 1rem; line-height: 1.8; }
.about-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}
.about-nav-card {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 1.4rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--black);
  transition: background var(--transition), border-color var(--transition);
}
.about-nav-card:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  opacity: 1;
}

/* ============================================================
   隐私页
   ============================================================ */
.privacy-eyebrow { margin-bottom: 0.5rem; }
.privacy-h1 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
.privacy-lead {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 600px;
  margin-bottom: 0.8rem;
}
.privacy-date { font-size: 0.85rem; color: var(--gray-400); }
.privacy-content { max-width: 700px; font-size: 1rem; line-height: 1.8; }
.privacy-content h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.7rem; }
.privacy-nav-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.privacy-nav-links a {
  display: block;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--black);
  transition: background var(--transition);
}
.privacy-nav-links a:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  opacity: 1;
}

/* ============================================================
   页脚（三列 dl）
   ============================================================ */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  border-top: 2px solid var(--black);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
}

.footer-col {}

.footer-col dt {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.footer-col dd {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
}

.footer-col dd a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-col dd a:hover {
  color: var(--white);
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  text-align: center;
}

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

/* ============================================================
   Scroll Reveal 动效
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --nav-width: 0px;
  }

  .page-layout {
    flex-direction: column;
  }

  .site-aside {
    position: static;
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1.5px solid var(--gray-200);
    padding: 1.5rem 1.5rem 1rem;
  }

  .aside-inner h3 { font-size: 0.9rem; }

  .page-main {
    padding: 2rem 1.5rem 3rem;
  }

  .header-inner {
    padding: 0 1rem;
    gap: 0.8rem;
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .site-nav p a {
    padding: 0 0.55rem;
    font-size: 0.74rem;
    height: 44px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .hero-layout {
    flex-direction: column;
  }

  .hero-media {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    min-height: 220px;
  }
  .hero-media img.hero-img {
    height: 220px;
  }

  .hero-content {
    padding: 2.5rem 1.5rem;
  }

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

  .hero-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .cats-grid, .articles-grid {
    grid-template-columns: 1fr;
  }

  .child-card {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.2rem 1.2rem;
  }
  .child-card-num {
    font-size: 1.8rem;
  }

  .about-nav-grid {
    flex-direction: column;
  }
  .about-nav-card {
    width: 100%;
    justify-content: center;
  }

  .home-hero {
    min-height: auto;
  }

  .page-main {
    padding: 1.5rem 1rem 2.5rem;
  }
}

/* ============================================================
   导航横向滚动隐藏滚动条
   ============================================================ */
.site-nav {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
