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

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

:root {
  --neon: #80ff00;
  --neon2: #00ff00;
  --dark: #1f2617;
  --dark2: #161c0f;
  --dark3: #2a3520;
  --text: #e8f5d0;
  --text-muted: #9ab87a;
  --glass-bg: rgba(128, 255, 0, 0.06);
  --glass-border: rgba(128, 255, 0, 0.18);
  --nav-h: 60px;
  --radius: 10px;
  --font-serif: 'Cormorant Garamond', 'Libre Baskerville', Georgia, serif;
  --font-mono: 'Courier New', monospace;
}

html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-serif);
  background-color: var(--dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  filter: saturate(1.1);
}

body.dark-bg {
  background-color: var(--dark);
}

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

a:hover {
  color: var(--neon2);
  text-decoration: underline;
}

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

ul {
  list-style: none;
}

/* ===== 布局骨架 ===== */
.site-wrap {
  display: flex;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
}

.page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== 底部固定导航（aside > nav > ul > li > a） ===== */
.side-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--dark2);
  border-top: 2px solid var(--neon);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.brand-logo {
  flex-shrink: 0;
  padding: 0 16px;
  border-right: 1px solid var(--glass-border);
}

.brand-link {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--neon);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.brand-link:hover {
  color: var(--neon2);
  text-decoration: none;
}

.side-nav nav {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.side-nav nav::-webkit-scrollbar {
  display: none;
}

.side-nav nav ul {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 0;
}

.side-nav nav ul li {
  flex-shrink: 0;
}

.side-nav nav ul li a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 14px;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  border-right: 1px solid var(--glass-border);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  min-height: 40px;
}

.side-nav nav ul li a:hover {
  background: var(--glass-bg);
  color: var(--neon);
  text-decoration: none;
}

.nav-search {
  flex-shrink: 0;
  padding: 0 12px;
  border-left: 1px solid var(--glass-border);
}

.nav-search form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-search input {
  background: var(--dark3);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  padding: 6px 10px;
  width: 120px;
  outline: none;
  transition: border-color 0.2s;
}

.nav-search input:focus {
  border-color: var(--neon);
}

.nav-search button {
  background: var(--neon);
  color: var(--dark);
  border: none;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 10px;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.2s;
}

.nav-search button:hover {
  background: var(--neon2);
}

/* ===== 跑马灯 ===== */
.marquee-wrap {
  overflow: hidden;
  background: var(--neon);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  height: 28px;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  animation: marquee 24s linear infinite;
  will-change: transform;
}

.marquee-track span {
  color: var(--dark);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Hero 区块（右侧图、左侧文） ===== */
.hero-section {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 40px 32px 32px;
  min-height: 45vh;
  max-height: 45vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 100%);
  border-bottom: 2px solid var(--glass-border);
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  order: 1;
}

.hero-figure {
  flex: 0 0 38%;
  order: 2;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 38vh;
}

.hero-figure .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(1.3);
}

.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--neon);
  line-height: 1.2;
  text-shadow: 0 0 20px rgba(128,255,0,0.3);
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 420px;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--neon);
  color: var(--dark);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  min-height: 44px;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--neon2);
  color: var(--dark);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ===== 内容区布局（main > section > figure/aside 交错） ===== */
.content-section,
.article-body-section,
.about-content-section,
.privacy-body-section,
.default-section {
  display: flex;
  gap: 32px;
  padding: 40px 32px;
  align-items: flex-start;
}

/* 侧边栏在左侧 */
.section-aside,
.article-sidebar {
  flex: 0 0 220px;
  order: -1;
  position: sticky;
  top: 24px;
}

.aside-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 6px;
}

.section-aside ul,
.article-sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

.section-aside ul li a,
.article-sidebar ul li a {
  display: block;
  padding: 7px 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.section-aside ul li a:hover,
.article-sidebar ul li a:hover {
  background: var(--glass-bg);
  color: var(--neon);
  text-decoration: none;
}

.aside-hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 14px 0;
}

.content-main,
.article-content {
  flex: 1;
  min-width: 0;
}

/* ===== 文章区域 ===== */
.article-header-section {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 36px 32px 24px;
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 100%);
  border-bottom: 2px solid var(--glass-border);
}

.article-hero-figure {
  flex: 0 0 35%;
  border-radius: var(--radius);
  overflow: hidden;
  order: 2;
}

.article-hero-figure .article-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  filter: saturate(1.2);
}

.article-meta-aside {
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--neon);
  line-height: 1.25;
}

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

.article-dates {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pub-date {
  color: var(--neon);
  font-weight: 600;
}

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

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

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

/* ===== 关于页 / 隐私页 Hero ===== */
.about-hero-section,
.privacy-header-section {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 48px 32px 32px;
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 100%);
  border-bottom: 2px solid var(--glass-border);
}

.about-deco-figure,
.privacy-deco-figure {
  flex: 0 0 auto;
  order: 2;
}

.deco-big {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--neon);
  line-height: 1;
  display: block;
  opacity: 0.4;
  font-family: var(--font-serif);
}

.deco-small-text {
  font-size: clamp(3rem, 9vw, 6rem);
}

.about-intro-aside,
.privacy-meta-aside {
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-h1,
.privacy-h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--neon);
  line-height: 1.2;
}

/* ===== 副标题样式 ===== */
.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
  margin-top: 4px;
}

/* ===== 正文排版 ===== */
.prose {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--neon);
  margin: 1.8em 0 0.4em;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.4em 0 0.3em;
}

.prose p {
  margin: 0.75em 0;
}

.prose ul,
.prose ol {
  margin: 0.75em 0 0.75em 1.2em;
  list-style: disc;
}

.prose ul li,
.prose ol li {
  margin: 0.3em 0;
}

.prose strong {
  color: var(--neon);
  font-weight: 700;
}

.prose em {
  color: var(--neon2);
}

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--neon2);
}

.prose blockquote {
  border-left: 3px solid var(--neon);
  padding-left: 16px;
  color: var(--text-muted);
  font-style: italic;
  margin: 1em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.9rem;
}

.prose th {
  background: var(--dark3);
  color: var(--neon);
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--glass-border);
}

.prose td {
  padding: 8px 12px;
  border: 1px solid var(--glass-border);
}

.prose tr:nth-child(even) td {
  background: rgba(128,255,0,0.03);
}

.prose code {
  background: var(--dark3);
  color: var(--neon2);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.prose pre {
  background: var(--dark2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin: 1em 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

/* ===== 卡片区域 ===== */
.cards-section {
  padding: 40px 32px;
  border-top: 1px solid var(--glass-border);
}

.cards-section > h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 4px;
}

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

/* 玻璃拟态卡片 */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  mix-blend-mode: normal;
}

.glass-card:hover {
  border-color: var(--neon);
  background: rgba(128,255,0,0.1);
  transform: translateY(-3px) rotate(0.4deg);
  box-shadow: 0 8px 32px rgba(128,255,0,0.12);
  color: var(--text);
  text-decoration: none;
}

.glass-card strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--neon);
  line-height: 1.35;
  display: block;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.card-thumb {
  border-radius: 6px;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

/* ===== 更多文章区 ===== */
.article-more-section {
  background: var(--dark2);
}

/* ===== 页脚（仅 p + small） ===== */
.site-footer {
  margin-top: auto;
  background: var(--dark2);
  border-top: 2px solid var(--neon);
  padding: 0;
}

.site-footer .footer-cta {
  background: var(--neon);
  color: var(--dark);
  padding: 18px 32px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer .footer-cta a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.site-footer .footer-cta a:hover {
  border-bottom-color: var(--dark);
  text-decoration: none;
}

.site-footer small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer small a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer small a:hover {
  color: var(--neon);
}

/* ===== 贴纸装饰 ===== */
.sticker {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  font-family: var(--font-serif);
  font-weight: 700;
  user-select: none;
  animation: jitter 3s ease-in-out infinite;
}

.sticker-1 {
  top: 18%;
  right: 2%;
  font-size: 1.8rem;
  color: var(--neon);
  transform: rotate(15deg);
  animation-delay: 0s;
}

.sticker-2 {
  top: 35%;
  right: 1%;
  font-size: 0.72rem;
  background: var(--neon);
  color: var(--dark);
  padding: 4px 8px;
  border-radius: 3px;
  transform: rotate(-8deg);
  animation-delay: 0.8s;
}

.sticker-3 {
  top: 55%;
  right: 2%;
  font-size: 1.4rem;
  transform: rotate(5deg);
  animation-delay: 1.4s;
}

.sticker-4 {
  top: 28%;
  right: 1%;
  font-size: 0.72rem;
  background: var(--dark3);
  color: var(--neon);
  border: 1px solid var(--neon);
  padding: 4px 8px;
  border-radius: 3px;
  transform: rotate(-6deg);
  animation-delay: 0.5s;
}

@keyframes jitter {
  0%, 100% { transform: rotate(15deg) translateY(0); }
  25% { transform: rotate(16deg) translateY(-2px); }
  75% { transform: rotate(14deg) translateY(2px); }
}

.sticker-2 {
  animation-name: jitter2;
}

@keyframes jitter2 {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  33% { transform: rotate(-9deg) translateY(-2px); }
  66% { transform: rotate(-7deg) translateY(1px); }
}

.sticker-4 {
  animation-name: jitter3;
}

@keyframes jitter3 {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  40% { transform: rotate(-7deg) translateY(-2px); }
  80% { transform: rotate(-5deg) translateY(2px); }
}

/* ===== h2 + p.subtitle 标题装饰 ===== */
h2 + .subtitle,
h2 + p.subtitle,
h2 + p.subhead,
h2 + p.desc,
h2 + p.lead {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.93rem;
  margin-top: 4px;
  margin-bottom: 20px;
}

/* ===== 卡片章节内的 h2 ===== */
.cards-section h2 {
  position: relative;
  display: inline-block;
}

.cards-section h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--neon);
  border-radius: 2px;
}

/* ===== 响应式断点 ===== */
@media (max-width: 900px) {
  .hero-section {
    flex-direction: column-reverse;
    min-height: auto;
    max-height: none;
    padding: 24px 20px 20px;
  }

  .hero-figure {
    flex: none;
    width: 100%;
    max-height: 220px;
  }

  .hero-text {
    order: 2;
    width: 100%;
  }

  .content-section,
  .article-body-section,
  .about-content-section,
  .privacy-body-section,
  .default-section {
    flex-direction: column;
    padding: 24px 20px;
    gap: 24px;
  }

  .section-aside,
  .article-sidebar {
    flex: none;
    width: 100%;
    position: static;
    order: 2;
  }

  .content-main,
  .article-content {
    order: 1;
  }

  .article-header-section {
    flex-direction: column;
    padding: 24px 20px 20px;
  }

  .article-hero-figure {
    flex: none;
    width: 100%;
    order: -1;
  }

  .article-meta-aside {
    order: 2;
  }

  .about-hero-section,
  .privacy-header-section {
    flex-direction: column;
    padding: 32px 20px 24px;
  }

  .about-deco-figure,
  .privacy-deco-figure {
    order: -1;
  }

  .cards-section {
    padding: 28px 20px;
  }

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

  .sticker {
    display: none;
  }

  .site-footer .footer-cta {
    padding: 14px 20px;
  }

  .site-footer small {
    padding: 10px 20px;
  }
}

@media (max-width: 600px) {
  .side-nav {
    height: var(--nav-h);
  }

  .brand-logo {
    padding: 0 10px;
  }

  .brand-link {
    font-size: 0.75rem;
  }

  .side-nav nav ul li a {
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .nav-search {
    display: none;
  }

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

  .about-h1,
  .privacy-h1,
  .article-h1 {
    font-size: 1.4rem;
  }

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

  .marquee-wrap {
    font-size: 0.72rem;
    height: 24px;
  }

  .deco-big {
    font-size: 3.5rem;
  }

  .prose {
    font-size: 0.97rem;
  }

  .prose h2 {
    font-size: 1.2rem;
  }

  .prose h3 {
    font-size: 1.05rem;
  }
}

/* ===== 视差（纯 CSS subtle） ===== */
@media (prefers-reduced-motion: no-preference) {
  .glass-card {
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  }

  .marquee-track {
    animation: marquee 24s linear infinite;
  }

  .sticker {
    animation-play-state: running;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }

  .sticker {
    animation: none;
  }

  .glass-card {
    transition: none;
  }

  .btn-primary {
    transition: none;
  }
}

/* ===== 页面跳过链接 ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--neon);
  color: var(--dark);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  z-index: 999;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dark2);
}

::-webkit-scrollbar-thumb {
  background: var(--dark3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon);
}

/* ===== 选中样式 ===== */
::selection {
  background: var(--neon);
  color: var(--dark);
}

/* ===== 时间元素 ===== */
time {
  font-style: normal;
}
