@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ===== CSS变量 ===== */
:root {
  --c-red: #ff0000;
  --c-pink: #ff1493;
  --c-dark: #261717;
  --c-dark-2: #1a0f0f;
  --c-dark-3: #0e0808;
  --c-dark-light: #3a2020;
  --c-text: #f0e0e0;
  --c-text-muted: #b08080;
  --c-text-faint: #7a5555;
  --c-glow-red: rgba(255,0,0,0.35);
  --c-glow-pink: rgba(255,20,147,0.3);
  --c-border: rgba(255,0,0,0.18);
  --c-border-light: rgba(255,20,147,0.15);
  --radius-card: 4px;
  --font-mono: 'Space Mono', 'Courier New', Courier, monospace;
  --nav-h: 64px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 1200px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-mono);
  background-color: var(--c-dark-3);
  color: var(--c-text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 极光背景 ===== */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  mix-blend-mode: screen;
}
.aurora-layer-1 {
  width: 120vw;
  height: 80vh;
  top: -20vh;
  left: -20vw;
  background: radial-gradient(ellipse at 40% 50%, #ff0000 0%, #ff1493 40%, transparent 70%);
  animation: aurora1 10s ease-in-out infinite alternate;
}
.aurora-layer-2 {
  width: 100vw;
  height: 100vh;
  top: 20vh;
  right: -30vw;
  background: radial-gradient(ellipse at 60% 40%, #ff1493 0%, #7b00ff 50%, transparent 70%);
  animation: aurora2 12s ease-in-out infinite alternate;
}
.aurora-layer-3 {
  width: 80vw;
  height: 60vh;
  bottom: -10vh;
  left: 10vw;
  background: conic-gradient(from 180deg at 50% 50%, #ff0000 0deg, #ff1493 120deg, #261717 240deg, #ff0000 360deg);
  opacity: 0.1;
  animation: aurora3 9s linear infinite;
}
@keyframes aurora1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5vw, 3vh) scale(1.1); }
}
@keyframes aurora2 {
  0% { transform: translate(0, 0) scale(1.05); }
  100% { transform: translate(-4vw, 5vh) scale(0.95); }
}
@keyframes aurora3 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== 页头 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(38, 23, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  box-shadow: 0 0 12px var(--c-glow-red);
  transition: box-shadow var(--transition);
}
.brand-mark:hover { box-shadow: 0 0 20px var(--c-glow-red), 0 0 40px var(--c-glow-pink); }
.nav-logo-img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.nav-logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.05em;
}

/* ===== 主导航：nav > ol > li > a ===== */
.primary-nav {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar { display: none; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}
.nav-list li { display: flex; }
.nav-pill {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: rgba(255,0,0,0.06);
  color: var(--c-text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-pill:hover,
.nav-pill:focus-visible {
  background: linear-gradient(90deg, rgba(255,0,0,0.2), rgba(255,20,147,0.2));
  border-color: var(--c-red);
  color: var(--c-text);
  box-shadow: 0 0 10px var(--c-glow-red);
}
.cta-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
  box-shadow: 0 0 14px var(--c-glow-red);
  transition: all var(--transition);
  white-space: nowrap;
}
.cta-btn:hover { box-shadow: 0 0 24px var(--c-glow-red), 0 0 48px var(--c-glow-pink); filter: brightness(1.1); }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  scroll-margin-top: var(--nav-h);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(38,23,23,0.95) 0%,
    rgba(38,23,23,0.75) 40%,
    rgba(14,8,8,0.85) 100%
  );
}
.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, transparent 49.5%, var(--c-dark-3) 50%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 120px;
  width: 100%;
  max-width: 700px;
  padding-left: 24px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-pink);
  border: 1px solid rgba(255,20,147,0.4);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 20px;
}
.hero-section h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--c-red) 50%, var(--c-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
  box-shadow: 0 0 20px var(--c-glow-red);
  transition: all var(--transition);
}
.btn-primary:hover { filter: brightness(1.15); box-shadow: 0 0 32px var(--c-glow-red), 0 0 60px var(--c-glow-pink); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  background: rgba(255,0,0,0.06);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--c-red); background: rgba(255,0,0,0.12); box-shadow: 0 0 14px var(--c-glow-red); }

/* ===== 主内容区：main > div > figure/aside ===== */
.site-main {
  position: relative;
  z-index: 1;
  padding: 0 0 80px;
}
.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* aside 在内容左侧 */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: start;
}
.aside-inner {
  background: rgba(38,23,23,0.7);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(8px);
}
.aside-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-red);
  margin-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 10px;
}
.aside-title span { display: inline; }
.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aside-link {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--c-text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.aside-link:hover {
  background: rgba(255,0,0,0.1);
  border-color: var(--c-border);
  color: var(--c-text);
}

/* figure 装饰 */
.content-banner {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
  position: relative;
}
.banner-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-red), var(--c-pink), var(--c-red));
  background-size: 200% 100%;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ===== 正文内容样式（page.content 里的 div） ===== */
.content-body {
  min-width: 0;
}
.content-body div {
  scroll-margin-top: calc(var(--nav-h) + 20px);
  padding: 48px 0;
  border-bottom: 1px solid var(--c-border);
}
.content-body div:last-child { border-bottom: none; }
.content-body h2 {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--c-text);
}
.content-body h2 span {
  background: linear-gradient(90deg, var(--c-red), var(--c-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.content-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--c-text);
  letter-spacing: 0.02em;
}
.content-body h3 span { color: var(--c-pink); }
.content-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}
.content-body a {
  color: var(--c-red);
  text-decoration: underline;
  text-decoration-color: rgba(255,0,0,0.3);
  transition: color var(--transition);
}
.content-body a:hover { color: var(--c-pink); text-decoration-color: var(--c-pink); }
.content-body ul, .content-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--c-text-muted);
  font-size: 16px;
  line-height: 1.8;
}
.content-body li { margin-bottom: 6px; }
.content-body strong { color: var(--c-text); font-weight: 700; }
.content-body blockquote {
  border-left: 3px solid var(--c-red);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(255,0,0,0.05);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--c-text-muted);
  font-style: italic;
}
.content-body img {
  max-width: 100%;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.content-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px 0;
}
.content-body th {
  background: rgba(255,0,0,0.1);
  color: var(--c-text);
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--c-border);
  font-weight: 700;
}
.content-body td {
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.content-body tr:hover td { background: rgba(255,0,0,0.04); }
.content-body time {
  display: inline-block;
  font-size: 12px;
  color: var(--c-text-faint);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ===== 卡片（通用） ===== */
.card {
  background: rgba(38,23,23,0.8);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 20px;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.card:hover {
  border-color: rgba(255,0,0,0.4);
  box-shadow: 0 4px 24px rgba(255,0,0,0.15), 0 2px 12px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--c-dark-2);
  border-top: 1px solid var(--c-border);
}
.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 40px;
  border-bottom: 1px solid var(--c-border);
}
.footer-brand-word {
  display: block;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--c-text-faint);
  max-width: 480px;
  line-height: 1.6;
}
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-red);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.footer-col-title span { display: inline; }
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col ul li a {
  font-size: 13px;
  color: var(--c-text-faint);
  text-decoration: none;
  letter-spacing: 0.03em;
  display: inline-block;
  padding: 4px 0;
  min-height: 40px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--c-text); }
.footer-col address { font-style: normal; }
.footer-note {
  font-size: 12px;
  color: var(--c-text-faint);
  line-height: 1.6;
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,0,0,0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-copy {
  font-size: 12px;
  color: var(--c-text-faint);
  letter-spacing: 0.05em;
}
.footer-disclaimer {
  font-size: 11px;
  color: var(--c-text-faint);
  opacity: 0.6;
}

/* ===== 滚动动效 ===== */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stagger-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 焦点可访问性 ===== */
:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== 移动端适配 ===== */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
  }
  .aside-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  :root { --nav-h: 56px; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .nav-pill { height: 36px; padding: 0 12px; font-size: 12px; }
  .cta-btn { height: 40px; padding: 0 14px; font-size: 12px; }
  .hero-content { padding: 60px 16px 80px; }
  .hero-section h1 { font-size: 1.9rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .content-section { padding: 40px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 16px; }
  .footer-top { padding: 40px 16px 24px; }
  .footer-brand-word { font-size: 2.5rem; }
  .footer-bottom { padding: 16px; }
  .primary-nav { display: none; }
}
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== div scroll-margin ===== */
div[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
