/* ============================================================
   把我的故事讲给你听 · 个人简历
   视觉复刻自 Noomo《The Power of Digital Storytelling》
   ============================================================ */

:root {
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --ink: #fff;
  --ink-dim: rgba(255, 255, 255, .68);
  --gold: #ffd9a0;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: auto; }

body {
  background: #0b0d1c;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.has-smooth { overflow: hidden auto; }

::selection { background: rgba(255, 217, 160, .35); color: #fff; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }

/* ---------- WebGL 画布 ---------- */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* ---------- 加载页 ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0b0d1c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s var(--ease-out), visibility 1s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pre-inner { text-align: center; }
.pre-name {
  font-size: 12px;
  letter-spacing: .5em;
  color: var(--ink-dim);
  margin-bottom: 22px;
}
.pre-count {
  font-family: var(--serif);
  font-size: clamp(72px, 14vw, 150px);
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.pre-count sup { font-size: .3em; color: var(--ink-dim); }
.pre-bar {
  width: min(280px, 60vw);
  height: 1px;
  background: rgba(255, 255, 255, .15);
  margin: 30px auto 18px;
}
#pre-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .2s linear;
}
.pre-tip { font-size: 12px; letter-spacing: .35em; color: var(--ink-dim); }

/* ---------- 顶栏 ---------- */
#topbar {
  position: fixed;
  z-index: 50;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px clamp(22px, 4vw, 56px);
  mix-blend-mode: normal;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 1s var(--ease-out) .3s, transform 1s var(--ease-out) .3s;
}
body.ready #topbar { opacity: 1; transform: none; }
.logo {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .2em;
}
.logo span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .2em;
  vertical-align: super;
  color: var(--ink-dim);
  margin-left: 6px;
}
.top-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  margin-right: clamp(20px, 4vw, 56px);
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--ink-dim);
}
.top-contact a { color: var(--ink-dim); transition: color .35s; }
.top-contact b {
  font-weight: 400;
  font-size: 11px;
  color: rgba(255, 255, 255, .42);
  margin-right: 7px;
  letter-spacing: .15em;
}
.top-contact a:hover { color: var(--gold); }
.top-contact i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
}
@media (max-width: 720px) {
  .top-contact {
    gap: 0;
    margin-right: clamp(14px, 3vw, 24px);
  }
  .top-contact .tc-tel { display: inline; }
  .top-contact a:not(.tc-tel),
  .top-contact i { display: none; }
  .top-contact b { display: none; }
}
@media (max-width: 520px) {
  #topbar { padding: 24px 20px; }
  .logo {
    font-size: 18px;
    letter-spacing: .16em;
  }
  .logo span {
    font-size: 9px;
    margin-left: 4px;
  }
  .top-contact {
    display: flex;
    margin-left: auto;
    margin-right: 14px;
    font-size: 11.5px;
    letter-spacing: .04em;
    white-space: nowrap;
  }
}
#menu-btn { display: flex; align-items: center; gap: 12px; }
.mb-label { font-size: 12px; letter-spacing: .4em; color: var(--ink-dim); }
.mb-lines { display: flex; flex-direction: column; gap: 6px; width: 30px; }
.mb-lines i {
  height: 1px;
  background: #fff;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out);
  transform-origin: right center;
}
.mb-lines i:last-child { width: 70%; align-self: flex-end; }
#menu-btn:hover .mb-lines i:last-child { width: 100%; }
body.menu-open .mb-lines i:first-child { transform: translateY(3.5px) rotate(-8deg); }
body.menu-open .mb-lines i:last-child { width: 100%; transform: translateY(-3.5px) rotate(8deg); }

/* ---------- 全屏菜单 ---------- */
#menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(22px, 8vw, 120px);
  visibility: hidden;
  pointer-events: none;
}
.menu-bg {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 20, .72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  transition: opacity .7s var(--ease-out);
}
body.menu-open #menu { visibility: visible; pointer-events: auto; }
body.menu-open .menu-bg { opacity: 1; }
.menu-list { position: relative; }
.menu-list li {
  overflow: hidden;
}
.menu-list a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 6.5vw, 72px);
  line-height: 1.55;
  transform: translateY(110%);
  transition: transform .9s var(--ease-out), color .4s;
}
body.menu-open .menu-list a { transform: none; }
.menu-list li:nth-child(1) a { transition-delay: .05s; }
.menu-list li:nth-child(2) a { transition-delay: .10s; }
.menu-list li:nth-child(3) a { transition-delay: .15s; }
.menu-list li:nth-child(4) a { transition-delay: .20s; }
.menu-list li:nth-child(5) a { transition-delay: .25s; }
.menu-list li:nth-child(6) a { transition-delay: .30s; }
.menu-list a:hover { color: var(--gold); }
.menu-list em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--ink-dim);
}
.menu-list small {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .35em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.menu-foot {
  position: absolute;
  bottom: 36px;
  left: clamp(22px, 8vw, 120px);
  font-size: 13px;
  letter-spacing: .25em;
  color: var(--ink-dim);
  opacity: 0;
  transition: opacity .8s .4s;
}
body.menu-open .menu-foot { opacity: 1; }

/* ---------- 右侧章节指示 ---------- */
#chapter-nav {
  position: fixed;
  z-index: 30;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transition: opacity 1s var(--ease-out) .6s;
}
body.ready #chapter-nav { opacity: 1; }
#chapter-nav button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--ink-dim);
  transition: color .4s;
}
#chapter-nav button span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width .5s var(--ease-out), opacity .4s;
  opacity: 0;
}
#chapter-nav button b {
  font-weight: 400;
  position: relative;
  padding-bottom: 2px;
}
#chapter-nav button b::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right .5s var(--ease-out);
}
#chapter-nav button.on { color: #fff; }
#chapter-nav button.on b::after { right: 0; }
#chapter-nav button.on span,
#chapter-nav button:hover span { max-width: 70px; opacity: 1; }

/* ---------- 滚动提示 ---------- */
#scroll-hint {
  position: fixed;
  z-index: 30;
  left: clamp(22px, 4vw, 56px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--ink-dim);
  opacity: 0;
  transition: opacity 1s var(--ease-out) .8s;
}
body.ready #scroll-hint { opacity: 1; }
body.scrolled #scroll-hint { opacity: 0; transition-delay: 0s; }
.hint-line {
  width: 56px;
  height: 1px;
  background: rgba(255, 255, 255, .3);
  position: relative;
  overflow: hidden;
}
.hint-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  animation: hint 2.2s var(--ease-out) infinite;
}
@keyframes hint {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- 自定义光标 ---------- */
body {
  --cursor-h1: 42;
  --cursor-h2: 18;
  --cursor-h3: 205;
  --cursor-aura: .48;
  --cursor-nebula: .34;
}
body.cursor-sun {
  --cursor-h1: 42;
  --cursor-h2: 16;
  --cursor-h3: 205;
  --cursor-aura: .44;
  --cursor-nebula: .28;
}
body.cursor-star {
  --cursor-h1: 205;
  --cursor-h2: 248;
  --cursor-h3: 56;
  --cursor-aura: .48;
  --cursor-nebula: .36;
}
body.cursor-violet {
  --cursor-h1: 284;
  --cursor-h2: 34;
  --cursor-h3: 206;
  --cursor-aura: .46;
  --cursor-nebula: .34;
}
#cursor {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.c-dot,
.c-ring {
  position: absolute;
  left: 0; top: 0;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity, filter;
}
.c-dot {
  width: 210px;
  height: 210px;
  background:
    radial-gradient(circle at 50% 50%,
      hsla(var(--cursor-h1), 100%, 88%, calc(var(--cursor-aura) * .58)) 0%,
      hsla(var(--cursor-h2), 100%, 76%, calc(var(--cursor-aura) * .26)) 28%,
      hsla(var(--cursor-h3), 100%, 72%, calc(var(--cursor-aura) * .10)) 52%,
      rgba(255, 255, 255, 0) 74%);
  filter: blur(16px) saturate(1.22);
  opacity: .72;
}
.c-ring {
  width: 380px;
  height: 380px;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, 0) 0 21%,
      hsla(var(--cursor-h1), 100%, 82%, calc(var(--cursor-nebula) * .26)) 31%,
      rgba(255, 255, 255, 0) 58%),
    conic-gradient(from 18deg,
      rgba(255, 255, 255, 0) 0deg,
      hsla(var(--cursor-h1), 100%, 78%, calc(var(--cursor-nebula) * .38)) 48deg,
      hsla(var(--cursor-h2), 100%, 72%, calc(var(--cursor-nebula) * .32)) 92deg,
      rgba(255, 255, 255, 0) 138deg,
      hsla(var(--cursor-h3), 100%, 78%, calc(var(--cursor-nebula) * .26)) 226deg,
      rgba(255, 255, 255, 0) 310deg);
  filter: blur(24px) saturate(1.35);
  opacity: .56;
}
body.cursor-moving .c-dot { opacity: .9; }
body.cursor-moving .c-ring { opacity: .72; }
body.cursor-hover .c-dot { filter: blur(18px) saturate(1.35); opacity: .95; }
body.cursor-hover .c-ring { filter: blur(28px) saturate(1.5); opacity: .82; }
body.cursor-star .c-ring {
  background:
    radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, 0) 0 18%,
      hsla(var(--cursor-h1), 100%, 88%, calc(var(--cursor-nebula) * .22)) 28%,
      rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 38% 42%,
      hsla(56, 100%, 86%, calc(var(--cursor-nebula) * .18)) 0 1.8px,
      rgba(255,255,255,0) 2.6px),
    radial-gradient(circle at 63% 56%,
      hsla(205, 100%, 88%, calc(var(--cursor-nebula) * .22)) 0 1.4px,
      rgba(255,255,255,0) 2.4px),
    conic-gradient(from 18deg,
      rgba(255, 255, 255, 0) 0deg,
      hsla(var(--cursor-h1), 100%, 78%, calc(var(--cursor-nebula) * .28)) 50deg,
      hsla(var(--cursor-h2), 100%, 78%, calc(var(--cursor-nebula) * .25)) 102deg,
      rgba(255, 255, 255, 0) 160deg,
      hsla(var(--cursor-h3), 100%, 80%, calc(var(--cursor-nebula) * .20)) 232deg,
      rgba(255, 255, 255, 0) 316deg);
}
@media (pointer: coarse) { #cursor { display: none; } }

/* ---------- 内容布局 ---------- */
#content { position: relative; z-index: 1; }
body.has-smooth #content {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  will-change: transform;
}

.chapter {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18vh clamp(22px, 7vw, 110px);
  position: relative;
}
.wrap { max-width: 1080px; width: 100%; margin: 0 auto; }

/* 大标题 */
.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 8.4vw, 108px);
  line-height: 1.28;
  letter-spacing: .02em;
  text-shadow: 0 4px 60px rgba(5, 6, 20, .45);
  margin: 18px 0 34px;
}
.display.xl { font-size: clamp(48px, 9.5vw, 124px); }
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line-in {
  display: inline-block;
  transform: translateY(115%) rotate(.6deg);
  transition: transform 1.3s var(--ease-out) var(--d, 0s);
  will-change: transform;
}
.in .line-in, .line-in.in { transform: none; }

/* 浮现元素 */
[data-reveal] {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 1.1s var(--ease-out) var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

.eyebrow {
  font-size: 12px;
  letter-spacing: .5em;
  color: var(--gold);
}
.ch-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .4em;
  color: var(--ink-dim);
}
.ch-label b {
  font-weight: 400;
  color: var(--gold);
  font-size: 13px;
}
.ch-label::after {
  content: "";
  flex: 0 0 64px;
  height: 1px;
  background: rgba(255, 255, 255, .25);
}

/* 序章 */
.hero { text-align: center; align-items: center; }
.hero .eyebrow { margin-bottom: 8px; }
.hero-sub {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--ink-dim);
  letter-spacing: .08em;
}
.hero-sub b { color: #fff; font-weight: 600; }

/* 关于 */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  color: var(--ink-dim);
  max-width: 920px;
  font-size: 15.5px;
}
.stats {
  display: flex;
  gap: clamp(36px, 7vw, 110px);
  margin-top: 64px;
}
.stats b {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 5.5vw, 72px);
  line-height: 1.1;
  color: var(--gold);
}
.stats sup { font-size: .38em; margin-left: 4px; color: var(--ink-dim); }
.stats span { font-size: 12px; letter-spacing: .3em; color: var(--ink-dim); }

/* 能力（开放式行排版，与"群星之下"的时间线一致的呼吸感） */
.skill-rows { margin-top: 14px; max-width: 880px; }
.srow {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  transition: transform .5s var(--ease-out);
}
.srow:hover { transform: translateX(8px); }
.srow h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 2.2vw, 24px);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.srow h3 b {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .25em;
  color: var(--gold);
}
.srow p {
  color: var(--ink-dim);
  font-size: 14.5px;
  line-height: 2.1;
}
.tools-line {
  margin-top: 30px;
  max-width: 880px;
  font-size: 13px;
  line-height: 2.2;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .45);
}

.marquee {
  position: absolute;
  left: 0; right: 0;
  bottom: 4vh;
  overflow: hidden;
  opacity: .35;
  pointer-events: none;
}
.mq-track {
  display: flex;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 40px);
  letter-spacing: .12em;
  animation: mq 28s linear infinite;
}
@keyframes mq { to { transform: translateX(-50%); } }

/* 经历 */
.timeline { margin-top: 14px; max-width: 760px; }
.timeline li {
  position: relative;
  padding: 30px 0 30px 42px;
  border-left: 1px solid rgba(255, 255, 255, .22);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 44px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold);
}
.timeline time {
  font-size: 12px;
  letter-spacing: .35em;
  color: var(--gold);
}
.timeline h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 27px);
  margin: 8px 0 6px;
}
.timeline p { color: var(--ink-dim); font-size: 14.5px; max-width: 600px; }

/* 项目（开放式编号清单） */
.works-list { margin-top: 14px; max-width: 880px; }
.works-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: clamp(12px, 2vw, 28px);
  padding: 30px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  transition: transform .5s var(--ease-out);
}
.works-list li:hover { transform: translateX(8px); }
.works-list em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: .2em;
  padding-top: 6px;
}
.works-list h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  margin-bottom: 8px;
  transition: color .4s;
}
.works-list li:hover h3 { color: var(--gold); }
.works-list p {
  color: var(--ink-dim);
  font-size: 14px;
  max-width: 680px;
  margin-bottom: 8px;
}
.wtags {
  font-size: 12px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .42);
}

/* 联络 */
.contact { text-align: center; align-items: center; padding-top: 9vh; padding-bottom: 6vh; }
.contact .display {
  font-size: clamp(36px, 6.4vw, 82px);
  margin-bottom: clamp(36px, 7vh, 70px);
}
.contact .ch-label { justify-content: center; }
.contact .ch-label::after { display: none; }
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 6px 0 26px;
}
.qr-wrap img {
  width: clamp(140px, 18vh, 176px);
  padding: 12px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(10, 8, 24, .45);
}
.qr-wrap span {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--ink-dim);
}
.seek {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
.meta {
  font-size: 13px;
  letter-spacing: .25em;
  color: var(--ink-dim);
  margin-bottom: 28px;
}
.email-cta {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(20px, 3.2vw, 34px);
  letter-spacing: .06em;
  color: var(--gold);
  border-bottom: 1px solid rgba(255, 217, 160, .5);
  padding-bottom: 6px;
  margin: 6px 0 18px;
  transition: color .4s, border-color .4s, letter-spacing .6s var(--ease-out);
}
.email-cta:hover { color: #fff; border-color: #fff; letter-spacing: .12em; }
.socials {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 40px);
  font-size: 13px;
  letter-spacing: .25em;
}
.socials a {
  color: var(--ink-dim);
  transition: color .35s;
  position: relative;
}
.socials a:hover { color: #fff; }
.contact footer {
  margin-top: 3vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .4);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .cols, .srow { grid-template-columns: 1fr; }
  .srow { gap: 8px; }
  .stats { flex-wrap: wrap; gap: 28px 44px; }
  #chapter-nav { display: none; }
  .chapter { padding-top: 14vh; padding-bottom: 14vh; }
  .contact .display { display: none; }
  .contact .qr-wrap { margin-top: clamp(70px, 11vh, 108px); }
  .contact .seek { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .line-in, [data-reveal] { transition: none; transform: none; opacity: 1; }
  .hint-line::after, .mq-track { animation: none; }
}
