:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f2f1ee;
  --muted: #8b8883;
  --silver: #c9c5bc;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- 顶栏 ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.topbar[data-solid] {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.brand {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.nav a { transition: color 0.25s var(--ease); }
.nav a:hover { color: var(--text); }

.meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- 首屏横向轨道 ---------- */

.hero {
  position: relative;
  padding-top: clamp(88px, 14vh, 140px);
}

.rail {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 0 var(--pad);
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.rail::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 min(78vw, 1180px);
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease);
}

.slide:hover img { transform: scale(1.02); }

.slide .frame {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 30% 20%, #1d2024 0%, transparent 60%),
    radial-gradient(90% 80% at 80% 80%, #16181c 0%, transparent 55%),
    #101113;
}

.frame .ph-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #5a5b58;
}

.frame .ph-size {
  font-family: var(--mono);
  font-size: 10px;
  color: #3f403e;
}

.slide-cap {
  position: absolute;
  left: 22px;
  bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.85);
}

.slide-cap .no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--silver);
  letter-spacing: 0.14em;
}

.slide-cap .name {
  font-size: clamp(17px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.slide-cap .kind {
  font-size: 12px;
  color: #b9b5ac;
}

.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad) 0;
}

.counter {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.counter b { color: var(--text); font-weight: 500; }

.arrows { display: flex; gap: 8px; }

.arrows button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: all 0.25s var(--ease);
}

.arrows button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.hint {
  margin: 0;
  padding: 10px var(--pad) 0;
  font-size: 11px;
  color: #555653;
  letter-spacing: 0.06em;
}

/* ---------- 通用区块头 ---------- */

section { padding: clamp(80px, 12vh, 160px) var(--pad) 0; }

.head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(28px, 5vh, 56px);
}

.head .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.head h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.head .en {
  font-size: 11px;
  color: #575854;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-left: 2px;
}

/* ---------- 作品网格 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 34px);
}

.card { display: block; }

.card .thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1s var(--ease), opacity 0.4s var(--ease);
}

.card .thumb .frame { position: absolute; inset: 0; }

.card:hover .thumb img { transform: scale(1.035); }

.card .cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
}

.card .cap .name { font-size: 15px; letter-spacing: -0.005em; }
.card .cap .kind {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* ---------- 星球占位 ---------- */

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(62% 78% at 50% 50%, #171a1e 0%, #0a0a0b 72%);
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.stage[data-dragging] { cursor: grabbing; }

.stage-head {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
}

.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.62);
  backdrop-filter: blur(10px);
}

.seg button {
  padding: 6px 15px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 999px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.seg button.on { background: rgba(255, 255, 255, 0.1); color: var(--text); }

.orbit { position: absolute; inset: 0; }

.orbit-print {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  pointer-events: none;
}

.orbit-print img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #1a1c1f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 18px 40px rgba(0, 0, 0, 0.45);
  -webkit-user-drag: none;
}

.orbit-print[data-front] img { pointer-events: auto; cursor: zoom-in; }

.sheet {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 64px 18px 26px;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-content: start;
}

.stage[data-view="grid"] .orbit { display: none; }
.stage[data-view="grid"] .sheet { display: grid; }

.sheet img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #1a1c1f;
  cursor: zoom-in;
  transition: opacity 0.25s var(--ease);
}

.sheet img:hover { opacity: 0.78; }

.stage-hint {
  position: absolute;
  left: 16px;
  bottom: 13px;
  margin: 0;
  z-index: 5;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #4e4f4c;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  background: rgba(6, 6, 7, 0.95);
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lb-close {
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 30px;
  line-height: 1;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.lb-close:hover { color: var(--text); }

/* ---------- 关于 ---------- */

.about-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}

.lede {
  margin: 0;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.bio { margin: 22px 0 0; color: var(--muted); font-size: 14px; max-width: 46ch; }

.stats {
  display: grid;
  gap: 0;
  margin: 0;
  padding-top: 4px;
  align-content: start;
}

.stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.stats dt {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.stats dd {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
}

/* ---------- 页脚 ---------- */

footer {
  margin-top: clamp(90px, 16vh, 180px);
  padding: 40px var(--pad) 34px;
  border-top: 1px solid var(--line);
}

.foot-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.mail {
  font-size: clamp(18px, 2.6vw, 30px);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease);
}

.mail:hover { border-color: var(--text); }

.social { display: flex; gap: 22px; font-size: 13px; color: var(--muted); }
.social a:hover { color: var(--text); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 10px;
  color: #4e4f4c;
  letter-spacing: 0.1em;
}

/* ---------- 进场 ---------- */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about-body { grid-template-columns: 1fr; }
  .slide { flex-basis: 86vw; }
  .nav { display: none; }
  .stage { aspect-ratio: 1 / 1; }
  .sheet { grid-template-columns: repeat(3, 1fr); padding-top: 56px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .stats { gap: 0; }
  .meta { display: none; }
  .hint { display: none; }
}
