:root {
  --ink: #060B18;
  --panel: #0C1730;
  --panel-2: #12224A;
  --line: #1E3A6E;
  --cyan: #22E0D6;
  --cyan-hi: #6FF3EC;
  --red: #E12A4A;
  --orange: #FF8A3D;
  --text: #E8EEF7;
  --text-dim: #C3D0E4;
  --muted: #8FA3C4;
  --graphite: #2A3550;

  --font-head: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", ui-monospace, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --width: 1280px;
  --header-h: 66px;
  --edge: 2px solid var(--graphite);
  --shadow-hard: 6px 6px 0 0 #03060F;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.75;
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 620px at 78% -12%, rgba(34, 224, 214, .10), transparent 72%),
    radial-gradient(920px 520px at 4% 4%, rgba(18, 34, 74, .85), transparent 74%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .62em;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(38px, 6.4vw, 96px); line-height: 1.02; letter-spacing: -.03em; }
h2 { font-size: clamp(24px, 3vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 22px); }

p { margin: 0 0 1em; }

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--cyan-hi); }

:focus-visible {
  outline: 2px solid var(--cyan-hi);
  outline-offset: 3px;
}

main:focus { outline: none; }

[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

/* ---------- 工具类 ---------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--width));
  margin-inline: auto;
}
.container--narrow { max-width: 800px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--cyan);
}

.prose { max-width: 34em; }
.prose p { color: var(--text-dim); }

.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 4vw, 48px);
  background: var(--line);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -90px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-decoration: none;
  border: 2px solid var(--cyan-hi);
  box-shadow: 4px 4px 0 0 #03060F;
  transition: top .18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 12px; color: var(--ink); }

/* ---------- 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(6, 11, 24, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  width: min(100% - (var(--gutter) * 2), var(--width));
  margin-inline: auto;
  min-height: var(--header-h);
  padding-block: 10px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--cyan);
  border: 2px solid var(--cyan-hi);
  box-shadow: 3px 3px 0 0 var(--panel-2);
}
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.1;
}
.brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}
.brand__badge {
  align-self: flex-start;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--cyan);
  border: 1px solid var(--line);
}
.brand:hover .brand__badge { color: var(--cyan-hi); border-color: var(--cyan); }
.brand--footer .brand__mark { width: 34px; height: 34px; font-size: 11px; }

/* 主导航 */
.site-nav { margin-inline: auto; min-width: 0; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__item { flex: 0 0 auto; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color .16s var(--ease), background-color .16s var(--ease), border-color .16s var(--ease);
}
.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--line);
  transition: color .16s var(--ease);
}
.site-nav__label { white-space: nowrap; }

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--text);
  background: rgba(18, 34, 74, .8);
  border-color: var(--line);
}
.site-nav__link:hover .site-nav__index,
.site-nav__link:focus-visible .site-nav__index { color: var(--cyan); }

.site-nav__link[aria-current="page"] {
  color: var(--cyan-hi);
  background: rgba(34, 224, 214, .08);
  border-color: rgba(34, 224, 214, .35);
}
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--cyan); }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  background: var(--cyan);
}

/* 头部右侧 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.status-lamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}
.status-lamp__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 224, 214, .55);
  animation: lamp-pulse 2.6s ease-out infinite;
}
@keyframes lamp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 224, 214, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 224, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 224, 214, 0); }
}
.status-lamp--footer { margin-top: 18px; color: var(--cyan); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 2px solid var(--graphite);
  box-shadow: 4px 4px 0 0 #03060F;
  cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), background-color .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}
.btn:hover,
.btn:focus-visible {
  color: var(--ink);
  background: var(--cyan-hi);
  border-color: var(--cyan-hi);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 #03060F;
}
.btn--primary {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan-hi);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--cyan-hi);
  color: var(--ink);
}
.btn--ghost {
  color: var(--cyan);
  background: transparent;
  border-color: var(--line);
}
.btn--sm { padding: 7px 12px; font-size: 11.5px; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--cyan);
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 0 #03060F;
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan-hi); }
.nav-toggle__text { line-height: 1; }
.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 滚动进度光带 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-hi));
  transition: width .1s linear;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 120px);
  color: var(--text);
  background-image: linear-gradient(180deg, var(--ink) 0%, #04070F 58%, #03060F 100%);
  border-top: 2px solid var(--line);
}
.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(34, 224, 214, .18) 42%, transparent 72%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  width: min(100% - (var(--gutter) * 2), var(--width));
  margin-inline: auto;
  padding-block: clamp(36px, 6vw, 72px) clamp(24px, 4vw, 44px);
}

.footer-brand { min-width: 0; }

.footer-tagline {
  margin: 18px 0 0;
  max-width: 26em;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-heading {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.footer-list--plain { gap: 10px; }

.footer-link {
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .14s var(--ease);
}
.footer-link:hover,
.footer-link:focus-visible { color: var(--cyan); }

.footer-contact__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.footer-contact__key {
  flex: 0 0 34px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  opacity: .8;
}
.footer-contact__value { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

.footer-copy {
  margin-left: 8px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .14s var(--ease), background-color .14s var(--ease), border-color .14s var(--ease);
}
.footer-copy:hover,
.footer-copy:focus-visible {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}
.footer-copy[data-copied="true"] {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan-hi);
}
.footer-copy[data-copied="false"] {
  color: var(--red);
  border-color: rgba(225, 42, 74, .6);
}

.footer-meta__item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  width: min(100% - (var(--gutter) * 2), var(--width));
  margin-inline: auto;
  padding-block: 16px 24px;
  border-top: 1px solid var(--line);
}
.footer-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--muted);
}
.footer-year { color: var(--cyan); }

/* ---------- 通用内容组件 ---------- */
.section {
  padding-block: clamp(36px, 6vw, 76px);
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.5vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  padding: clamp(18px, 3vw, 28px);
  background: var(--panel);
  border: var(--edge);
  box-shadow: var(--shadow-hard);
}
.panel--accent { border-color: rgba(34, 224, 214, .45); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--orange);
  border: 1px solid rgba(255, 138, 61, .5);
}
.tag--red {
  color: var(--red);
  border-color: rgba(225, 42, 74, .55);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .14s var(--ease), background-color .14s var(--ease), border-color .14s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--cyan); }
.chip[aria-pressed="true"] {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan-hi);
}

.breadcrumbs {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--muted);
}
.breadcrumbs__list li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cyan); }

.index-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--line);
}
.index-rail__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: inherit;
  text-decoration: none;
  transition: color .12s var(--ease);
}
.index-rail__num { color: inherit; }
.index-rail__item:hover,
.index-rail__item[data-active="true"] { color: var(--cyan); }

/* ---------- 图片容器基础规则 ---------- */
.figure {
  display: grid;
  gap: 12px;
  margin: 0;
}
.figure__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: var(--edge);
  box-shadow: var(--shadow-hard);
  background-color: var(--panel);
  background-image:
    linear-gradient(155deg, rgba(34, 224, 214, .12), rgba(6, 11, 24, 0) 62%),
    repeating-linear-gradient(90deg, rgba(30, 58, 110, .55) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(30, 58, 110, .55) 0 1px, transparent 1px 44px);
}
.figure__media--wide { aspect-ratio: 21 / 9; }
.figure__media--tall { aspect-ratio: 4 / 5; }
.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.figure__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity .42s var(--ease) var(--reveal-delay, 0ms),
    transform .42s var(--ease) var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
  .site-nav__link { padding: 8px 8px 11px; font-size: 12.5px; }
  .site-nav__index { font-size: 10.5px; }
  .site-header .status-lamp__text { display: none; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-inline: 0;
    padding: 12px var(--gutter) 14px;
    background: rgba(6, 11, 24, .985);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s linear;
  }
  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav__item { flex: 0 0 auto; }
  .site-nav__link {
    white-space: nowrap;
    padding: 9px 12px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
  }
  .site-nav__link[aria-current="page"]::after { left: 12px; right: 12px; bottom: 4px; }

  .header-actions { margin-left: auto; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-cta { display: none; }
  .brand__name { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { justify-content: flex-start; }
  .footer-contact__key { flex-basis: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .status-lamp__dot {
    animation: none !important;
    box-shadow: 0 0 0 3px rgba(34, 224, 214, .18) !important;
  }
}
