@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --ink: #171f26;
  --ink-deep: #101619;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --paper: #e8f0f8;
  --paper-2: #d3e2ef;
  --line: rgba(23, 31, 38, 0.12);
  --lift: -6px -6px 16px rgba(206, 228, 245, 0.16), 10px 14px 28px rgba(6, 10, 13, 0.6);
  --lift-sm: -3px -3px 8px rgba(206, 228, 245, 0.1), 4px 5px 12px rgba(4, 8, 10, 0.55);
  --press: inset 3px 3px 8px rgba(8, 13, 17, 0.6), inset -3px -3px 8px rgba(206, 228, 245, 0.18);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: #e3eef7;
  background-color: var(--ink);
  background-image: radial-gradient(900px 520px at 12% -8%, rgba(200, 224, 244, 0.14), transparent 62%),
    radial-gradient(760px 460px at 96% 8%, rgba(245, 224, 232, 0.1), transparent 60%);
  background-repeat: no-repeat;
}

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

a {
  color: #9ec9e6;
}

:focus-visible {
  outline: 2px solid #8fc0e2;
  outline-offset: 3px;
  border-radius: 8px;
}

/* ============ 顶栏 ============ */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: rgba(16, 22, 25, 0.93);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(200, 224, 244, 0.1), 0 12px 26px rgba(4, 8, 10, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f7e6ec;
  text-decoration: none;
  box-shadow: var(--lift-sm);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.brand:active {
  box-shadow: var(--press);
  transform: scale(0.985);
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--pink));
  box-shadow: 0 0 0 3px rgba(200, 224, 244, 0.16);
}

.nav {
  position: relative;
  margin-left: auto;
}

.nav > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 16px;
  color: #dceaf4;
  box-shadow: var(--lift-sm);
  transition: box-shadow 150ms ease, transform 150ms ease;
  user-select: none;
}

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

.nav[open] > summary {
  box-shadow: var(--press);
}

.navMenu {
  list-style: none;
}

/* 窄屏下拉 */
@media (max-width: 860.98px) {
  .nav > menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(300px, calc(100vw - 26px));
    margin: 0;
    padding: 8px;
    display: grid;
    gap: 4px;
    border-radius: 16px;
    background: #141c22;
    box-shadow: var(--lift), inset 0 1px 0 rgba(200, 224, 244, 0.12);
  }

  .navMenu a {
    display: block;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #dceaf4;
    text-decoration: none;
    font-size: 16px;
    box-shadow: var(--lift-sm);
  }

  .navMenu a:active {
    box-shadow: var(--press);
    transform: scale(0.99);
  }
}

/* 宽屏平铺 */
@media (min-width: 861px) {
  .nav > summary {
    display: none;
  }

  .nav > menu,
  .nav:not([open]) > menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
  }

  .navMenu a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 13px;
    border-radius: 12px;
    font-size: 16px;
    color: #c9dcea;
    text-decoration: none;
    box-shadow: var(--lift-sm);
    transition: color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  }

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

  .navMenu a:active {
    box-shadow: var(--press);
    transform: scale(0.98);
  }
}

/* ============ 口号细条 ============ */
.ticker {
  background: linear-gradient(90deg, #1e2b35, #151d24);
  border-bottom: 1px solid rgba(200, 224, 244, 0.08);
}

.ticker p {
  margin: 0;
  padding: 9px 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: #a6c3d6;
}

/* ============ 布局骨架 ============ */
main {
  display: block;
}

.wrap {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 1210px;
  margin: 0 auto;
  padding: 30px clamp(12px, 3vw, 26px) 56px;
}

.stage {
  min-width: 0;
}

/* ============ 侧栏 ============ */
.rail {
  position: sticky;
  top: 84px;
  padding: 20px 16px 22px;
  border-radius: 16px;
  background: linear-gradient(150deg, #22313b, #182129);
  box-shadow: var(--lift), inset 0 1px 0 rgba(200, 224, 244, 0.16);
}

.railTitle {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: #f7e6ec;
}

.subtitle {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.6;
  color: #a9c4d6;
}

.railMenu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  counter-reset: rail;
}

.railMenu li {
  counter-increment: rail;
}

.railMenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: #dbe9f3;
  text-decoration: none;
  box-shadow: -3px -3px 8px rgba(200, 224, 244, 0.06), 4px 5px 10px rgba(4, 8, 10, 0.5);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.railMenu a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  color: #7f9fb4;
}

.railMenu a:active {
  box-shadow: var(--press);
  transform: scale(0.99);
}

.toTop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 16px;
  color: #dbe9f3;
  text-decoration: none;
  box-shadow: var(--lift-sm);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.toTop:active {
  box-shadow: var(--press);
  transform: scale(0.98);
}

/* ============ 正文面板 ============ */
.prose {
  overflow: hidden;
  padding: clamp(18px, 3.2vw, 44px);
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(152deg, var(--paper) 0%, #dceaf5 52%, var(--paper-2) 100%);
  box-shadow: -7px -7px 18px rgba(200, 224, 244, 0.14), 12px 16px 34px rgba(5, 9, 12, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 74vh;
  min-height: 74svh;
  padding: 8px 0 34px;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--pink), var(--blue));
  transform: skewX(-20deg);
  box-shadow: 0 6px 14px rgba(23, 31, 38, 0.16);
}

.heroText {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 26px 0;
  text-align: center;
}

.prose h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 60px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #14202a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  max-width: 26ch;
}

.lead {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.72;
  color: #31485a;
}

.heroArt {
  overflow: hidden;
  height: clamp(168px, 32vh, 320px);
  border-radius: 14px;
  box-shadow: inset 4px 4px 10px rgba(10, 16, 20, 0.34), inset -4px -4px 10px rgba(255, 255, 255, 0.62),
    0 12px 24px rgba(6, 10, 13, 0.3);
}

.heroArt img,
.heroArt .heroImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 正文内元素 */
.prose div {
  scroll-margin-top: 104px;
}

.prose div + div {
  margin-top: 2.6rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}

.prose h2 {
  position: relative;
  margin: 0 0 0.55em;
  padding-left: 18px;
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.35;
  color: #16232d;
}

.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.34em;
  bottom: 0.28em;
  width: 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--pink), var(--blue));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.66);
}

.prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: 19px;
  line-height: 1.5;
  color: #1d2d39;
}

.prose p {
  margin: 0 0 1em;
  font-size: 17px;
  line-height: 1.85;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: 0.45em;
  line-height: 1.8;
}

.prose strong {
  color: #10212c;
}

.prose a {
  color: #1c5578;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  color: #0d3b56;
}

.prose blockquote {
  margin: 1.3em 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 3px 3px 8px rgba(23, 31, 38, 0.1), inset -3px -3px 8px rgba(255, 255, 255, 0.8);
  color: #263a48;
}

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

.prose figure {
  margin: 1.4em 0;
}

.prose figure img {
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(6, 10, 13, 0.28);
}

.prose figcaption {
  margin-top: 0.5em;
  font-size: 16px;
  line-height: 1.6;
  color: #3f5666;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  height: 1px;
  background: var(--line);
}

.prose code {
  font-family: var(--mono);
  font-size: 16px;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(23, 31, 38, 0.08);
}

.prose pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ink-deep);
  color: #d6e7f4;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.prose table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 16px;
}

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

/* ============ 页脚 ============ */
footer {
  margin-top: 40px;
  padding: 46px clamp(16px, 4vw, 32px) 34px;
  text-align: center;
  border-top: 1px solid rgba(200, 224, 244, 0.1);
  background: linear-gradient(180deg, rgba(23, 31, 38, 0), rgba(13, 19, 23, 0.65));
}

.footMark {
  margin-bottom: 22px;
}

.wordmark {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(34px, 9vw, 84px);
  line-height: 1.14;
  letter-spacing: 0.05em;
  color: transparent;
  background: linear-gradient(118deg, var(--blue), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 10px 26px rgba(6, 10, 13, 0.5);
}

.footBase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
}

.footBase .copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #93b0c3;
}

.footBase .toTop {
  margin-top: 0;
}

/* ============ 移动端 ============ */
@media (max-width: 860.98px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-top: 20px;
  }

  .stage {
    order: 1;
  }

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

  .hero {
    min-height: 62vh;
    min-height: 62svh;
  }

  .heroText {
    padding: 18px 0 22px;
  }

  .prose h1 {
    max-width: 20ch;
  }
}

@media (max-width: 420px) {
  .ticker p {
    font-size: 16px;
    letter-spacing: 0.02em;
    padding: 8px 12px;
  }

  .brand {
    font-size: 17px;
    padding: 6px 10px;
  }
}

/* ============ 动效 ============ */
@media (prefers-reduced-motion: no-preference) {
  .heroText h1,
  .heroText .lead,
  .heroArt {
    animation: rise 0.62s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .heroText .lead {
    animation-delay: 0.07s;
  }

  .heroArt {
    animation-delay: 0.13s;
  }

  .prose > div {
    animation: rise 0.5s ease both;
  }

  .prose > div:nth-of-type(1) {
    animation-delay: 0.05s;
  }
  .prose > div:nth-of-type(2) {
    animation-delay: 0.1s;
  }
  .prose > div:nth-of-type(3) {
    animation-delay: 0.15s;
  }
  .prose > div:nth-of-type(4) {
    animation-delay: 0.2s;
  }
  .prose > div:nth-of-type(5) {
    animation-delay: 0.25s;
  }
  .prose > div:nth-of-type(6) {
    animation-delay: 0.3s;
  }
  .prose > div:nth-of-type(7) {
    animation-delay: 0.35s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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