@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Josefin+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: rgba(31,31,31,0.12);
  --c-accent: #1f1f1f;

  --shadow-sm: 0 1px 4px rgba(31,31,31,0.08), 0 0 0 1px rgba(31,31,31,0.04);
  --shadow-md: 0 4px 16px rgba(31,31,31,0.10), 0 1px 4px rgba(31,31,31,0.06);
  --shadow-lg: 0 8px 32px rgba(31,31,31,0.14), 0 2px 8px rgba(31,31,31,0.08);
  --shadow-xl: 0 20px 60px rgba(31,31,31,0.18), 0 4px 16px rgba(31,31,31,0.10);

  --sidebar-w: 260px;
  --radius: 4px;
  --font-head: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Josefin Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--c-light);
  color: var(--c-dark);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  background: var(--c-light);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ═══════════════════════════════════════
   左侧固定侧边导航
═══════════════════════════════════════ */
.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--c-dark);
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-white);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo { border-radius: var(--radius); flex-shrink: 0; }

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

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

.nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.72);
  border-radius: 20px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
  line-height: 1.35;
}

.nav-link:hover {
  background: rgba(255,255,255,0.10);
  color: var(--c-white);
  transform: translateX(3px);
}

.nav-link.active {
  background: var(--c-white);
  color: var(--c-dark);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.sidebar-search {
  padding: 16px 12px 24px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 9px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  transition: background var(--transition), border-color var(--transition);
  min-height: 40px;
}

.search-input::placeholder { color: rgba(255,255,255,0.40); }

.search-input:focus {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.30);
}

/* ═══════════════════════════════════════
   汉堡按钮（移动端）
═══════════════════════════════════════ */
.nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--c-dark);
  border: none;
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  padding: 0;
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════
   页面主包装
═══════════════════════════════════════ */
.page-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  position: relative;
}

/* ═══════════════════════════════════════
   Hero（首页）
═══════════════════════════════════════ */
.hero-block {
  width: 100%;
  min-height: 45vh;
  background: var(--c-dark);
  color: var(--c-white);
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  z-index: 1;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: clamp(60px, 12vw, 160px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  line-height: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 48px 40px;
  max-width: 600px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.50);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  color: var(--c-white);
}

.hero-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.68);
  margin-bottom: 28px;
  max-width: 440px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: var(--c-white);
  color: var(--c-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
  min-height: 44px;
}

.hero-cta:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hero-img-wrap {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 40%;
  z-index: 1;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.5;
}

/* ═══════════════════════════════════════
   主内容区
═══════════════════════════════════════ */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.content-section {
  padding: 40px 48px;
  position: relative;
}

/* figure 装饰 */
.section-figure,
.article-meta-fig,
.privacy-badge,
.about-badge,
.page-eyebrow {
  margin-bottom: 12px;
}

.section-label,
.article-meta,
.about-badge-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--c-muted);
  text-transform: uppercase;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.article-date {
  font-size: 0.80rem;
  color: var(--c-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

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

/* ═══════════════════════════════════════
   面包屑
═══════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-bottom: 8px;
}

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

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

/* ═══════════════════════════════════════
   标题
═══════════════════════════════════════ */
.page-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.02em;
  color: var(--c-dark);
  margin-bottom: 14px;
}

.subtitle {
  font-size: 0.92rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════
   文章正文
═══════════════════════════════════════ */
.article-body,
.home-body,
.about-body,
.privacy-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-dark);
  max-width: 720px;
}

.article-body h2,
.home-body h2,
.about-body h2,
.privacy-body h2 {
  font-family: var(--font-head);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 2em 0 0.6em;
  color: var(--c-dark);
}

.article-body h3,
.home-body h3,
.about-body h3,
.privacy-body h3 {
  font-family: var(--font-head);
  font-size: 1.06rem;
  font-weight: 600;
  margin: 1.6em 0 0.5em;
  color: var(--c-mid);
}

.article-body p,
.home-body p,
.about-body p,
.privacy-body p {
  margin-bottom: 1em;
}

.article-body ul,
.article-body ol,
.home-body ul,
.about-body ul,
.privacy-body ul {
  margin: 0.8em 0 1em 1.4em;
  list-style: disc;
}

.article-body li,
.home-body li,
.about-body li,
.privacy-body li {
  margin-bottom: 0.4em;
  line-height: 1.65;
}

.article-body a,
.home-body a,
.about-body a,
.privacy-body a {
  color: var(--c-dark);
  border-bottom: 1px solid var(--c-border);
  transition: border-color var(--transition);
}

.article-body a:hover,
.home-body a:hover { border-color: var(--c-dark); }

/* ═══════════════════════════════════════
   文章英雄图
═══════════════════════════════════════ */
.article-hero {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════
   内联 aside（文章页）
═══════════════════════════════════════ */
.article-inline-aside,
.about-nav-aside,
.privacy-aside {
  float: right;
  width: 240px;
  margin: 0 0 24px 32px;
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 2;
}

.article-body-section,
.about-body-section,
.privacy-body-section {
  overflow: hidden;
}

/* ═══════════════════════════════════════
   右侧侧边栏
═══════════════════════════════════════ */
.content-aside {
  width: 280px;
  flex-shrink: 0;
  padding: 40px 24px 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 40px;
  align-self: flex-start;
}

.aside-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 2;
  transition: box-shadow var(--transition), transform var(--transition);
}

.aside-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.aside-title {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-dark);
  margin-bottom: 4px;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.aside-links li a {
  display: block;
  font-size: 0.82rem;
  color: var(--c-mid);
  padding: 6px 8px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.aside-links li a:hover {
  background: var(--c-light);
  color: var(--c-dark);
}

.aside-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 9px 18px;
  background: var(--c-dark);
  color: var(--c-white);
  font-size: 0.80rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 20px;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 40px;
}

.aside-cta:hover {
  background: var(--c-mid);
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════
   首页卡片网格
═══════════════════════════════════════ */
.index-section {
  padding: 40px 48px;
  background: var(--c-light);
}

.section-aside-label {
  margin-bottom: 28px;
}

.section-heading {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-dark);
  margin-bottom: 6px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.index-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}

.index-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px) translateZ(0);
  z-index: 3;
}

.card-num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(31,31,31,0.06);
  line-height: 1;
  position: absolute;
  top: 12px;
  right: 16px;
  user-select: none;
  pointer-events: none;
}

.card-img-wrap {
  margin: -24px -24px 16px;
  height: 160px;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.index-card:hover .card-img { transform: scale(1.04); }

.card-body { position: relative; z-index: 1; }

.card-title {
  font-family: var(--font-head);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.card-title a {
  color: var(--c-dark);
  transition: color var(--transition);
}

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

.card-desc {
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 0.75rem;
  color: rgba(31,31,31,0.38);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   About 导航列表
═══════════════════════════════════════ */
.about-nav-dl {
  margin-top: 12px;
}

.about-nav-dl dt {
  margin-top: 14px;
}

.about-nav-dl dt a {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-dark);
  border-bottom: 1px solid var(--c-border);
  transition: border-color var(--transition), color var(--transition);
  padding-bottom: 2px;
  display: inline;
}

.about-nav-dl dt a:hover {
  color: var(--c-muted);
  border-color: var(--c-dark);
}

.about-nav-dl dd {
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.55;
  margin-top: 4px;
  padding-left: 0;
}

/* ═══════════════════════════════════════
   页脚
═══════════════════════════════════════ */
.site-footer {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  background: var(--c-dark);
  color: var(--c-white);
  display: flex;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.footer-brand-section {
  width: 100%;
  padding: 40px 48px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.footer-brand-text {
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.08);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.footer-links-section {
  flex: 1;
  padding: 28px 48px;
}

.footer-links-section nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-links-section nav ul li a {
  font-size: 0.80rem;
  color: rgba(255,255,255,0.56);
  letter-spacing: 0.04em;
  padding: 6px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}

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

.footer-copy-section {
  width: 100%;
  padding: 16px 48px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.32);
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   文章详情页布局
═══════════════════════════════════════ */
.layout-article .page-wrapper,
.layout-about .page-wrapper,
.layout-privacy .page-wrapper,
.layout-default .page-wrapper {
  align-items: flex-start;
  padding-right: 0;
}

.layout-article .main-content,
.layout-about .main-content,
.layout-privacy .main-content,
.layout-default .main-content {
  flex: 1;
  min-width: 0;
}

.layout-article .content-aside,
.layout-about .content-aside,
.layout-privacy .content-aside,
.layout-default .content-aside {
  margin-top: 40px;
}

/* 首页布局 */
.layout-home .page-wrapper {
  flex-direction: column;
}

.layout-home .main-content {
  width: 100%;
}

/* ═══════════════════════════════════════
   Scroll Reveal 动效
═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .index-card,
  .aside-card,
  .hero-cta,
  .nav-link,
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ═══════════════════════════════════════
   层叠 Z-index 提升
═══════════════════════════════════════ */
.index-card { z-index: 1; }
.index-card:hover { z-index: 3; }
.content-aside { z-index: 2; }
.site-sidebar { z-index: 100; }
.site-footer { z-index: 10; }
.nav-toggle { z-index: 200; }

/* ═══════════════════════════════════════
   响应式 — 平板
═══════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --sidebar-w: 220px; }

  .content-section { padding: 32px 32px; }
  .index-section { padding: 32px 32px; }
  .footer-links-section { padding: 24px 32px; }
  .footer-brand-section { padding: 32px 32px 20px; }
  .footer-copy-section { padding: 14px 32px 24px; }
  .hero-content { padding: 36px 32px 32px; }

  .content-aside { width: 240px; }

  .article-inline-aside,
  .about-nav-aside,
  .privacy-aside {
    width: 200px;
  }
}

/* ═══════════════════════════════════════
   响应式 — 移动端
═══════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  body { display: block; }

  .site-sidebar {
    transform: translateX(-100%);
    will-change: transform;
  }

  .site-sidebar.open {
    transform: translateX(0);
  }

  .nav-toggle { display: flex; }

  .page-wrapper {
    margin-left: 0;
    flex-direction: column;
    padding-top: 60px;
  }

  .site-footer {
    margin-left: 0;
    width: 100%;
  }

  .hero-block {
    min-height: 45vh;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    padding: 70px 20px 28px;
    max-width: 100%;
  }

  .hero-img-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    opacity: 0.25;
  }

  .content-section { padding: 24px 20px; }
  .index-section { padding: 24px 20px; }

  .cards-grid { grid-template-columns: 1fr; gap: 14px; }

  .content-aside {
    width: 100%;
    position: static;
    padding: 0 20px 24px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }

  .aside-card { flex: 1; min-width: 240px; }

  .article-inline-aside,
  .about-nav-aside,
  .privacy-aside {
    float: none;
    width: 100%;
    margin: 0 0 24px 0;
  }

  .footer-brand-section { padding: 28px 20px 16px; }
  .footer-links-section { padding: 20px 20px; width: 100%; }
  .footer-copy-section { padding: 12px 20px 20px; }

  .footer-links-section nav ul {
    flex-direction: column;
    gap: 2px;
  }

  .footer-links-section nav ul li a {
    min-height: 44px;
    padding: 8px 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }

  .sidebar-overlay.visible { display: block; }
}

@media (max-width: 480px) {
  .page-h1 { font-size: 1.4rem; }
  .hero-h1 { font-size: 1.5rem; }
  .hero-cta { padding: 11px 22px; font-size: 0.82rem; }
  .section-heading { font-size: 1.2rem; }
}
