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

/* ============================================================
   变量 & 重置
   ============================================================ */
:root {
  --c-bg: #0D1B2A;
  --c-surface: #122030;
  --c-border: #1e3048;
  --c-text: #E8EEF4;
  --c-muted: #8a9ab4;
  --c-accent: #C0392B;
  --c-accent-light: #e04d3d;
  --c-link: #9cb8d8;
  --c-link-hover: #E8EEF4;
  --nav-w: 220px;
  --max-w: 680px;
  --radius: 4px;
  --font: 'Noto Sans KR', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --transition: 0.18s ease;
}

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

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

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ============================================================
   左侧固定竖排导航
   ============================================================ */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
  z-index: 100;
  overflow-y: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.2rem 1.8rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 1.2rem;
}

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

.nav-brand-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.05em;
  line-height: 1.3;
  word-break: keep-all;
}

.side-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.side-nav nav a {
  display: block;
  padding: 0.7rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--c-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
  word-break: keep-all;
  line-height: 1.4;
}

.side-nav nav a:hover {
  color: var(--c-text);
  border-left-color: var(--c-accent);
  background: rgba(192, 57, 43, 0.06);
}

.side-nav nav a[aria-current="page"] {
  color: var(--c-text);
  border-left-color: var(--c-accent);
  font-weight: 500;
  background: rgba(192, 57, 43, 0.1);
}

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

main {
  flex: 1;
  padding: 4rem 2rem;
}

main > article > div > div {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.breadcrumb a {
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ============================================================
   首页 Hero
   ============================================================ */
.home-hero {
  padding: 3rem 0 4rem;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--c-accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  letter-spacing: 0.04em;
  transition: background var(--transition), transform var(--transition);
  min-height: 44px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.hero-cta:hover {
  background: var(--c-accent-light);
  transform: translateY(-1px);
}

/* ============================================================
   页面标题区（category/about/privacy）
   ============================================================ */
.page-header {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 2.5rem;
}

.page-h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.page-lead {
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.7;
}

/* ============================================================
   通用正文内容区
   ============================================================ */
.section-content,
.entry-body,
.about-body,
.privacy-body {
  margin-bottom: 3rem;
}

.section-content p,
.entry-body p,
.about-body p,
.privacy-body p {
  margin-bottom: 1.2em;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
}

.section-content h2,
.entry-body h2,
.about-body h2,
.privacy-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 2em 0 0.8em;
  letter-spacing: -0.01em;
}

.section-content h3,
.entry-body h3,
.about-body h3,
.privacy-body h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-text);
  margin: 1.5em 0 0.6em;
}

.section-content a,
.entry-body a,
.about-body a,
.privacy-body a {
  color: var(--c-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.section-content a:hover,
.entry-body a:hover,
.about-body a:hover,
.privacy-body a:hover {
  color: var(--c-link-hover);
}

.section-content ul,
.entry-body ul,
.about-body ul,
.privacy-body ul,
.section-content ol,
.entry-body ol,
.about-body ol,
.privacy-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.section-content li,
.entry-body li,
.about-body li,
.privacy-body li {
  margin-bottom: 0.4em;
  line-height: 1.7;
}

/* ============================================================
   区块标题
   ============================================================ */
.section-heading {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--c-border);
}

/* ============================================================
   首页：栏目表格
   ============================================================ */
.home-cats {
  margin-bottom: 4rem;
}

.cat-table {
  width: 100%;
  border-collapse: collapse;
}

.cat-table tr {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition);
}

.cat-table tr:hover {
  background: rgba(232, 238, 244, 0.03);
}

.tbl-title {
  padding: 1rem 1rem 1rem 0;
  width: 35%;
  vertical-align: middle;
}

.tbl-title a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--transition);
}

.tbl-title a:hover {
  color: var(--c-accent-light);
}

.tbl-desc {
  padding: 1rem 0.5rem;
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.5;
  vertical-align: middle;
}

.tbl-count {
  padding: 1rem 0 1rem 0.5rem;
  font-size: 0.75rem;
  color: var(--c-muted);
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

/* ============================================================
   首页：近期收录卡片
   ============================================================ */
.home-entries {
  margin-bottom: 4rem;
}

.entries-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.entry-card {
  position: relative;
  border-top: 1px solid var(--c-border);
  transition: background var(--transition);
}

.entry-card:last-child {
  border-bottom: 1px solid var(--c-border);
}

.entry-card:hover {
  background: rgba(232, 238, 244, 0.03);
}

.card-inner {
  padding: 1.2rem 0;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.card-cat {
  font-size: 0.72rem;
  color: var(--c-accent);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: color var(--transition);
}

.card-cat:hover {
  color: var(--c-accent-light);
}

.card-date {
  font-size: 0.72rem;
  color: var(--c-muted);
}

.card-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--transition);
}

.card-title a:hover {
  color: var(--c-link-hover);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.6;
}

.card-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-accent);
  transition: width 0.3s ease;
}

.entry-card:hover .card-line {
  width: 100%;
}

/* ============================================================
   栏目页：子页列表表格
   ============================================================ */
.children-section {
  margin-bottom: 3rem;
}

.children-table {
  width: 100%;
  border-collapse: collapse;
}

.child-row {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition);
  position: relative;
}

.child-row:hover {
  background: rgba(232, 238, 244, 0.03);
}

.child-thumb {
  padding: 1rem 1rem 1rem 0;
  width: 68px;
  vertical-align: middle;
}

.child-thumb img,
.thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.child-title {
  padding: 1rem 0.5rem;
  vertical-align: middle;
}

.child-title a {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  margin-bottom: 0.3rem;
  transition: color var(--transition);
}

.child-title a:hover {
  color: var(--c-accent-light);
}

.child-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--c-muted);
  line-height: 1.5;
}

.child-date {
  padding: 1rem 0 1rem 0.5rem;
  font-size: 0.75rem;
  color: var(--c-muted);
  white-space: nowrap;
  vertical-align: middle;
  text-align: right;
}

/* ============================================================
   文章页
   ============================================================ */
.entry-header {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 2.5rem;
}

.entry-h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.35;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.entry-lead {
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.7;
  margin-top: 0.5rem;
}

.entry-dates {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.date-label {
  color: var(--c-muted);
}

.date-sep {
  color: var(--c-border);
}

.entry-hero-wrap {
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border-bottom: 3px solid var(--c-accent);
}

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

/* ============================================================
   相关内容（同栏）
   ============================================================ */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

.siblings-table {
  width: 100%;
  border-collapse: collapse;
}

.siblings-table tr {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition);
}

.siblings-table tr:hover {
  background: rgba(232, 238, 244, 0.03);
}

.sib-title {
  padding: 0.8rem 0.5rem 0.8rem 0;
}

.sib-title a {
  font-size: 0.88rem;
  color: var(--c-link);
  text-decoration: none;
  font-weight: 400;
  transition: color var(--transition);
}

.sib-title a:hover {
  color: var(--c-link-hover);
}

.sib-date {
  padding: 0.8rem 0 0.8rem 0.5rem;
  font-size: 0.72rem;
  color: var(--c-muted);
  white-space: nowrap;
  text-align: right;
}

/* ============================================================
   关于页
   ============================================================ */
.about-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

.about-nav-label {
  width: 100%;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--c-muted);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.about-cat-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--c-muted);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.about-cat-link:hover {
  border-color: var(--c-accent);
  color: var(--c-text);
  background: rgba(192, 57, 43, 0.06);
}

/* ============================================================
   隐私政策页
   ============================================================ */
.privacy-date {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-bottom: 0.8rem;
}

.privacy-footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

.privacy-footer-links a {
  font-size: 0.85rem;
  color: var(--c-link);
  text-decoration: none;
  transition: color var(--transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.privacy-footer-links a:hover {
  color: var(--c-link-hover);
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 3rem 2rem 0;
  margin-top: auto;
}

.footer-cols {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col-heading {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--c-muted);
  line-height: 1.6;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--transition);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.footer-col a:hover {
  color: var(--c-text);
}

.footer-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 0;
  border-top: 1px solid var(--c-border);
  font-size: 0.72rem;
  color: var(--c-muted);
}

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

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

  .reveal-item[style*="--stagger:0"] { transition-delay: 0ms; }
  .reveal-item[style*="--stagger:1"] { transition-delay: 80ms; }
  .reveal-item[style*="--stagger:2"] { transition-delay: 160ms; }
  .reveal-item[style*="--stagger:3"] { transition-delay: 240ms; }
  .reveal-item[style*="--stagger:4"] { transition-delay: 320ms; }
  .reveal-item[style*="--stagger:5"] { transition-delay: 400ms; }
}

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

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板 */
@media (max-width: 900px) {
  :root {
    --nav-w: 180px;
  }

  .nav-brand-name {
    font-size: 0.68rem;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-h1 {
    font-size: 1.8rem;
  }
}

/* 移动端 */
@media (max-width: 680px) {
  :root {
    --nav-w: 0px;
  }

  html {
    font-size: 17px;
  }

  body {
    flex-direction: column;
  }

  .side-nav {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    padding: 1rem 0;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
    overflow-y: visible;
  }

  .nav-brand {
    width: 100%;
    padding: 0 1rem 0.8rem;
    margin-bottom: 0;
    border-bottom: none;
  }

  .side-nav nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 0.5rem;
    width: 100%;
  }

  .side-nav nav a {
    padding: 0.5rem 0.8rem;
    font-size: 0.78rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    min-height: 40px;
  }

  .side-nav nav a:hover,
  .side-nav nav a[aria-current="page"] {
    border-left-color: transparent;
    border-bottom-color: var(--c-accent);
    background: rgba(192, 57, 43, 0.06);
  }

  .page-wrap {
    margin-left: 0;
  }

  main {
    padding: 2rem 1.2rem;
  }

  .home-hero {
    padding: 2rem 0 2.5rem;
    text-align: left;
  }

  .hero-desc {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-h1 {
    font-size: 1.6rem;
  }

  .page-h1,
  .entry-h1 {
    font-size: 1.5rem;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .tbl-desc {
    display: none;
  }

  .child-thumb {
    display: none;
  }
}

@media (max-width: 400px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }

  .hero-h1 {
    font-size: 1.4rem;
  }
}
