@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  color-scheme: dark;
  font-size: 16px;
}

body.dark-oled {
  background: #000000;
  color: #E0E0E0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== 品牌色变量 ===== */
:root {
  --c-bg: #000000;
  --c-card: #121212;
  --c-border: #1e1e1e;
  --c-accent: #4fc3f7;
  --c-accent2: #a78bfa;
  --c-gold: #fbbf24;
  --c-text: #E0E0E0;
  --c-muted: #888888;
  --c-white: #ffffff;
  --nav-h: 96px;
  --radius: 10px;
  --max-w: 1200px;
}

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

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 2rem;
  border-bottom: 1px solid var(--c-border);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

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

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-white);
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.4);
}

.header-tagline {
  font-size: 0.75rem;
  color: var(--c-muted);
  display: none;
}

.header-nav-row {
  padding: 0.5rem 2rem;
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  min-height: 40px;
  border-radius: 999px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.pill-btn:hover,
.pill-btn:focus-visible {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #000;
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.35);
  outline: none;
}

.pill-btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ===== Hero 区 ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--c-bg);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(79, 195, 247, 0.3);
  border-radius: 4px;
  background: rgba(79, 195, 247, 0.06);
}

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--c-white);
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.2);
}

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

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  min-height: 48px;
  background: var(--c-accent);
  color: #000;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: box-shadow 0.2s, transform 0.2s;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  box-shadow: 0 0 18px rgba(79, 195, 247, 0.5);
  transform: translateY(-2px);
  outline: none;
}

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

.hero-img {
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(79, 195, 247, 0.12);
  max-height: 60vh;
  object-fit: cover;
  width: 100%;
}

.hero-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 16px;
  background: linear-gradient(135deg, #121212 0%, #0a1a2e 100%);
  border: 1px solid var(--c-border);
  box-shadow: 0 0 40px rgba(79, 195, 247, 0.08);
}

/* 斜切色带装饰 */
.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--c-bg);
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

/* ===== 主内容区 ===== */
main {
  flex: 1;
  background: var(--c-bg);
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.content-section {
  /* article 直接子元素 */
}

.content-article {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ===== aside 左侧 ===== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  padding: 1.25rem;
  overflow: hidden;
}

.aside-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}

.aside-nav dl {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.aside-nav dt {
  display: block;
}

.aside-nav dt a {
  display: block;
  padding: 0.45rem 0.6rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--c-muted);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.aside-nav dt a:hover,
.aside-nav dt a:focus-visible {
  background: rgba(79, 195, 247, 0.08);
  color: var(--c-accent);
  outline: none;
}

/* ===== 正文内容 ===== */
.content-body {
  min-width: 0;
}

/* page.content 内部元素样式 */
.content-body article {
  padding: 3rem 0;
  border-bottom: 1px solid var(--c-border);
}

.content-body article:last-child {
  border-bottom: none;
}

.content-body h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--c-white);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-white);
  margin: 1.5rem 0 0.75rem;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 1rem;
}

.content-body ul,
.content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-body li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  margin-bottom: 0.4rem;
}

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

.content-body a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(79, 195, 247, 0.3);
  transition: color 0.15s, border-color 0.15s;
}

.content-body a:hover {
  color: var(--c-white);
  border-color: var(--c-white);
}

/* small 眉题（h2 前紧邻） */
.content-body small,
small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 0.4rem;
}

/* details/summary 仅可展开型，不影响正文可见性 */
.content-body details summary {
  cursor: pointer;
  color: var(--c-accent);
  font-weight: 600;
}

/* 表格 */
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.content-body th,
.content-body td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--c-border);
}

.content-body th {
  font-weight: 700;
  color: var(--c-white);
  background: var(--c-card);
}

.content-body td {
  color: var(--c-text);
}

/* 卡片块 */
.content-body .card {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.content-body .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* ===== 页脚 ===== */
.site-footer {
  background: #000;
  border-top: 1px solid var(--c-border);
  padding: 2rem 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-super-brand {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-white);
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.25);
  white-space: nowrap;
}

.footer-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.footer-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.1rem;
  justify-content: center;
}

.footer-nav dt {
  display: inline-flex;
}

.footer-nav dt a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  min-height: 40px;
  font-size: 0.78rem;
  color: var(--c-muted);
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s;
}

.footer-nav dt a:hover,
.footer-nav dt a:focus-visible {
  color: var(--c-accent);
  outline: none;
}

.footer-copy {
  text-align: right;
  flex-shrink: 0;
}

.footer-copy p {
  font-size: 0.78rem;
  color: var(--c-muted);
  line-height: 1.6;
}

.footer-note {
  font-size: 0.7rem !important;
  opacity: 0.6;
}

/* ===== 动效：stagger list + hover micro ===== */
@media (prefers-reduced-motion: no-preference) {
  .pill-btn {
    animation: fadeSlideIn 0.4s both;
  }

  .pill-nav .pill-btn:nth-child(1) { animation-delay: 0.05s; }
  .pill-nav .pill-btn:nth-child(2) { animation-delay: 0.10s; }
  .pill-nav .pill-btn:nth-child(3) { animation-delay: 0.15s; }
  .pill-nav .pill-btn:nth-child(4) { animation-delay: 0.20s; }
  .pill-nav .pill-btn:nth-child(5) { animation-delay: 0.25s; }
  .pill-nav .pill-btn:nth-child(6) { animation-delay: 0.30s; }
  .pill-nav .pill-btn:nth-child(7) { animation-delay: 0.35s; }

  .content-body article {
    animation: fadeUp 0.5s both;
  }

  @keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-text {
    animation: fadeUp 0.6s 0.1s both;
  }

  .hero-media {
    animation: fadeUp 0.6s 0.25s both;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-article {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

@media (max-width: 768px) {
  :root {
    --nav-h: 112px;
  }

  html {
    scroll-padding-top: 112px;
  }

  .header-brand {
    padding: 0.5rem 1rem;
  }

  .header-nav-row {
    padding: 0.4rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .header-nav-row::-webkit-scrollbar {
    display: none;
  }

  .pill-nav {
    flex-wrap: nowrap;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 3rem;
    gap: 2rem;
  }

  .hero-media {
    order: -1;
  }

  .hero-placeholder {
    aspect-ratio: 16/7;
  }

  .hero-section h1 {
    font-size: 1.9rem;
  }

  .wrap {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.1rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .footer-nav dl {
    gap: 0;
  }
}

/* ===== 焦点可见性全局 ===== */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-muted);
}
