@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');

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

:root {
  color-scheme: dark;
  --black: #000000;
  --panel: #0a0b0d;
  --panel2: #121212;
  --line: rgba(255, 255, 255, 0.13);
  --hair: rgba(255, 255, 255, 0.07);
  --tx: #E3E7ED;
  --blue: #7FB0FF;
  --mid: #16233d;
  --gold: #D8B173;
  --mut: #98A1AF;
  --r: 18px;
  --max: 1180px;
}

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

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: "Playfair Display", "Source Serif 4", Georgia, serif;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- 顶部细条 + 导航 ---------- */

.mast {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.announce {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: #71798a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--hair);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1.25rem;
}

.nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1rem;
  margin: 0;
  padding: 0;
}

.nav-r { justify-content: flex-end; }

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 42px;
  padding: 0.3rem 0.1rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: #B4BCC9;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover { color: #ffffff; border-color: var(--blue); }

.dot {
  width: 5px; height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--mid);
  border: 1px solid rgba(127, 176, 255, 0.55);
  box-shadow: 0 0 6px rgba(127, 176, 255, 0.45);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.25rem 0.5rem;
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 1.28rem;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(127, 176, 255, 0.35);
}

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

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 4rem);
  padding: clamp(1.75rem, 5vw, 4rem) 1.25rem clamp(2.5rem, 7vw, 5rem);
}

.collage {
  position: relative;
  margin: 0;
  height: clamp(320px, 58vh, 600px);
}

.collage .shot {
  position: absolute;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--line);
  filter: brightness(0.9) contrast(1.06);
  box-shadow: 0 0 44px rgba(18, 35, 68, 0.55), 0 22px 48px rgba(0, 0, 0, 0.92);
}

.shot--1 { width: 66%; height: 74%; top: 0; left: 0; }
.shot--2 { width: 56%; height: 52%; bottom: 0; right: 0; border-color: rgba(216, 177, 115, 0.35); }

.hero-copy { text-align: right; }

.hero-copy h1 {
  font-size: clamp(2.2rem, 5.6vw, 4.3rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(127, 176, 255, 0.22);
}

.lede {
  margin: 1.15rem 0 0 auto;
  max-width: 32ch;
  color: var(--mut);
  font-size: 1.05rem;
  font-style: italic;
}

.badge {
  position: absolute;
  right: 1.4rem;
  top: clamp(2.5rem, 11vh, 7rem);
  padding: 0.45rem 1rem;
  border: 1px solid rgba(216, 177, 115, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  box-shadow: 0 0 18px rgba(216, 177, 115, 0.16);
}

/* ---------- 正文 + 侧栏 ---------- */

.stage {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: 0 1.25rem 5rem;
}

.prose { min-width: 0; }

.prose article {
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 132px;
}

.prose article:first-child { border-top: 0; padding-top: 0.4rem; }

.prose h2 {
  font-size: clamp(1.55rem, 3.1vw, 2.15rem);
  margin: 0 0 1rem;
  color: #ffffff;
}

.prose h2 > span {
  position: relative;
  display: inline-block;
  padding-bottom: 0.55rem;
}

.prose h2 > span::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 58px; height: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
  box-shadow: 0 0 10px rgba(127, 176, 255, 0.6);
}

.prose h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.55rem;
  color: #F1F4F9;
}

.prose p { margin: 0 0 1rem; color: #C9D0DA; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; color: #C9D0DA; }
.prose li { margin: 0.4rem 0; }
.prose strong { color: #ffffff; }

.prose a {
  color: var(--blue);
  border-bottom: 1px solid rgba(127, 176, 255, 0.32);
}

.prose a:hover { border-color: var(--blue); }

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.55rem 0 0.55rem 1.1rem;
  border-left: 2px solid var(--mid);
  color: var(--mut);
  font-style: italic;
}

.prose figure { margin: 1.4rem 0; }
.prose img { border-radius: var(--r); border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.6rem 0.5rem; text-align: left; }
.prose th { color: #ffffff; font-weight: 600; }

/* ---------- 右侧目录 ---------- */

.rail {
  position: sticky;
  top: 118px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, #0b0d11, #050506);
}

.rail::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 1rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
  box-shadow: 0 0 10px rgba(127, 176, 255, 0.5);
}

.rail-title {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: #8A93A2;
}

.rail-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  counter-reset: rl;
}

.rail-list li { counter-increment: rl; }

.rail-list a {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.4rem 0;
  font-size: 0.94rem;
  color: #A6AFBD;
  border-bottom: 1px solid var(--hair);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail-list a::before {
  content: counter(rl, decimal-leading-zero);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  color: #57606E;
  transition: color 0.2s ease;
}

.rail-list a:hover, .rail-list a.is-on { color: #ffffff; padding-left: 0.25rem; }
.rail-list a:hover::before, .rail-list a.is-on::before { color: var(--blue); }

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 2rem;
  padding: 3rem clamp(1.25rem, 6vw, 8rem) 2rem;
  border-top: 1px solid var(--line);
  background: #040404;
}

.foot p { margin: 0; }

.f-brand strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  color: #ffffff;
}

.f-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0;
  font-size: 0.94rem;
  color: #9EA7B5;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.f-links a:hover { color: #ffffff; border-color: var(--blue); }

.sub { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.sub input {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.94rem;
  color: #ffffff;
  background: #0c0d10;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.sub input::placeholder { color: #6d7684; }

.sub button {
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--blue);
  background: #101a2e;
  border: 1px solid rgba(127, 176, 255, 0.4);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sub button:hover { background: #16233d; color: #ffffff; box-shadow: 0 0 16px rgba(127, 176, 255, 0.28); }

.f-copy {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #67707E;
}

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

@media (prefers-reduced-motion: no-preference) {
  .rail-list li { animation: rise 0.5s ease both; }
  .rail-list li:nth-child(1) { animation-delay: 0.04s; }
  .rail-list li:nth-child(2) { animation-delay: 0.08s; }
  .rail-list li:nth-child(3) { animation-delay: 0.12s; }
  .rail-list li:nth-child(4) { animation-delay: 0.16s; }
  .rail-list li:nth-child(5) { animation-delay: 0.2s; }
  .rail-list li:nth-child(6) { animation-delay: 0.24s; }
  .rail-list li:nth-child(7) { animation-delay: 0.28s; }
  .collage .shot { animation: fade 0.9s ease both; }
  .shot--2 { animation-delay: 0.18s; }
}

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

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail-list li, .collage .shot { animation: none; }
}

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

@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.4rem 1rem 0.55rem;
  }
  .brand { order: -1; font-size: 1.15rem; }
  .nav ol { justify-content: center; gap: 0.1rem 0.9rem; }
  .nav-r { justify-content: center; }
  .nav a { font-size: 0.76rem; }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-top: 1.4rem;
  }
  .hero-copy { order: -1; text-align: left; }
  .lede { margin-left: 0; }
  .badge {
    position: static;
    order: -2;
    justify-self: start;
    margin-bottom: 0.9rem;
  }
  .collage { height: clamp(200px, 32vh, 300px); }
  .shot--1 { height: 82%; }
  .shot--2 { height: 58%; }

  .stage { grid-template-columns: 1fr; padding-bottom: 3.5rem; }
  .rail { position: static; }
  .prose article { scroll-margin-top: 210px; padding: 2rem 0; }

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

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .announce { font-size: 0.66rem; }
  .foot { grid-template-columns: 1fr; gap: 1.25rem; }
  .prose article { scroll-margin-top: 220px; }
}

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