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

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

:root {
  --ink: #171f26;
  --ink-deep: #0d131a;
  --ink-soft: #1e2935;
  --sky: #c8e0f4;
  --rose: #f5e0e8;
  --text: #d3e1ee;
  --muted: #91a6b6;
  --raise: -7px -7px 16px rgba(255, 255, 255, 0.052), 7px 7px 18px rgba(0, 0, 0, 0.62);
  --raise-sm: -4px -4px 10px rgba(255, 255, 255, 0.05), 4px 4px 10px rgba(0, 0, 0, 0.55);
  --sink: inset 5px 5px 12px rgba(0, 0, 0, 0.62), inset -5px -5px 12px rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --edge: clamp(16px, 5vw, 44px);
  --font-head: 'Archivo', 'Space Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Space Grotesk', 'Archivo', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

body {
  margin: 0;
  padding-bottom: 96px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(1100px 640px at 8% -10%, rgba(200, 224, 244, 0.17), transparent 62%),
    radial-gradient(860px 580px at 96% 4%, rgba(245, 224, 232, 0.13), transparent 64%),
    radial-gradient(900px 700px at 50% 110%, rgba(200, 224, 244, 0.08), transparent 70%),
    var(--ink);
  background-attachment: fixed;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.022em;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.05em; }

a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* ---------- 抽屉菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(30px, 8vw, 68px) clamp(22px, 7vw, 64px);
  overflow-y: auto;
  background:
    radial-gradient(700px 460px at 6% -6%, rgba(200, 224, 244, 0.16), transparent 65%),
    linear-gradient(160deg, #1c2733, #0e141a 78%);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.42s;
}

.drawer.is-open { transform: none; visibility: visible; }

.drawer-close {
  position: absolute;
  top: clamp(18px, 4vw, 30px);
  right: clamp(16px, 4vw, 30px);
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: linear-gradient(145deg, #202b37, #151d25);
  box-shadow: var(--raise-sm);
  cursor: pointer;
  transition: box-shadow 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.drawer-close:active { box-shadow: var(--sink); transform: scale(0.97); }

.kicker {
  display: block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--rose);
  text-indent: 0.32em;
}

.drawer-title {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 300;
  color: #eef6fd;
  margin: 0.12em 0 0.5em;
}

.drawer-nav { max-width: 620px; width: 100%; }

.nav-list {
  counter-reset: navidx;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.nav-list li { counter-increment: navidx; }

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 6px 20px;
  border-radius: 13px;
  font-family: var(--font-head);
  font-size: clamp(1.08rem, 3.4vw, 1.35rem);
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(145deg, #1f2a36, #151d25);
  box-shadow: var(--raise-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.nav-list a::before {
  content: counter(navidx, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-right: 16px;
  min-width: 1.9em;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--sky);
  box-shadow: var(--sink);
  transform: translateX(4px);
}

.nav-list a.is-active {
  color: var(--sky);
  box-shadow: var(--sink);
}

.drawer.is-open .nav-list li { animation: slideIn 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.drawer.is-open .nav-list li:nth-child(1) { animation-delay: 0.04s; }
.drawer.is-open .nav-list li:nth-child(2) { animation-delay: 0.09s; }
.drawer.is-open .nav-list li:nth-child(3) { animation-delay: 0.14s; }
.drawer.is-open .nav-list li:nth-child(4) { animation-delay: 0.19s; }
.drawer.is-open .nav-list li:nth-child(5) { animation-delay: 0.24s; }
.drawer.is-open .nav-list li:nth-child(6) { animation-delay: 0.29s; }
.drawer.is-open .nav-list li:nth-child(7) { animation-delay: 0.34s; }

/* ---------- 首屏 ---------- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(56px, 12vw, 110px) 0 clamp(30px, 6vw, 56px);
  text-align: right;
  animation: rise 0.7s ease both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 9.4vw, 5.4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  word-break: break-word;
  color: #eef6fd;
  background: linear-gradient(128deg, var(--sky) 4%, #f3f9fe 42%, var(--rose) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 正文 ---------- */
article { display: block; }

article > section {
  margin: 0 0 clamp(20px, 3.6vw, 34px);
  padding: clamp(22px, 4.2vw, 40px);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1e2833, #141c24);
  box-shadow: var(--raise);
  scroll-margin-top: 28px;
  animation: rise 0.6s ease both;
}

article > section:nth-of-type(1) { animation-delay: 0.05s; }
article > section:nth-of-type(2) { animation-delay: 0.1s; }
article > section:nth-of-type(3) { animation-delay: 0.15s; }
article > section:nth-of-type(4) { animation-delay: 0.2s; }
article > section:nth-of-type(5) { animation-delay: 0.25s; }
article > section:nth-of-type(6) { animation-delay: 0.3s; }
article > section:nth-of-type(7) { animation-delay: 0.35s; }
article > section:nth-of-type(n+8) { animation-delay: 0.4s; }

article > section > :first-child { margin-top: 0; }
article > section > :last-child { margin-bottom: 0; }

article > section h2 {
  font-size: clamp(1.42rem, 4.6vw, 2rem);
  color: #edf5fc;
  padding-bottom: 0.42em;
  border-bottom: 1px solid rgba(200, 224, 244, 0.14);
  margin-bottom: 0.9em;
}

article > section h3 {
  font-size: clamp(1.14rem, 3.4vw, 1.32rem);
  font-weight: 500;
  color: var(--rose);
  margin-top: 1.6em;
}

article > section strong { color: var(--rose); font-weight: 600; }
article > section em { color: var(--sky); font-style: normal; }

article > section ul,
article > section ol {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
}

article > section li { margin-bottom: 0.45em; }
article > section li::marker { color: var(--sky); }

article > section a {
  color: var(--sky);
  text-decoration-style: dotted;
  transition: color 0.15s ease;
}

article > section a:hover { color: #ffffff; }

article > section blockquote {
  margin: 1.2em 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: #161f28;
  box-shadow: var(--sink);
  color: #c4d6e5;
}

article > section blockquote p:last-child { margin-bottom: 0; }

article > section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1em 0;
  font-size: 0.98rem;
}

article > section th,
article > section td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(200, 224, 244, 0.13);
  vertical-align: top;
}

article > section th { color: var(--sky); font-weight: 500; }

article > section code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.94em;
  padding: 2px 7px;
  border-radius: 7px;
  background: #131b22;
  box-shadow: var(--sink);
}

article > section img {
  border-radius: 12px;
  margin: 1.1em 0;
  box-shadow: var(--raise-sm);
}

article > section figure { margin: 1.2em 0; }

/* ---------- 页脚 ---------- */
footer {
  max-width: 1100px;
  margin: clamp(30px, 6vw, 54px) auto 0;
  padding: clamp(22px, 4vw, 32px) var(--edge) 0;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px 20px;
  align-items: baseline;
  border-top: 1px solid rgba(200, 224, 244, 0.14);
}

footer p { margin: 0; color: var(--text); font-size: 1rem; }
footer small { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.04em; }
footer .f-brand { font-family: var(--font-head); letter-spacing: 0.02em; }
footer .f-copy { text-align: right; color: var(--muted); }

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--edge) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(23, 31, 38, 0.94), #0d131a);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(9px);
}

.dock-brand {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--sky);
  text-decoration: none;
  background: linear-gradient(145deg, #202b37, #141c24);
  box-shadow: var(--raise-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dock-brand img { width: 26px; height: 26px; object-fit: contain; }

.mark-letter {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dock-actions { display: flex; align-items: center; gap: 10px; }

.dock-btn {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  font: inherit;
  font-size: 1rem;
  color: #e9f3fb;
  background: linear-gradient(145deg, #222d3a, #141c24);
  box-shadow: var(--raise-sm);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.dock-btn-quiet { color: var(--muted); }
.dock-btn:hover { color: var(--sky); }
.dock-btn:active,
.dock-brand:active { box-shadow: var(--sink); transform: scale(0.96); }

.dock-btn:focus-visible,
.dock-brand:focus-visible,
.drawer-close:focus-visible,
.nav-list a:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 断点 ---------- */
@media (min-width: 860px) {
  body { font-size: 18px; padding-bottom: 104px; }
  article > section { border-radius: 18px; }
  .hero { min-height: 74vh; }
  .hero h1 { font-size: clamp(3.6rem, 7.4vw, 6rem); }
  .drawer { padding-left: max(64px, calc(50vw - 320px)); }
}

@media (max-width: 560px) {
  footer {
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
  }
  footer small { grid-column: 1 / -1; }
  footer .f-copy { grid-column: 2; grid-row: 1; }
  .dock-btn { padding: 0 15px; font-size: 0.96rem; }
  article > section { padding: 20px 17px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .hero, article > section, .nav-list li { opacity: 1 !important; transform: none !important; }
}

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