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

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

:root {
  --bg: #000000;
  --bg2: #121212;
  --bg3: #1a1a1a;
  --border: #2a2a2a;
  --border-hi: #3a3a3a;
  --text: #e8e8e8;
  --text-muted: #888888;
  --text-dim: #555555;
  --accent-green: #00ff88;
  --accent-blue: #00cfff;
  --accent-gold: #ffd700;
  --accent-purple: #bb88ff;
  --accent-main: #00ff88;
  --font: 'Outfit', 'Work Sans', system-ui, -apple-system, sans-serif;
  --header-h: 60px;
  --sticky-h: 44px;
  --offset: calc(var(--header-h) + var(--sticky-h));
  --max-w: 1280px;
  --radius: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-size: 16px;
}

body, .dark-body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 锚点补偿 */
section[id] {
  scroll-margin-top: var(--offset);
}

a {
  color: var(--accent-main);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-blue); }
a:focus-visible {
  outline: 2px solid var(--accent-main);
  outline-offset: 2px;
}

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

ul, menu { list-style: none; }

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* === 页面容器 === */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === 顶部 Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(0,0,0,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
}

.site-logo-img {
  height: 36px;
  width: auto;
}

.site-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-main);
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px var(--accent-main);
}

/* === 导航 details/summary/menu === */
.nav-details {
  position: relative;
}

.nav-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  list-style: none;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color 0.2s;
}

.nav-summary::-webkit-details-marker { display: none; }
.nav-summary:hover { border-color: var(--accent-main); }

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: background 0.2s;
}

.nav-details[open] .hamburger-bar { background: var(--accent-main); }

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border-hi);
  min-width: 200px;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.nav-menu li { border-bottom: 1px solid var(--border); }
.nav-menu li:last-child { border-bottom: none; }

.nav-link {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--bg3);
  color: var(--accent-main);
}

/* === 粘性锚点条 === */
.sticky-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  height: var(--sticky-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  margin-top: var(--header-h);
}

.sticky-bar::-webkit-scrollbar { display: none; }

.sticky-link {
  flex-shrink: 0;
  padding: 0 1.1rem;
  height: var(--sticky-h);
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  min-height: 44px;
}

.sticky-link:hover {
  color: var(--accent-main);
  background: rgba(0,255,136,0.04);
}

/* === 主区域 === */
.site-main {
  flex: 1;
}

/* === Hero === */
.hero-section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: linear-gradient(135deg, #000000 60%, #0a0a18 100%);
}

.hero-aside {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 5;
}

.badge-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--accent-main);
  color: var(--accent-main);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--accent-main);
  background: rgba(0,255,136,0.05);
}

.badge-tag.accent-gold {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-gold);
  background: rgba(255,215,0,0.05);
}

.badge-tag.accent-blue {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  text-shadow: 0 0 8px var(--accent-blue);
  background: rgba(0,207,255,0.05);
}

.hero-figure {
  flex: 1;
  display: flex;
  align-items: center;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  gap: 3rem;
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

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

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: var(--accent-main);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition: box-shadow 0.2s, transform 0.15s;
  text-shadow: none;
}

.btn-primary:hover {
  color: #000;
  box-shadow: 0 0 16px var(--accent-main);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-hi);
  min-height: 44px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.hero-img-wrap {
  flex: 0 0 42%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-wrap .hero-img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-hi);
  display: block;
  object-fit: cover;
}

.hero-placeholder {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border-hi);
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-main);
  text-shadow: 0 0 20px var(--accent-main), 0 0 40px rgba(0,255,136,0.3);
  letter-spacing: 0.1em;
}

/* === 内容区：左aside + 右body === */
.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.content-aside {
  flex: 0 0 220px;
  position: sticky;
  top: var(--offset);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  align-self: flex-start;
}

.aside-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 1.25rem;
}

.aside-list li {
  border-left: 2px solid transparent;
  transition: border-color 0.2s;
}

.aside-list li:hover {
  border-left-color: var(--accent-main);
}

.aside-link {
  display: block;
  padding: 0.45rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.aside-link:hover { color: var(--accent-main); }

.aside-tip {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.aside-tip p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.content-body {
  flex: 1;
  min-width: 0;
}

/* 正文内的section样式 */
.content-body section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.content-body section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.content-body h2 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.content-body h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.content-body h2 + hr,
.content-body h3 + hr {
  margin-bottom: 1.25rem;
  border-top-color: var(--accent-main);
  opacity: 0.4;
}

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

.content-body ul, .content-body ol {
  margin: 0.75rem 0 1rem 1.25rem;
}

.content-body li {
  margin-bottom: 0.4rem;
  color: var(--text);
  line-height: 1.65;
}

.content-body a {
  color: var(--accent-blue);
  border-bottom: 1px solid rgba(0,207,255,0.25);
  transition: border-color 0.2s, color 0.2s;
}

.content-body a:hover {
  color: var(--accent-main);
  border-bottom-color: var(--accent-main);
}

.content-body figure {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg2);
}

.content-body figcaption {
  padding: 0.6rem 0.875rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.content-body aside {
  background: var(--bg2);
  border-left: 3px solid var(--accent-purple);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* time元素样式 */
time {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* === 页脚 === */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer-cta {
  margin: 0;
}

.footer-copy {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.footer-link {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent-main); }

/* === 滚动显现动效 === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 10px var(--accent-main); }
  50% { text-shadow: 0 0 20px var(--accent-main), 0 0 40px rgba(0,255,136,0.4); }
}

.hero-h1 {
  animation: fadeUp 0.7s ease both;
}
.hero-desc {
  animation: fadeUp 0.7s 0.15s ease both;
}
.hero-cta-group {
  animation: fadeUp 0.7s 0.28s ease both;
}
.glow-text {
  animation: glowPulse 3s ease-in-out infinite;
}

/* Scroll reveal 用 JS 控制 */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

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

/* === 响应式 === */
@media (max-width: 900px) {
  .hero-figure {
    flex-direction: column;
    padding: 4rem 1.5rem 2.5rem;
    gap: 2rem;
  }
  .hero-img-wrap {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  .hero-placeholder {
    min-height: 200px;
  }
  .hero-aside {
    flex-direction: row;
    flex-wrap: wrap;
    top: 1.25rem;
    right: 1.25rem;
    gap: 0.4rem;
  }
  .content-section {
    flex-direction: column;
    padding: 2rem 1.25rem;
  }
  .content-aside {
    position: static;
    flex: none;
    width: 100%;
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 56px;
    --sticky-h: 40px;
  }
  .header-inner { padding: 0 1rem; }
  .hero-h1 { font-size: 1.75rem; }
  .hero-figure { padding: 3.5rem 1rem 2rem; }
  .sticky-link { font-size: 0.78rem; padding: 0 0.75rem; }
  .content-section { padding: 1.5rem 1rem; }
  .btn-primary, .btn-ghost { padding: 0.75rem 1.25rem; font-size: 0.875rem; }
  .hero-cta-group { flex-direction: column; width: 100%; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .hero-aside { top: auto; bottom: 1rem; right: 1rem; flex-direction: row; flex-wrap: wrap; }
  .site-footer { padding: 2rem 1rem 1.5rem; }
}

/* === 选择框/代码 === */
::selection {
  background: rgba(0,255,136,0.25);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-main); }

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