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

/* ===== 变量 ===== */
:root {
  --c-bg: #0D0D0D;
  --c-accent: #00FF99;
  --c-deep: #1A1A2E;
  --c-text: #E8E8E8;
  --c-muted: #888;
  --c-border: #222;
  --c-card: #111;
  --c-card2: #141420;
  --c-hover: rgba(0,255,153,0.08);
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --nav-h: 58px;
  --sidebar-w: 52px;
  --radius: 18px;
  --radius-sm: 8px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-bg);
  color: var(--c-text);
}
body, .dark-body {
  font-family: var(--font-sans);
  line-height: 1.65;
  background: var(--c-bg);
  color: var(--c-text);
  overflow-x: hidden;
}
a { color: var(--c-accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
address { font-style: normal; }
strong { color: var(--c-accent); }

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

/* ===== 站点容器 ===== */
.site-wrapper {
  min-height: 100vh;
  padding-bottom: var(--nav-h);
}

/* ===== 底部固定导航条 ===== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13,13,13,0.96);
  border-top: 1px solid var(--c-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
}
.bottom-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}
.bottom-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  min-height: 40px;
  padding: 0 4px;
}
.brand-text { color: var(--c-accent); }
.logo-img { height: 32px; width: auto; }

.bottom-nav-center { position: relative; display: flex; align-items: center; }

.nav-toggle {
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
}
.toggle-bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-deep);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-width: 200px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.7);
}
.nav-dropdown.open { display: block; }
.nav-group-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.nav-dropdown-list { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: block;
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--c-text);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  line-height: 1.3;
  display: flex;
  align-items: center;
}
.nav-link:hover { background: var(--c-hover); color: var(--c-accent); opacity: 1; }

.nav-cta {
  background: var(--c-accent);
  color: #0D0D0D;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background var(--transition), color var(--transition);
}
.nav-cta:hover { background: #fff; color: #0D0D0D; opacity: 1; }

/* ===== 内容布局：aside 左 + main 右 ===== */
.content-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== 侧边栏 ===== */
.sidebar-aside {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 60vh;
}
.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-nav li a {
  display: block;
  width: 36px; height: 36px;
  background: var(--c-deep);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--c-muted);
  text-align: center;
  line-height: 34px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  overflow: hidden;
  white-space: nowrap;
  text-indent: -9999px;
  position: relative;
}
.sidebar-nav li a::after {
  content: '';
  display: block;
  width: 6px; height: 6px;
  background: var(--c-muted);
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  text-indent: 0;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  border-color: var(--c-accent);
  background: var(--c-hover);
  opacity: 1;
}
.sidebar-nav li a:hover::after,
.sidebar-nav li a.active::after {
  background: var(--c-accent);
}
.sidebar-tag {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--c-border);
  letter-spacing: 0.1em;
  user-select: none;
}

/* ===== 主内容 ===== */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 0 20px 60px;
}

/* ===== Hero ===== */
.hero-block {
  min-height: 45vh;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--c-accent);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
}
.typed-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--c-accent);
  animation: cursor-blink 0.9s step-end infinite;
  vertical-align: middle;
}
@keyframes cursor-blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-h1 {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.h1-line { display: block; }
.h1-line.accent {
  background: linear-gradient(135deg, #00FF99 0%, #00ccff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 380px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--c-accent);
  color: #0D0D0D;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,255,153,0.3); opacity: 1; }
.btn-ghost {
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); opacity: 1; }

/* hero 右侧装饰 */
.hero-right {
  flex: 0 0 280px;
  position: relative;
  height: 280px;
}
.hero-deco-wrap { position: relative; width: 100%; height: 100%; }
.hero-bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,255,153,0.12);
  letter-spacing: 0.12em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  animation: hero-float 6s ease-in-out infinite;
}
@keyframes hero-float {
  0%,100% { transform: translate(-50%,-50%) translateY(0); }
  50% { transform: translate(-50%,-50%) translateY(-10px); }
}
.hero-deco-box {
  position: absolute;
  inset: 20px;
  background: var(--c-deep);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.deco-line-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.deco-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(0,255,153,0.3);
  border: 1px solid rgba(0,255,153,0.1);
  border-radius: 4px;
  text-align: center;
  padding: 4px;
  animation: deco-pulse 2s ease-in-out infinite;
}
.deco-num:nth-child(2) { animation-delay: 0.3s; }
.deco-num:nth-child(3) { animation-delay: 0.6s; }
.deco-num:nth-child(4) { animation-delay: 0.9s; }
.deco-num:nth-child(5) { animation-delay: 1.2s; }
.deco-num:nth-child(6) { animation-delay: 1.5s; }
@keyframes deco-pulse {
  0%,100% { color: rgba(0,255,153,0.3); border-color: rgba(0,255,153,0.1); }
  50% { color: rgba(0,255,153,0.8); border-color: rgba(0,255,153,0.4); }
}
.deco-code-block {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--c-muted);
  flex: 1;
}
.code-kw { color: #cc99ff; }
.code-op { color: var(--c-accent); }
.code-str { color: #ffb347; }
.code-num { color: #00ccff; }

/* ===== 正文容器 main > div.wrap > article > section ===== */
.wrap {
  width: 100%;
}
.content-section {
  width: 100%;
}
.content-article {
  width: 100%;
}
.page-content {
  width: 100%;
}

/* ===== page.content 内部样式（CMS注入的7个article） ===== */
.page-content article {
  margin-bottom: 64px;
  padding-top: 16px;
}
.page-content h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
  position: relative;
}
.page-content h2::before {
  content: attr(data-index, '');
  font-size: 0.7rem;
  color: var(--c-accent);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}
.page-content h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-accent);
  margin: 28px 0 12px;
  letter-spacing: 0.02em;
}
.page-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 20px 0 8px;
  font-family: var(--font-mono);
}
.page-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #ccc;
  margin-bottom: 16px;
  max-width: 68ch;
}
.page-content ul, .page-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.page-content ul { list-style: none; padding-left: 0; }
.page-content ul li {
  padding: 6px 0 6px 20px;
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.65;
  position: relative;
}
.page-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-size: 0.8rem;
}
.page-content ol { list-style: decimal; }
.page-content ol li { color: #ccc; font-size: 0.95rem; padding: 4px 0; line-height: 1.65; }
.page-content a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.page-content strong { color: var(--c-accent); font-weight: 600; }
.page-content em { color: #aaa; font-style: italic; }
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
}
.page-content th {
  background: var(--c-deep);
  color: var(--c-accent);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--c-border);
}
.page-content td {
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  color: #ccc;
  vertical-align: top;
}
.page-content tr:hover td { background: var(--c-hover); }

/* Q&A (dt/dd 或 details → 确保可见) */
.page-content details { all: unset; display: block; }
.page-content details summary { all: unset; display: block; cursor: pointer; }
.page-content dt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--c-text);
  font-size: 0.95rem;
  padding: 12px 0 4px;
  border-top: 1px solid var(--c-border);
}
.page-content dd {
  color: #bbb;
  font-size: 0.92rem;
  line-height: 1.7;
  padding-bottom: 12px;
}
.page-content blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--c-hover);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #ccc;
  font-size: 0.95rem;
}

/* 卡片式块：圆角18px，柔阴影浮起 */
.page-content .card,
.page-content [class*="card"] {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
}
.page-content .card:hover,
.page-content [class*="card"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,255,153,0.1), 0 2px 8px rgba(0,0,0,0.5);
}

/* subtitle/subhead/desc/lead 契约 */
.subtitle, .subhead, .desc, .lead {
  font-size: 1rem;
  color: var(--c-muted);
  margin-bottom: 24px;
  line-height: 1.7;
  font-family: var(--font-sans);
}

/* ===== Scroll Reveal 动画 ===== */
.js-reveal, .js-reveal-delay {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal-delay { transition-delay: 0.15s; }
.js-reveal.revealed, .js-reveal-delay.revealed { opacity: 1; transform: none; }

.js-content-reveal > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-content-reveal > *.revealed { opacity: 1; transform: none; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-deep);
  border-top: 1px solid var(--c-border);
  margin-top: 80px;
  padding-bottom: var(--nav-h);
}
.footer-top {
  overflow: hidden;
  padding: 40px 40px 0;
  line-height: 1;
}
.footer-brand-mega {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,255,153,0.15);
  letter-spacing: -0.02em;
  user-select: none;
  white-space: nowrap;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding: 40px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo-wrap { margin-bottom: 12px; }
.footer-brand-name {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-accent);
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.6;
  max-width: 260px;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links li a {
  font-size: 0.9rem;
  color: #aaa;
  transition: color var(--transition);
  display: block;
  padding: 4px 0;
  min-height: 32px;
  line-height: 1.5;
}
.footer-links li a:hover { color: var(--c-accent); opacity: 1; }
.footer-notice {
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,100,100,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,100,100,0.04);
}
.footer-contact-list { display: flex; flex-direction: column; gap: 6px; }
.footer-contact-list li a {
  font-size: 0.875rem;
  color: #aaa;
  min-height: 32px;
  display: block;
  line-height: 2;
}
.footer-address { display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding: 20px 40px;
  text-align: center;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ===== 断点：平板 ===== */
@media (max-width: 900px) {
  .hero-block { flex-direction: column; gap: 28px; padding: 32px 0 28px; min-height: auto; }
  .hero-right { flex: none; width: 100%; height: 180px; }
  .hero-bg-text { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px 24px; }
  .sidebar-aside { display: none; }
  .content-layout { max-width: 100%; }
  .main-content { padding: 0 16px 40px; }
}

/* ===== 断点：移动端 ===== */
@media (max-width: 600px) {
  .hero-h1 { font-size: clamp(2rem, 12vw, 3rem); }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px; }
  .footer-top { padding: 24px 16px 0; }
  .footer-brand-mega { font-size: clamp(2.5rem, 15vw, 4rem); }
  .footer-bottom { padding: 16px; }
  .bottom-nav-inner { padding: 0 12px; }
  .nav-cta { padding: 10px 12px; font-size: 0.75rem; }
  .hero-right { height: 140px; }
  .page-content h2 { font-size: 1.25rem; }
  .page-content p { font-size: 0.95rem; }
  .main-content { padding: 0 12px 40px; }
}

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