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

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

:root {
  --c-green: #87ff71;
  --c-blue: #01cdfe;
  --c-dark: #192617;
  --c-purple: #b967ff;
  --c-pink: #ff71ce;
  --c-dark2: #0f1a0e;
  --c-dark3: #1e3318;
  --c-text: #d4f5c8;
  --c-text-dim: #7aaa6e;
  --c-card-bg: rgba(25, 38, 23, 0.85);
  --nav-width: 240px;
  --radius: 10px;
  --font-main: 'Space Grotesk', 'Archivo', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-green: 0 0 8px #87ff71, 0 0 20px rgba(135, 255, 113, 0.4);
  --glow-blue: 0 0 8px #01cdfe, 0 0 20px rgba(1, 205, 254, 0.4);
  --shadow-card: 0 4px 24px rgba(1, 205, 254, 0.12), 0 2px 10px rgba(0,0,0,0.5);
  scroll-behavior: smooth;
}

html { font-size: 16px; }

body.vaporwave-body {
  font-family: var(--font-main);
  background-color: var(--c-dark2);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 辅助 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

.main-wrap {
  margin-left: var(--nav-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== 左侧导航 ===== */
.sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: linear-gradient(180deg, #0f1a0e 0%, #192617 60%, #0d1a1f 100%);
  border-right: 1px solid rgba(135, 255, 113, 0.15);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

.sidenav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(135, 255, 113, 0.02) 3px,
    rgba(135, 255, 113, 0.02) 4px
  );
  pointer-events: none;
}

.sidenav-inner {
  padding: 28px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

.sidenav-brand {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(135, 255, 113, 0.2);
}

.brand-logo { display: block; text-decoration: none; }
.logo-img { width: 100%; max-width: 160px; height: auto; display: block; }
.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  letter-spacing: 0.05em;
}

/* 搜索框 */
.sidenav-search { position: relative; }
.search-input {
  width: 100%;
  background: rgba(135, 255, 113, 0.07);
  border: 1px solid rgba(135, 255, 113, 0.25);
  border-radius: 6px;
  padding: 8px 32px 8px 12px;
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--c-text-dim); }
.search-input:focus {
  border-color: var(--c-green);
  box-shadow: var(--glow-green);
}
.search-icon {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-dim);
  font-size: 1rem;
  pointer-events: none;
}

/* 导航列表 nav > ol > li > a */
.sidenav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidenav-list li { display: block; }

.sidenav-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--c-text);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.sidenav-list li a::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--c-green);
  transform: scaleY(0);
  transition: transform var(--transition);
  border-radius: 0 2px 2px 0;
}

.sidenav-list li a:hover,
.sidenav-list li a:focus-visible {
  background: rgba(135, 255, 113, 0.1);
  border-color: rgba(135, 255, 113, 0.3);
  color: var(--c-green);
  text-shadow: var(--glow-green);
}

.sidenav-list li a:hover::before,
.sidenav-list li a:focus-visible::before {
  transform: scaleY(1);
}

.nav-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-blue);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  letter-spacing: 0.05em;
}

.nav-text { flex: 1; }

.sidenav-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--c-text-dim);
  padding-top: 12px;
  border-top: 1px solid rgba(135, 255, 113, 0.1);
}

.neon-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: var(--glow-green);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* 汉堡 */
.nav-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 200;
  background: var(--c-dark3);
  border: 1px solid var(--c-green);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-green);
  border-radius: 2px;
  transition: all var(--transition);
  box-shadow: var(--glow-green);
}

/* ===== Hero ===== */
.hero-section {
  display: flex;
  align-items: center;
  min-height: 70vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1a0e 0%, #192617 40%, #0d1a24 70%, #0a0f1a 100%);
  border-bottom: 1px solid rgba(1, 205, 254, 0.2);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(1, 205, 254, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 30%, rgba(135, 255, 113, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-aside {
  flex: 1;
  padding: 60px 48px 60px 60px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: clamp(80px, 15vw, 200px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(135, 255, 113, 0.08);
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--c-blue);
  text-transform: uppercase;
  text-shadow: var(--glow-blue);
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-blue) 60%, var(--c-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-dim);
  max-width: 380px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(90deg, var(--c-green), var(--c-blue));
  color: var(--c-dark2);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(135, 255, 113, 0.3);
  min-height: 48px;
  line-height: 1.5;
}

.hero-cta:hover, .hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(135, 255, 113, 0.5);
  filter: brightness(1.1);
}

.hero-figure {
  flex: 0 0 45%;
  max-width: 45%;
  position: relative;
  height: 70vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(1,205,254,0.05), rgba(185,103,255,0.1));
}

.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}
.orb1 {
  width: 300px; height: 300px;
  background: rgba(1, 205, 254, 0.15);
  top: -50px; right: -50px;
}
.orb2 {
  width: 200px; height: 200px;
  background: rgba(185, 103, 255, 0.15);
  bottom: 20px; left: 20px;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 3;
}

/* Glitch 文字 */
.glitch-text {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  position: relative;
  animation: glitch-anim 4s infinite;
}

@keyframes glitch-anim {
  0%, 90%, 100% { text-shadow: var(--glow-green); transform: none; }
  91% { text-shadow: 2px 0 var(--c-pink), -2px 0 var(--c-blue); transform: skewX(-2deg); }
  93% { text-shadow: -2px 0 var(--c-pink), 2px 0 var(--c-blue); transform: skewX(2deg); }
  95% { text-shadow: var(--glow-green); transform: none; }
  97% { text-shadow: 3px 0 var(--c-purple), -3px 0 var(--c-green); transform: skewX(-1deg); }
}

/* ===== 正文主区域 ===== */
.content-main {
  flex: 1;
  padding: 0;
  background: var(--c-dark2);
  position: relative;
}

/* main > div > figure/aside 交错 */
.content-sections {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr;
  gap: 0;
  align-items: start;
  min-height: 60vh;
  position: relative;
}

.content-deco-figure {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
}

.retro-grid {
  width: 100%;
  height: 120px;
  background:
    linear-gradient(rgba(1,205,254,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,205,254,0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(400px) rotateX(30deg);
  transform-origin: top center;
  opacity: 0.5;
}

.content-aside {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px 16px;
  border-right: 1px solid rgba(135, 255, 113, 0.12);
  min-height: 300px;
}

.aside-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-blue);
  text-shadow: var(--glow-blue);
  text-transform: uppercase;
}

.aside-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-nav-list li a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--c-text-dim);
  font-size: 0.82rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.aside-nav-list li a:hover,
.aside-nav-list li a:focus-visible {
  color: var(--c-green);
  border-left-color: var(--c-green);
  background: rgba(135, 255, 113, 0.07);
  padding-left: 14px;
}

.aside-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--c-text-dim);
  margin-top: 8px;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: var(--glow-green);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.content-body {
  grid-column: 2;
  grid-row: 2;
  padding: 48px 56px;
  min-width: 0;
}

/* 正文内容样式 */
.content-body div {
  margin-bottom: 80px;
  scroll-margin-top: 80px;
  position: relative;
}

.content-body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 16px;
  position: relative;
  padding-left: 16px;
}

.content-body h2::before {
  content: '';
  position: absolute;
  left: 0; top: 10%;
  width: 4px; height: 80%;
  background: linear-gradient(180deg, var(--c-green), var(--c-blue));
  border-radius: 2px;
}

.content-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--c-green), var(--c-blue), transparent);
  margin: 16px 0 28px;
  opacity: 0.4;
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-blue);
  margin: 28px 0 12px;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 14px;
}

.content-body a {
  color: var(--c-green);
  text-decoration: underline;
  text-decoration-color: rgba(135, 255, 113, 0.4);
  transition: all var(--transition);
}

.content-body a:hover {
  color: var(--c-blue);
  text-shadow: var(--glow-blue);
}

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

.content-body li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.content-body img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* 卡片样式（content 里可能有） */
.content-body .card,
.content-body [class*="card"] {
  background: var(--c-card-bg);
  border: 1px solid rgba(135, 255, 113, 0.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.content-body .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(1, 205, 254, 0.2);
}

/* scroll margin for sections with id */
div[id] { scroll-margin-top: 70px; }

/* ===== 页脚 footer > div×n ===== */
.site-footer {
  background: linear-gradient(180deg, #0d1a0e 0%, #0a0f0a 100%);
  border-top: 1px solid rgba(135, 255, 113, 0.2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-green), var(--c-blue), var(--c-purple), var(--c-pink));
  opacity: 0.7;
}

.site-footer > div {
  padding: 40px 32px;
  border-right: 1px solid rgba(135, 255, 113, 0.08);
}

.site-footer > div:last-of-type { border-right: none; }

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-blue);
  text-shadow: var(--glow-blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.site-footer hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(1,205,254,0.4), transparent);
  margin-bottom: 20px;
}

/* 联系区 */
.footer-contact-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-item {
  font-size: 0.875rem;
  color: var(--c-text-dim);
}

.footer-contact-item a {
  color: var(--c-green);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-contact-item a:hover { color: var(--c-blue); }

.sub-label {
  display: block;
  font-size: 0.8rem;
  color: var(--c-text-dim);
  margin-bottom: 8px;
}

.sub-row {
  display: flex;
  gap: 8px;
}

.sub-input {
  flex: 1;
  background: rgba(135, 255, 113, 0.07);
  border: 1px solid rgba(135, 255, 113, 0.25);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  min-height: 40px;
  transition: border-color var(--transition);
}

.sub-input::placeholder { color: var(--c-text-dim); }
.sub-input:focus { border-color: var(--c-green); }

.sub-btn {
  background: var(--c-green);
  color: var(--c-dark2);
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 40px;
  white-space: nowrap;
}

.sub-btn:hover {
  background: var(--c-blue);
  box-shadow: var(--glow-blue);
}

/* 关于区 */
.footer-about-text {
  font-size: 0.875rem;
  color: var(--c-text-dim);
  line-height: 1.7;
  margin-bottom: 14px;
}

.footer-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-tags li {
  font-size: 0.75rem;
  padding: 3px 10px;
  border: 1px solid rgba(135, 255, 113, 0.25);
  border-radius: 20px;
  color: var(--c-text-dim);
}

/* 声明区 */
.footer-legal-text {
  font-size: 0.8rem;
  color: var(--c-text-dim);
  line-height: 1.65;
  margin-bottom: 8px;
}

/* 底栏版权 */
.footer-bottom {
  grid-column: 1 / -1;
  padding: 20px 32px;
  border-top: 1px solid rgba(135, 255, 113, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: var(--c-text-dim);
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }

  .sidenav-list li a { will-change: background, color; }
}

/* hue rotate 装饰背景动画 */
@media (prefers-reduced-motion: no-preference) {
  .hero-section::before {
    animation: hue-shift 12s linear infinite alternate;
  }
}

@keyframes hue-shift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(30deg); }
}

/* ===== 断点：平板 ===== */
@media (max-width: 1024px) {
  :root { --nav-width: 200px; }
  .hero-aside { padding: 48px 32px; }
  .content-body { padding: 36px 32px; }
  .site-footer { grid-template-columns: repeat(2, 1fr); }
  .footer-legal { grid-column: 1 / -1; border-right: none; }
}

/* ===== 断点：移动端 ===== */
@media (max-width: 768px) {
  :root { --nav-width: 260px; }

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

  .sidenav {
    transform: translateX(-100%);
    box-shadow: 4px 0 40px rgba(0,0,0,0.6);
  }

  .sidenav.open { transform: translateX(0); }

  .nav-toggle { display: flex; }

  .hero-section {
    flex-direction: column;
    min-height: auto;
    padding-top: 72px;
  }

  .hero-aside {
    padding: 40px 20px 32px;
    order: 2;
  }

  .hero-figure {
    flex: none;
    max-width: 100%;
    width: 100%;
    height: 45vw;
    min-height: 200px;
    order: 1;
  }

  .hero-bg-text {
    font-size: clamp(60px, 20vw, 100px);
  }

  .content-sections {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .content-deco-figure {
    grid-column: 1;
    grid-row: 1;
  }

  .content-aside {
    grid-column: 1;
    grid-row: 2;
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(135, 255, 113, 0.12);
    padding: 20px;
  }

  .aside-nav-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .aside-nav-list li a { min-height: 40px; padding: 6px 12px; border-left: none; border-bottom: 2px solid transparent; }
  .aside-nav-list li a:hover { padding-left: 12px; border-bottom-color: var(--c-green); }

  .content-body {
    grid-column: 1;
    grid-row: 3;
    padding: 28px 20px;
  }

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

  .site-footer > div {
    border-right: none;
    border-bottom: 1px solid rgba(135, 255, 113, 0.08);
    padding: 28px 20px;
  }

  .footer-bottom { padding: 16px 20px; }

  div[id] { scroll-margin-top: 20px; }
}

@media (max-width: 480px) {
  .hero-h1 { font-size: 1.8rem; }
  .content-body { padding: 20px 16px; }
  .sub-row { flex-direction: column; }
  .sub-btn { width: 100%; }
}

/* ===== 工具类 ===== */
img { max-width: 100%; height: auto; display: block; }

/* 滚动条样式 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark2); }
::-webkit-scrollbar-thumb { background: rgba(135, 255, 113, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-green); }

/* 选中文字 */
::selection { background: rgba(135, 255, 113, 0.3); color: var(--c-text); }

button[aria-expanded]{min-width:44px;min-height:44px}
