/* ============================================================
   肖宇辰 · 双世界作品集 — 浅色画廊风 UI
   设计基调:纸白 / 墨黑 / 一点蓝,细线,磨砂玻璃,衬线中文标题
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600&family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500&display=swap');

:root {
  --paper: #faf9f6;
  --paper-deep: #f1efe9;
  --ink: #101013;
  --ink-soft: #43444c;
  --ink-faint: #83848d;
  --accent: #2563eb;
  --hairline: rgba(16, 16, 19, 0.14);
  --hairline-strong: rgba(16, 16, 19, 0.32);
  --glass: rgba(250, 249, 246, 0.72);
  --glass-strong: rgba(250, 249, 246, 0.88);
  --glass-border: rgba(255, 255, 255, 0.65);
  --shadow-soft: 0 1px 2px rgba(16, 16, 19, 0.04), 0 12px 32px rgba(16, 16, 19, 0.10);
  --shadow-lift: 0 2px 4px rgba(16, 16, 19, 0.05), 0 24px 56px rgba(16, 16, 19, 0.16);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Space Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
  --display: "Archivo", "Noto Sans SC", sans-serif;
  --ease-out: cubic-bezier(0.22, 0.75, 0.25, 1);
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

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

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; }

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

.icon { width: 15px; height: 15px; flex: none; }

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  transition: top 200ms var(--ease-out);
}
.skip-link:focus { top: 12px; }

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  padding: 16px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  z-index: 300;
}

/* ---------------- 加载器 ---------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 520ms var(--ease-out), visibility 520ms;
}
.loader.is-ready { opacity: 0; visibility: hidden; }

.loader__inner {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(280px, 70vw);
}

.loader__monogram {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.loader__word {
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.loader__track {
  width: 100%;
  height: 1px;
  background: var(--hairline);
  overflow: hidden;
}
.loader__track span {
  display: block;
  height: 100%;
  width: 12%;
  background: var(--ink);
  transition: width 300ms var(--ease-out);
}

.loader__pct {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* ---------------- 舞台与视频 ---------------- */

.experience, .stage { position: fixed; inset: 0; }

.stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0d12;
}

.stage__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.30) 0%, rgba(8, 10, 14, 0) 26%,
      rgba(8, 10, 14, 0) 62%, rgba(8, 10, 14, 0.42) 100%);
  pointer-events: none;
}

.stage__color {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: background 600ms var(--ease-out);
}
body[data-world="industrial"] .stage__color { background: rgba(64, 42, 20, 0.10); }
body[data-world="ai"] .stage__color { background: rgba(16, 32, 68, 0.12); }

.stage__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.world-flash {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
}
.world-flash.is-active { animation: worldFlash 840ms var(--ease-out); }
@keyframes worldFlash {
  0% { opacity: 0; }
  28% { opacity: 0.92; }
  100% { opacity: 0; }
}

/* ---------------- 通用小件 ---------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.30em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.eyebrow__rule {
  width: 34px;
  height: 1px;
  background: var(--hairline-strong);
}
.eyebrow--light { color: rgba(250, 249, 246, 0.85); }
.eyebrow--light .eyebrow__rule { background: rgba(250, 249, 246, 0.5); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out), background 240ms;
  box-shadow: 0 10px 28px rgba(16, 16, 19, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #000;
  box-shadow: 0 16px 36px rgba(16, 16, 19, 0.34);
}
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-primary .icon { transition: transform 240ms var(--ease-out); }

.btn-text {
  padding: 12px 4px;
  border: none;
  background: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--paper);
  border-bottom: 1px solid rgba(250, 249, 246, 0.4);
  transition: color 200ms, border-color 200ms;
}
.btn-text:hover { color: #fff; border-color: #fff; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  transition: border-color 200ms, background 200ms, transform 200ms var(--ease-out);
}
.ghost-btn:hover { border-color: var(--ink); background: rgba(16, 16, 19, 0.04); }
.ghost-btn:active { transform: scale(0.94); }

.ghost-btn--ink {
  width: auto;
  height: auto;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

/* ---------------- 顶部 HUD ---------------- */

.top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
  pointer-events: none;
}
body:not([data-state="loading"]) .top-hud { opacity: 1; transform: none; pointer-events: auto; }

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow-soft);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.identity:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }

.identity__monogram {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.identity__rule { width: 1px; height: 22px; background: var(--hairline); }

.identity__copy { display: grid; text-align: left; line-height: 1.25; }
.identity__copy strong { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.identity__copy small {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* 世界切换:分段控件 */
.world-nav {
  position: relative;
  display: flex;
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  pointer-events: none;
}
body[data-state="junction"] .world-nav,
body[data-state="world"] .world-nav { opacity: 1; transform: none; pointer-events: auto; }

.world-nav__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform 320ms var(--ease-out);
}
.world-nav:has(.world-tab[data-world-target="ai"].is-active) .world-nav__thumb {
  transform: translateX(100%);
}

.world-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  transition: color 240ms;
}
.world-tab small {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}
.world-tab.is-active { color: var(--paper); }

/* ---------------- 落地页 ---------------- */

.landing {
  position: absolute;
  left: clamp(24px, 7vw, 110px);
  bottom: clamp(56px, 12vh, 140px);
  z-index: 30;
  max-width: 720px;
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out), visibility 560ms;
}
body[data-state="landing"] .landing { opacity: 1; visibility: visible; transform: none; }

.landing .eyebrow { color: rgba(250, 249, 246, 0.75); }
.landing .eyebrow__rule { background: rgba(250, 249, 246, 0.45); }

.landing h1 {
  margin: 22px 0 18px;
  font-family: var(--serif);
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(8, 10, 14, 0.45);
}
.landing h1 em {
  font-style: normal;
  color: #bcd3ff;
}
.landing__line { display: block; }
body[data-state="landing"] .landing__line { animation: riseIn 720ms var(--ease-out) both; }
body[data-state="landing"] .landing__line:nth-child(2) { animation-delay: 110ms; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.landing__lead {
  font-size: 15.5px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(250, 249, 246, 0.82);
}

.landing__actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 34px;
}

/* ---------------- 跳过入场 ---------------- */

.skip-intro {
  position: absolute;
  right: clamp(24px, 4.5vw, 64px);
  top: 96px;
  z-index: 30;
  padding: 4px 2px;
  border: none;
  border-bottom: 1px solid rgba(250, 249, 246, 0.45);
  background: none;
  color: rgba(250, 249, 246, 0.85);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out), visibility 360ms, color 200ms, border-color 200ms;
}
.skip-intro:hover { color: #fff; border-color: #fff; }
body[data-state="entry"] .skip-intro { opacity: 1; visibility: visible; transform: none; }

/* ---------------- 岔路口 ---------------- */

.entry-credits {
  position: absolute;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  color: rgba(250, 249, 246, 0.94);
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
  transition: opacity 760ms var(--ease-out), visibility 760ms;
}
body[data-state="entry"] .entry-credits { opacity: 1; visibility: visible; }

.entry-credits__rail {
  position: absolute;
  top: 19%;
  bottom: 17%;
  width: min(24vw, 320px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  text-shadow: 0 1px 14px rgba(8, 10, 14, 0.65);
}
.entry-credits__rail--left {
  left: clamp(18px, 4.5vw, 68px);
  background: linear-gradient(90deg, rgba(8, 10, 14, 0.30), rgba(8, 10, 14, 0));
}
.entry-credits__rail--right {
  right: clamp(18px, 4.5vw, 68px);
  background: linear-gradient(-90deg, rgba(8, 10, 14, 0.30), rgba(8, 10, 14, 0));
  text-align: right;
}

.entry-credits__rail-head,
.entry-credits__rail-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  padding: 8px 0;
  border-top: 1px solid rgba(250, 249, 246, 0.48);
  border-bottom: 1px solid rgba(250, 249, 246, 0.18);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.17em;
  line-height: 1.2;
  color: rgba(250, 249, 246, 0.70);
  text-transform: uppercase;
}
.entry-credits__rail-foot {
  border-top: 1px solid rgba(250, 249, 246, 0.18);
  border-bottom: 1px solid rgba(250, 249, 246, 0.48);
}
.entry-credits__rail-head::before,
.entry-credits__rail-foot::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 34px;
  height: 1px;
  background: #fff;
  opacity: 0.7;
}
.entry-credits__rail-foot::before { top: auto; bottom: -1px; left: auto; right: 0; }

.entry-credits__viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  /* 加长上下渐隐区，让滚动信息像片尾字幕一样柔和地进入和离开。 */
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.08) 8%, rgba(0, 0, 0, 0.72) 18%, #000 28%, #000 72%, rgba(0, 0, 0, 0.72) 82%, rgba(0, 0, 0, 0.08) 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.08) 8%, rgba(0, 0, 0, 0.72) 18%, #000 28%, #000 72%, rgba(0, 0, 0, 0.72) 82%, rgba(0, 0, 0, 0.08) 92%, transparent 100%);
}
.entry-credits__track {
  display: flex;
  flex-direction: column;
  animation: entryCreditsUp 14s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}
body[data-state="entry"] .entry-credits__track { animation-play-state: running; }
.entry-credits__rail--right .entry-credits__track {
  animation-name: entryCreditsDown;
  animation-duration: 16s;
}
.entry-credits__set {
  display: grid;
  gap: 0;
  flex: none;
  padding: 10px 0;
}

.entry-credits__line {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid rgba(250, 249, 246, 0.16);
}
.entry-credits__line::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 20px;
  height: 1px;
  background: rgba(250, 249, 246, 0.46);
}
.entry-credits__rail--right .entry-credits__line {
  grid-template-columns: 24px minmax(0, 1fr);
}
.entry-credits__rail--right .entry-credits__line::before {
  left: auto;
  right: 0;
}
.entry-credits__index {
  padding-top: 2px;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(250, 249, 246, 0.48);
}
.entry-credits__line > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.entry-credits__line b {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.35;
  color: rgba(250, 249, 246, 0.94);
  overflow-wrap: anywhere;
}
.entry-credits__line small {
  font-size: 11px;
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: rgba(250, 249, 246, 0.67);
}
.entry-credits__line--hero strong {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.1;
}
.entry-credits__line--quote strong {
  font-family: var(--serif);
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.08em;
}
.entry-credits__rail--right .entry-credits__line > span:last-child,
.entry-credits__rail--right .entry-credits__line > strong {
  justify-self: end;
}

@keyframes entryCreditsUp {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@keyframes entryCreditsDown {
  from { transform: translateY(-50%); }
  to { transform: translateY(0); }
}

.junction {
  position: absolute;
  inset: 0;
  z-index: 32;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 34px;
  padding: 0 clamp(24px, 6vw, 96px) clamp(40px, 8vh, 88px);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0) 30%, rgba(8, 10, 14, 0.52) 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out), visibility 480ms;
}
body[data-state="junction"] .junction { opacity: 1; visibility: visible; transform: none; }

.junction__copy { color: var(--paper); max-width: 560px; }
.junction__copy h2 {
  margin: 16px 0 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 20px rgba(8, 10, 14, 0.4);
}
.junction__copy p { font-size: 14px; font-weight: 300; letter-spacing: 0.05em; color: rgba(250, 249, 246, 0.78); }

.junction__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.world-choice {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  text-align: left;
  border: none;
  border-top: 1px solid rgba(250, 249, 246, 0.32);
  background: none;
  color: var(--paper);
  transition: border-color 260ms, padding-left 300ms var(--ease-out);
}
.world-choice:hover { border-top-color: rgba(250, 249, 246, 0.85); padding-left: 14px; }

.world-choice__index {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(250, 249, 246, 0.6);
}

.world-choice__text { flex: 1; display: grid; gap: 4px; }
.world-choice__text strong { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.world-choice__text small { font-size: 12.5px; font-weight: 300; color: rgba(250, 249, 246, 0.66); letter-spacing: 0.03em; }

.world-choice__arrow { color: rgba(250, 249, 246, 0.7); transition: transform 260ms var(--ease-out), color 260ms; }
.world-choice:hover .world-choice__arrow { transform: translateX(4px); color: #fff; }

/* ---------------- 底部项目信息栏(通栏,非卡片) ---------------- */

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 34;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 80px);
  padding: 22px clamp(24px, 4.5vw, 64px) 18px;
  border-top: 1px solid rgba(250, 249, 246, 0.20);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0) 0%, rgba(8, 10, 14, 0.55) 45%);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 440ms var(--ease-out), transform 440ms var(--ease-out), visibility 440ms;
}
body[data-state="world"] .dock { opacity: 1; visibility: visible; transform: none; }

.dock__project { display: flex; gap: 18px; align-items: flex-start; min-width: 0; }

.dock__thumb {
  flex: none;
  width: 88px;
  height: 88px;
  overflow: hidden;
  background: rgba(250, 249, 246, 0.10);
}
.dock__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dock__info { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.dock__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(250, 249, 246, 0.62);
}
.dock__meta b { font-size: 12.5px; font-weight: 600; color: var(--paper); }
.dock__meta em { font-style: normal; opacity: 0.5; margin-right: 2px; }
.dock__meta-sep { width: 22px; height: 1px; background: rgba(250, 249, 246, 0.35); }
.dock__kicker { font-size: 11px; letter-spacing: 0.14em; color: #bcd3ff; }
.dock__info h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.01em; }
.dock__summary {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(250, 249, 246, 0.78);
  max-width: 48ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 0 0 3px;
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  background: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  transition: color 200ms, border-color 200ms, gap 240ms var(--ease-out);
}
.project-link:hover { color: var(--accent); border-color: var(--accent); gap: 12px; }

.project-link--light { color: var(--paper); border-color: rgba(250, 249, 246, 0.45); margin-top: 10px; }
.project-link--light:hover { color: #bcd3ff; border-color: #bcd3ff; }

/* ---------------- 信息栏右侧:进度与导航 ---------------- */

.dock__side { flex: none; width: min(300px, 30vw); display: grid; gap: 10px; }

.dock__progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(250, 249, 246, 0.66);
}
.dock__pct { font-family: var(--display); font-weight: 600; color: var(--paper); }

.progress-track {
  position: relative;
  height: 1px;
  background: rgba(250, 249, 246, 0.22);
}
.progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--paper);
  transition: width 120ms linear;
}
.progress-dot {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(250, 249, 246, 0.4);
  transform: translate(-50%, -50%);
  transition: background 200ms, box-shadow 200ms;
}
.progress-dot.is-past { background: #bcd3ff; box-shadow: 0 0 0 3px rgba(188, 211, 255, 0.22); }

.dock__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dock__hint { font-size: 10.5px; letter-spacing: 0.14em; color: rgba(250, 249, 246, 0.5); }

.dock-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--paper);
  cursor: pointer;
  transition: color 200ms, transform 220ms var(--ease-out);
}
.dock-arrow:hover { color: #bcd3ff; }
#next-project.dock-arrow:hover { transform: translateX(3px); }
#previous-project.dock-arrow:hover { transform: translateX(-3px); }

/* ---------------- 世界标题 ---------------- */

.world-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 36;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--paper);
  pointer-events: none;
  opacity: 0;
}
.world-caption.is-revealing { animation: captionReveal 1600ms var(--ease-out) both; }
@keyframes captionReveal {
  0% { opacity: 0; transform: translate(-50%, -46%); letter-spacing: 0.3em; }
  18% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -54%); }
}
.world-caption span {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.42em;
  color: rgba(250, 249, 246, 0.72);
  margin-bottom: 12px;
}
.world-caption strong {
  font-family: var(--display);
  font-size: clamp(44px, 8vw, 104px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-shadow: 0 4px 40px rgba(8, 10, 14, 0.5);
}

/* ---------------- 弹窗通用 ---------------- */

dialog {
  inset: 0;
  margin: auto;
  border: none;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: calc(100dvh - 48px);
}
dialog::backdrop {
  background: rgba(14, 15, 20, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
dialog[open] { animation: dialogIn 380ms var(--ease-out); }
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink);
  transition: transform 200ms var(--ease-out), border-color 200ms, background 200ms;
}
.dialog-close:hover { transform: rotate(90deg); border-color: var(--ink); }

/* ---------------- 项目详情弹窗 ---------------- */

.detail-dialog { width: min(1180px, 94vw); }

.dialog-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  height: min(760px, calc(100dvh - 48px));
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 40px 120px rgba(8, 10, 14, 0.45);
}

.dialog-media {
  position: relative;
  background: linear-gradient(160deg, #f4f3ef 0%, #e8e6e0 100%);
  overflow: hidden;
}
.dialog-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dialog-model { position: absolute; inset: 0; }
#model-canvas { width: 100%; height: 100%; display: block; touch-action: none; }

.model-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  transition: opacity 300ms;
  pointer-events: none;
}
.model-loading.is-loaded { opacity: 0; }
.model-loading__bar {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 1100ms ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* 形态切换器 */
.model-forms {
  position: absolute;
  left: 50%;
  bottom: 66px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  max-width: calc(100% - 32px);
  overflow-x: auto;
}
.model-forms button {
  flex: none;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: background 220ms, color 220ms;
  white-space: nowrap;
}
.model-forms button:hover { color: var(--ink); }
.model-forms button.is-active { background: var(--ink); color: var(--paper); }

.model-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  pointer-events: none;
}
.model-toolbar .ghost-btn--ink { pointer-events: auto; }
.model-hint {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  background: var(--glass-strong);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dialog-content {
  padding: clamp(26px, 3.4vw, 46px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.dialog-domain {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 16px;
}

.dialog-content h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.dialog-lead {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.dialog-reference {
  display: grid;
  grid-template-columns: minmax(112px, 38%) 1fr;
  gap: 13px;
  align-items: stretch;
  margin: -4px 0 24px;
  padding: 8px;
  border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--paper) 74%, var(--accent) 4%);
}
.dialog-reference[hidden] { display: none; }
.dialog-reference img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 104px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.dialog-reference figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-soft);
}
.dialog-reference figcaption span::before {
  content: "灵感参考";
  display: block;
  margin-bottom: 5px;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.dialog-reference a {
  align-self: flex-start;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dialog-meta {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
  margin-bottom: 24px;
}
.dialog-meta > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.dialog-meta dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.dialog-meta dd { font-size: 13px; font-weight: 500; }

.dialog-points {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}
.dialog-points li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.dialog-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.dialog-external {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 0.05em;
  transition: transform 220ms var(--ease-out), background 220ms;
}
.dialog-external:hover { transform: translateY(-2px); background: var(--accent); }
.dialog-external[hidden] { display: none; }

/* ---------------- 关于弹窗 ---------------- */

.about-dialog { width: min(880px, 92vw); }

.about-shell {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 40px 120px rgba(8, 10, 14, 0.45);
}

.about-portrait { background: var(--paper-deep); min-height: 100%; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-copy { padding: clamp(28px, 3.6vw, 48px); }
.about-copy h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  margin-bottom: 14px;
}
.about-lead {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.about-tags span + span::before {
  content: "/";
  margin: 0 12px;
  color: var(--ink-faint);
}

.about-contact { display: grid; border-top: 1px solid var(--hairline); }
.about-contact a,
.about-contact button {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid var(--hairline);
  background: none;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  transition: background 200ms, padding-left 240ms var(--ease-out);
}
.about-contact a:hover,
.about-contact button:hover { background: rgba(16, 16, 19, 0.03); padding-left: 10px; }
.about-contact span {
  width: 64px;
  flex: none;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}
.about-contact strong { font-size: 13.5px; font-weight: 500; }

/* ---------------- “更多作品”画廊弹窗 ---------------- */

.more-dialog { width: min(1060px, 94vw); }

.more-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: min(780px, calc(100dvh - 48px));
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 40px 120px rgba(8, 10, 14, 0.45);
}

.more-head { padding: clamp(26px, 3.4vw, 44px) clamp(26px, 3.4vw, 44px) 8px; }
.more-head h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  margin-bottom: 10px;
}
.more-head p:last-child {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-soft);
}

.more-grid {
  display: flex;
  flex-direction: column;
  padding: 12px clamp(26px, 3.4vw, 44px) clamp(20px, 2.6vw, 36px);
  overflow-y: auto;
}

.more-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid var(--hairline);
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 200ms, padding-left 260ms var(--ease-out);
}
.more-card:hover { background: rgba(16, 16, 19, 0.03); padding-left: 14px; }

.more-card__thumb {
  flex: none;
  width: 92px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #f4f3ef 0%, #e8e6e0 100%);
  overflow: hidden;
}
.more-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.more-card__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.more-card__copy strong { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.more-card__copy small {
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.more-card__index {
  flex: none;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  transition: color 200ms;
}
.more-card:hover .more-card__index { color: var(--accent); }

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 150;
  transform: translate(-50%, 16px);
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), visibility 300ms;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .dialog-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); height: calc(100dvh - 32px); }
  .about-shell { grid-template-columns: 1fr; }
  .about-portrait { max-height: 240px; }
  /* 信息栏改为上下两段:项目信息在上,进度与导航在下 */
  .dock { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px clamp(18px, 4vw, 32px) 14px; }
  .dock__side { width: auto; }
  .dock__hint { display: none; }
}

@media (max-width: 720px) {
  .top-hud { flex-wrap: wrap; gap: 6px 8px; padding: 12px 14px; }
  .identity { gap: 10px; padding: 7px 14px 7px 7px; }
  .identity__monogram { width: 34px; height: 34px; font-size: 10.5px; }
  .identity__copy small { display: none; }
  .world-nav { flex: 0 0 min(220px, calc(100vw - 28px)); width: min(220px, calc(100vw - 28px)); min-width: 0; margin-left: auto; }
  .world-tab { flex: 1 1 0; min-width: 0; justify-content: center; padding: 9px 8px; gap: 4px; font-size: 12.5px; white-space: nowrap; }
  .world-tab small { display: none; }

  .landing { left: 20px; right: 20px; bottom: 40px; }
  .landing h1 { margin: 16px 0 14px; font-size: clamp(30px, 9.4vw, 44px); }
  .landing__lead { font-size: 14px; }
  .landing__actions { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 26px; }

  .skip-intro { top: auto; bottom: 24px; right: 20px; }

  .entry-credits__rail {
    top: 25%;
    bottom: 22%;
    width: calc(50% - 24px);
    padding: 0 6px;
  }
  .entry-credits__rail--left { left: 12px; }
  .entry-credits__rail--right { right: 12px; }
  .entry-credits__rail-head,
  .entry-credits__rail-foot {
    gap: 5px;
    padding: 7px 0;
    font-size: 7.5px;
    letter-spacing: 0.10em;
  }
  .entry-credits__line {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 5px;
    padding: 10px 0;
  }
  .entry-credits__rail--right .entry-credits__line {
    grid-template-columns: 17px minmax(0, 1fr);
  }
  .entry-credits__index { font-size: 7.5px; }
  .entry-credits__line b { font-size: 8px; letter-spacing: 0.06em; }
  .entry-credits__line small { font-size: 8.5px; line-height: 1.4; letter-spacing: 0; }
  .entry-credits__line--hero strong { font-size: 17px; letter-spacing: 0.08em; }
  .entry-credits__line--quote strong { font-size: 11px; letter-spacing: 0.03em; }

  .junction { padding: 0 16px 24px; gap: 20px; }
  .junction__choices { grid-template-columns: 1fr; gap: 0; }
  .world-choice { gap: 14px; padding: 18px 2px; }

  .world-caption strong { font-size: clamp(26px, 8.6vw, 44px); letter-spacing: 0.1em; }

  .dock { gap: 12px; padding: 14px 16px 12px; }
  .dock__thumb { width: 56px; height: 56px; }
  .dock__info h2 { font-size: 17px; }
  .dock__summary { display: none; }
  .dock__kicker { font-size: 10px; }
  .project-link--light { margin-top: 6px; font-size: 12px; }

  /* 弹窗全屏化 */
  .detail-dialog, .about-dialog, .more-dialog { width: 100vw; margin: 0; inset: 0; max-height: none; }
  .dialog-shell, .about-shell, .more-shell { height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: none; }
  .more-card { gap: 14px; padding: 12px 2px; }
  .more-card__thumb { width: 64px; }
  .more-card__copy strong { font-size: 14px; }
  .more-card__copy small { font-size: 10.5px; }
  .about-portrait { max-height: 180px; }
  .about-copy { overflow-y: auto; }
  .dialog-close { top: 12px; right: 12px; }

  .model-forms { bottom: 60px; }
  .model-hint { display: none; }
}

/* ---------------- 动效降级 ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
