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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #1f1f1f;
  color: #f5f5f5;
}

body {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 1rem;
  line-height: 1.7;
  background: #1f1f1f;
  color: #f5f5f5;
  overflow-x: hidden;
}

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

a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.75;
}

ul, menu {
  list-style: none;
}

/* ===== scroll-margin 用于吸顶导航偏移 ===== */
article[id] {
  scroll-margin-top: 110px;
}

/* ===== 包裹层 ===== */
.site-wrapper {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ===== 顶部双行导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1f1f1f;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

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

.brand-text {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border: 2px solid #ffffff;
  border-radius: 28px;
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f1f1f;
  background: #ffffff;
  letter-spacing: 0.04em;
  min-height: 40px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  position: relative;
  z-index: 2;
}

.cta-btn:hover {
  background: transparent;
  color: #ffffff;
  opacity: 1;
  transform: translateY(-2px);
}

/* 导航行 */
.header-nav-row {
  padding: 0.5rem 2rem;
}

.nav-details {
  position: relative;
}

.nav-details[open] > .nav-summary {
  display: none;
}

.nav-summary {
  display: none;
  cursor: pointer;
  padding: 0.5rem 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: #f5f5f5;
  list-style: none;
  min-height: 40px;
  align-items: center;
}

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

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.nav-menu li {
  position: relative;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 28px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: #f5f5f5;
  background: transparent;
  letter-spacing: 0.02em;
  min-height: 40px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  border-color: #ffffff;
  background: rgba(255,255,255,0.08);
  opacity: 1;
  transform: translateY(-2px);
}

/* ===== Hero ===== */
.hero-wrap {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 2rem;
  min-height: 45vh;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-text {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
}

.hero-h1 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: #c8c8c8;
  max-width: 36em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.8rem;
  border: 2px solid #ffffff;
  border-radius: 28px;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f1f1f;
  background: #ffffff;
  letter-spacing: 0.04em;
  min-height: 44px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  position: relative;
  z-index: 3;
}

.hero-cta:hover {
  background: transparent;
  color: #ffffff;
  opacity: 1;
  transform: translateY(-3px);
}

.hero-media {
  flex: 1 1 40%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.hero-img {
  width: 100%;
  max-width: 480px;
  border-radius: 28px;
  border: 1.5px solid rgba(255,255,255,0.15);
  object-fit: cover;
  /* elevation layer 2 */
  box-shadow:
    0 2px 4px rgba(0,0,0,0.3),
    0 8px 24px rgba(0,0,0,0.45),
    0 20px 48px rgba(0,0,0,0.3);
  transform: translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-img:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.35),
    0 16px 36px rgba(0,0,0,0.5),
    0 32px 64px rgba(0,0,0,0.35);
}

.hero-placeholder {
  width: 100%;
  max-width: 480px;
  height: 260px;
  border-radius: 28px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

/* ===== 主体布局 ===== */
.body-layout {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

/* ===== 侧边栏 ===== */
.site-aside {
  flex: 0 0 200px;
  position: sticky;
  top: 120px;
  z-index: 10;
}

.aside-inner {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  padding: 1.5rem;
  /* elevation layer 1 */
  box-shadow:
    0 2px 6px rgba(0,0,0,0.25),
    0 8px 20px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.aside-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.aside-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.aside-nav li {
  margin-bottom: 0.5rem;
}

.aside-nav a {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 40px;
  line-height: 40px;
  padding: 0 0.5rem;
}

.aside-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  opacity: 1;
}

/* ===== 主内容 ===== */
.site-main {
  flex: 1 1 0%;
  min-width: 0;
}

.content-article {
  position: relative;
  z-index: 2;
}

.content-section {
  position: relative;
}

/* 正文内 article 卡片式分层 */
.content-section > article {
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  /* elevation layer 2 */
  box-shadow:
    0 1px 3px rgba(0,0,0,0.2),
    0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* scroll reveal 初始状态 */
  opacity: 0;
  transform: translateY(24px);
}

.content-section > article.revealed {
  opacity: 1;
  transform: translateY(0);
}

.content-section > article:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.3),
    0 16px 36px rgba(0,0,0,0.4);
  z-index: 3;
}

/* 正文排版 */
.content-section h1,
.content-section h2,
.content-section h3,
.content-section h4 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.content-section h2 { font-size: 1.4rem; margin-top: 1.5rem; }
.content-section h3 { font-size: 1.15rem; margin-top: 1.2rem; }

.content-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: #c8c8c8;
  margin-bottom: 1rem;
  max-width: 72ch;
}

.content-section a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-section ul,
.content-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #c8c8c8;
  line-height: 1.8;
}

.content-section li { margin-bottom: 0.4rem; }

.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.content-section th,
.content-section td {
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.6rem 0.9rem;
  text-align: left;
  color: #c8c8c8;
}

.content-section th {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-weight: 700;
}

/* small 眉题 */
.content-section small,
small.aside-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.content-section small + h2,
.content-section small + h3 {
  margin-top: 0.2rem;
}

/* ===== 页脚 ===== */
.site-footer {
  background: #141414;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 3rem 2rem 2rem;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.footer-super {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  height: 5rem;
}

.footer-brand-mega {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: rgba(255,255,255,0.06);
  letter-spacing: 0.05em;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.footer-cols {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-cols dl {
  flex: 1 1 160px;
}

.footer-cols dt {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-cols dd {
  margin: 0 0 0.4rem;
}

.footer-cols dd a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s ease;
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
}

.footer-cols dd a:hover {
  color: #ffffff;
  opacity: 1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ===== Dimensional Layering 装饰层 ===== */
.site-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(255,255,255,0.025) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(255,255,255,0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== 滚动揭示动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .content-section > article {
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-section > article {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-img,
  .hero-cta,
  .cta-btn,
  .pill-btn,
  .aside-nav a,
  .footer-cols dd a {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .body-layout {
    flex-direction: column;
  }
  .site-aside {
    position: static;
    flex: none;
    width: 100%;
  }
  .aside-inner {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
  }
  .aside-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .aside-nav li { margin-bottom: 0; }
  .aside-nav a {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 0 0.75rem;
    font-size: 0.78rem;
    min-height: 36px;
    line-height: 36px;
  }
}

@media (max-width: 768px) {
  .header-brand-row {
    padding: 0.65rem 1rem;
  }

  .header-nav-row {
    padding: 0.4rem 1rem;
  }

  .nav-details[open] > .nav-summary {
    display: flex;
  }

  .nav-summary {
    display: flex;
  }

  .nav-menu {
    gap: 0.4rem;
    padding-bottom: 0.5rem;
  }

  .pill-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
  }

  .hero-wrap {
    flex-direction: column;
    padding: 2rem 1rem;
    min-height: auto;
    gap: 1.5rem;
  }

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

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

  .hero-media {
    justify-content: center;
  }

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

  .body-layout {
    padding: 1.5rem 1rem 3rem;
    gap: 1.5rem;
  }

  .content-section > article {
    padding: 1.25rem;
    border-radius: 20px;
  }

  .footer-cols {
    flex-direction: column;
    gap: 1.5rem;
  }

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

  .site-footer {
    padding: 2rem 1rem 1.5rem;
  }
}

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

  .cta-btn {
    font-size: 0.78rem;
    padding: 0.45rem 1rem;
  }

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

  article[id] {
    scroll-margin-top: 130px;
  }
}
