@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --ink-2: rgba(31, 31, 31, 0.74);
  --ink-3: rgba(31, 31, 31, 0.5);
  --line: rgba(31, 31, 31, 0.14);
  --line-2: rgba(31, 31, 31, 0.08);
  --e1: 0 1px 2px rgba(31, 31, 31, 0.06);
  --e2: 0 3px 10px rgba(31, 31, 31, 0.08);
  --e3: 0 12px 30px rgba(31, 31, 31, 0.12);
  --e4: 0 24px 64px rgba(31, 31, 31, 0.18);
  --serif: 'Crimson Pro', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --rail: 4.75rem;
  --pad: clamp(1rem, 3vw, 2.5rem);
}

*,
*::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.65;
  color: var(--ink);
  background:
    radial-gradient(rgba(31, 31, 31, 0.1) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(72% 46% at 100% 0, rgba(31, 31, 31, 0.07), transparent 68%),
    radial-gradient(60% 40% at 0 100%, rgba(31, 31, 31, 0.05), transparent 70%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.v-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 90;
  padding: 0.8rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.v-skip:focus { left: 0.5rem; top: 0.5rem; }

/* 左侧竖排轨 */
.v-rail {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.5rem;
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--line-2);
  box-shadow: var(--e1);
}

.v-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--e2);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.v-mark:hover { transform: translateY(-2px); box-shadow: var(--e3); }
.v-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.v-mark span { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; line-height: 1; }

.v-burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.4rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 4px;
  box-shadow: var(--e2);
  background: var(--paper);
}
.v-burger:hover { box-shadow: var(--e3); }
.v-burger-lines { display: block; }
.v-burger-lines i {
  display: block;
  width: 1.05rem;
  height: 2px;
  background: var(--ink);
}
.v-burger-lines i + i { margin-top: 4px; }
.v-burger-txt {
  writing-mode: vertical-rl;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--ink-2);
}

/* 右侧主按钮 */
.v-cta {
  position: fixed;
  z-index: 45;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  box-shadow: var(--e3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.v-cta:hover { transform: translateY(-2px); box-shadow: var(--e4); }

/* 全屏遮罩菜单 */
.v-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: clamp(1.5rem, 6vw, 5rem);
  background: rgba(245, 245, 245, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}
body.v-open .v-menu { opacity: 1; visibility: visible; }

.v-close {
  align-self: flex-end;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--e2);
  font-size: 0.95rem;
}

.v-nav { width: 100%; }
.v-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: navc;
  columns: 2;
  column-gap: clamp(1.5rem, 5vw, 4rem);
  max-width: 56rem;
}
.v-nav li {
  counter-increment: navc;
  break-inside: avoid;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
body.v-open .v-nav li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--n, 0) * 1ms + 90ms);
}
.v-nav li:nth-child(1) { --n: 1; }
.v-nav li:nth-child(2) { --n: 2; }
.v-nav li:nth-child(3) { --n: 3; }
.v-nav li:nth-child(4) { --n: 4; }
.v-nav li:nth-child(5) { --n: 5; }
.v-nav li:nth-child(6) { --n: 6; }
.v-nav li:nth-child(7) { --n: 7; }
.v-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-height: 44px;
  padding: 0.6rem 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.2s ease, padding-left 0.2s ease;
}
.v-nav a::before {
  content: counter(navc, decimal-leading-zero);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.v-nav a:hover { border-bottom-color: var(--ink); padding-left: 0.25rem; }

/* 主体 */
.v-main {
  position: relative;
  z-index: 1;
  padding-left: calc(var(--rail) + var(--pad));
  padding-right: var(--pad);
}

.v-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: 45vh;
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(1.5rem, 4vh, 2.75rem);
}

.v-fig {
  position: relative;
  margin: 0;
  will-change: transform;
}
.v-fig::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: -1.15rem;
  width: 62%;
  height: 62%;
  border-radius: 4px;
  background: var(--mist);
  box-shadow: var(--e2);
  z-index: 0;
}
.v-fig .v-img,
.v-ph {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: var(--mist);
  box-shadow: var(--e4);
}
.v-ph {
  background:
    radial-gradient(rgba(31, 31, 31, 0.16) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--mist);
}

.v-txt { text-align: right; }
.v-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
}
.v-lead {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.7;
}

/* 阅读区 */
.v-reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
  grid-template-areas:
    "head side"
    "prose side";
  gap: 0 clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.5rem) 0 4rem;
}

.v-head {
  grid-area: head;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.v-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.25;
}
.v-sub {
  margin: 0.35rem 0 1.75rem;
  color: var(--ink-3);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.v-prose {
  grid-area: prose;
  max-width: 64ch;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ink);
}
.v-prose section[id] { scroll-margin-top: 5.5rem; }
.v-prose section + section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-2);
}
.v-prose h2,
.v-prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.v-prose h2 { margin: 2rem 0 0.6rem; font-size: 1.55rem; }
.v-prose h3 { margin: 1.6rem 0 0.5rem; font-size: 1.25rem; }
.v-prose p { margin: 0 0 1.05rem; }
.v-prose ul,
.v-prose ol { margin: 0 0 1.15rem; padding-left: 1.35rem; }
.v-prose li { margin-bottom: 0.45rem; }
.v-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.v-prose a:hover { text-decoration-thickness: 2px; }
.v-prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--ink);
  background: var(--mist);
  border-radius: 0 4px 4px 0;
  box-shadow: var(--e1);
}
.v-prose blockquote p:last-child { margin-bottom: 0; }
.v-prose strong { font-weight: 700; }
.v-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: 1rem; }
.v-prose th,
.v-prose td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; }
.v-prose img { border-radius: 4px; box-shadow: var(--e2); margin: 1rem 0; }

/* 右侧栏 */
.v-side {
  grid-area: side;
  position: sticky;
  top: 1.5rem;
  z-index: 2;
  padding: 1.1rem 1rem 0.9rem;
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--e3);
}
.v-side-t {
  margin: 0 0 0.6rem;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}
.v-side ol { list-style: none; margin: 0; padding: 0; counter-reset: sidec; }
.v-side li { counter-increment: sidec; }
.v-side a {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px dashed var(--line-2);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.v-side a::before {
  content: counter(sidec, decimal-leading-zero);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.v-side a:hover { padding-left: 0.2rem; }
.v-side li:last-child a { border-bottom: 0; }

/* 页脚 */
.v-foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) 1.5rem calc(var(--rail) + var(--pad));
  background: var(--mist);
  border-top: 1px solid var(--line);
}
.v-foot p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.v-foot .v-f-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.v-foot .v-f-link { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: flex-start; }
.v-foot .v-f-link a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 0.15rem 0;
  min-height: 32px;
}
.v-foot .v-f-link a:hover { border-bottom-color: var(--ink); }
.v-foot small {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

/* 动效 */
html.v-js .v-reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.62s ease var(--d, 0ms), transform 0.62s ease var(--d, 0ms);
}
html.v-js .v-reveal.v-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.v-js .v-reveal { opacity: 1; transform: none; transition: none; }
  .v-nav li { opacity: 1; transform: none; }
  .v-fig { transform: none !important; }
}

/* 断点 */
@media (max-width: 900px) {
  .v-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 1.5rem; }
  .v-fig { order: 2; }
  .v-txt { order: 1; }
  .v-reader {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "prose"
      "side";
    gap: 0;
  }
  .v-side { position: static; margin-top: 2rem; }
}

@media (max-width: 800px) {
  .v-rail {
    inset: 0 0 auto 0;
    width: auto;
    height: 3.75rem;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem 0.9rem;
    border-right: 0;
    border-bottom: 1px solid var(--line-2);
  }
  .v-mark { width: 2.5rem; height: 2.5rem; }
  .v-burger { flex-direction: row; gap: 0.5rem; padding: 0.55rem 0.8rem; }
  .v-burger-txt { writing-mode: horizontal-tb; letter-spacing: 0.14em; font-size: 0.8rem; }
  .v-cta { top: auto; bottom: 1rem; right: 1rem; }
  .v-main { padding-left: var(--pad); padding-right: var(--pad); padding-top: 3.75rem; }
  .v-foot { padding-left: var(--pad); padding-right: var(--pad); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-nav ol { columns: 1; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .v-prose { font-size: 1.05rem; }
  .v-foot { grid-template-columns: minmax(0, 1fr); }
  .v-foot .v-f-brand { font-size: clamp(2rem, 12vw, 3rem); }
}

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