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

/* ============================================================
   CSS 变量 & 重置
   ============================================================ */
:root {
  --c-white:   #ffffff;
  --c-light:   #f5f5f5;
  --c-dark:    #1f1f1f;
  --c-mid:     #3a3a3a;
  --c-muted:   #6b6b6b;
  --c-border:  #d4d4d4;
  --c-accent:  #c8a2c8;
  --c-accent2: #8b6a8b;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 28px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.10);
  --shadow-xl: 0 20px 48px rgba(0,0,0,.20), 0 8px 20px rgba(0,0,0,.12);

  --nav-w: 256px;
  --radius: 0px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);

  --font-body: 'Be Vietnam Pro', 'Noto Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ============================================================
   布局骨架：左侧 sidenav + 右侧 main-area
   ============================================================ */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   左侧竖排导航
   ============================================================ */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-dark);
  color: var(--c-light);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid #333;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}

.sidenav__brand {
  padding: 28px 20px 20px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

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

.sidenav__logomark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidenav__brand-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.sidenav__nav {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  flex: 1;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 400;
  color: #c0c0c0;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav__link:hover {
  background: rgba(255,255,255,.07);
  color: var(--c-white);
  text-decoration: none;
  border-left-color: var(--c-accent);
}

.nav__link--active {
  background: rgba(200,162,200,.12);
  color: var(--c-white);
  border-left-color: var(--c-accent);
  font-weight: 600;
}

.sidenav__search {
  padding: 16px 20px;
  border-top: 1px solid #333;
  flex-shrink: 0;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid #444;
  border-radius: 0;
  overflow: hidden;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--c-white);
  font: inherit;
  font-size: 0.8rem;
  padding: 9px 12px;
  outline: none;
  min-height: 40px;
}

.search-input::placeholder { color: #888; }

.search-btn {
  background: none;
  border: none;
  color: #aaa;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  transition: color var(--transition);
}

.search-btn:hover { color: var(--c-accent); }

/* Mobile nav toggle */
.sidenav__toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--c-dark);
  border: 1px solid #444;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-white);
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   主内容区域
   ============================================================ */
.main-area {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Hero 区域（全宽 + 斜切色带）
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--c-dark);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(31,31,31,.75) 0%, rgba(31,31,31,.40) 60%, rgba(139,106,139,.30) 100%);
  z-index: 2;
}

/* 斜切色带装饰 */
.hero__slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--c-white);
  z-index: 3;
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0 100%);
}

.hero__content {
  position: relative;
  z-index: 4;
  padding: 48px 56px 100px;
  max-width: 760px;
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}

.hero__crumb {
  color: var(--c-accent);
  text-decoration: none;
}

.hero__crumb:hover {
  text-decoration: underline;
}

.hero__h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,.80);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 28px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-accent);
  color: var(--c-white);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  letter-spacing: 0.04em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  min-height: 44px;
}

.hero__cta:hover {
  background: var(--c-accent2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Privacy banner (no hero image variant) */
.privacy-banner {
  background: var(--c-dark);
  padding: 60px 56px 40px;
  position: relative;
  overflow: hidden;
}

.privacy-banner::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--c-white);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0 100%);
}

.privacy-banner__inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.privacy-banner__h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
  margin: 12px 0 16px;
}

/* ============================================================
   页面主内容
   ============================================================ */
.page-main {
  flex: 1;
  padding: 48px 56px;
  max-width: 1100px;
  width: 100%;
}

.page-main--article {
  max-width: 860px;
}

.page-main--privacy {
  max-width: 860px;
}

.content-article {
  position: relative;
  z-index: 2;
}

.content-wrap {
  position: relative;
}

.content-wrap--narrow {
  max-width: 720px;
}

/* ============================================================
   Prose 正文
   ============================================================ */
.prose-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-dark);
}

.prose-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.4em 0 0.8em;
  color: var(--c-dark);
  letter-spacing: -0.01em;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-light);
}

.prose-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
  color: var(--c-mid);
}

.prose-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.4em 0 0.5em;
}

.prose-content p {
  margin-bottom: 1.2em;
}

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

.prose-content li {
  margin-bottom: 0.4em;
}

.prose-content a {
  color: var(--c-accent2);
  text-decoration: underline;
  text-decoration-color: rgba(139,106,139,.4);
  transition: color var(--transition);
}

.prose-content a:hover {
  color: var(--c-dark);
}

.prose-content blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 12px 20px;
  background: var(--c-light);
  margin: 1.5em 0;
  font-style: italic;
  color: var(--c-mid);
}

.prose-content code {
  background: var(--c-light);
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.875em;
  border: 1px solid var(--c-border);
}

.prose-content pre {
  background: var(--c-dark);
  color: var(--c-light);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.875em;
  line-height: 1.6;
}

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

.prose-content th,
.prose-content td {
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  text-align: left;
}

.prose-content th {
  background: var(--c-light);
  font-weight: 600;
}

.prose-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  box-shadow: var(--shadow-md);
}

/* ============================================================
   日期标签
   ============================================================ */
.article-date {
  display: inline-block;
  font-size: 0.8rem;
  color: rgba(255,255,255,.65);
  letter-spacing: 0.04em;
}

.article-date--mod {
  margin-left: 12px;
}

/* ============================================================
   区段公共样式
   ============================================================ */
.layer-section {
  padding: 48px 0 32px;
  position: relative;
  z-index: 2;
}

.section-header {
  margin-bottom: 28px;
}

.eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent2);
  margin-bottom: 6px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: -0.01em;
}

/* ============================================================
   表格型子页列表（结构抽签：table > tbody > tr > td）
   ============================================================ */
.table-layer {
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
}

.topic-table,
.child-table {
  width: 100%;
  border-collapse: collapse;
}

.topic-table td,
.child-table th,
.child-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
  font-size: 0.9rem;
  line-height: 1.5;
}

.child-table th {
  background: var(--c-dark);
  color: var(--c-light);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topic-table tr:nth-child(even),
.child-table tbody tr:nth-child(even) {
  background: var(--c-light);
}

.topic-table tr:hover,
.child-table tbody tr:hover {
  background: rgba(200,162,200,.08);
}

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

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

.topic-table__title,
.child-table__title {
  font-weight: 500;
  min-width: 160px;
}

.topic-table__desc,
.child-table__desc {
  color: var(--c-muted);
}

.topic-table__action {
  text-align: right;
  width: 80px;
}

.child-table__num {
  width: 52px;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--c-muted);
  font-weight: 600;
}

.child-table__date {
  width: 130px;
  font-size: 0.8rem;
  color: var(--c-muted);
  white-space: nowrap;
}

.topic-link,
.child-link {
  color: var(--c-dark);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.topic-link:hover,
.child-link:hover {
  color: var(--c-accent2);
  text-decoration: underline;
}

.btn-goto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-dark);
  color: var(--c-white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  letter-spacing: 0.06em;
  transition: background var(--transition), box-shadow var(--transition);
  text-decoration: none;
  min-height: 34px;
  white-space: nowrap;
}

.btn-goto:hover {
  background: var(--c-accent2);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* ============================================================
   首页文章卡片网格（layer-card: 描边无阴影，圆角 0）
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  position: relative;
  z-index: 2;
}

.article-card {
  background: var(--c-white);
  border: none;
  position: relative;
  z-index: 2;
  transition: box-shadow var(--transition), transform var(--transition);
}

.article-card:hover {
  z-index: 3;
  box-shadow: var(--shadow-md);
  transform: translate(-1px, -2px);
}

.article-card__inner {
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card__body {
  flex: 1;
}

.article-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.article-card__title a {
  color: var(--c-dark);
  text-decoration: none;
  transition: color var(--transition);
}

.article-card__title a:hover {
  color: var(--c-accent2);
}

.article-card__desc {
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.card__date {
  display: block;
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-top: 8px;
}

/* ============================================================
   相关文章 aside
   ============================================================ */
.related-aside {
  margin-top: 48px;
  padding: 32px;
  background: var(--c-light);
  border: 1px solid var(--c-border);
  position: relative;
  z-index: 2;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 20px;
  margin-top: 8px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-item {
  display: block;
  font-size: 0.9rem;
  color: var(--c-mid);
  text-decoration: none;
  padding: 10px 14px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.related-item:hover {
  background: var(--c-dark);
  color: var(--c-white);
  border-color: var(--c-dark);
  text-decoration: none;
}

/* ============================================================
   Privacy 页链接行
   ============================================================ */
.privacy-links {
  padding: 32px 0;
}

.privacy-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.privacy-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--c-light);
  border: 1px solid var(--c-border);
  color: var(--c-dark);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  min-height: 44px;
}

.privacy-nav-link:hover {
  background: var(--c-dark);
  color: var(--c-white);
  border-color: var(--c-dark);
  text-decoration: none;
}

/* ============================================================
   页脚（三栏 dl 并排）
   ============================================================ */
.site-footer {
  background: var(--c-dark);
  color: var(--c-light);
  padding: 52px 56px 0;
  margin-top: auto;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.footer-dl {
  display: block;
}

.footer-dl__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 16px;
  display: block;
}

.footer-dl dd {
  margin: 0 0 10px;
}

.footer-dl dd a {
  font-size: 0.875rem;
  color: #a0a0a0;
  text-decoration: none;
  transition: color var(--transition);
  display: inline-block;
  min-height: 28px;
  line-height: 1.6;
}

.footer-dl dd a:hover {
  color: var(--c-white);
  text-decoration: underline;
}

.footer-copy {
  padding: 20px 0;
  text-align: center;
}

.footer-copy p {
  font-size: 0.8rem;
  color: #666;
}

/* ============================================================
   Reveal / Stagger 动效（prefers-reduced-motion 保护）
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal-item {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease calc(var(--reveal-i, 0) * 0.07s),
                transform 0.45s ease calc(var(--reveal-i, 0) * 0.07s);
  }

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

  .article-card {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.40s ease calc(var(--reveal-i, 0) * 0.06s),
                transform 0.40s ease calc(var(--reveal-i, 0) * 0.06s),
                box-shadow 0.22s ease,
                background 0.22s ease;
  }

  .article-card.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .layer-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .layer-section.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ============================================================
   层叠深度装饰（z-index elevation 表现）
   ============================================================ */
.layer-card {
  position: relative;
  z-index: 2;
}

/* ============================================================
   响应式：平板 ≤1024px
   ============================================================ */
@media (max-width: 1024px) {
  :root { --nav-w: 220px; }

  .hero__content {
    padding: 36px 36px 90px;
  }

  .page-main {
    padding: 36px 36px;
  }

  .site-footer {
    padding: 40px 36px 0;
  }

  .footer-cols {
    gap: 28px;
  }
}

/* ============================================================
   响应式：移动端 ≤768px
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-w: 260px; }

  .sidenav {
    transform: translateX(-100%);
    width: var(--nav-w);
  }

  .sidenav.is-open {
    transform: translateX(0);
  }

  .sidenav__toggle {
    display: flex;
  }

  .main-area {
    margin-left: 0;
  }

  .hero {
    height: auto;
    min-height: 55vh;
    padding-top: 60px;
  }

  .hero__content {
    padding: 24px 20px 80px;
  }

  .hero__h1 {
    font-size: 1.5rem;
  }

  .hero__sub {
    font-size: 0.9rem;
  }

  .page-main {
    padding: 28px 20px;
  }

  .page-main--article,
  .page-main--privacy {
    max-width: 100%;
  }

  .privacy-banner {
    padding: 48px 20px 30px;
  }

  .site-footer {
    padding: 36px 20px 0;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .child-table__desc {
    display: none;
  }

  .topic-table__desc {
    display: none;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .related-aside {
    padding: 20px;
  }
}

/* ============================================================
   响应式：小屏 ≤480px
   ============================================================ */
@media (max-width: 480px) {
  .hero__h1 { font-size: 1.3rem; }

  .child-table__date {
    display: none;
  }

  .footer-copy p {
    font-size: 0.75rem;
  }
}

/* ============================================================
   Nav overlay backdrop（移动端）
   ============================================================ */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.nav-backdrop.is-active {
  display: block;
}
