:root {
  --ink: #0E0E12;
  --ink-2: #15151d;
  --cy: #22D3EE;
  --or: #FF7A45;
  --fg: #E8E9EE;
  --mut: #9BA0AE;
  --line: rgba(255, 255, 255, 0.1);
  --r: 18px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: Archivo, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Space Grotesk", Archivo, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; line-height: 1.15; margin: 0; }

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

/* 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 14, 18, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 0 16px;
  max-width: 1280px;
  min-height: var(--nav-h);
  list-style: none;
  flex-wrap: nowrap;
}

.nav-list > li { display: flex; }

.nav-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 11px;
  min-height: 44px;
  font-size: 1rem;
  color: var(--mut);
  border-radius: 12px;
  transition: color 0.25s, background 0.25s, transform 0.25s;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.nav-list a[aria-current] { color: var(--cy); }

.nav-brand { margin-left: auto; margin-right: auto; }

.brand {
  font-family: "Space Grotesk", "PingFang SC", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  color: #fff !important;
  background: none !important;
  font-size: 1.15rem !important;
  white-space: nowrap;
}

.brand:hover { color: var(--cy) !important; }

.nav-cta { margin-left: 10px; }

.cta {
  background: var(--or) !important;
  color: #16100c !important;
  font-weight: 600;
  border-radius: var(--r) !important;
  padding: 10px 18px !important;
}

.cta:hover {
  background: #ff9066 !important;
  transform: translateY(-2px) !important;
}

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 90px) 24px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
}

.hero-copy { text-align: center; }

.hero-title {
  font-family: "Space Grotesk", "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 8.4vw, 5.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.hero-title .ln {
  display: inline-block;
  white-space: pre;
  animation: rise 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i) * 45ms);
}

.hero-title .ln:nth-child(4n + 2) { color: var(--cy); }
.hero-title .ln:nth-child(4n + 3) { color: var(--or); }

.caret {
  display: inline-block;
  width: 3px;
  height: 0.86em;
  margin-left: 0.16em;
  vertical-align: -0.06em;
  background: var(--cy);
  animation: blink 1.05s steps(1) infinite;
}

.hero-sub {
  max-width: 36ch;
  margin: 1.4rem auto 0;
  color: var(--mut);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-visual {
  position: relative;
  min-height: clamp(220px, 42vh, 440px);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--r);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 122, 69, 0.35), transparent 58%),
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.3), transparent 60%),
    var(--ink-2);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: inherit;
  animation: slowin 1.4s ease-out both;
}

.glow {
  position: absolute;
  inset: 18% 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.5), transparent 68%);
  filter: blur(6px);
  animation: pulse 6s ease-in-out infinite;
}

/* 主体栅格 */
.wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 58px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.5rem 24px 6rem;
  border-top: 1px solid var(--line);
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
  border-left: 2px solid var(--or);
  padding-left: 16px;
}

.toc-title {
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: #fff;
}

.toc .subtitle {
  margin: 0.2rem 0 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--mut);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.toc-list li { counter-increment: toc; }

.toc-list a {
  display: block;
  position: relative;
  padding: 9px 0 9px 26px;
  min-height: 40px;
  font-size: 0.98rem;
  color: var(--mut);
  transition: color 0.2s, padding-left 0.2s;
}

.toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 9px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(34, 211, 238, 0.65);
}

.toc-list a:hover { color: #fff; padding-left: 32px; }

.body { min-width: 0; }

/* 正文 */
.prose { max-width: 74ch; }

.prose > div[id] {
  scroll-margin-top: calc(var(--nav-h) + 22px);
}

.prose > div + div {
  margin-top: 3rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--line);
}

.prose h2 {
  font-size: clamp(1.5rem, 3.3vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.9rem;
}

.prose h2::before {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-bottom: 0.8rem;
  background: var(--or);
  border-radius: 2px;
}

.prose > div > h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.2rem;
  color: var(--cy);
  margin: 1.9rem 0 0.6rem;
  letter-spacing: 0.01em;
}

.prose p {
  margin: 0 0 1.15rem;
  line-height: 1.95;
  color: #D7D9E0;
}

.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.2rem; }
.prose li { margin: 0.45rem 0; line-height: 1.85; color: #D7D9E0; }
.prose li::marker { color: var(--cy); }

.prose a {
  color: var(--cy);
  border-bottom: 1px solid rgba(34, 211, 238, 0.45);
}

.prose a:hover { border-bottom-color: var(--or); color: var(--or); }

.prose strong { color: #fff; font-weight: 600; }

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.3rem;
  border-left: 3px solid var(--cy);
  background: var(--ink-2);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--mut);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose time {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.prose img { border-radius: var(--r); border: 1px solid var(--line); margin: 1.2rem 0; }

.prose table { width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: 0.98rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--ink-2); color: #fff; }

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
  background: #0a0a0e;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr;
  align-items: end;
  gap: 32px;
  padding: 3.5rem 24px 2rem;
}

.foot div { min-width: 0; }

.giant {
  margin: 0;
  font-family: "Space Grotesk", "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 10vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, var(--cy), #ffffff 46%, var(--or));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 10s linear infinite;
}

.foot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 18px;
}

.foot-list a {
  display: block;
  padding: 8px 0;
  min-height: 40px;
  font-size: 0.98rem;
  color: var(--mut);
  transition: color 0.2s;
}

.foot-list a:hover { color: var(--cy); }

.foot-meta {
  text-align: center;
  padding-bottom: 6px;
}

.copy {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
  color: var(--mut);
  letter-spacing: 0.04em;
}

.totop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--mut);
  transition: color 0.2s, border-color 0.2s;
}

.totop:hover { color: var(--or); border-color: var(--or); }

/* 动效 */
@keyframes rise {
  from { opacity: 0; transform: translateY(0.55em) rotate(2.5deg); }
  to { opacity: 1; transform: none; }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes shimmer {
  to { background-position: 220% center; }
}

@keyframes slowin {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}

.reveal { opacity: 0; transform: translateY(22px); }

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 响应式 */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 2.4rem 20px 2.6rem;
  }
  .hero-visual { min-height: 200px; order: 2; }
  .hero-copy { order: 1; }
  .wrap {
    grid-template-columns: 1fr;
    padding: 2rem 20px 4rem;
    gap: 24px;
  }
  .toc {
    position: static;
    border-left: 0;
    border-top: 2px solid var(--or);
    padding: 14px 0 0;
  }
  .toc-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .toc-list a {
    padding: 8px 14px 8px 30px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--r);
  }
  .toc-list a::before { left: 12px; top: 10px; }
  .toc-list a:hover { padding-left: 30px; }
  .foot { grid-template-columns: 1fr; gap: 26px; padding: 2.6rem 20px 2rem; align-items: start; }
  .foot-meta { text-align: left; }
}

@media (max-width: 720px) {
  .nav-list { flex-wrap: wrap; padding: 8px 14px 10px; gap: 4px; min-height: 0; }
  .nav-brand { order: -1; flex-basis: 100%; margin: 0; justify-content: center; padding-bottom: 6px; }
  .nav-list a { padding: 10px 12px; font-size: 0.98rem; }
  .nav-cta { margin-left: 0; }
  .foot-list { columns: 2; }
}

@media (max-width: 400px) {
  .nav-list a { padding: 10px 9px; font-size: 0.95rem; }
}

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

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