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

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

:root {
  --color-primary: #56228b;
  --color-accent: #8b4513;
  --color-dark: #1f1726;
  --color-dark2: #2a1f36;
  --color-dark3: #352545;
  --color-primary-light: rgba(86, 34, 139, 0.18);
  --color-accent-light: rgba(139, 69, 19, 0.18);
  --color-text: #e8dff5;
  --color-text-muted: #b8a8d0;
  --color-text-dim: #7a6a94;
  --color-glass: rgba(255, 255, 255, 0.06);
  --color-glass-border: rgba(255, 255, 255, 0.12);
  --radius-card: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 8px 32px rgba(31, 23, 38, 0.55);
  --shadow-card: 0 4px 24px rgba(86, 34, 139, 0.18);
  --font-serif: 'Noto Serif TC', 'Georgia', serif;
  --font-sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --nav-h: 68px;
  --announce-h: 36px;
}

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

body {
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--color-dark);
}

/* ===== 滚动偏移（固定导航补偿）===== */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h) + 16px);
}

/* ===== 站级包装 ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 顶部公告条 ===== */
.top-announce {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  height: var(--announce-h);
  background: linear-gradient(90deg, var(--color-dark) 0%, var(--color-dark3) 50%, var(--color-dark) 100%);
  border-bottom: 1px solid rgba(86, 34, 139, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  font-family: var(--font-sans);
}

.announce-icon {
  color: var(--color-primary);
  font-size: 10px;
  opacity: 0.8;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: var(--announce-h);
  left: 0;
  width: 100%;
  z-index: 190;
  background: rgba(31, 23, 38, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(86, 34, 139, 0.22);
  height: var(--nav-h);
}

.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-left {
  justify-content: flex-end;
}

.nav-right {
  justify-content: flex-start;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-family: var(--font-sans);
  font-weight: 400;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.22s ease, background 0.22s ease;
  white-space: nowrap;
  min-height: 40px;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-text);
  background: rgba(86, 34, 139, 0.18);
  outline: none;
}

.nav-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6;
  flex-shrink: 0;
}

.brand-center {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 8px;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  background: linear-gradient(135deg, #a06cde, #56228b 60%, #8b4513);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* ===== Hero ===== */
.hero-wrap {
  position: relative;
  margin-top: calc(var(--nav-h) + var(--announce-h));
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #2d1450 0%, var(--color-dark) 100%);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.hero-grid {
  width: 100%;
  height: 100%;
}

.hero-blob {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-blob svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 24px 100px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), #7a3bc7);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 40px;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(86, 34, 139, 0.5);
  min-height: 48px;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(86, 34, 139, 0.65);
  outline: none;
}

.hero-arc {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
}

.hero-arc svg {
  width: 100%;
  height: 100%;
}

/* ===== 主体 ===== */
.site-main {
  flex: 1;
  background: var(--color-dark);
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

/* ===== 正文内容区 ===== */
.content-body {
  min-width: 0;
}

/* 内容区中 article 结构适配 */
.content-body article {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(86, 34, 139, 0.15);
}

.content-body article:last-child {
  border-bottom: none;
}

/* figure / aside 作为 article 直接子元素 */
.content-body article > figure {
  margin: 24px 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  padding: 20px;
}

.content-body article > figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.content-body article > figure figcaption {
  font-size: 13px;
  color: var(--color-text-dim);
  margin-top: 10px;
  text-align: center;
}

.content-body article > aside {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 24px 0;
  backdrop-filter: blur(10px);
}

/* 通用排版 */
.content-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  margin-top: 40px;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 28px;
  margin-bottom: 8px;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.content-body a {
  color: #a06cde;
  text-decoration: underline;
  text-decoration-color: rgba(160, 108, 222, 0.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}

.content-body a:hover {
  color: #c49ef5;
  text-decoration-color: rgba(196, 158, 245, 0.7);
}

.content-body ul,
.content-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-body li {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 8px;
}

.content-body strong {
  color: var(--color-text);
  font-weight: 700;
}

/* subtitle 副标题 */
.content-body .subtitle,
.content-body p.subtitle {
  font-size: 0.97rem;
  color: var(--color-text-dim);
  margin-top: -4px;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* 卡片（玻璃拟态）*/
.content-body .card,
.glass-card {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.content-body .card:hover,
.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(86, 34, 139, 0.28);
}

/* ===== 右侧边栏 ===== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--announce-h) + 24px);
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

.content-aside h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.content-aside p.subtitle {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-bottom: 18px;
  line-height: 1.5;
}

.aside-nav-list {
  list-style: none;
}

.aside-nav-list dt {
  margin-bottom: 4px;
}

.aside-nav-list dd.aside-sep {
  height: 1px;
  background: rgba(86, 34, 139, 0.15);
  margin-bottom: 8px;
}

.aside-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  min-height: 40px;
}

.aside-link:hover,
.aside-link:focus-visible {
  background: rgba(86, 34, 139, 0.18);
  color: var(--color-text);
  outline: none;
}

.aside-arrow {
  color: var(--color-primary);
  font-size: 12px;
  flex-shrink: 0;
}

/* ===== Footer CTA 块 ===== */
.footer-cta-block {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-dark3) 0%, var(--color-dark2) 100%);
  border-top: 1px solid rgba(86, 34, 139, 0.22);
  border-bottom: 1px solid rgba(86, 34, 139, 0.22);
  padding: 64px 24px;
  text-align: center;
}

.footer-cta-blob {
  position: absolute;
  top: 50%;
  right: -80px;
  transform: translateY(-50%);
  width: 360px;
  opacity: 0.5;
  pointer-events: none;
}

.footer-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
}

.footer-cta-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.footer-cta-inner p.subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), #c46b2a);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 40px;
  letter-spacing: 0.06em;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.45);
  min-height: 48px;
}

.footer-cta-btn:hover,
.footer-cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139, 69, 19, 0.6);
  outline: none;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--color-dark);
  border-top: 1px solid rgba(86, 34, 139, 0.15);
  padding: 48px 24px 28px;
}

.footer-cols {
  max-width: 1000px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-dl-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.footer-dl dd {
  font-size: 0.88rem;
  color: var(--color-text-dim);
  line-height: 1.6;
}

.footer-dl dd a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

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

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(86, 34, 139, 0.12);
  padding-top: 24px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--color-text-dim);
  line-height: 1.6;
}

/* ===== Scroll Reveal 动效 ===== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeSlideUp 0.6s ease both;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== 响应式断点 ===== */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    order: -1;
  }

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

@media (max-width: 640px) {
  :root {
    --nav-h: 60px;
    --announce-h: 32px;
  }

  .main-nav {
    padding: 0 12px;
    gap: 6px;
  }

  .nav-link {
    font-size: 11.5px;
    padding: 8px 5px;
    gap: 3px;
    min-height: 44px;
  }

  .nav-dot {
    display: none;
  }

  .brand-text {
    font-size: 13px;
    letter-spacing: 0.01em;
  }

  .brand-center {
    padding: 4px 6px;
    min-height: 44px;
  }

  .hero-content {
    padding: 48px 16px 90px;
  }

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

  .content-section {
    padding: 32px 16px 48px;
  }

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

  .footer-cta-blob {
    display: none;
  }

  .top-announce {
    font-size: 11px;
    gap: 8px;
    padding: 0 12px;
  }

  .announce-icon {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav-link {
    font-size: 11px;
    padding: 8px 4px;
    min-height: 44px;
  }

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

  .brand-text {
    font-size: 12px;
  }
}
