@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  --ink: #000000;
  --panel: #121212;
  --line: #1b1d24;
  --line-soft: #14161b;
  --txt: #e6e6e6;
  --dim: #96999f;
  --midnight: #1b2c4e;
  --glow: #5f8fdd;
  --gold: #c8a45a;
}

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

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

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--txt);
  font-family: "Source Serif 4", Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
  line-height: 1.78;
  padding-left: 248px;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}

::selection {
  background: var(--midnight);
  color: #ffffff;
}

/* ---------- 左侧固定竖排 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 248px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 34px 20px 40px;
  background: var(--ink);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 6px 0;
  text-decoration: none;
  color: #ffffff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
}

.brand-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(1.1);
}

.brand-name {
  white-space: nowrap;
}

.rail-nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 10px 11px 15px;
  border-left: 1px solid #23262f;
  color: #b6bcc7;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease,
    text-shadow 0.18s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: #ffffff;
  border-left-color: var(--glow);
  background: #0a0c11;
  text-shadow: 0 0 10px rgba(95, 143, 221, 0.55);
}

.rail-nav a.is-active {
  color: #ffffff;
  border-left-color: var(--gold);
}

/* ---------- 满屏首屏 ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 130px 6vw 13vh;
  overflow: hidden;
  background: radial-gradient(115% 85% at 100% 100%, #0e1728 0%, #000000 68%);
}

.hero-media {
  position: absolute;
  inset: 0;
  margin: 0;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.82);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    262deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.62) 44%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(780px, 94%);
  margin-left: auto;
  text-align: right;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(0, 0, 0, 0.65);
  text-wrap: balance;
}

/* ---------- 正文区：左 aside / 右正文 ---------- */

.stage {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 56px) 24px;
}

.side {
  position: sticky;
  top: 42px;
  align-self: start;
  border-left: 1px solid var(--midnight);
  padding-left: 16px;
}

.side-title {
  margin: 0 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  line-height: 1.3;
}

.subtitle {
  margin: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.62;
}

.prose {
  min-width: 0;
  max-width: 70ch;
}

.prose article {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
}

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

.prose > :last-child,
.prose article:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.prose h2 {
  margin: 0 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: #ffffff;
  border-bottom: 2px solid var(--midnight);
  padding-bottom: 10px;
}

.prose h2 + p {
  margin-top: 0;
}

.prose h3 {
  margin: 1.9em 0 0.6em;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.35;
  color: #ffffff;
}

.prose p {
  margin: 0 0 1.05em;
}

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

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

.prose li {
  margin: 0.35em 0;
}

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em 0;
  filter: brightness(0.93);
}

.prose figure {
  margin: 1.7em 0;
}

.prose blockquote {
  margin: 1.7em 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--gold);
  color: #cdd1d6;
  font-style: italic;
}

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

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

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

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

.prose th {
  color: #ffffff;
}

/* ---------- 页脚：仅 p 与 small ---------- */

.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 24px;
  max-width: 1240px;
  margin: 32px auto 0;
  padding: 0 clamp(20px, 4vw, 56px) 40px;
  border-top: 1px solid var(--line);
}

.foot-cta {
  grid-column: 1 / -1;
  margin: clamp(40px, 6vw, 76px) 0 26px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.foot-cta a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid var(--midnight);
  padding-bottom: 6px;
  transition: color 0.18s ease, border-color 0.18s ease, text-shadow 0.18s ease;
}

.foot-cta a:hover,
.foot-cta a:focus-visible {
  color: var(--glow);
  border-bottom-color: var(--glow);
  text-shadow: 0 0 14px rgba(95, 143, 221, 0.55);
}

.foot-col {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.foot-col a {
  display: inline-block;
  min-height: 40px;
  padding: 9px 0;
  color: var(--dim);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.18s ease;
}

.foot-col a:hover,
.foot-col a:focus-visible {
  color: #ffffff;
}

.foot-note {
  grid-column: 1 / -1;
  display: block;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #101216;
  text-align: center;
  color: #6d727b;
  font-size: 15px;
  letter-spacing: 0.04em;
}

/* ---------- 动效 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1,
  .side {
    animation: rise 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .side {
    animation-delay: 0.1s;
  }

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

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

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 960px) {
  body {
    padding-left: 0;
    padding-top: 66px;
  }

  .rail {
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .brand {
    font-size: 1.06rem;
    letter-spacing: 0.05em;
  }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
  }

  .rail-nav p {
    flex-direction: row;
    gap: 4px;
  }

  .rail-nav a {
    border-left: 0;
    border-bottom: 1px solid transparent;
    padding: 10px 11px;
    white-space: nowrap;
    font-size: 16px;
  }

  .rail-nav a:hover,
  .rail-nav a:focus-visible {
    border-left-color: transparent;
    border-bottom-color: var(--glow);
  }

  .rail-nav a.is-active {
    border-bottom-color: var(--gold);
  }

  .hero {
    min-height: calc(100svh - 66px);
    padding: 90px 22px 12vh;
  }

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

  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-top: 44px;
  }

  .side {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--midnight);
    padding: 16px 0 0;
  }

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

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .hero {
    padding: 80px 18px 10vh;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
  }
}

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