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

/* === 变量与重置 === */
:root {
  --c-bg: #0A0A0F;
  --c-blue: #1A8FFF;
  --c-text: #E8E8F0;
  --c-muted: #6B7280;
  --c-border: rgba(26,143,255,0.2);
  --c-glass: rgba(255,255,255,0.04);
  --c-glass-border: rgba(255,255,255,0.08);
  --nav-h: 64px;
  --font-main: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-card: 4px;
  --transition: 0.3s 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-page {
  font-family: var(--font-main);
  line-height: 1.6;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, menu { list-style: none; }

/* === 网格底纹 === */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,143,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,143,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* === 底部固定导航 === */
.nav-details {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav-details summary {
  list-style: none;
  cursor: default;
}

.nav-details summary::-webkit-details-marker { display: none; }

.nav-summary {
  display: block;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--c-border);
  padding: 8px 16px;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  letter-spacing: 0.02em;
}

.nav-link:hover {
  background: rgba(26,143,255,0.15);
  border-color: var(--c-blue);
  color: var(--c-blue);
  text-decoration: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
}

.brand-text {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: var(--c-blue);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.brand-logo-img {
  height: 36px;
  width: auto;
}

/* === Hero === */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 24px calc(var(--nav-h) + 40px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--c-text) 40%, var(--c-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 480px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--c-blue);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  align-self: flex-start;
  transition: opacity var(--transition), transform var(--transition);
}

.hero-cta:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-media {
  flex: 1;
  max-width: 480px;
  border-radius: 8px;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.hero-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-placeholder-gfx {
  width: 100%;
  aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(26,143,255,0.04) 0px,
      rgba(26,143,255,0.04) 1px,
      transparent 1px,
      transparent 20px
    );
  border: 1px solid var(--c-border);
  border-radius: 8px;
  position: relative;
}

.hero-placeholder-gfx::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(26,143,255,0.12) 0%, transparent 70%);
  border-radius: 8px;
}

/* === 主体区 scroll-margin === */
div[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* === wrap + 结构 === */
main {
  padding: 60px 24px calc(var(--nav-h) + 40px);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.content-section {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* === aside 左侧 === */
.content-aside {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}

.aside-inner {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  backdrop-filter: blur(8px);
}

.aside-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--c-blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-muted);
  padding: 6px 10px;
  border-radius: var(--radius-card);
  transition: color var(--transition), background var(--transition);
  line-height: 1.4;
}

.aside-link:hover {
  color: var(--c-blue);
  background: rgba(26,143,255,0.08);
  text-decoration: none;
}

/* === section 内容 === */
.content-article {
  flex: 1;
  min-width: 0;
}

.section-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--c-text);
}

.subtitle {
  font-size: 15px;
  color: var(--c-muted);
  margin-bottom: 36px;
  line-height: 1.6;
}

.page-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
}

/* 内容区排版 */
.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 48px 0 12px;
  letter-spacing: -0.01em;
}

.page-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 32px 0 10px;
}

.page-content p {
  margin-bottom: 18px;
}

.page-content ul, .page-content ol {
  margin: 0 0 18px 1.4em;
  list-style: disc;
}

.page-content ol { list-style: decimal; }

.page-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-content a {
  color: var(--c-blue);
  border-bottom: 1px solid rgba(26,143,255,0.35);
  transition: border-color var(--transition);
}

.page-content a:hover {
  border-color: var(--c-blue);
  text-decoration: none;
}

.page-content div {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--c-border);
}

.page-content div:last-child {
  border-bottom: none;
}

.page-content strong {
  color: var(--c-blue);
  font-weight: 700;
}

.page-content blockquote {
  border-left: 3px solid var(--c-blue);
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(26,143,255,0.06);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--c-muted);
  font-style: italic;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.page-content th, .page-content td {
  border: 1px solid var(--c-border);
  padding: 10px 14px;
  text-align: left;
}

.page-content th {
  background: rgba(26,143,255,0.1);
  color: var(--c-blue);
  font-weight: 600;
}

/* 玻璃拟态卡片 */
.page-content .card,
.page-content [class*="card"] {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition);
}

.page-content .card:hover {
  border-color: var(--c-border);
}

/* === 标题装饰 h2 + p.subtitle === */
.page-content h2 + p {
  color: var(--c-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

/* === 页脚 === */
.site-footer {
  padding: 28px 24px calc(var(--nav-h) + 28px);
  border-top: 1px solid var(--c-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand {
  font-size: 14px;
  color: var(--c-muted);
}

.footer-note {
  font-size: 12px;
  color: rgba(107,114,128,0.7);
  line-height: 1.5;
}

/* === Kinetic Typography 动效 === */

/* 渐显上浮 */
@keyframes ktype-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 打字光标 */
@keyframes cursor-blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--c-blue); }
}

/* 渐变文字扫光 */
@keyframes gradient-scan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 打字效果步进 */
@keyframes typing-steps {
  from { width: 0; }
  to { width: 100%; }
}

/* stagger reveal */
@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ktype-reveal {
  opacity: 0;
  animation: ktype-in 0.7s ease forwards;
}

.ktype-title {
  animation: ktype-in 0.9s 0.2s ease both;
  background-size: 200% 200%;
  animation-name: ktype-in, gradient-scan;
  animation-duration: 0.9s, 6s;
  animation-delay: 0.2s, 1s;
  animation-fill-mode: both, forwards;
  animation-timing-function: ease, linear;
  animation-iteration-count: 1, infinite;
}

.hero-eyebrow.ktype-reveal {
  animation-delay: 0s;
}

.hero-desc.ktype-reveal {
  animation-delay: 0.45s;
}

.hero-cta {
  opacity: 0;
  animation: ktype-in 0.7s 0.65s ease forwards;
}

.ktype-heading {
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  transform: translateY(16px);
}

.ktype-heading.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger aside links */
.aside-link {
  opacity: 0;
  animation: stagger-in 0.5s ease forwards;
}

.aside-nav-list li:nth-child(1) .aside-link { animation-delay: 0.1s; }
.aside-nav-list li:nth-child(2) .aside-link { animation-delay: 0.18s; }
.aside-nav-list li:nth-child(3) .aside-link { animation-delay: 0.26s; }
.aside-nav-list li:nth-child(4) .aside-link { animation-delay: 0.34s; }
.aside-nav-list li:nth-child(5) .aside-link { animation-delay: 0.42s; }
.aside-nav-list li:nth-child(6) .aside-link { animation-delay: 0.50s; }
.aside-nav-list li:nth-child(7) .aside-link { animation-delay: 0.58s; }

/* === prefers-reduced-motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .ktype-reveal,
  .ktype-title,
  .hero-cta,
  .aside-link {
    opacity: 1;
    transform: none;
  }
  .ktype-heading {
    opacity: 1;
    transform: none;
  }
}

/* === 响应式 === */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    gap: 32px;
    padding: 0;
  }

  .hero-media {
    max-width: 100%;
    width: 100%;
  }

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

  .hero-desc {
    max-width: 100%;
  }

  .hero-cta {
    align-self: center;
  }

  .content-section {
    flex-direction: column;
  }

  .content-aside {
    width: 100%;
    position: static;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .aside-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 6px 14px;
  }
}

@media (max-width: 600px) {
  .hero-section {
    min-height: 70vh;
    padding: 60px 16px calc(var(--nav-h) + 32px);
  }

  main {
    padding: 40px 16px calc(var(--nav-h) + 32px);
  }

  .hero-h1 {
    font-size: 2rem;
  }

  .nav-link {
    font-size: 11px;
    padding: 0 8px;
    height: 40px;
  }

  .nav-bar-inner {
    gap: 6px;
    padding: 0 4px;
  }

  .section-heading {
    font-size: 1.4rem;
  }

  .page-content h2 {
    font-size: 1.25rem;
  }

  .page-content {
    font-size: 16px;
  }

  .site-footer {
    padding: 24px 16px calc(var(--nav-h) + 24px);
  }
}

/* === 站点包裹 === */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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