@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 {
  --bg: #000000;
  --panel: #121212;
  --panel-2: #0a0c12;
  --line: rgba(110, 140, 220, 0.18);
  --line-soft: rgba(110, 140, 220, 0.1);
  --text: #e8ebf4;
  --dim: #97a1ba;
  --blue: #3e5bff;
  --blue-soft: rgba(62, 91, 255, 0.45);
  --gold: #e9c46a;
  --r: 18px;
  --w: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  padding-bottom: 112px;
  overflow-x: hidden;
}

h1, h2, h3, .dock__brand, .menu__brand {
  font-family: 'Space Grotesk', 'Inter', system-ui, 'PingFang SC', sans-serif;
  letter-spacing: -0.01em;
}

a { color: var(--text); }

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ============ hero ============ */
.hero {
  max-width: var(--w);
  margin: 0 auto;
  padding: clamp(26px, 6vh, 68px) 22px clamp(22px, 4vh, 44px);
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
}

.hero__media {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  aspect-ratio: 4 / 5;
  max-height: 60vh;
  box-shadow: 0 0 0 1px var(--line-soft), 0 24px 70px -40px var(--blue-soft);
}

.hero__media:empty { display: none; }

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__copy { text-align: right; }

.hero__copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.12;
  font-weight: 600;
  text-shadow: 0 0 26px var(--blue-soft);
}

.hero__lede {
  margin: 0;
  color: var(--dim);
  font-size: 1.03rem;
  line-height: 1.7;
  max-width: 46ch;
  margin-left: auto;
}

/* ============ main layout ============ */
main {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 22px;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: clamp(26px, 4vw, 62px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 42px 0 84px;
}

.col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: clamp(26px, 4vw, 62px);
  align-items: start;
  grid-column: 1 / -1;
}

/* ============ prose ============ */
.prose { min-width: 0; font-size: 1.03rem; }

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

.prose h2 {
  font-size: clamp(1.38rem, 2.5vw, 1.92rem);
  line-height: 1.25;
  margin: 52px 0 8px;
  font-weight: 600;
}

.prose h3 {
  font-size: 1.16rem;
  margin: 34px 0 6px;
  font-weight: 600;
  color: #f2f4fb;
}

hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--blue-soft), rgba(110, 140, 220, 0.08) 62%, transparent);
  margin: 12px 0 26px;
}

.prose p { margin: 0 0 20px; }

.prose a {
  color: #9fb2ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.prose a:hover { color: #cdd8ff; }

.prose ul, .prose ol { margin: 0 0 22px; padding-left: 1.25em; }

.prose li { margin: 0 0 9px; }

.prose li::marker { color: var(--blue); }

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

.prose blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--panel);
  border-radius: var(--r);
  border-left: 2px solid var(--blue);
  color: #dfe4f2;
}

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

.prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.98rem;
}

.prose th, .prose td {
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.prose th { color: #ffffff; font-weight: 600; }

/* ============ aside rail ============ */
.rail {
  position: sticky;
  top: 26px;
  background: var(--panel);
  border-radius: var(--r);
  padding: 22px 22px 14px;
}

.rail h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rail hr { margin: 10px 0 12px; background: linear-gradient(90deg, var(--blue-soft), transparent); }

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

.rail__list li { counter-increment: rail; }

.rail__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 3px 0;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.97rem;
  transition: color 0.18s ease, transform 0.18s ease;
}

.rail__list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--blue);
  opacity: 0.75;
}

.rail__list a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

/* ============ footer ============ */
.foot {
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding: 54px 22px 26px;
}

.foot__grid {
  max-width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.foot address {
  font-style: normal;
  display: grid;
  gap: 10px;
  max-width: 40ch;
}

.foot__mark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px var(--blue-soft);
}

.foot__desc { color: var(--dim); font-size: 0.97rem; line-height: 1.7; }

.foot__list { list-style: none; margin: 0; padding: 0; }

.foot__list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.97rem;
  transition: color 0.18s ease;
}

.foot__list a:hover { color: #ffffff; }

.foot__cr {
  max-width: var(--w);
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: #6f7a92;
  font-size: 0.95rem;
}

/* ============ dock ============ */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 8, 14, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.dock__btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.dock__btn--end { justify-self: end; }

.dock__btn:hover {
  border-color: var(--blue-soft);
  color: #ffffff;
  transform: translateY(-2px);
}

.dock__brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.06rem;
  font-weight: 600;
  text-shadow: 0 0 16px var(--blue-soft);
}

/* ============ full sheet menu ============ */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000000;
  display: grid;
  place-items: center;
  padding: 24px 18px 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
  overflow-y: auto;
}

.sheet.is-open { opacity: 1; visibility: visible; }

.menu { width: 100%; max-width: 940px; }

.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 4px;
}

.menu__list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--dim);
  text-decoration: none;
  font-size: 1.12rem;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.menu__list a:hover {
  color: #ffffff;
  background: var(--panel);
  transform: translateY(-2px);
}

.menu__brand a {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 6px 22px;
  text-shadow: 0 0 22px var(--blue-soft);
}

/* ============ responsive ============ */
@media (max-width: 900px) {
  .wrap, .col { grid-template-columns: minmax(0, 1fr); }

  .rail { position: static; order: 2; }

  .foot__grid { grid-template-columns: 1fr 1fr; }

  .foot__col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  body { font-size: 16px; padding-bottom: 104px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 18px 18px 26px;
    gap: 18px;
  }

  .hero__media {
    aspect-ratio: 16 / 10;
    max-height: 32vh;
  }

  .hero__copy h1 { font-size: clamp(1.85rem, 8.4vw, 2.5rem); }

  main { padding: 0 18px; }

  .wrap { padding: 28px 0 64px; }

  .foot { padding: 40px 18px 22px; }

  .menu__list a { font-size: 1.05rem; min-height: 44px; padding: 4px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

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