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

/* ============================================================
   CSS 变量 & 基础重置
   ============================================================ */
:root {
  --c-black: #000000;
  --c-white: #ffffff;
  --c-grey-90: #1a1a1a;
  --c-grey-80: #2d2d2d;
  --c-grey-60: #666666;
  --c-grey-20: #cccccc;
  --c-grey-10: #e8e8e8;
  --c-accent: #000000;
  --sidebar-w: 220px;
  --font-base: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 4px;
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --scroll-offset: 80px;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  font-family: var(--font-base);
  background: var(--c-white);
  color: var(--c-black);
  overflow-x: hidden;
}

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

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

ol, ul {
  list-style: none;
}

/* ============================================================
   布局外壳：左侧固定导航 + 右侧内容区
   ============================================================ */
.site-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ============================================================
   左侧固定竖排导航 (sidebar)
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--c-black);
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 2px solid var(--c-black);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar__brand {
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--c-grey-80);
}

.sidebar__logo-link {
  display: block;
  width: 48px;
  height: 48px;
}

.sidebar__logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.sidebar__logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--c-white);
  color: var(--c-black);
  font-weight: 700;
  font-size: 1.5rem;
  border: 2px solid var(--c-white);
}

.sidebar__tagline {
  padding: 0.75rem 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--c-grey-20);
  text-transform: uppercase;
  border-bottom: 1px solid var(--c-grey-80);
  line-height: 1.4;
}

.sidebar__nav {
  flex: 1;
  padding: 1.5rem 0;
}

.sidebar__nav ol {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar__nav li {
  border-bottom: 1px solid var(--c-grey-80);
}

.sidebar__nav li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--c-grey-20);
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  min-height: 44px;
  border-left: 3px solid transparent;
}

.sidebar__nav li a:hover,
.sidebar__nav li a:focus-visible {
  background: var(--c-grey-90);
  color: var(--c-white);
  border-left-color: var(--c-white);
  padding-left: 2rem;
  outline: none;
}

.sidebar__nav li a:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: -2px;
}

.sidebar__foot {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar__dot {
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid var(--c-grey-60);
  border-radius: 50%;
}

/* ============================================================
   右侧内容区
   ============================================================ */
.content-area {
  margin-left: var(--sidebar-w);
  min-width: 0;
}

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

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 4rem;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-grey-20);
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--c-white);
  padding-left: 0.75rem;
}

.hero__h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-grey-20);
  max-width: 42ch;
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2.5rem;
  border: 2px solid var(--c-white);
  color: var(--c-white);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
}

.hero__cta:hover,
.hero__cta:focus-visible {
  background: var(--c-white);
  color: var(--c-black);
  outline: none;
}

.hero__cta:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: 3px;
}

/* 双图错位拼贴 */
.hero__images {
  position: relative;
  height: 520px;
}

.hero-img {
  position: absolute;
  object-fit: cover;
  border: 2px solid var(--c-grey-80);
}

.hero-img--a {
  width: 65%;
  height: 70%;
  top: 0;
  right: 0;
  z-index: 2;
}

.hero-img--b {
  width: 60%;
  height: 65%;
  bottom: 0;
  left: 0;
  z-index: 1;
  border-color: var(--c-grey-60);
}

/* 斜切色带 */
.hero__slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 120px;
  background: var(--c-white);
  clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

/* ============================================================
   主内容区
   ============================================================ */
.main-content {
  background: var(--c-white);
  padding: 0 0 4rem;
}

/* div > figure/aside 结构契约 */
.content-section {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 4rem 0;
}

.content-body {
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 0;
  padding-right: 3rem;
}

.content-aside {
  grid-column: 2;
  grid-row: 1;
  border: 2px solid var(--c-black);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  align-self: start;
}

.content-figure {
  grid-column: 2;
  grid-row: 2;
  padding-top: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.figure-geo {
  border: 2px solid var(--c-black);
  border-radius: var(--radius);
}

.figure-geo--a {
  height: 80px;
  background: var(--c-black);
}

.figure-geo--b {
  height: 40px;
  background: transparent;
}

/* aside 内部 */
.aside-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--c-black);
}

.aside-title span {
  display: inline-block;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-links a {
  display: block;
  padding: 0.5rem 0.625rem;
  font-size: 0.82rem;
  border-left: 2px solid transparent;
  transition: border-color var(--transition), background var(--transition), padding-left var(--transition);
  border-radius: 0 var(--radius) var(--radius) 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-links a:hover,
.aside-links a:focus-visible {
  border-left-color: var(--c-black);
  background: var(--c-grey-10);
  padding-left: 1rem;
  outline: none;
}

.aside-links a:focus-visible {
  outline: 2px solid var(--c-black);
  outline-offset: -2px;
}

/* ============================================================
   page.content 内部元素样式（正文）
   ============================================================ */
.content-body h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--c-black);
  scroll-margin-top: var(--scroll-offset);
}

.content-body h2 span {
  display: inline;
}

.content-body h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: var(--scroll-offset);
}

.content-body h3 span {
  display: inline;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  max-width: 72ch;
}

.content-body ul,
.content-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  list-style: disc;
}

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

.content-body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 1rem;
}

.content-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.content-body a:hover {
  opacity: 0.65;
}

.content-body strong {
  font-weight: 700;
}

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

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

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

.content-body blockquote {
  border-left: 4px solid var(--c-black);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--c-grey-60);
  font-size: 1rem;
}

/* div id 滚动偏移（单页锚点）*/
div[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* ============================================================
   页脚：单行横排 logo + nav + copyright
   ============================================================ */
.site-footer {
  background: var(--c-black);
  color: var(--c-white);
  border-top: 2px solid var(--c-black);
  padding: 2rem 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-logo,
.footer-logo-text {
  display: block;
  max-width: 120px;
  max-height: 40px;
  object-fit: contain;
}

.footer-logo-text {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.footer-nav {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--c-grey-20);
  font-size: 0.78rem;
  padding: 0.5rem 0.875rem;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-right: 1px solid var(--c-grey-80);
}

.footer-nav a:last-child {
  border-right: none;
}

.footer-nav a:hover {
  color: var(--c-white);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--c-grey-60);
  letter-spacing: 0.04em;
  text-align: right;
}

/* ============================================================
   滚动揭示动画
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   响应式：平板 ≤1024px
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 180px;
  }

  .hero__grid {
    padding: 4rem 2.5rem;
    gap: 2.5rem;
  }

  .content-section {
    padding: 3rem 2.5rem 0;
  }

  .content-body {
    padding-right: 2rem;
  }

  .site-footer {
    padding: 2rem 2.5rem;
  }
}

/* ============================================================
   响应式：手机 ≤768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --scroll-offset: 60px;
  }

  .site-shell {
    grid-template-columns: 1fr;
  }

  /* 侧边栏变顶部横条 */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    z-index: 200;
    border-right: none;
    border-bottom: 2px solid var(--c-grey-80);
    overflow: visible;
  }

  .sidebar__brand {
    padding: 0.75rem 1rem;
    border-bottom: none;
    border-right: 1px solid var(--c-grey-80);
  }

  .sidebar__tagline {
    display: none;
  }

  .sidebar__nav {
    flex: 1;
    padding: 0;
    overflow-x: auto;
  }

  .sidebar__nav ol {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .sidebar__nav li {
    border-bottom: none;
    border-right: 1px solid var(--c-grey-80);
    flex-shrink: 0;
  }

  .sidebar__nav li a {
    padding: 0.75rem 0.875rem;
    font-size: 0.75rem;
    gap: 0.4rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .sidebar__nav li a:hover {
    padding-left: 0.875rem;
    border-left: none;
    border-bottom-color: var(--c-white);
  }

  .sidebar__foot {
    display: none;
  }

  .content-area {
    margin-left: 0;
    padding-top: 56px;
  }

  /* Hero 单列 */
  .hero__grid {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem 6rem;
    gap: 2rem;
  }

  .hero__images {
    height: 260px;
  }

  .hero__h1 {
    font-size: 2rem;
  }

  /* 正文容器 */
  .content-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 2rem 1.25rem 0;
  }

  .content-body {
    grid-column: 1;
    grid-row: 2;
    padding-right: 0;
  }

  .content-aside {
    grid-column: 1;
    grid-row: 1;
    position: static;
    max-height: none;
    margin-bottom: 2rem;
  }

  .content-figure {
    display: none;
  }

  /* 页脚 */
  .site-footer {
    padding: 1.5rem 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-nav {
    width: 100%;
  }

  .footer-nav a {
    font-size: 0.72rem;
    padding: 0.5rem 0.5rem;
  }

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

/* ============================================================
   响应式：小屏 ≤375px 验证
   ============================================================ */
@media (max-width: 400px) {
  .hero__h1 {
    font-size: 1.6rem;
  }

  .hero__sub {
    font-size: 0.9rem;
  }

  .content-section {
    padding: 1.5rem 1rem 0;
  }

  .content-body p {
    font-size: 1rem;
  }
}

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