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

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

:root {
  --bg: #000000;
  --bg-card: #121212;
  --bg-card2: #1a1a1a;
  --border: #2a2a2a;
  --border-light: #333333;
  --text: #f0f0f0;
  --text-muted: #9a9a9a;
  --text-dim: #666666;
  --accent: #c9a84c;
  --accent2: #8b6bcd;
  --accent-glow: rgba(201,168,76,0.15);
  --radius: 18px;
  --radius-sm: 10px;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --aside-w: 240px;
  --shadow: 0 4px 24px rgba(0,0,0,0.6), 0 1px 6px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.8), 0 2px 12px rgba(201,168,76,0.12);
  color-scheme: dark;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover, a:focus {
  color: #e0c070;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

/* ── 公告条 ── */
.site-announce {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 8px 16px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 布局骨架 ── */
.site-wrapper {
  display: flex;
  min-height: calc(100vh - 40px);
  align-items: flex-start;
}

/* ── 侧边导航 (aside) ── */
.site-aside {
  width: var(--aside-w);
  min-width: var(--aside-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: 100vh;
  flex-shrink: 0;
}

.brand-row {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(201,168,76,0.3);
}

.brand-name:hover {
  color: var(--accent);
  text-decoration: none;
}

/* aside > nav > ul > li > a 结构 */
.site-aside nav ul {
  padding: 12px 0;
}

.site-aside nav ul li a {
  display: block;
  padding: 10px 20px;
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-left: 2px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.site-aside nav ul li a:hover,
.site-aside nav ul li a:focus {
  background: rgba(201,168,76,0.08);
  color: var(--accent);
  border-left-color: var(--accent);
  text-decoration: none;
}

.site-aside nav ul li.nav-active > a {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-glow);
  font-weight: 600;
}

.aside-section {
  border-top: 1px solid var(--border);
  padding: 16px 0 8px;
}

.aside-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  padding: 0 20px 8px;
  text-transform: uppercase;
}

.aside-child-list li a {
  display: block;
  padding: 7px 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.aside-child-list li a:hover {
  color: var(--accent);
  text-decoration: none;
}

.aside-tags {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-pill {
  display: inline-block;
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  margin: 2px 2px 0 0;
}

.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── 主内容区 ── */
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── main > article > section 结构 ── */
main {
  padding: 40px 48px 60px;
  max-width: 900px;
}

main > article {
  width: 100%;
}

main > article > section {
  margin-bottom: 56px;
}

/* ── Hero (首页) ── */
.hero-block {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 60px 48px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: right;
  max-width: 680px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  text-shadow: 0 0 40px rgba(201,168,76,0.2);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── 按钮 ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 44px;
  transition: background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.05em;
}

.btn-primary:hover, .btn-primary:focus {
  background: #e0c070;
  color: #000;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(201,168,76,0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 44px;
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: 0.03em;
}

.btn-ghost:hover, .btn-ghost:focus {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.btn-link:hover {
  text-decoration: underline;
}

/* ── h2 + hr ── */
h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

h3 a {
  color: var(--text);
  text-decoration: none;
}

h3 a:hover {
  color: var(--accent);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 28px;
}

/* ── 内容/正文 ── */
.prose-section {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.prose-section h2 { color: var(--text); margin-top: 36px; margin-bottom: 12px; }
.prose-section h3 { color: var(--text); margin-top: 28px; margin-bottom: 8px; }
.prose-section p { margin-bottom: 18px; }
.prose-section ul, .prose-section ol { padding-left: 22px; margin-bottom: 18px; list-style: disc; }
.prose-section ol { list-style: decimal; }
.prose-section li { margin-bottom: 6px; }
.prose-section a { color: var(--accent); }
.prose-section strong { color: var(--text); font-weight: 600; }
.prose-section blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
  margin: 20px 0;
}
.prose-section code {
  background: var(--bg-card2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}
.prose-section pre {
  background: var(--bg-card2);
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 18px;
}
.prose-section time {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ── 卡片通用 ── */
.topic-card,
.child-card,
.tag-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  height: 100%;
}

.topic-card:hover,
.child-card:hover,
.tag-article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--border-light);
}

.topic-card p,
.child-card p,
.tag-article-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.card-footer {
  margin-top: auto;
}

/* ── 主题栅格 ── */
.topic-grid,
.children-grid,
.tag-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ul > li > article > h3/p 结构 */
.topic-grid > li,
.children-grid > li,
.tag-article-grid > li {
  display: flex;
}

.topic-grid > li > article,
.children-grid > li > article,
.tag-article-grid > li > article {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ── 最新内容列表 ── */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recent-item {
  border-bottom: 1px solid var(--border);
}

.recent-item:last-child { border-bottom: none; }

.recent-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}

.recent-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.recent-title {
  font-size: 0.92rem;
  flex: 1;
}

.recent-date {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── 专题 Hero ── */
.topic-hero,
.tag-hero {
  position: relative;
  padding: 80px 48px 60px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.topic-hero-grid,
.tag-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139,107,205,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,107,205,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.topic-hero-inner,
.tag-hero-inner {
  position: relative;
  z-index: 1;
  text-align: right;
}

.topic-eyebrow,
.tag-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent2);
  margin-bottom: 12px;
}

.topic-hero-inner h1,
.tag-hero-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
}

.topic-desc,
.tag-hero-inner p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── 文章页 ── */
.article-main {
  width: 100%;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}

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

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 14px;
}

.article-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.65;
}

.article-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.meta-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.article-hero-img-wrap {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.article-nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── 关于页 ── */
.about-article {
  width: 100%;
}

.about-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.about-eyebrow,
.privacy-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.about-header h1,
.privacy-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.about-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

.about-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.about-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.about-link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.alc-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.alc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── 隐私页 ── */
.privacy-article {
  width: 100%;
}

.privacy-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.privacy-date {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 10px;
}

.privacy-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── 卡片图片 ── */
.card-img-wrap {
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  margin: -24px -24px 16px;
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── 页脚 footer 三列 dl ── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  gap: 40px;
  padding: 48px 48px 32px;
  flex-wrap: wrap;
}

/* footer 里 ≥3 个 dl 并排 */
.footer-col {
  flex: 1;
  min-width: 160px;
}

.footer-col dt {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.footer-col dd {
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-col dd a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col dd a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer-links a:hover { color: var(--accent); }

/* ── 滚动动画 ── */
@media (prefers-reduced-motion: no-preference) {
  .topic-card,
  .child-card,
  .tag-article-card,
  .about-link-card,
  .recent-item {
    opacity: 0;
    transform: translateY(18px);
    animation: revealUp 0.5s forwards;
  }

  .topic-grid > li:nth-child(1) .topic-card,
  .children-grid > li:nth-child(1) .child-card,
  .tag-article-grid > li:nth-child(1) .tag-article-card { animation-delay: 0.05s; }
  .topic-grid > li:nth-child(2) .topic-card,
  .children-grid > li:nth-child(2) .child-card,
  .tag-article-grid > li:nth-child(2) .tag-article-card { animation-delay: 0.1s; }
  .topic-grid > li:nth-child(3) .topic-card,
  .children-grid > li:nth-child(3) .child-card,
  .tag-article-grid > li:nth-child(3) .tag-article-card { animation-delay: 0.15s; }
  .topic-grid > li:nth-child(4) .topic-card,
  .children-grid > li:nth-child(4) .child-card,
  .tag-article-grid > li:nth-child(4) .tag-article-card { animation-delay: 0.2s; }
  .topic-grid > li:nth-child(5) .topic-card { animation-delay: 0.25s; }
  .topic-grid > li:nth-child(6) .topic-card { animation-delay: 0.3s; }

  .recent-item:nth-child(1) { animation-delay: 0.05s; }
  .recent-item:nth-child(2) { animation-delay: 0.1s; }
  .recent-item:nth-child(3) { animation-delay: 0.15s; }
  .recent-item:nth-child(4) { animation-delay: 0.2s; }

  @keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── 响应式 ── */
@media (max-width: 900px) {
  .site-wrapper {
    flex-direction: column;
  }

  .site-aside {
    width: 100%;
    min-width: 0;
    position: static;
    max-height: none;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .brand-row {
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
  }

  .site-aside nav ul {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .site-aside nav ul li a {
    padding: 10px 14px;
    border-left: none;
    border-bottom: 2px solid transparent;
    font-size: 0.82rem;
  }

  .site-aside nav ul li a:hover,
  .site-aside nav ul li.nav-active > a {
    border-left: none;
    border-bottom-color: var(--accent);
  }

  .aside-section,
  .aside-tags {
    padding: 12px 16px;
  }

  .hero-block {
    min-height: 100svh;
    padding: 40px 24px;
  }

  main {
    padding: 28px 20px 48px;
  }

  .topic-hero,
  .tag-hero {
    padding: 48px 24px 36px;
  }

  .footer-inner {
    padding: 32px 24px 20px;
    gap: 28px;
  }

  .footer-bottom {
    padding: 14px 24px 20px;
  }
}

@media (max-width: 600px) {
  :root { --radius: 14px; }

  .hero-title {
    font-size: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-end;
  }

  .topic-grid,
  .children-grid,
  .tag-article-grid {
    grid-template-columns: 1fr;
  }

  .about-link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  main {
    padding: 20px 16px 40px;
  }

  .topic-hero,
  .tag-hero {
    padding: 36px 16px 28px;
  }

  .article-header h1 {
    font-size: 1.6rem;
  }

  h2 { font-size: 1.3rem; }

  .article-nav-links,
  .privacy-links {
    flex-direction: column;
    align-items: flex-start;
  }
}
