/* ============ 变量与重置 ============ */
:root {
  --color-deep-space: #0A1428;
  --color-ice-white: #EAF6FF;
  --color-neon-green: #C5FF3D;
  --color-night-flight: #0B1E3F;
  --color-glacier-cyan: #8CE5FF;
  --color-slate-gray: #4A5C72;
  --color-aqua-green: #3ED68A;
  --color-signal-red: #FF5C5C;
  --font-heading: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
  --header-height: 72px;
  --container-max: 1320px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-slate-gray);
  background: var(--color-deep-space);
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  list-style: none;
}

a {
  color: var(--color-glacier-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-neon-green);
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.25;
  color: var(--color-ice-white);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1em; }

/* ============ 容器 ============ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ 非对称网格 ============ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.content-grid__main {
  grid-column: span 8;
}

.content-grid__aside {
  grid-column: span 3;
  grid-column-start: 10;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-neon-green);
  color: var(--color-deep-space);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.btn--primary:hover {
  background: var(--color-ice-white);
  color: var(--color-deep-space);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(197, 255, 61, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--color-ice-white);
  border: 1px solid rgba(234, 246, 255, 0.4);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.btn--ghost:hover {
  border-color: var(--color-neon-green);
  color: var(--color-neon-green);
  transform: translateY(-2px);
}

/* ============ 面包屑 ============ */
.breadcrumb {
  font-family: var(--font-data);
  font-size: 0.8rem;
  margin-bottom: 32px;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb__item {
  color: rgba(234, 246, 255, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "›";
  color: var(--color-neon-green);
  font-size: 1rem;
  line-height: 1;
}

.breadcrumb__link {
  color: rgba(234, 246, 255, 0.7);
}

.breadcrumb__link:hover {
  color: var(--color-neon-green);
}

.breadcrumb__item[aria-current="page"] {
  color: var(--color-neon-green);
}

/* ============ 章节标题 ============ */
.section-heading {
  position: relative;
  padding-left: 24px;
  margin-bottom: 24px;
}

.section-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 14px;
  height: 1.2em;
  background: var(--color-neon-green);
  clip-path: polygon(0 0, 100% 0, 20% 100%, 0 100%);
}

/* ============ 数据文本 ============ */
.data-text {
  font-family: var(--font-data);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ============ 图片容器基础规则 ============ */
.img-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-night-flight), var(--color-deep-space));
  border-radius: 2px;
}

.img-frame::before {
  content: "";
  display: block;
  padding-bottom: 56.25%;
}

.img-frame > img,
.img-frame > canvas,
.img-frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--tall::before { padding-bottom: 75%; }
.img-frame--wide::before { padding-bottom: 50%; }
.img-frame--square::before { padding-bottom: 100%; }

/* ============ 页头 ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(10, 20, 40, 0.6), rgba(10, 20, 40, 0));
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.has-scrolled {
  background: rgba(10, 20, 40, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

.site-header__skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 2000;
  background: var(--color-neon-green);
  color: var(--color-deep-space);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s ease;
}

.site-header__skip:focus {
  top: 0;
}

.site-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--color-ice-white);
}

.site-header__brand:hover .site-brand__name {
  color: var(--color-ice-white);
}

.site-brand__name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--color-ice-white);
  line-height: 1;
  transition: color 0.2s ease;
}

.site-brand__accent {
  color: var(--color-neon-green);
  font-style: normal;
}

.site-brand__badge {
  display: inline-block;
  background: var(--color-neon-green);
  color: var(--color-deep-space);
  font-family: var(--font-data);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  align-items: center;
}

.site-nav__list {
  display: flex;
  gap: 2px;
}

.site-nav__link {
  display: block;
  padding: 10px 14px;
  color: var(--color-ice-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s ease;
}

.site-nav__link::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--color-neon-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav__link:hover::before,
.site-nav__link:focus-visible::before {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-neon-green);
}

.site-nav__link[aria-current="page"]::before {
  transform: scaleX(1);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-header__cta {
  padding: 10px 20px;
  font-size: 0.8rem;
}

.site-header__nav-cta {
  display: none;
  margin-top: 24px;
  width: 100%;
  justify-content: center;
}

.site-header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(234, 246, 255, 0.3);
  border-radius: 4px;
  background: rgba(10, 20, 40, 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.site-header__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-ice-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__progress {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--color-neon-green), var(--color-glacier-cyan));
  transition: width 0.1s linear;
  z-index: 1;
}

/* ============ 页脚 ============ */
.site-footer {
  background: var(--color-night-flight);
  color: var(--color-ice-white);
  position: relative;
  margin-top: 96px;
  padding-top: 56px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-neon-green) 0%, var(--color-glacier-cyan) 50%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%);
}

.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 32px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 40px;
}

.site-footer__brand-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.site-footer__slogan {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-glacier-cyan);
  margin-bottom: 4px;
}

.site-footer__trust {
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(234, 246, 255, 0.5);
  max-width: 320px;
}

.site-footer__heading {
  font-family: var(--font-data);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-glacier-cyan);
  margin-bottom: 18px;
  padding-bottom: 10px;
  position: relative;
}

.site-footer__heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--color-neon-green);
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__list a {
  color: rgba(234, 246, 255, 0.75);
  font-size: 0.875rem;
  display: inline-block;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer__list a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--color-neon-green);
  transition: width 0.25s ease;
}

.site-footer__list a:hover {
  color: var(--color-neon-green);
  transform: translateX(4px);
}

.site-footer__list a:hover::before {
  width: 100%;
}

.site-footer__item {
  font-size: 0.875rem;
}

.site-footer__list--plain {
  gap: 12px;
}

.site-footer__label {
  display: block;
  font-family: var(--font-data);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-glacier-cyan);
  opacity: 0.8;
  margin-bottom: 2px;
}

.site-footer__text {
  color: rgba(234, 246, 255, 0.85);
  line-height: 1.5;
  word-break: break-all;
}

.site-footer__meta {
  border-top: 1px solid rgba(234, 246, 255, 0.08);
  padding: 20px 0 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--font-data);
  font-size: 0.78rem;
  color: rgba(234, 246, 255, 0.5);
}

.site-footer__copyright,
.site-footer__icp {
  margin: 0;
}

/* ============ 移动端断点 ============ */
@media (max-width: 1024px) {
  :root {
    --header-height: 60px;
  }

  .content-grid__main {
    grid-column: span 12;
  }

  .content-grid__aside {
    grid-column: span 12;
    grid-column-start: auto;
  }

  .site-header__actions {
    gap: 8px;
  }

  .site-header__cta {
    display: none;
  }

  .site-header__nav-cta {
    display: flex;
  }

  .site-header__toggle {
    display: flex;
  }

  .site-header__nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 82vw);
    background: var(--color-night-flight);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px 28px 32px;
    transform: translateX(110%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    z-index: 1001;
  }

  .site-header__nav[data-open] {
    transform: translateX(0);
  }

  .site-nav__list {
    flex-direction: column;
    width: 100%;
    gap: 4px;
  }

  .site-nav__link {
    padding: 14px 8px;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(234, 246, 255, 0.08);
  }

  .site-nav__link::before {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    color: var(--color-neon-green);
    background: rgba(197, 255, 61, 0.06);
    border-left: 3px solid var(--color-neon-green);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .content-grid__main,
  .content-grid__aside {
    grid-column: auto;
  }

  .site-header__inner {
    padding: 0 16px;
  }

  .site-brand__name {
    font-size: 1.1rem;
  }

  .site-brand__badge {
    font-size: 0.6rem;
    padding: 3px 8px;
  }

  .site-footer__inner {
    padding: 0 16px 24px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
  }

  .site-footer__meta {
    flex-direction: column;
    gap: 6px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }
}

/* ============ 无障碍 ============ */
:focus-visible {
  outline: 2px solid var(--color-neon-green);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .site-header__progress {
    transition: none;
  }

  .site-header__nav {
    transition: none;
  }

  .site-nav__link::before {
    transition: none;
  }

  .btn,
  .site-footer__list a {
    transition: none;
  }
}
