/* ============================================================
   Babe's Portfolio — paper, stars, and a little bit of data
   Visual language: warm paper, pastel washes, editorial serif,
   monospace captions, hard shadows, slow cinematic chapters.
   ============================================================ */

@font-face {
  font-family: "Caveat";
  src: url("../assets/fonts/caveat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../assets/fonts/silkscreen-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3eedb;
  --paper-2: #fbf6e6;
  --paper-3: #fffaf0;
  --ink: #171915;
  --ink-2: #242821;
  --ink-soft: #3f413b;
  --muted: #7c746b;
  --line: #9a9085;
  --sage: #267961;
  --pink: #e7a3c0;
  --pink-soft: #f7d6db;
  --green: #87b79a;
  --green-soft: #c2ddcc;
  --gold: #f4c85b;
  --gold-soft: #fcebc2;
  --lilac: #b9a7d8;
  --blue: #a9c7dd;
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --pixel: "Silkscreen", "SFMono-Regular", Consolas, monospace;
  --hand: "Caveat", "Segoe Script", cursive;
  --shadow: 5px 5px 0 var(--ink-2);
  --shadow-sm: 3px 3px 0 var(--ink-2);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html {
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
body.text-open { overflow: hidden; }
::selection { background: var(--gold); color: var(--ink); }
a { color: inherit; }
button { color: inherit; font: inherit; cursor: pointer; }
img { max-width: 100%; }
p { 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;
}
.skip-link {
  position: fixed;
  left: 16px; top: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--paper-3);
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- background ---------- */
#scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100dvh;
  touch-action: pan-y;
}
#wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 252, 232, .9), transparent 46%),
    linear-gradient(180deg, #f6f0dd 0%, #f1ecd8 58%, #ece6d2 100%);
}
.wash__layer {
  position: absolute;
  inset: -30%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease;
  will-change: opacity;
}
.wash__layer--pink {
  background:
    radial-gradient(circle at 24% 24%, rgba(233, 158, 190, .85), transparent 52%),
    radial-gradient(circle at 74% 70%, rgba(247, 208, 216, .75), transparent 60%),
    linear-gradient(180deg, rgba(246, 205, 214, .55), rgba(247, 226, 222, .45));
}
.wash__layer--green {
  background:
    radial-gradient(circle at 72% 28%, rgba(135, 183, 154, .50), transparent 46%),
    radial-gradient(circle at 16% 76%, rgba(194, 221, 204, .55), transparent 52%);
}
.wash__layer--gold {
  background:
    radial-gradient(circle at 44% 78%, rgba(244, 200, 91, .42), transparent 48%),
    radial-gradient(circle at 82% 20%, rgba(252, 235, 194, .60), transparent 50%);
}
.wash__layer--lilac {
  background:
    radial-gradient(circle at 66% 46%, rgba(185, 167, 216, .38), transparent 46%),
    radial-gradient(circle at 22% 26%, rgba(247, 214, 219, .34), transparent 48%);
}
.wash__layer--blue {
  background:
    radial-gradient(circle at 30% 40%, rgba(169, 199, 221, .40), transparent 48%),
    radial-gradient(circle at 80% 72%, rgba(252, 235, 194, .46), transparent 50%);
}
#grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .05;
  background-image: url("../assets/grain.svg");
  background-size: 220px 220px;
}
#vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(243, 238, 219, .80) 0%, rgba(243, 238, 219, .24) 13%, transparent 27%),
    linear-gradient(0deg, rgba(243, 238, 219, .76) 0%, rgba(243, 238, 219, .22) 14%, transparent 28%);
}

/* the moment the camera passes through the glass */
#glass-pass {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: none;
  opacity: 0;
  transform-origin: 50% 50%;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 50% 46%,
      rgba(255, 252, 242, .94) 0%,
      rgba(255, 246, 227, .62) 20%,
      rgba(253, 226, 236, .34) 43%,
      rgba(214, 242, 232, .22) 66%,
      rgba(243, 238, 219, 0) 86%),
    linear-gradient(112deg,
      rgba(255, 255, 255, .14) 8%,
      rgba(255, 232, 241, .22) 38%,
      rgba(222, 246, 236, .18) 62%,
      rgba(255, 248, 218, .14) 88%);
}
#glass-pass::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: repeating-linear-gradient(104deg,
    rgba(255, 255, 255, .13) 0 2px,
    rgba(255, 255, 255, 0) 2px 11px);
  mask-image: radial-gradient(circle at 50% 48%, #000 0 28%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 0 28%, transparent 72%);
}

/* ---------- custom cursor ---------- */
#cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 90;
  width: 22px; height: 22px;
  color: var(--ink-2);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .3s ease, transform .2s var(--ease-out);
  mix-blend-mode: multiply;
}
#cursor.is-visible { opacity: .55; }
#cursor.is-hot,
body.glass-hover #cursor { transform: translate(-50%, -50%) scale(1.5) rotate(12deg); opacity: .8; }
@media (pointer: coarse) { #cursor { display: none; } }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 22px;
  left: 32px;
  right: 32px;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}
.site-header a,
.site-header button { pointer-events: auto; }
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand__mark {
  height: clamp(34px, 3vw, 44px);
  width: auto;
  display: block;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.text-toggle {
  border: 0;
  background: none;
  padding: 6px 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #5f594f;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.text-toggle:hover { color: var(--ink); border-color: var(--ink); }
#chapter-nav {
  display: flex;
  align-items: center;
  gap: 13px;
}
.chapter-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 7px 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #5f594f;
  opacity: .84;
  transition: color .25s, opacity .25s;
}
.chapter-dot::before {
  content: "";
  width: 7px; height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background .25s, transform .25s var(--ease-spring);
}
.chapter-dot em { font-style: normal; }
.chapter-dot:hover { opacity: 1; color: var(--ink); }
.chapter-dot.is-active { opacity: 1; color: var(--ink); }
.chapter-dot.is-active::before { background: currentColor; transform: scale(1.25); }

/* ---------- hint ---------- */
.hint {
  position: fixed;
  left: 50%;
  bottom: max(34px, env(safe-area-inset-bottom));
  z-index: 45;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--ink-2);
  border-radius: 30px;
  background: rgba(243, 238, 219, .92);
  box-shadow: var(--shadow-sm);
  transition: opacity .5s ease, transform .5s var(--ease-out), visibility .5s;
}
.hint:hover { background: var(--paper-3); }
.hint.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  pointer-events: none;
}
.hint__mouse {
  display: block;
  flex: 0 0 13px;
  width: 13px; height: 21px;
  border: 1.5px solid var(--ink-2);
  border-radius: 8px;
}
.hint__mouse span {
  display: block;
  width: 2px; height: 5px;
  margin: 4px auto 0;
  border-radius: 2px;
  background: var(--ink-2);
  animation: hint-scroll 1.8s ease-in-out infinite;
}
@keyframes hint-scroll {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(4px); opacity: .35; }
}
.hint__text {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hint__cn {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- chapters ---------- */
.chapter {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(78px, 10vh, 118px) clamp(20px, 5.2vw, 84px) clamp(50px, 7vh, 86px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 18px, 0) scale(.985);
  will-change: opacity, transform;
}
.chapter[data-active="true"] { visibility: visible; }
.chapter__inner {
  position: relative;
  width: min(1280px, 100%);
  margin: auto;
  pointer-events: none;
}
.chapter[data-active="true"] .chapter__inner { pointer-events: auto; }

/* entrance */
.chapter--entrance {
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: clamp(84px, 13vh, 150px);
}
.entrance__place {
  position: absolute;
  right: 4vw;
  bottom: clamp(40px, 7vh, 80px);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .22em;
  color: var(--muted);
}
.entrance__wordmark-fallback { display: none; }

/* shared type */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.kicker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid currentColor;
  border-radius: 20px;
  font-size: 8px;
  color: var(--ink-soft);
}
.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
}
.display--en {
  font-size: clamp(28px, 3.5vw, 56px);
  line-height: 1.06;
  letter-spacing: -.032em;
  max-width: 17ch;
}
.display--cn {
  margin-top: 14px;
  font-size: clamp(19px, 2.05vw, 32px);
  line-height: 1.45;
  letter-spacing: .01em;
  font-weight: 700;
  color: var(--ink-soft);
}
.body {
  margin-top: 18px;
  max-width: 40em;
  font-size: clamp(12.5px, 1.02vw, 15px);
  line-height: 1.95;
  color: var(--ink-soft);
}
.body--en {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(12px, 1.02vw, 15px);
  font-style: italic;
  line-height: 1.75;
  color: var(--muted);
  max-width: 43em;
}
.micro {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head { margin-bottom: clamp(14px, 2.2vh, 28px); }
.section-head .display--en { max-width: 22ch; }
.section-head .display--cn { margin-top: 8px; }

/* ---------- hello ---------- */
.hello {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  gap: clamp(28px, 4.5vw, 78px);
  align-items: center;
}
.hello__copy .display--en { max-width: 18ch; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(36, 40, 33, .35);
  border-radius: 20px;
  font-size: 10px;
  color: var(--ink-soft);
  background: rgba(255, 250, 240, .38);
  white-space: nowrap;
}
.chip em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 9.5px;
  color: var(--muted);
}
.hello__micro { margin-top: 20px; }

.hello__visual {
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
}
.polaroid-stack {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 58%;
  pointer-events: none;
  transition: opacity .4s ease, transform .5s var(--ease-out);
}
.hello__visual.has-photo .polaroid-stack {
  opacity: 0;
  transform: translateY(-10px) scale(.98);
}
.polaroid {
  position: absolute;
  margin: 0;
  padding: 6px 6px 22px;
  width: clamp(96px, 8.6vw, 132px);
  background: var(--paper-3);
  border: 1px solid rgba(36, 40, 33, .16);
  box-shadow: 4px 4px 0 rgba(36, 40, 33, .16);
  transition: transform .6s var(--ease-spring);
}
.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(.82) contrast(.96) sepia(.05);
}
.polaroid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 5px;
  text-align: center;
  font-family: var(--hand);
  font-size: 15px;
  color: var(--muted);
  transform: rotate(-2deg);
}
.polaroid--a { right: 32%; top: 2%; transform: rotate(-7deg); }
.polaroid--b { right: 3%; top: 15%; transform: rotate(5deg); }
.hello__visual:hover .polaroid--a { transform: rotate(-11deg) translate(-8px, -6px); }
.hello__visual:hover .polaroid--b { transform: rotate(9deg) translate(8px, -10px); }
.tape {
  position: absolute;
  z-index: 2;
  width: 54px; height: 17px;
  background: rgba(244, 200, 91, .48);
  border-left: 1px dashed rgba(121, 96, 42, .28);
  border-right: 1px dashed rgba(121, 96, 42, .28);
  backdrop-filter: blur(1px);
}
.polaroid .tape { left: 50%; top: -9px; transform: translateX(-50%) rotate(-4deg); }
.tape--tl { left: 24px; top: -10px; transform: rotate(-5deg); }
.tape--tr { right: 26px; top: -10px; transform: rotate(5deg); }

.letters {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: .005em;
  width: 100%;
  margin-top: auto;
  padding-top: 150px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(68px, 10.5vw, 158px);
  line-height: .9;
  letter-spacing: .01em;
  color: var(--ink);
}
.letter {
  position: relative;
  display: inline-block;
  padding: 0 .005em;
  outline: none;
  cursor: pointer;
  transition: padding .45s var(--ease-spring), color .3s ease, transform .45s var(--ease-spring);
  transform-origin: 50% 80%;
}
.letter:hover,
.letter:focus-visible,
.letter.is-open { color: var(--sage); transform: translateY(-4px); }
.letter:focus-visible { outline: 2px solid var(--sage); outline-offset: 8px; }
.letter.is-open { padding: 0 .1em; }
.letter-photo {
  position: absolute;
  left: 0;
  top: -158px;
  z-index: 30;
  width: clamp(96px, 8.6vw, 138px);
  pointer-events: none;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}
.letter-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 5px solid var(--paper-3);
  box-shadow: 5px 5px 0 rgba(36, 40, 33, .82);
  filter: saturate(.88) contrast(.97);
}

/* ---------- paper cards ---------- */
.paper-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 252, 242, .97), rgba(249, 243, 224, .97));
  border: 1px solid rgba(36, 40, 33, .72);
  box-shadow: var(--shadow);
  border-radius: 2px;
  padding: clamp(16px, 1.7vw, 26px);
}
.paper-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: url("../assets/grain.svg");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
  border-radius: inherit;
}
.tabs {
  display: none;
  gap: 8px;
  margin-bottom: 14px;
}
.tab {
  border: 1px solid rgba(36, 40, 33, .35);
  border-radius: 20px;
  background: rgba(255, 250, 240, .4);
  padding: 6px 11px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- experience ---------- */
.work__deck {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
  align-items: start;
}
/* 两卡之间的蜡笔星连接件：悬停任一卡片时旋转放大 */
.work__link {
  position: absolute;
  left: 50%;
  top: 46%;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
}
.work__link-line {
  width: clamp(22px, 2.6vw, 40px);
  border-top: 2px dashed rgba(36, 40, 33, .30);
}
.work__link-line:first-child { transform: rotate(-6deg); }
.work__link-line:last-child { transform: rotate(5deg); }
.work__link-star {
  font-size: 21px;
  line-height: 1;
  color: var(--pink);
  text-shadow: 1.5px 1.5px 0 var(--ink-2);
  transition: transform .5s var(--ease-spring);
}
.work__deck:has(.work-card:hover) .work__link-star { transform: rotate(180deg) scale(1.3); }
/* 工作卡片：参照参考站的干净白卡——细边、柔和投影，去胶带/粗黑边/硬阴影；
   指针跟随的 3D 微倾斜 + 高光扫过（--tilt-x/--tilt-y/--shine-x 由 main.js 写入） */
.work-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffdf8, #fdf8ee);
  border: 1px solid rgba(36, 40, 33, .13);
  box-shadow: 0 18px 44px rgba(97, 76, 58, .10), 0 2px 8px rgba(97, 76, 58, .05);
  transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(var(--lift, 0px));
  transition: transform .45s var(--ease-spring), box-shadow .4s ease;
}
.work-card:hover { --lift: -5px; box-shadow: 0 26px 56px rgba(97, 76, 58, .14), 0 4px 10px rgba(97, 76, 58, .07); }
.work-card .tape { display: none; }
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .45) 50%, transparent 58%);
  background-size: 240% 100%;
  background-position: var(--shine-x, 50%) 0;
  transition: opacity .35s ease;
}
.work-card:hover::before { opacity: 1; }
.work-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid rgba(154, 144, 133, .22);
  padding-bottom: 9px;
  margin-bottom: 13px;
}
/* 出处（公司·平台）：加大加粗，一眼看出是哪里的项目 */
.card-org {
  margin: 0;
  font-weight: 800;
  font-size: clamp(13.5px, 1.1vw, 16px);
  letter-spacing: .02em;
  color: var(--ink);
}
.card-org span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 纸团：经历卡默认揉成纸团，点开才展开 ---------- */
.work-card.is-folded {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  min-height: clamp(260px, 34vh, 360px);
}
.work-card.is-folded::before { display: none; }
.work-card.is-folded .work-card__content { display: none; }
.paper-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(112px, 11vw, 152px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  padding: 0;
  border: none;
  cursor: pointer;
  border-radius: 47% 53% 51% 49% / 52% 48% 55% 45%;
  background: radial-gradient(circle at 32% 28%, #fffef8, #f3ead3 58%, #e0d4b6 100%);
  box-shadow:
    inset -10px -12px 20px rgba(97, 76, 58, .24),
    inset 8px 10px 16px rgba(255, 255, 255, .95),
    0 16px 28px rgba(97, 76, 58, .20);
  animation: ball-breathe 3.4s ease-in-out infinite;
}
.paper-ball::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: inherit;
  background:
    linear-gradient(64deg, transparent 44%, rgba(97, 76, 58, .24) 49%, transparent 54%),
    linear-gradient(-42deg, transparent 40%, rgba(97, 76, 58, .19) 45%, transparent 50%),
    linear-gradient(8deg, transparent 53%, rgba(97, 76, 58, .16) 58%, transparent 63%),
    linear-gradient(112deg, transparent 29%, rgba(97, 76, 58, .13) 33%, transparent 38%),
    radial-gradient(circle at 68% 72%, rgba(97, 76, 58, .18), transparent 42%);
}
.paper-ball:hover { animation: ball-wobble .6s var(--ease-spring); }
/* 展开后纸团本体退场 */
.work-card:not(.is-folded) .paper-ball { display: none; }
@keyframes ball-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  50% { transform: translate(-50%, -50%) scale(1.035) rotate(2.5deg); }
}
@keyframes ball-wobble {
  0% { transform: translate(-50%, -50%) scale(1.03) rotate(-5deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}
.work-card.is-folded::after {
  content: "点击纸团 · 展开";
  position: absolute;
  inset: auto;
  left: 50%;
  top: calc(50% + clamp(74px, 7.6vw, 100px));
  transform: translateX(-50%);
  padding: 6px 11px;
  background: rgba(255, 253, 246, .94);
  border: 1px solid rgba(36, 40, 33, .32);
  border-radius: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(36, 40, 33, .14);
  animation: hint-bounce 1.6s ease-in-out infinite;
}
@keyframes hint-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}
@keyframes hint-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
/* 展开：纸团弹开成卡片 */
.work-card.is-unfolding {
  animation: card-unfold .85s var(--ease-spring) both;
}
@keyframes card-unfold {
  0% { transform: scale(.13) rotate(-18deg); opacity: .5; }
  55% { transform: scale(1.045) rotate(2.5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}
/* 展开后每一行字依次浮跳出来 */
.work-card.is-unfolding .work-card__content > * {
  opacity: 0;
  animation: line-pop .55s var(--ease-spring) forwards;
}
.work-card.is-unfolding .work-card__content > *:nth-child(1) { animation-delay: .14s; }
.work-card.is-unfolding .work-card__content > *:nth-child(2) { animation-delay: .22s; }
.work-card.is-unfolding .work-card__content > *:nth-child(3) { animation-delay: .30s; }
.work-card.is-unfolding .work-card__content > *:nth-child(4) { animation-delay: .37s; }
.work-card.is-unfolding .work-card__content > *:nth-child(5) { animation-delay: .44s; }
.work-card.is-unfolding .work-card__content > *:nth-child(6) { animation-delay: .51s; }
.work-card.is-unfolding .work-card__content > *:nth-child(7) { animation-delay: .58s; }
.work-card.is-unfolding .work-card__content > *:nth-child(8) { animation-delay: .65s; }
.work-card.is-unfolding .work-card__content > *:nth-child(9) { animation-delay: .72s; }
@keyframes line-pop {
  0% { opacity: 0; transform: translateY(18px) scale(.965); }
  70% { transform: translateY(-3px) scale(1.008); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.refold {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  padding: 4px 8px;
  border: 1px solid rgba(36, 40, 33, .25);
  border-radius: 14px;
  background: rgba(255, 253, 246, .9);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  color: var(--muted);
  opacity: 0;
  transition: opacity .25s ease;
}
.work-card:not(.is-folded):hover .refold,
.refold:focus-visible { opacity: 1; }
.refold:hover { color: var(--ink); border-color: rgba(36, 40, 33, .5); }
.card-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(21px, 2.1vw, 32px);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.card-title-cn {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-soft);
}
.card-role {
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .02em;
}
.card-role span {
  font-family: var(--serif);
  font-style: italic;
}
.card-meta {
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--muted);
}
.card-meta span { font-family: var(--serif); font-style: italic; }
.card-summary {
  margin-top: 12px;
  font-size: clamp(11.5px, .94vw, 13.5px);
  line-height: 1.85;
  color: var(--ink-soft);
}
.card-summary--en {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(11px, .9vw, 13px);
  line-height: 1.65;
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(154, 144, 133, .18);
  border-bottom: 1px solid rgba(154, 144, 133, .18);
}
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric strong {
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 25px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
}
.metric span {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s var(--ease-out), opacity .35s ease, margin .35s ease;
  opacity: 0;
  margin-top: 0;
}
.card__details.is-open {
  max-height: 22vh;
  opacity: 1;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.story-list {
  margin: 0;
  padding-left: 14px;
  display: grid;
  gap: 7px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.story-list li::marker { color: var(--sage); }
.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags span {
  padding: 3px 6px;
  border: 1px solid rgba(36, 40, 33, .24);
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
}
.more {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  padding: 2px 0 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color .2s, letter-spacing .25s;
}
.more:hover { color: var(--sage); letter-spacing: .11em; }
.more span { display: inline-block; transition: transform .3s var(--ease-spring); }
.more[aria-expanded="true"] span { transform: rotate(45deg); }

/* ---------- projects ---------- */
.projects__deck {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  align-items: stretch;
}
/* 三卡之间的两枚蜡笔星连接件（金色），悬停任一卡片时旋转放大 */
.projects__deck .work__link { top: 50%; }
.projects__deck .work__link--p1 { left: 33.4%; }
.projects__deck .work__link--p2 { left: 66.6%; }
.projects__deck .work__link-star { color: var(--gold); }
.projects__deck:has(.project-card:hover) .work__link-star { transform: rotate(180deg) scale(1.3); }

/* 点一下滑出一张：未翻出的卡隐藏在右侧 */
.projects-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 8px 15px;
  background: rgba(255, 253, 246, .94);
  border: 1px solid rgba(36, 40, 33, .32);
  border-radius: 20px;
  box-shadow: 2px 2px 0 rgba(36, 40, 33, .14);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  animation: hint-float 1.6s ease-in-out infinite;
}
.projects-hint::after { content: "→"; font-size: 14px; }
.projects-hint.is-done { display: none; }
.project-card.is-hidden {
  opacity: 0;
  transform: translateX(90px) rotate(2.5deg);
  pointer-events: none;
}
.project-card.is-revealing { animation: card-slide-in .75s var(--ease-spring) both; }
@keyframes card-slide-in {
  0% { opacity: 0; transform: translateX(90px) rotate(3deg); }
  100% { opacity: 1; transform: translateX(0) rotate(0deg); }
}
/* 创新字效：大标题逐字弹出（随机小倾角 + 模糊聚焦） */
.project-card.is-revealing .title-word { white-space: nowrap; display: inline-block; }
.project-card.is-revealing .title-char {
  display: inline-block;
  opacity: 0;
  animation: char-pop .5s var(--ease-spring) forwards;
  animation-delay: calc(.3s + var(--ci, 0) * .045s);
}
@keyframes char-pop {
  0% { opacity: 0; transform: translateY(16px) rotate(var(--rot, 4deg)) scale(.5); filter: blur(4px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); filter: blur(0); }
}
/* 其余行：蜡笔横扫式擦入 */
.project-card.is-revealing .project-card__top,
.project-card.is-revealing .card-title-cn,
.project-card.is-revealing .card-meta,
.project-card.is-revealing .card-summary,
.project-card.is-revealing .metrics,
.project-card.is-revealing .duo-hint,
.project-card.is-revealing .duo,
.project-card.is-revealing .duo-note,
.project-card.is-revealing .card-foot {
  opacity: 0;
  animation: line-wipe .55s ease-out forwards;
}
.project-card.is-revealing .project-card__top { animation-delay: .12s; }
.project-card.is-revealing .card-title-cn { animation-delay: .6s; }
.project-card.is-revealing .card-meta { animation-delay: .7s; }
.project-card.is-revealing .card-summary { animation-delay: .8s; }
.project-card.is-revealing .metrics { animation-delay: .9s; }
.project-card.is-revealing .duo-hint { animation-delay: .92s; }
.project-card.is-revealing .duo { animation-delay: .95s; }
.project-card.is-revealing .duo-note { animation-delay: 1.02s; }
.project-card.is-revealing .card-foot { animation-delay: 1.05s; }
@keyframes line-wipe {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateY(6px); }
  100% { opacity: 1; clip-path: inset(0 -2% 0 0); transform: translateY(0); }
}

/* 第三卡：两个并列的 vibecoding 项目 */
.project-card--play .vb { font-weight: 700; }
.duo {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.duo__item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(36, 40, 33, .18);
  background: rgba(255, 253, 246, .65);
  text-decoration: none;
  transition: transform .25s var(--ease-spring), box-shadow .25s ease;
}
.duo__item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink-2);
  background: #fffdf6;
}
.duo__name {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink);
}
.duo__name i {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
}
.duo__desc { font-size: 11.5px; line-height: 1.7; color: var(--ink-soft); }
.duo__desc strong { font-weight: 800; color: var(--ink); }
/* 灵感来源：可跳转的平台 */
.duo__src {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.duo__src a,
.duo__src span {
  padding: 2px 7px;
  border: 1px solid rgba(36, 40, 33, .22);
  border-radius: 12px;
  background: rgba(255, 253, 246, .8);
  font-size: 10.5px;
  color: var(--ink);
  text-decoration: none;
}
.duo__src a:hover { background: var(--gold); border-color: rgba(36, 40, 33, .5); }
.duo__go {
  justify-self: start;
  margin-top: 5px;
  padding: 5px 12px;
  border: 1px solid var(--ink-2);
  border-radius: 16px;
  background: var(--pink);
  box-shadow: 2px 2px 0 var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
  text-decoration: none;
}
.duo__go:hover { background: var(--gold); }
.duo__intranet {
  justify-self: start;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.duo__item:hover .duo__go { background: var(--gold); }
/* 两个链接上方的点击指引 */
.duo-hint {
  margin: 12px 0 -4px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.duo-hint::before { content: "↓"; font-size: 15px; color: var(--pink); }
.duo-hint span { font-weight: 400; font-size: 10.5px; color: var(--muted); }
/* 持续探索 AI */
.duo-note {
  margin-top: 11px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.duo-note b { font-weight: 800; color: var(--ink); }
.project-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: transform .55s var(--ease-spring), box-shadow .4s ease;
}
.project-card:nth-child(1) { transform: rotate(-1.1deg); }
.project-card:nth-child(2) { transform: rotate(.4deg) translateY(10px); }
.project-card:nth-child(3) { transform: rotate(1.2deg); }
.project-card:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 8px 8px 0 var(--ink-2); z-index: 2; }
.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(154, 144, 133, .34);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.project-num {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}
.project-card .card-title { font-size: clamp(19px, 1.75vw, 28px); }
.project-card .card-title-cn { font-size: clamp(13px, 1.08vw, 16px); }
.project-card .card-summary { font-size: clamp(11px, .87vw, 12.8px); line-height: 1.8; }
.project-card .card-summary--en { font-size: clamp(10.5px, .83vw, 12px); }
.project-card .metrics { grid-template-columns: repeat(3, 1fr); }
.project-card .metric strong { font-size: clamp(15px, 1.4vw, 21px); }
.award-tag {
  position: absolute;
  right: -8px;
  top: 42%;
  padding: 4px 9px;
  background: var(--gold-soft);
  border: 1px solid rgba(36, 40, 33, .4);
  box-shadow: 2px 2px 0 rgba(36, 40, 33, .5);
  font-size: 9px;
  transform: rotate(6deg);
}
.project-card--play {
  background:
    linear-gradient(180deg, rgba(240, 247, 244, .98), rgba(230, 241, 236, .98));
}
.terminal {
  position: relative;
  margin-top: 14px;
  border: 1px solid rgba(36, 40, 33, .6);
  background: rgba(23, 25, 21, .92);
  color: #f3eedb;
  padding: 22px 12px 12px;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.8;
  box-shadow: 3px 3px 0 rgba(36, 40, 33, .35);
  overflow: hidden;
}
.terminal__bar {
  position: absolute;
  left: 8px; top: 7px;
  display: flex;
  gap: 4px;
}
.terminal__bar i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pink);
}
.terminal__bar i:nth-child(2) { background: var(--gold); }
.terminal__bar i:nth-child(3) { background: var(--green); }
.terminal code { display: block; font: inherit; }
.terminal b { color: var(--green); font-weight: 400; }
.terminal span { color: rgba(243, 238, 219, .62); }
.cursor-block {
  display: inline-block;
  animation: blink 1.1s steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.project-play-foot {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.play-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1.5px solid var(--ink-2);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .03em;
  text-decoration: none;
  transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.play-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink-2);
  background: var(--paper-3);
}
.project-play-foot .micro { font-size: 7.5px; }

/* ---------- honors ---------- */
.honors__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.star-map-wrap { position: relative; }
.star-map {
  position: relative;
  width: 100%;
  height: clamp(260px, 38vh, 380px);
}
.star-map__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ink-soft);
  opacity: .35;
  overflow: visible;
}
.star-map__lines path {
  stroke-dasharray: 1.2 1.6;
  animation: line-drift 18s linear infinite;
}
@keyframes line-drift { to { stroke-dashoffset: -28; } }
.honor-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 34px; height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  transform: translate(-50%, -50%);
  transition: color .25s ease;
}
.honor-star__glyph {
  display: block;
  font-size: 22px;
  line-height: 34px;
  transition: transform .35s var(--ease-spring), color .25s;
}
.honor-star:hover .honor-star__glyph,
.honor-star:focus-visible .honor-star__glyph,
.honor-star.is-active .honor-star__glyph {
  color: var(--pink);
  transform: scale(1.45) rotate(-10deg);
}
.honor-star:focus-visible { outline: 2px solid var(--sage); outline-offset: 6px; border-radius: 50%; }
.honor-star__label {
  position: absolute;
  left: 50%;
  top: 34px;
  transform: translateX(-50%);
  padding: 2px 6px;
  background: rgba(255, 250, 240, .84);
  border: 1px solid rgba(36, 40, 33, .16);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--muted);
  opacity: 0;
  transition: opacity .25s ease, transform .25s var(--ease-out);
}
.honor-star:hover .honor-star__label,
.honor-star:focus-visible .honor-star__label,
.honor-star.is-active .honor-star__label {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}
.honor-card {
  margin-top: 6px;
  padding: 14px 16px;
  background: rgba(255, 250, 240, .72);
  border: 1px solid rgba(36, 40, 33, .30);
  box-shadow: 3px 3px 0 rgba(36, 40, 33, .22);
  min-height: 92px;
  transition: transform .35s var(--ease-spring);
}
.honor-card.is-flipping { transform: rotate(-.8deg) translateY(-2px); }
.honor-card__kicker {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .12em;
  color: var(--muted);
}
.honor-card__title {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.2;
}
.honor-card__en {
  margin-top: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
}
.honor-card__note {
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.star-map__hint {
  margin-top: 12px;
  display: inline-block;
  padding: 6px 11px;
  background: rgba(255, 253, 246, .94);
  border: 1px solid rgba(36, 40, 33, .32);
  border-radius: 16px;
  box-shadow: 2px 2px 0 rgba(36, 40, 33, .14);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink);
  animation: hint-float 1.6s ease-in-out infinite;
}
@keyframes hint-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

.skills {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}
/* 右侧留白处的蜡笔素材（够大才看得见） */
.skills::before {
  content: "✦";
  position: absolute;
  right: clamp(-38px, -2vw, -18px);
  top: 2%;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ink-2);
  transform: rotate(14deg);
  animation: bob 5s ease-in-out infinite;
}
.skills::after {
  content: "✧";
  position: absolute;
  right: clamp(-30px, -1.4vw, -10px);
  bottom: 6%;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
  color: var(--pink);
  text-shadow: 1.5px 1.5px 0 var(--ink-2);
  transform: rotate(-12deg);
  animation: bob 6s ease-in-out 1.2s infinite;
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
.honors__grid { position: relative; }
.honors__grid::after {
  content: "★";
  position: absolute;
  right: clamp(-26px, -1vw, 6px);
  top: 10%;
  font-size: clamp(18px, 1.9vw, 28px);
  line-height: 1;
  color: var(--sage);
  text-shadow: 1.5px 1.5px 0 var(--ink-2);
  transform: rotate(22deg);
  animation: bob 7s ease-in-out .6s infinite;
}
.skill-cluster {
  position: relative;
  padding: 10px 11px 9px;
  background: rgba(255, 250, 240, .48);
  border: 1px solid rgba(36, 40, 33, .26);
  box-shadow: 2px 2px 0 rgba(36, 40, 33, .18);
  transition: transform .4s var(--ease-spring), background .3s, box-shadow .3s;
  opacity: 0;
  transform: translate(46px, 8px);
}
.chapter[data-active="true"] .skill-cluster {
  opacity: 1;
  transform: translate(0, 0);
  transition-delay: calc(var(--i) * 110ms + 180ms);
}
/* AI 应用：通栏宽卡 */
.skill-cluster--wide { grid-column: 1 / -1; }
.skill-cluster--wide ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
}
.skill-cluster:hover {
  transform: translateY(-4px) rotate(-.7deg);
  background: rgba(255, 250, 240, .86);
  box-shadow: 4px 4px 0 rgba(36, 40, 33, .28);
}
.skill-cluster__num {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  color: var(--muted);
}
.skill-cluster h5 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.2;
}
.skill-cluster ul {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  max-height: 150px;
  opacity: 1;
  transition: max-height .45s var(--ease-out), opacity .35s ease, margin .35s;
}
.skill-cluster li {
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-left: 9px;
  position: relative;
}
.skill-cluster li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 6px;
  color: var(--sage);
}

/* ---------- contact ---------- */
.chapter--contact { align-items: center; }
/* 桌面端整块内容靠左，右半留给 3D 漂流瓶 */
.contact__grid {
  display: grid;
  gap: clamp(20px, 3.4vh, 36px);
  width: min(100%, 58%);
  justify-items: start;
}
.contact__copy .display--en { max-width: 16ch; }
.contact__note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__note span { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; }
.contact__rows { min-width: 0; }
.contact-row {
  display: grid;
  grid-template-columns: 1fr 2.15fr auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border-bottom: 1px solid rgba(154, 144, 133, .38);
}
.contact-row:first-child { border-top: 1px solid rgba(154, 144, 133, .7); }
.contact-platform {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  font-size: clamp(11px, 1vw, 15px);
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.contact-value em { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: .92em; }
a.contact-value:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.contact-action:hover {
  background: rgba(255, 248, 230, .65);
  border-color: var(--ink-soft);
  color: var(--ink);
  transform: translateY(-1px);
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(30px, 5vh, 58px);
  padding-top: 12px;
  border-top: 1px solid rgba(154, 144, 133, .32);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.replay {
  border: 0;
  background: none;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.replay:hover { border-color: var(--ink-soft); }
.replay span { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; }

/* ---------- 暗夜主题：CONTACT 漂流瓶页（参考站式的深底白字） ---------- */
.theme-dusk #vignette { opacity: 0; }
.theme-dusk .chapter--contact .kicker,
.theme-dusk .chapter--contact .display,
.theme-dusk .chapter--contact .body,
.theme-dusk .contact-value { color: #f3efe2; }
.theme-dusk .chapter--contact .kicker span { color: rgba(243, 239, 226, .6); }
.theme-dusk .contact-platform,
.theme-dusk .contact__note,
.theme-dusk .contact-value em,
.theme-dusk .site-footer p,
.theme-dusk .replay { color: rgba(243, 239, 226, .62); }
.theme-dusk .contact-row { border-bottom-color: rgba(243, 239, 226, .26); }
.theme-dusk .contact-row:first-child { border-top-color: rgba(243, 239, 226, .5); }
.theme-dusk .contact-action {
  color: #f3efe2;
  border-color: rgba(243, 239, 226, .42);
  background: transparent;
}
.theme-dusk .contact-action:hover {
  background: rgba(243, 239, 226, .14);
  border-color: rgba(243, 239, 226, .8);
  color: #fffdf6;
}
.theme-dusk .replay:hover { border-color: rgba(243, 239, 226, .8); }
.theme-dusk .site-footer { border-top-color: rgba(243, 239, 226, .22); }
.theme-dusk .text-toggle,
.theme-dusk .chapter-dot { color: rgba(243, 239, 226, .72); }
.theme-dusk .text-toggle:hover,
.theme-dusk .chapter-dot:hover { color: #fffdf6; }
/* 只把左上角 logo 反白：黑字变白，彩星保留 */
.theme-dusk .brand__mark { filter: invert(1); }
#vignette { transition: opacity .6s ease; }

/* ---------- loading / errors ---------- */
.loading {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(243, 238, 219, .85);
  padding: 10px 14px;
  border: 1px solid rgba(36, 40, 33, .25);
  transition: opacity .6s ease, visibility .6s;
}
.loading span { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; }
.loading.is-done { opacity: 0; visibility: hidden; }
.webgl-error {
  position: fixed;
  left: 50%; top: 50%;
  z-index: 61;
  transform: translate(-50%, -50%);
  max-width: min(420px, 86vw);
  padding: 18px 20px;
  background: var(--paper-3);
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.7;
}
.webgl-error span { display: block; font-family: var(--serif); font-style: italic; color: var(--muted); }

/* ---------- text version ---------- */
.text-version {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.text-version[hidden] { display: none; }
.text-version__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(20px, 5vw, 64px);
  background: rgba(243, 238, 219, .94);
  border-bottom: 1px solid rgba(36, 40, 33, .18);
  backdrop-filter: blur(6px);
}
.text-version__bar .mono { font-size: 8px; letter-spacing: .14em; }
.text-version__close {
  border: 1px solid rgba(36, 40, 33, .4);
  background: transparent;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
}
.text-version__close:hover { background: var(--paper-3); }
.text-version__inner {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(36px, 6vh, 72px) clamp(20px, 5vw, 40px) 100px;
}
.text-version__head {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(36, 40, 33, .2);
  margin-bottom: 26px;
}
.text-version__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -.03em;
}
.text-version__head h2 span {
  font-family: var(--hand);
  font-size: .62em;
  color: var(--muted);
  margin-left: 8px;
}
.text-version__head p { margin-top: 7px; font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.text-version__head a { text-underline-offset: 3px; }
.text-version section { margin-bottom: 30px; }
.text-version h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -.02em;
}
.text-version h4 {
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 600;
}
.text-version h4 span {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
}
.text-version p,
.text-version li {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.text-version ul { margin: 6px 0 0; padding-left: 18px; }
.text-version li { margin-bottom: 4px; }
.text-version li::marker { color: var(--sage); }
.text-version a { text-underline-offset: 3px; }
/* 数据与关键词强调：深色加粗，让页面有重点 */
.text-version b { color: var(--ink); font-weight: 700; }
.text-version p a { font-weight: 600; }

/* ---------- noscript ---------- */
.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: var(--paper);
  text-align: center;
}
.noscript h2 { font-family: var(--serif); font-size: 36px; margin: 0; }
.noscript p { font-size: 13px; line-height: 1.8; max-width: 38em; }

/* ---------- mobile letter lightbox ---------- */
.letter-lightbox {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(243, 238, 219, .88);
  backdrop-filter: blur(9px);
}
.letter-lightbox[hidden] { display: none; }
.letter-lightbox img {
  width: min(78vw, 420px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 7px solid var(--paper-3);
  box-shadow: 8px 8px 0 var(--ink-2);
  transform: rotate(-2deg);
}
.letter-lightbox__close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink-2);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-size: 24px;
  line-height: 1;
}
body.lightbox-open { overflow: hidden; }

/* ---------- no-webgl fallback ---------- */
body.no-webgl #scene { display: none; }
body.no-webgl .entrance__wordmark-fallback {
  display: flex;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}
.entrance__babe {
  font-family: var(--hand);
  font-size: clamp(72px, 13vw, 190px);
  line-height: .8;
  transform: rotate(-5deg);
}
.entrance__portfolio {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 76px);
  letter-spacing: -.04em;
}
body.no-webgl .chapter--entrance { align-items: flex-end; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .header__right { gap: 12px; }
  .chapter-dot em { display: none; }
  .hello { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 28px; }
  .letters { font-size: clamp(46px, 8.4vw, 100px); padding-top: 130px; }
  .honors__grid { gap: 24px; }
}

@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .site-header {
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
    right: 16px;
  }
  .brand__mark { height: 30px; }
  .header__right { flex-direction: column-reverse; align-items: flex-end; gap: 2px; }
  #chapter-nav { gap: 8px; }
  .chapter-dot { font-size: 7.5px; padding: 5px 1px; }
  .chapter-dot span { font-size: 8px; }
  .text-toggle { font-size: 7px; }
  .hint { bottom: max(18px, env(safe-area-inset-bottom)); padding: 7px 12px; }
  .hint__cn { display: none; }

  .chapter {
    padding: 74px 18px max(68px, calc(env(safe-area-inset-bottom) + 60px));
    align-items: flex-start;
    overflow: hidden;
  }
  .chapter__inner {
    width: 100%;
    max-height: calc(100dvh - 132px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 3px;
    scrollbar-width: none;
  }
  .chapter__inner::-webkit-scrollbar { display: none; }
  .chapter--entrance { align-items: flex-end; padding: 0 18px 96px; }
  .entrance__place { display: none; }

  .display--en { font-size: clamp(26px, 7.2vw, 40px); max-width: 20ch; }
  .display--cn { font-size: clamp(18px, 4.6vw, 24px); }
  .body { font-size: 12.5px; line-height: 1.85; }
  .body--en { font-size: 12px; }

  .hello {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
  }
  .hello__visual { min-height: 0; margin-top: 8px; }
  .polaroid-stack { display: none; }
  .letters {
    justify-content: flex-start;
    padding-top: 70px;
    font-size: clamp(46px, 15vw, 78px);
    margin-top: 0;
  }
  .letter-photo { width: 82px; top: -120px; }
  .chips { gap: 5px; margin-top: 14px; }
  .chip { font-size: 9px; padding: 4px 7px; }
  .chip em { display: none; }
  .hello__micro { margin-top: 10px; font-size: 7px; }

  .section-head { margin-bottom: 12px; }
  .section-head .display--en { font-size: clamp(24px, 6.6vw, 34px); }

  .tabs { display: flex; flex-wrap: wrap; }
  .work__deck,
  .projects__deck {
    display: block;
  }
  .work-card,
  .project-card {
    display: none;
    transform: none !important;
    box-shadow: var(--shadow-sm);
  }
  .work__link { display: none; }
  .projects-hint { display: none; }
  .work-card.is-active,
  .project-card.is-active {
    display: flex;
    animation: card-in .5s var(--ease-out) both;
  }
  @keyframes card-in {
    from { opacity: 0; transform: translateY(10px) rotate(-.4deg); }
    to { opacity: 1; transform: translateY(0) rotate(0); }
  }
  .work-card:hover,
  .project-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .work-card__top .mono { font-size: 6.5px; }
  .card-title { font-size: clamp(20px, 5.6vw, 27px); }
  .card-title-cn { font-size: 13.5px; }
  .card-summary { font-size: 11.5px; }
  .card-summary--en { font-size: 11px; }
  .metrics { margin-top: 12px; padding: 9px 0; }
  .metric strong { font-size: 18px; }
  .card__details.is-open { max-height: 30vh; }
  .story-list { font-size: 10.5px; }
  .card-foot { flex-direction: column; align-items: flex-start; gap: 9px; }
  .award-tag {
    position: static;
    align-self: flex-start;
    margin-top: 10px;
    transform: rotate(-2deg);
  }

  .projects__tabs { margin-bottom: 12px; }

  .honors__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .star-map { height: 200px; }
  .honor-star { width: 28px; height: 28px; }
  .honor-star__glyph { font-size: 18px; line-height: 28px; }
  .honor-star__label { font-size: 6px; top: 28px; }
  .honor-card { min-height: 0; padding: 11px 12px; }
  .honor-card__note { font-size: 10px; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .skill-cluster { padding: 8px 9px; }
  .skill-cluster h5 { font-size: 13px; }
  .skill-cluster ul { max-height: 150px; opacity: 1; margin-top: 5px; }
  .skill-cluster li { font-size: 8.5px; }

  .contact__grid { grid-template-columns: 1fr; gap: 22px; }
  .contact-row { grid-template-columns: .8fr 1.7fr auto; min-height: 50px; gap: 7px; }
  .contact-platform { font-size: 7.5px; }
  .contact-value { font-size: 11px; }
  .contact-action { min-width: 56px; height: 26px; font-size: 7px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 26px; }
  .site-footer p { line-height: 1.7; }
}

@media (max-width: 520px) {
  .chapter { padding-left: 14px; padding-right: 14px; }
  .chapter--entrance { padding-left: 18px; padding-right: 18px; }
  .display--en { font-size: clamp(24px, 7.8vw, 34px); }
  .display--cn { font-size: 17px; }
  .kicker { font-size: 7.5px; margin-bottom: 10px; }
  .letters { font-size: clamp(42px, 15.5vw, 64px); letter-spacing: -.05em; }
  .letter-photo { width: 64px; border-width: 4px; }
  .metrics { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .metric strong { font-size: 16px; }
  .metric span { font-size: 6.5px; }
  .tags span { font-size: 6.5px; }
  .star-map { height: 180px; }
  .honor-star__label { display: none; }
  .skills { gap: 6px; }
  .skill-cluster li { font-size: 8px; }
  .contact__grid { gap: 16px; }
  .contact-row { grid-template-columns: .7fr 1.8fr auto; }
  .contact-value { font-size: 10.5px; }
  .contact-action { min-width: 50px; font-size: 6.5px; padding: 0 4px; }
  .text-version__inner { padding-left: 18px; padding-right: 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  #cursor { display: none; }
  .letter-photo { transition: none; }
}
