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

/* =============================================
   CSS 自定义属性
   ============================================= */
:root {
  --c-bg: #1a1a2e;
  --c-accent: #e94560;
  --c-text: #f5f5f0;
  --c-bg2: #16213e;
  --c-bg3: #0f3460;
  --c-glass: rgba(245,245,240,0.07);
  --c-glass-border: rgba(245,245,240,0.13);
  --c-muted: rgba(245,245,240,0.55);
  --c-accent2: #c73652;
  --nav-width: 220px;
  --topbar-h: 36px;
  --font-serif: 'EB Garamond', 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Lato', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius: 10px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 20px);
  font-size: 16px;
  background: var(--c-bg);
  color: var(--c-text);
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--c-bg);
}

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

/* =============================================
   视差层 / 背景装饰
   ============================================= */
.page-home::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(233,69,96,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(15,52,96,0.5) 0%, transparent 70%),
    linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%);
  z-index: 0;
  pointer-events: none;
}

/* =============================================
   布局骨架
   ============================================= */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main-stage {
  flex: 1;
  margin-left: var(--nav-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* =============================================
   公告条
   ============================================= */
.topbar-announce {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--topbar-h);
  background: linear-gradient(90deg, var(--c-accent) 0%, #b02d48 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.announce-text {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

/* =============================================
   左侧导航 details/summary/menu
   ============================================= */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  z-index: 300;
  background: rgba(22,33,62,0.96);
  border-right: 1px solid var(--c-glass-border);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.side-nav[open] {
  display: flex;
}

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px 16px;
  cursor: pointer;
  list-style: none;
  min-height: 80px;
  border-bottom: 1px solid var(--c-glass-border);
}

.nav-summary::-webkit-details-marker { display: none; }
.nav-summary::marker { display: none; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.logo-img { height: 36px; width: auto; }

.nav-toggle-icon {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-menu::-webkit-scrollbar { width: 3px; }
.nav-menu::-webkit-scrollbar-track { background: transparent; }
.nav-menu::-webkit-scrollbar-thumb { background: var(--c-glass-border); border-radius: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--c-muted);
  letter-spacing: 0.04em;
  transition: var(--transition);
  border-left: 3px solid transparent;
  min-height: 44px;
  position: relative;
}

.nav-link::before {
  content: '·';
  margin-right: 10px;
  color: var(--c-accent);
  font-size: 18px;
  line-height: 1;
}

.nav-link:hover,
.nav-link.active {
  color: var(--c-text);
  border-left-color: var(--c-accent);
  background: var(--c-glass);
  padding-left: 24px;
}

/* =============================================
   主内容 main > article.wrap > section > div
   ============================================= */
main {
  flex: 1;
  position: relative;
}

.wrap {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 80px;
  position: relative;
}

.content-section {
  flex: 1;
  min-width: 0;
}

.content-article {
  width: 100%;
}

/* =============================================
   Hero 区块
   ============================================= */
.hero-block {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 80px 32px 60px;
}

.hero-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: clamp(100px, 22vw, 280px);
  font-weight: 700;
  color: rgba(233,69,96,0.06);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  animation: heroFadeIn 1.2s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.hero-h1 em {
  font-style: normal;
  color: var(--c-accent);
}

.hero-desc {
  font-family: var(--font-sans);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-block;
  padding: 14px 40px;
  background: var(--c-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition: var(--transition);
  min-height: 48px;
  line-height: 20px;
}

.hero-cta:hover {
  background: var(--c-accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(233,69,96,0.35);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--c-muted);
  letter-spacing: 0.15em;
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--c-accent), transparent);
  margin: 8px auto 0;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* =============================================
   正文内容区（page.content 的 section 们）
   ============================================= */
.page-content {
  position: relative;
}

/* 对 page.content 里的 section 做样式 */
.page-content section {
  padding: 80px 0;
  border-bottom: 1px solid var(--c-glass-border);
  scroll-margin-top: calc(var(--topbar-h) + 20px);
  position: relative;
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.page-content section:last-child {
  border-bottom: none;
}

/* 正文排版 */
.page-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.page-content h2 + p,
.page-content .subtitle {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--c-accent);
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 28px;
  text-transform: none;
}

.page-content h3 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  color: var(--c-text);
  margin: 32px 0 14px;
  line-height: 1.3;
}

.page-content p {
  font-size: 16px;
  line-height: 1.85;
  color: rgba(245,245,240,0.85);
  margin-bottom: 18px;
  max-width: 72ch;
}

.page-content ul, .page-content ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.page-content li {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(245,245,240,0.82);
  margin-bottom: 8px;
}

.page-content a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(233,69,96,0.3);
  transition: var(--transition);
}

.page-content a:hover {
  border-bottom-color: var(--c-accent);
}

/* 玻璃拟态卡片 */
.page-content .card,
.page-content [class*="card"] {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 20px;
  transition: var(--transition);
}

.page-content .card:hover,
.page-content [class*="card"]:hover {
  background: rgba(245,245,240,0.10);
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

/* =============================================
   aside 侧边栏
   ============================================= */
.content-aside {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  max-height: calc(100vh - var(--topbar-h) - 48px);
  overflow-y: auto;
  padding: 0;
}

.content-aside::-webkit-scrollbar { width: 0; }

.aside-inner {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.aside-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}

.aside-sub {
  font-size: 12px;
  color: var(--c-accent);
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 18px;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.aside-link {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--c-muted);
  border-radius: 6px;
  transition: var(--transition);
  border: 1px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  color: var(--c-text);
  background: rgba(233,69,96,0.12);
  border-color: rgba(233,69,96,0.3);
}

.aside-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--c-muted);
  border-top: 1px solid var(--c-glass-border);
  padding-top: 14px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  flex-shrink: 0;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 4px #22c55e; }
  50%       { box-shadow: 0 0 14px #22c55e; }
}

/* =============================================
   页脚 footer（仅 p + small）
   ============================================= */
.site-footer {
  background: rgba(10,10,20,0.85);
  border-top: 1px solid var(--c-glass-border);
  padding: 48px 32px 36px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 700;
  color: rgba(245,245,240,0.08);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 20px;
  user-select: none;
}

.footer-copy {
  display: block;
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.7;
  letter-spacing: 0.04em;
}

/* =============================================
   Stagger List 动效（正文 li）
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .page-content section.is-visible li {
    animation: staggerIn 0.5s ease both;
  }

  .page-content section.is-visible li:nth-child(1) { animation-delay: 0.05s; }
  .page-content section.is-visible li:nth-child(2) { animation-delay: 0.10s; }
  .page-content section.is-visible li:nth-child(3) { animation-delay: 0.15s; }
  .page-content section.is-visible li:nth-child(4) { animation-delay: 0.20s; }
  .page-content section.is-visible li:nth-child(5) { animation-delay: 0.25s; }
  .page-content section.is-visible li:nth-child(6) { animation-delay: 0.30s; }
  .page-content section.is-visible li:nth-child(7) { animation-delay: 0.35s; }
  .page-content section.is-visible li:nth-child(n+8) { animation-delay: 0.40s; }
}

@keyframes staggerIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* parallax hero bg text */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg-text {
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-content section {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-inner { animation: none; }
  .hero-scroll-hint { animation: none; }
  .badge-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* =============================================
   移动端响应式
   ============================================= */
@media (max-width: 900px) {
  .wrap {
    flex-direction: column;
    padding: 0 20px 60px;
  }

  .content-aside {
    width: 100%;
    position: static;
    max-height: none;
  }

  .aside-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
  }

  .side-nav {
    width: 260px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 400;
  }

  .side-nav.nav-open {
    transform: translateX(0);
  }

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

  .nav-toggle-icon {
    display: flex;
  }

  .hero-block {
    padding: 60px 20px 50px;
    min-height: 100svh;
  }

  .hero-h1 {
    font-size: clamp(28px, 8vw, 48px);
  }

  .hero-cta {
    min-height: 48px;
    padding: 14px 32px;
  }

  .page-content section {
    padding: 56px 0;
  }

  .announce-text {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px 48px; }

  .aside-links {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 32px 16px 24px;
  }

  .footer-brand {
    font-size: 36px;
  }
}

/* =============================================
   nav overlay (mobile)
   ============================================= */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 380;
  backdrop-filter: blur(2px);
}

.nav-overlay.active {
  display: block;
}

/* =============================================
   额外装饰：分节线
   ============================================= */
.page-content section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--c-accent);
  border-radius: 2px;
}
