:root {
  --ink: #0B1B2B;
  --panel: #102A43;
  --panel-deep: #0A2135;
  --cream: #F7F1E3;
  --paper: #FFFDF7;
  --cyan: #16D9E3;
  --cyan-soft: #9FF3F2;
  --amber: #F5A623;
  --amber-soft: #FFC45E;
  --vermilion: #E4572E;
  --graphite: #2B2F36;
  --slate: #5B6770;
  --line-dark: rgba(22, 217, 227, 0.18);
  --line-light: rgba(16, 42, 67, 0.12);
  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 24px 60px -46px rgba(11, 27, 43, 0.65);
  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --sans: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 520px at 78% -8%, rgba(22, 217, 227, 0.16), transparent 62%),
    radial-gradient(760px 420px at 6% 4%, rgba(245, 166, 35, 0.1), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas,
picture {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(11, 27, 43, 0.45);
  border-radius: 6px;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--cyan);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.shell {
  width: min(var(--shell), 100%);
  margin-inline: auto;
}

#main-content {
  position: relative;
  width: calc(100% - clamp(16px, 3vw, 40px));
  max-width: 1400px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(56px, 6vw, 96px);
  background: var(--cream);
  border-radius: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 48px) 0 0;
  overflow: clip;
  scroll-margin-top: 96px;
}

/* ---------- 排版工具类 ---------- */
.t-display {
  display: block;
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(2.75rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.t-mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.t-serif {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.5;
  letter-spacing: 0;
}

.prose {
  max-width: 720px;
}

.prose p + p {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
}

.prose ul {
  margin-top: 0.8em;
  padding-left: 1.1em;
  list-style: disc;
}

.prose li + li {
  margin-top: 0.35em;
}

/* ---------- 顶部阅读进度条 ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  height: 3px;
  background: rgba(22, 217, 227, 0.14);
  pointer-events: none;
}

.reading-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

/* ---------- 头部悬浮胶囊导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 14px clamp(12px, 3vw, 28px) 10px;
}

.header-shell {
  width: min(var(--shell), 100%);
  margin-inline: auto;
}

.nav-island {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  padding: 8px 10px 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(16, 42, 67, 0.94);
  border: 1px solid var(--line-dark);
  box-shadow: 0 22px 50px -30px rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  color: var(--cream);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(22, 217, 227, 0.12);
  border: 1px solid rgba(22, 217, 227, 0.38);
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(22, 217, 227, 0.2);
}

.brand-version {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--cyan-soft);
}

.nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: rgba(247, 241, 227, 0.76);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-link:hover {
  color: var(--cream);
  background: rgba(22, 217, 227, 0.1);
  border-color: rgba(22, 217, 227, 0.42);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 700;
}

.nav-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.pill--ghost {
  color: var(--cyan-soft);
  border-color: rgba(159, 243, 242, 0.42);
}

.pill--ghost:hover {
  background: rgba(159, 243, 242, 0.14);
  color: var(--paper);
}

.pill--cyan {
  background: var(--cyan);
  color: var(--ink);
}

.pill--cyan:hover {
  background: var(--cyan-soft);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(22, 217, 227, 0.42);
  background: rgba(22, 217, 227, 0.1);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle-text {
  display: inline-block;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 0;
  padding: clamp(48px, 7vw, 88px) clamp(16px, 3vw, 28px) 24px;
  background: var(--ink);
  color: rgba(247, 241, 227, 0.72);
  border-top: 1px solid rgba(22, 217, 227, 0.16);
}

.footer-shell {
  width: min(var(--shell), 100%);
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1.35fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

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

.footer-logo {
  display: inline-block;
  color: var(--cream);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
}

.footer-logo:hover {
  color: var(--cyan-soft);
}

.footer-tagline {
  margin-top: 14px;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(247, 241, 227, 0.6);
}

.footer-icp {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(247, 241, 227, 0.45);
}

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

.footer-title {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.5;
  color: var(--cyan);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(247, 241, 227, 0.78);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-contact {
  display: grid;
  gap: 14px;
}

.footer-contact-item {
  display: grid;
  gap: 2px;
}

.footer-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: rgba(247, 241, 227, 0.42);
}

.footer-value {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(247, 241, 227, 0.86);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: 20px;
  border-top: 1px solid rgba(247, 241, 227, 0.14);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(247, 241, 227, 0.5);
}

.footer-copy,
.footer-meta {
  margin: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--cyan);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--cyan-soft);
}

.btn--amber {
  background: var(--amber);
  color: var(--ink);
}

.btn--amber:hover {
  background: var(--amber-soft);
}

.btn--outline {
  background: transparent;
  border-color: rgba(11, 27, 43, 0.24);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--ink);
  background: rgba(11, 27, 43, 0.05);
}

.btn--on-dark {
  background: rgba(22, 217, 227, 0.08);
  border-color: rgba(159, 243, 242, 0.45);
  color: var(--cyan-soft);
}

.btn--on-dark:hover {
  background: rgba(22, 217, 227, 0.18);
  border-color: var(--cyan);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 42, 67, 0.16);
  background: rgba(16, 42, 67, 0.06);
  color: var(--panel);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--cyan {
  background: rgba(22, 217, 227, 0.14);
  border-color: rgba(22, 217, 227, 0.45);
  color: #0A6A70;
}

.tag--amber {
  background: rgba(245, 166, 35, 0.16);
  border-color: rgba(245, 166, 35, 0.5);
  color: #8A5B00;
}

.tag--vermilion {
  background: rgba(228, 87, 46, 0.13);
  border-color: rgba(228, 87, 46, 0.42);
  color: #A83318;
}

.tag--on-dark {
  background: rgba(22, 217, 227, 0.12);
  border-color: rgba(22, 217, 227, 0.4);
  color: var(--cyan-soft);
}

/* ---------- 面板与堆叠 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-card);
}

.panel--dark {
  background: var(--panel);
  border-color: var(--line-dark);
  color: rgba(247, 241, 227, 0.82);
}

.panel--dark h2,
.panel--dark h3,
.panel--dark h4 {
  color: var(--cream);
}

.panel--cream {
  background: var(--cream);
}

.panel--flat {
  box-shadow: none;
}

.offset-stack {
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: rgba(16, 42, 67, 0.14);
}

.rule--on-dark {
  background: rgba(247, 241, 227, 0.16);
}

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--panel);
  background-image:
    radial-gradient(120% 120% at 12% 0%, rgba(22, 217, 227, 0.28), transparent 58%),
    linear-gradient(160deg, #102A43 0%, #0B1B2B 100%);
  isolation: isolate;
}

.media-frame img,
.media-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.media-frame img {
  object-fit: cover;
}

.media-frame--grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(159, 243, 242, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 243, 242, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

.media-frame--tall {
  aspect-ratio: 4 / 5;
}

.media-frame__caption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--slate);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

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

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-link {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.breadcrumb-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: rgba(43, 47, 54, 0.35);
}

.breadcrumb-current {
  color: var(--ink);
}

.breadcrumb--on-dark .breadcrumb-link {
  color: rgba(247, 241, 227, 0.6);
}

.breadcrumb--on-dark .breadcrumb-link:hover {
  color: var(--cyan);
}

.breadcrumb--on-dark .breadcrumb-sep {
  color: rgba(247, 241, 227, 0.3);
}

.breadcrumb--on-dark .breadcrumb-current {
  color: var(--cream);
}

/* ---------- 索引轨道 ---------- */
.rail {
  display: grid;
  gap: 6px;
}

.rail-list {
  display: grid;
  gap: 2px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border-left: 2px solid transparent;
  color: rgba(247, 241, 227, 0.62);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.rail-link:hover {
  color: var(--cyan-soft);
  background: rgba(22, 217, 227, 0.08);
}

.rail-link.is-active {
  background: var(--cyan);
  border-left-color: var(--amber);
  color: var(--ink);
  font-weight: 700;
}

.rail--on-light .rail-link {
  color: var(--slate);
}

.rail--on-light .rail-link:hover {
  color: var(--ink);
  background: rgba(16, 42, 67, 0.06);
}

.rail--on-light .rail-link.is-active {
  background: var(--ink);
  border-left-color: var(--amber);
  color: var(--cream);
}

/* ---------- 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

/* ---------- 响应式 ---------- */
@media (min-width: 900px) {
  .offset-stack > :nth-child(even) {
    margin-left: 20px;
  }
}

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

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    margin-left: 0;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(16, 42, 67, 0.99);
    border: 1px solid var(--line-dark);
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
  }

  .nav-island[data-open="true"] .nav {
    display: block;
  }

  .nav-island[data-open="true"] .nav-toggle {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--ink);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    display: block;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    color: rgba(247, 241, 227, 0.86);
  }

  .nav-quick {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 10px 10px 8px;
  }

  .nav-island {
    padding: 7px 8px 7px 14px;
    gap: 8px;
  }

  .brand-status {
    display: none;
  }

  #main-content {
    border-radius: 24px 24px 0 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover {
    transform: none;
  }
}
