:root {
  --wrap: 1120px;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --radius: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B121A;
  --bg2: #080D13;
  --panel: rgba(15, 24, 34, 0.70);
  --panel-solid: #0F1822;
  --line: #23303F;
  --ring: #3B4E66;
  --gold: #E9B44C;
  --warm: #E7B27A;
  --warm-soft: rgba(231, 178, 122, 0.10);
  --mint: #6EE7B7;
  --ink: #E2E9F1;
  --body: #BEC9D6;
  --dim: #8695A8;
  --glow: rgba(233, 180, 76, 0.12);
  --shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.9);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F3EC;
  --bg2: #EFE9DD;
  --panel: rgba(255, 253, 247, 0.80);
  --panel-solid: #FFFDF7;
  --line: #D9D1BF;
  --ring: #B4A78F;
  --gold: #9C6818;
  --warm: #A8672B;
  --warm-soft: rgba(168, 103, 43, 0.08);
  --mint: #0C735C;
  --ink: #1B2430;
  --body: #3C4956;
  --dim: #5F6B77;
  --glow: rgba(156, 104, 24, 0.10);
  --shadow: 0 22px 50px -40px rgba(70, 55, 30, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(90ch 50vh at 50% -8%, var(--glow) 0%, transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--gold);
  color: #10161d;
  font-size: 14px;
  transition: top .2s ease;
}
.skip:focus { top: 14px; }

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

/* ---------- 顶部进度条 ---------- */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--mint));
  z-index: 30;
  transition: width .12s linear;
}

/* ---------- 顶栏 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.head-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  font-size: 16px;
  flex: 0 0 auto;
}
.brand-mark { width: 26px; height: 26px; color: var(--gold); }

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
  letter-spacing: .1em;
}
.nav a {
  color: var(--dim);
  padding: 6px 0;
  position: relative;
  transition: color .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .25s ease;
}
.nav a:hover,
.nav a[aria-current="true"] { color: var(--ink); }
.nav a:hover::after,
.nav a[aria-current="true"]::after { width: 100%; }

.head-actions { display: flex; align-items: center; gap: 6px; margin-left: 6px; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line); background: var(--panel); }
.icon-btn svg { width: 19px; height: 19px; }

:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: none; }

.menu-btn { display: none; }
.menu-lines { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-lines i { width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  align-items: center;
  gap: 52px;
  padding: 84px 0 70px;
  min-height: clamp(520px, 70vh, 760px);
}

.hero-art { display: flex; justify-content: center; position: relative; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 66%);
  filter: blur(6px);
  pointer-events: none;
}
.compass { width: min(420px, 100%); height: auto; position: relative; }
.ticks {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin-ticks 120s linear infinite;
}
.needle {
  transform-box: fill-box;
  transform-origin: center;
  animation: sweep 22s ease-in-out infinite alternate;
}
@keyframes spin-ticks { to { transform: rotate(360deg); } }
@keyframes sweep {
  from { transform: rotate(-16deg); }
  to   { transform: rotate(24deg); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero-art { animation: rise .8s ease-out both; }
.hero-copy > * { animation: rise .65s ease-out both; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .12s; }
.hero-copy > *:nth-child(3) { animation-delay: .19s; }
.hero-copy > *:nth-child(4) { animation-delay: .26s; }
.hero-copy > *:nth-child(5) { animation-delay: .33s; }
.hero-copy > *:nth-child(6) { animation-delay: .40s; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mint);
  font-size: 12px;
  letter-spacing: .28em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 14%, transparent);
}

h1 {
  font-size: clamp(56px, 8.6vw, 104px);
  line-height: 1.04;
  letter-spacing: .14em;
  font-weight: 600;
  margin-bottom: 12px;
}

.tagline {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--gold);
  letter-spacing: .1em;
  margin-bottom: 20px;
}

.lede { color: var(--body); max-width: 44ch; margin-bottom: 30px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 38px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14.5px;
  letter-spacing: .08em;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #10161d; font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--gold) 86%, white); }
.btn.ghost { color: var(--body); background: transparent; }
.btn.ghost:hover { border-color: var(--gold); color: var(--ink); }

.meta { display: flex; gap: 40px; }
.meta li { display: flex; flex-direction: column; }
.meta b { font-size: 23px; font-weight: 600; line-height: 1.4; }
.meta span { font-size: 12px; color: var(--dim); letter-spacing: .14em; }

/* ---------- 区块通用 ---------- */
.section { padding-top: 92px; }
.section:last-of-type { padding-bottom: 40px; }

.sec-head { margin-bottom: 34px; max-width: 60ch; }
.sec-index {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--gold);
  margin-bottom: 8px;
}
.sec-head h2 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.sec-head p { color: var(--dim); font-size: 14.5px; }

/* ---------- 原则 ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pcard {
  position: relative;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color .25s ease, transform .25s ease;
}
.pcard:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); transform: translateY(-3px); }
.pnum {
  position: absolute;
  top: 20px; right: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--dim);
}
.pcard h3 { font-size: 18px; font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; }
.pcard p { color: var(--body); font-size: 14.5px; }

/* ---------- 能力 ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill {
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color .25s ease, transform .25s ease;
}
.skill:hover { border-color: color-mix(in srgb, var(--mint) 40%, var(--line)); transform: translateY(-3px); }
.skill svg { width: 24px; height: 24px; color: var(--gold); margin-bottom: 16px; }
.skill h3 { font-size: 16.5px; font-weight: 600; letter-spacing: .04em; margin-bottom: 7px; }
.skill p { color: var(--body); font-size: 14px; line-height: 1.8; }

/* ---------- 关于 ---------- */
.about-card {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  padding: 40px 40px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}
.avatar {
  width: 120px; height: 120px;
  flex: 0 0 auto;
  border-radius: 26px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--panel-solid);
}
.about-copy h3 { font-size: 22px; font-weight: 600; letter-spacing: .02em; margin-bottom: 12px; }
.about-copy > p { color: var(--body); margin-bottom: 14px; max-width: 62ch; }

.facts { display: grid; gap: 10px; margin-top: 22px; }
.facts li { display: flex; gap: 18px; font-size: 14px; color: var(--body); }
.facts b {
  flex: 0 0 72px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .08em;
}

/* ---------- 问答 ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 36px 18px 0;
  position: relative;
  font-size: 16px;
  letter-spacing: .02em;
  transition: color .2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 18px;
  color: var(--dim);
  transition: transform .2s ease, color .2s ease;
}
.faq-item[open] summary { color: var(--gold); }
.faq-item[open] summary::after { content: "−"; color: var(--gold); }
.faq-item summary:hover { color: var(--ink); }
.faq-item p {
  color: var(--body);
  font-size: 14.5px;
  padding: 0 48px 20px 0;
  max-width: 78ch;
}

/* ---------- 页脚 ---------- */
.site-foot {
  margin-top: 96px;
  padding: 30px 0 44px;
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: .04em;
}
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--body); letter-spacing: .14em; }
.foot-brand .brand-mark { width: 20px; height: 20px; color: var(--gold); }
.foot-link { color: var(--body); border-bottom: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); padding-bottom: 1px; }
.foot-link:hover { color: var(--gold); }
.site-foot p:last-child { margin-left: auto; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--body);
  cursor: pointer;
  z-index: 15;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, border-color .2s ease, color .2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 滚动揭示 ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

.principles .reveal:nth-child(2),
.skills .reveal:nth-child(3n+2) { transition-delay: .06s; }
.principles .reveal:nth-child(3),
.skills .reveal:nth-child(3n) { transition-delay: .12s; }
.principles .reveal:nth-child(4) { transition-delay: .06s; }
.timeline .tl-item:nth-child(2) { transition-delay: .05s; }
.timeline .tl-item:nth-child(3) { transition-delay: .1s; }
.timeline .tl-item:nth-child(4) { transition-delay: .15s; }
.timeline .tl-item:nth-child(5) { transition-delay: .2s; }
.timeline .tl-item:nth-child(6) { transition-delay: .25s; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 56px 0 48px;
    min-height: 0;
    text-align: center;
  }
  .hero-art { order: -1; }
  .compass { width: min(260px, 66vw); }
  .lede { margin-inline: auto; }
  .cta { justify-content: center; }
  .meta { justify-content: center; gap: 34px; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: 76px; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .principles { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }

  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 16px;
    background: var(--panel-solid);
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }

  .menu-btn[aria-expanded="true"] .menu-lines i:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-lines i:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .menu-lines i:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

  .about-card { flex-direction: column; gap: 22px; padding: 28px 24px; }
  .avatar { width: 88px; height: 88px; border-radius: 20px; }
  .site-foot { flex-direction: column; align-items: flex-start; }
  .site-foot p:last-child { margin-left: 0; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticks, .needle { animation: none; }
  .hero-art, .hero-copy > * { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pcard, .skill, .case, .icon-btn, .to-top { transition: none; }
}

/* ---------- 这些天 · 引言 ---------- */
.pull {
  margin: 6px 0 14px;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--warm);
  font-family: var(--serif);
}
.pull p {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.45;
  letter-spacing: .02em;
  color: var(--ink);
}
.pull cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--dim);
}
.pull-note {
  color: var(--dim);
  font-size: 15px;
  max-width: 62ch;
  margin-bottom: 42px;
}

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 10%, var(--line) 90%, transparent);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 20px;
  padding-bottom: 30px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -30.5px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid color-mix(in srgb, var(--gold) 80%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 8%, transparent);
}
.tl-item:last-child::before { background: var(--gold); border-color: var(--gold); }
.tl-when {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gold);
  padding-top: 4px;
  white-space: nowrap;
}
.tl-item h3 { font-size: 17.5px; font-weight: 600; letter-spacing: .03em; margin-bottom: 6px; }
.tl-item p { color: var(--body); font-size: 14.5px; max-width: 64ch; }

/* ---------- 信 ---------- */
.letter {
  position: relative;
  max-width: 720px;
  padding: 46px 48px 40px;
  border: 1px solid color-mix(in srgb, var(--warm) 32%, var(--line));
  border-radius: 18px;
  background: linear-gradient(165deg, var(--warm-soft), transparent 58%), var(--panel);
  box-shadow: var(--shadow);
}
.letter::before {
  content: "南";
  position: absolute;
  top: 24px;
  right: 26px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--warm) 50%, transparent);
  color: var(--warm);
  font-family: var(--serif);
  font-size: 19px;
  transform: rotate(9deg);
  opacity: .85;
}
.letter p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
  color: var(--body);
  margin-bottom: 15px;
}
.letter .letter-to { color: var(--ink); font-size: 18px; margin-bottom: 24px; }
.letter .letter-sign { color: var(--ink); margin-top: 30px; line-height: 1.9; }
.letter .letter-sign span {
  display: block;
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--dim);
  letter-spacing: .08em;
}

.foot-note { color: var(--warm); }

@media (max-width: 720px) {
  .tl-item { grid-template-columns: 1fr; gap: 4px; padding-bottom: 26px; }
  .tl-when { padding-top: 0; }
  .letter { padding: 32px 24px 30px; }
  .letter::before { top: 16px; right: 16px; width: 38px; height: 38px; font-size: 16px; }
  .letter p { font-size: 16px; line-height: 1.95; }
  .pull { padding-left: 18px; }
  .pull p { font-size: 24px; }
}
