/* ============================================================
   MINGYANG LI — UE Art & Pipeline Tools
   Minimal monochrome gallery. The artwork is the only color.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #0f0f11;
  --surface: #141416;
  --text: #f3f2ee;
  --muted: #9c9ca2;
  --faint: #6a6a70;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --hover: #ffffff;
  --accent: #c6f24e; /* 酸性绿，仅用于圆点 / hover / 数字点睛，克制使用 */

  --display: "Space Grotesk", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: var(--text);
  color: var(--bg);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
}

/* subtle film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  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='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--text);
  will-change: transform;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  line-height: 1.1;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.98rem;
}

.brand-role {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 28px);
  min-width: 0;
}

.nav-links a {
  position: relative;
  font-family: var(--mono);
  font-size: clamp(0.68rem, 0.72vw, 0.78rem);
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.lang-toggle {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.lang-toggle:hover {
  background: var(--text);
  color: var(--bg);
}

/* ---------- LAYOUT ---------- */
main {
  position: relative;
  z-index: 2;
}

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 88px;
}

.hero,
.envintro {
  scroll-margin-top: 88px;
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 20px;
  row-gap: 10px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.section-note {
  grid-column: 2;
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  /* 透明：让全站固定的 Galaxy 星场透上来 */
  background: transparent;
}

/* 极淡的栅格背景，呼应参考里的 HUD 质感，但克制成近黑白 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 78%);
}

/* Galaxy 星系背景（全站固定 WebGL canvas，由 assets/vendor/galaxy.js 驱动）
   z-index:0 → 在 body 底色之上、main(z-index:2) 内容之下，所以铺满每一页。 */
.site-galaxy {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
}

/* 半透明暗幕：盖在星场上、内容之下，把星点压成"低调质感"，保证全站文字可读 */
.site-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 60% 18%, rgba(10, 10, 11, 0.3) 0%, rgba(10, 10, 11, 0.52) 70%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.5) 0%, rgba(8, 8, 10, 0.56) 100%);
}

.hero-cosmos {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-cosmos::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 28%, rgba(6, 6, 10, 0.25) 45%, rgba(6, 6, 10, 0.88) 100%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.1) 0%, rgba(10, 10, 11, 0.75) 100%);
}

.star-field {
  position: absolute;
  inset: 0;
  opacity: 0.44;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(117, 229, 255, 0.5) 0 1px, transparent 1.8px);
  background-position: 0 0, 42px 76px;
  background-size: 122px 122px, 188px 188px;
}

.aurora {
  position: absolute;
  width: 68vw;
  height: 22vh;
  filter: blur(10px) saturate(1.2);
  opacity: 0.78;
  transform-origin: center;
}

.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  filter: blur(32px);
}

.aurora::after {
  inset: 26% 5%;
  opacity: 0.55;
  filter: blur(18px);
}

.aurora-red {
  left: -18vw;
  top: 40%;
  color: rgba(255, 45, 106, 0.68);
  clip-path: polygon(0 46%, 16% 34%, 32% 46%, 50% 58%, 70% 46%, 100% 34%, 100% 56%, 72% 64%, 48% 72%, 27% 62%, 0 72%);
  animation: auroraFloat 9s ease-in-out infinite;
}

.aurora-cyan {
  right: -16vw;
  top: 25%;
  color: rgba(41, 234, 230, 0.66);
  clip-path: polygon(0 42%, 18% 32%, 35% 36%, 54% 54%, 74% 42%, 100% 22%, 100% 48%, 78% 62%, 58% 76%, 36% 60%, 16% 56%, 0 64%);
  animation: auroraFloat 11s ease-in-out infinite reverse;
}

.data-streak {
  position: absolute;
  height: 1px;
  width: clamp(90px, 11vw, 190px);
  background: linear-gradient(90deg, transparent, rgba(180, 240, 255, 0.7), transparent);
  opacity: 0.54;
  transform: rotate(-24deg);
}

.streak-a {
  right: 18vw;
  top: 15vh;
}

.streak-b {
  right: 10vw;
  top: 21vh;
}

.streak-c {
  left: 22vw;
  bottom: 19vh;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin: 0 auto;
  padding-block: clamp(84px, 9vh, 110px);
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(220px, 23vw, 300px) minmax(0, 1fr);
  grid-template-areas:
    "portrait intro"
    "details  details";
  align-items: start;
  column-gap: clamp(34px, 5vw, 76px);
  row-gap: clamp(30px, 5vh, 56px);
}

/* 内容比视口高时，从顶部排起而不是垂直居中，避免上下都被裁 */
@media (min-height: 760px) and (max-height: 1040px) {
  .hero-inner {
    align-items: start;
  }
}

.hero-copy,
.hero-intro,
.hero-details {
  position: relative;
  z-index: 4;
}

/* 头像在左上，宽度跟左列一致（克制、不过大），与右侧标题顶对齐 */
.hero-portrait {
  grid-area: portrait;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  max-width: 300px;
}

.hero-intro {
  grid-area: intro;
}

/* 整行下方信息带：跨满两列，铺到头像下方，平衡左空右满 */
.hero-details {
  grid-area: details;
  display: grid;
  gap: clamp(20px, 3vh, 30px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 242, 238, 0.78);
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text);
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-title .line:first-child {
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(243, 242, 238, 0.6);
  margin-bottom: 6px;
}

.hero-title .hl {
  position: relative;
  color: var(--text);
  font-weight: 400; /* 名字更细一点，靠绿色下划线点睛而非字重 */
}

/* 名字下方一条克制的酸性绿短线——唯一的彩色点睛 */
.hero-title .hl::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.06em;
  width: 100%;
  height: 0.1em;
  background: var(--accent);
  opacity: 0.9;
  z-index: -1;
}

.hero-title .line {
  display: block;
}

.hero-title .line-muted {
  color: rgba(243, 242, 238, 0.38);
}

.hero-sub {
  margin: 22px 0 0;
  max-width: 52ch;
  color: rgba(243, 242, 238, 0.68);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-resume {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  max-width: 100%;
  margin-top: 24px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  backdrop-filter: blur(14px) saturate(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 42px rgba(0, 0, 0, 0.42);
}

.hero-resume-copy {
  min-width: 0;
}

.hero-resume-k {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: rgba(198, 242, 78, 0.88);
}

.hero-resume-copy strong {
  display: block;
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-resume-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-resume-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.26);
  color: rgba(243, 242, 238, 0.88);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.hero-resume-actions a:hover {
  transform: translateY(-1px);
  border-color: rgba(198, 242, 78, 0.65);
  background: rgba(198, 242, 78, 0.92);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(198, 242, 78, 0.28);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: rgba(243, 242, 238, 0.94);
  color: var(--bg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 14px 42px rgba(45, 234, 230, 0.12);
}

.btn-primary:hover {
  background: var(--hover);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(198, 242, 78, 0.18);
}

.hero-stage {
  position: relative;
  z-index: 3;
  min-height: clamp(430px, 62vh, 620px);
  display: grid;
  place-items: center;
}

.particle-orb {
  position: absolute;
  width: clamp(230px, 31vw, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.92;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 45%, rgba(73, 241, 255, 0.16) 47%, transparent 52%),
    radial-gradient(circle, rgba(160, 244, 255, 0.9) 0 1px, transparent 1.6px);
  background-size: 100% 100%, 12px 12px;
  box-shadow:
    inset 0 0 44px rgba(62, 231, 255, 0.16),
    0 0 60px rgba(65, 92, 255, 0.2);
  mask-image: radial-gradient(circle, #000 0 62%, transparent 72%);
}

.particle-orb::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(114, 246, 255, 0.34);
  transform: rotateX(62deg) rotateZ(-20deg);
}

.sound-card {
  position: relative;
  width: clamp(240px, 25vw, 350px);
  aspect-ratio: 1 / 1.05;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(18px);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.56),
    0 0 70px rgba(69, 76, 255, 0.22);
  transform: rotate(4deg);
  animation: cardFloat 6s ease-in-out infinite;
}

.sound-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 35%, rgba(100, 244, 255, 0.12));
  pointer-events: none;
}

.sound-card-cover {
  position: relative;
  z-index: 2;
  margin: 0;
  width: 72%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #000;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42);
}

.sound-card-cover img {
  filter: brightness(0.86) contrast(1.12) saturate(1.12);
}

.sound-card-disc {
  position: absolute;
  z-index: 1;
  right: 16px;
  top: 24px;
  width: 41%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, #090a0f 0 14%, transparent 15%),
    conic-gradient(from 80deg, #05060b, #1a1c26, #05060b, #303346, #05060b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.sound-card-text {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  color: var(--text);
}

.sound-card-text span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0;
}

.sound-card-text strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(243, 242, 238, 0.66);
  letter-spacing: 0.03em;
}

.hero-player {
  position: absolute;
  left: 50%;
  bottom: clamp(38px, 8vh, 82px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 52px;
  min-width: 168px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.36);
}

.player-play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent rgba(243, 242, 238, 0.82);
}

.player-pause {
  width: 16px;
  height: 16px;
  border-left: 4px solid rgba(243, 242, 238, 0.82);
  border-right: 4px solid rgba(243, 242, 238, 0.82);
}

.player-next {
  width: 18px;
  height: 16px;
  position: relative;
}

.player-next::before,
.player-next::after {
  content: "";
  position: absolute;
  top: 0;
  border-style: solid;
  border-width: 8px 0 8px 9px;
  border-color: transparent transparent transparent rgba(243, 242, 238, 0.82);
}

.player-next::before {
  left: 0;
}

.player-next::after {
  left: 8px;
}

.mood-cluster {
  position: absolute;
  right: clamp(12px, 3vw, 34px);
  bottom: clamp(50px, 8vh, 92px);
  z-index: 6;
  width: clamp(210px, 20vw, 300px);
  height: clamp(170px, 18vw, 250px);
}

.mood-bubble {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(243, 242, 238, 0.88);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.18;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.2), transparent 38%),
    rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(13px);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.mood-bubble:hover {
  transform: translateY(-3px) scale(1.05);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.3), transparent 38%),
    rgba(87, 237, 244, 0.18);
}

.bubble-lg {
  right: 0;
  top: 34px;
  width: 94px;
  height: 94px;
}

.bubble-md {
  width: 72px;
  height: 72px;
}

.bubble-sm {
  width: 56px;
  height: 56px;
}

.bubble-xs {
  width: 46px;
  height: 46px;
}

.bubble-lg + .bubble-sm {
  right: 96px;
  top: 86px;
}

.bubble-md {
  left: 20px;
  top: 24px;
}

.bubble-xs {
  left: 82px;
  bottom: 18px;
}

.bubble-dim {
  right: 28px;
  bottom: 0;
  opacity: 0.82;
}

.mood-cluster .mood-bubble {
  inset: auto;
}

.mood-cluster .mood-bubble:nth-child(1) {
  right: 0;
  top: 30px;
  width: 94px;
  height: 94px;
}

.mood-cluster .mood-bubble:nth-child(2) {
  right: 96px;
  top: 88px;
  width: 56px;
  height: 56px;
}

.mood-cluster .mood-bubble:nth-child(3) {
  left: 18px;
  top: 24px;
  width: 72px;
  height: 72px;
}

.mood-cluster .mood-bubble:nth-child(4) {
  left: 84px;
  bottom: 20px;
  width: 46px;
  height: 46px;
}

.mood-cluster .mood-bubble:nth-child(5) {
  right: 28px;
  bottom: 0;
  width: 72px;
  height: 72px;
  opacity: 0.82;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: clamp(32px, 6vh, 60px);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
}

.scroll-line {
  width: 56px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--text);
  animation: scrollPulse 2.4s var(--ease) infinite;
}

@keyframes scrollPulse {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(280%); }
}

@keyframes starsDrift {
  to { transform: translate3d(-122px, 122px, 0); }
}

@keyframes auroraFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scaleX(1); }
  50% { transform: translate3d(4vw, -1.6vh, 0) scaleX(1.08); }
}

@keyframes orbSpin {
  to { transform: rotate(360deg); }
}

@keyframes cardFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(4deg); }
  50% { transform: translate3d(0, -14px, 0) rotate(2.5deg); }
}

/* ---------- MARQUEE ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.012);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 28px);
  width: max-content;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  letter-spacing: 0;
  color: rgba(243, 242, 238, 0.86);
  animation: marquee 34s linear infinite;
}

.marquee-track i {
  color: var(--faint);
  font-style: normal;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- WORK ---------- */
.filter-dock {
  position: sticky;
  top: 76px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  margin: 0 0 clamp(32px, 5vw, 60px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, rgba(198, 242, 78, 0.09), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.024));
  backdrop-filter: blur(16px) saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 42px rgba(0, 0, 0, 0.3);
}

.filter-copy {
  padding-left: 6px;
  min-width: 0;
}

.filter-kicker {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(243, 242, 238, 0.42);
}

.filter-title {
  display: block;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.filter-note {
  margin: 3px 0 0;
  color: rgba(243, 242, 238, 0.52);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.035);
}

.portfolio-tabs button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  outline: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.portfolio-tabs button:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

.portfolio-tabs button:hover,
.portfolio-tabs button.active {
  background: var(--text);
  color: var(--bg);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: clamp(22px, 2.8vw, 44px);
}

.work-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: inherit;
}

.work-card.is-wide {
  grid-column: span 8;
}

#work-list .work-card:nth-child(1) {
  grid-column: 1 / span 6;
  margin-top: clamp(18px, 4vw, 56px);
}

#work-list .work-card:nth-child(2) {
  grid-column: 7 / span 6;
  margin-top: clamp(72px, 10vw, 132px);
}

#work-list .work-card:nth-child(3) {
  grid-column: 2 / span 10;
  margin-top: clamp(28px, 5vw, 72px);
}

#work-list .work-card:nth-child(4) {
  grid-column: 1 / span 4;
  margin-top: clamp(12px, 3vw, 40px);
}

#work-list .work-card:nth-child(5) {
  grid-column: 5 / span 4;
  margin-top: clamp(42px, 6vw, 82px);
}

#work-list .work-card:nth-child(6) {
  grid-column: 9 / span 4;
  margin-top: clamp(12px, 3vw, 40px);
}

#work-list .work-card:nth-child(7) {
  grid-column: 1 / span 6;
  margin-top: clamp(36px, 5vw, 70px);
}

#work-list .work-card:nth-child(8) {
  grid-column: 7 / span 6;
  margin-top: clamp(94px, 12vw, 150px);
}

#work-list[data-current-filter="featured"] .work-card.is-filter-hit {
  margin-top: 0 !important;
}

#work-list[data-current-filter="featured"] .work-card.filter-rank-1 {
  grid-column: 1 / span 5 !important;
  margin-top: clamp(16px, 3vw, 46px) !important;
}

#work-list[data-current-filter="featured"] .work-card.filter-rank-2 {
  grid-column: 6 / span 7 !important;
  margin-top: clamp(74px, 9vw, 122px) !important;
}

#work-list[data-current-filter="featured"] .work-card.filter-rank-3 {
  grid-column: 2 / span 10 !important;
  margin-top: clamp(28px, 5vw, 74px) !important;
}

#work-list[data-current-filter="featured"] .work-card.filter-rank-4 {
  grid-column: 1 / span 4 !important;
  margin-top: clamp(28px, 5vw, 60px) !important;
}

#work-list[data-current-filter="featured"] .work-card.filter-rank-5 {
  grid-column: 5 / span 4 !important;
  margin-top: clamp(76px, 8vw, 112px) !important;
}

#work-list[data-current-filter="featured"] .work-card.filter-rank-6 {
  grid-column: 9 / span 4 !important;
  margin-top: clamp(28px, 5vw, 60px) !important;
}

#work-list.is-filtered .work-card.is-filter-hit {
  grid-column: span 6 !important;
  margin-top: 0 !important;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(14px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36);
}

#work-list.is-filtered .work-card.is-filter-hit .work-media {
  border-radius: 16px;
  aspect-ratio: 16 / 10 !important;
}

#work-list.is-filtered .work-card.filter-rank-1 {
  grid-column: 1 / span 7 !important;
}

#work-list.is-filtered .work-card.filter-rank-2 {
  grid-column: 8 / span 5 !important;
  margin-top: clamp(44px, 5vw, 76px) !important;
}

#work-list.is-filtered .work-card.filter-rank-3 {
  grid-column: 3 / span 8 !important;
  margin-top: clamp(14px, 3vw, 42px) !important;
}

#work-list[data-current-filter="tech"] .work-card.filter-rank-1,
#work-list[data-current-filter="tech"] .work-card.filter-rank-2 {
  grid-column: span 6 !important;
  margin-top: 0 !important;
}

#work-list[data-current-filter="tech"] .work-card.is-filter-hit .work-media {
  aspect-ratio: 16 / 9 !important;
}

#work-list[data-current-filter="creative"] .work-card.filter-rank-1 {
  grid-column: 3 / span 8 !important;
  margin-top: 0 !important;
}

#work-list[data-current-filter="creative"] .work-card.filter-rank-1 .work-media {
  aspect-ratio: 21 / 9 !important;
}

/* 渲染大赛：更灵动的杂志式错落（大主图 + 竖屏卡 + 阶梯下沉） */
#render .work-card:nth-child(1) {
  grid-column: 1 / span 7;
}

#render .work-card:nth-child(2) {
  grid-column: 8 / span 5;
  margin-top: clamp(54px, 7vw, 108px);
}
#render .work-card:nth-child(2) .work-media {
  aspect-ratio: 16 / 10;
}

#render .work-card:nth-child(3) {
  grid-column: 1 / span 4;
  margin-top: clamp(36px, 6vw, 92px);
}

/* 竖屏作品（永恒的上升 · Dark Souls）做成纵向卡，打破横图节奏 */
#render .work-card:nth-child(4) {
  grid-column: 5 / span 3;
  margin-top: clamp(6px, 2vw, 26px);
}
#render .work-card:nth-child(4) .work-media {
  aspect-ratio: 3 / 4;
}

#render .work-card:nth-child(5) {
  grid-column: 8 / span 5;
  margin-top: clamp(44px, 6vw, 96px);
}
#render .work-card:nth-child(5) .work-media {
  aspect-ratio: 16 / 10;
}

.work-card.is-hidden {
  display: none;
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28);
}

.work-card.is-wide .work-media {
  aspect-ratio: 21 / 9;
}

#work-list .work-card:nth-child(3) .work-media,
#work-list .work-card:nth-child(7) .work-media,
#work-list .work-card:nth-child(8) .work-media,
#render .work-card:nth-child(1) .work-media {
  aspect-ratio: 16 / 9;
}

.work-media img {
  filter: grayscale(0.12) brightness(0.9);
  transform: scale(1.04);
  transition: filter 0.6s var(--ease);
  will-change: transform;
}

.work-card:hover .work-media img {
  filter: grayscale(0) brightness(1);
}

.work-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.work-no {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  padding-top: 4px;
}

.work-info h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.work-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 46ch;
}

.work-tag {
  grid-column: 2;
  justify-self: start;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  white-space: nowrap;
  padding: 4px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.work-playbtn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.work-card:hover .work-playbtn {
  opacity: 1;
  transform: scale(1);
}

.work-playbtn:hover {
  background: var(--text);
  border-color: var(--text);
}

.work-playbtn .play-tri {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--text);
  transition: border-color 0.35s var(--ease);
}

.work-playbtn:hover .play-tri {
  border-left-color: var(--bg);
}

.work-media iframe,
.work-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
  z-index: 4;
}

.work-media::after,
.reel-screen::after,
.tool-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='360'%20height='180'%20viewBox='0%200%20360%20180'%3E%3Ctext%20x='50%25'%20y='50%25'%20dominant-baseline='middle'%20text-anchor='middle'%20transform='rotate(-18%20180%2090)'%20fill='%23f2f1ea'%20fill-opacity='0.62'%20font-family='Arial,%20sans-serif'%20font-size='17'%20font-weight='700'%20letter-spacing='1.2'%3EMINGYANG%20LI%20/%20limingyang.netlify.app%3C/text%3E%3C/svg%3E");
  background-size: 360px 180px;
}

.work-media.is-playing::after,
.reel-screen.is-playing::after,
.tool-video::after {
  opacity: 0.15;
}

.video-notice {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100% - 32px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(10px);
  color: var(--text);
  transform: translate(-50%, -50%);
}

.video-notice strong {
  font-size: 0.9rem;
}

.video-notice span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.video-notice button,
.video-notice a {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* once a video is playing, the frame is no longer a "click to play" target */
.work-media.is-playing {
  cursor: default;
}

.work-media.is-playing .work-playbtn,
.work-media.is-playing .work-play {
  display: none;
}

.work-play {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  padding: 6px 11px;
  border-radius: 999px;
}

.work-all {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(24px, 4vw, 40px);
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

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

/* ---------- DRIFT (pinned parallax study) ---------- */
.drift {
  position: relative;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.drift-pin {
  position: relative;
  height: clamp(620px, 84vh, 780px);
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 20%, rgba(198, 242, 78, 0.1), transparent 30%),
    radial-gradient(circle at 24% 78%, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    var(--bg);
}

.drift-pin::before,
.drift-pin::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 54vw;
  height: 16vh;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.58;
  pointer-events: none;
}

.drift-pin::before {
  right: -12vw;
  top: 28%;
  background: rgba(198, 242, 78, 0.14);
  clip-path: polygon(0 42%, 24% 34%, 52% 54%, 80% 36%, 100% 48%, 100% 64%, 78% 72%, 50% 62%, 24% 76%, 0 60%);
}

.drift-pin::after {
  left: -16vw;
  bottom: 18%;
  background: rgba(255, 255, 255, 0.08);
  clip-path: polygon(0 48%, 28% 36%, 48% 56%, 72% 44%, 100% 52%, 100% 68%, 70% 72%, 48% 66%, 22% 76%, 0 62%);
}

.drift-frame {
  position: absolute;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 34px 110px rgba(0, 0, 0, 0.58);
  will-change: transform;
}

.drift-frame img {
  border-radius: 14px;
  filter: brightness(0.9) contrast(1.08);
  transform: scale(1.08);
}

.drift-frame-a {
  right: clamp(44px, 5vw, 86px);
  top: clamp(112px, 16vh, 150px);
  width: min(52vw, 800px);
  aspect-ratio: 16 / 9;
}

.drift-frame-b {
  left: clamp(160px, 14vw, 280px);
  bottom: clamp(52px, 9vh, 86px);
  width: min(35vw, 520px);
  aspect-ratio: 16 / 10;
}

.drift-frame-c {
  left: 42vw;
  top: clamp(64px, 10vh, 96px);
  width: min(22vw, 330px);
  aspect-ratio: 1 / 1;
}

.drift-copy {
  position: absolute;
  left: var(--gutter);
  top: clamp(180px, 36vh, 320px);
  z-index: 4;
  max-width: 32ch;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}

.drift-copy span {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.52);
}

.drift-copy p {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.72rem;
  line-height: 1.28;
  letter-spacing: 0;
  color: rgba(243, 242, 238, 0.78);
  text-wrap: balance;
}

/* ---------- SIDE NAV (jump dots, springy) ---------- */
.sidenav {
  position: fixed;
  right: clamp(12px, 1.6vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: flex-end;
}

.sidenav-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  text-decoration: none;
  height: 16px;
}

.sidenav-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s var(--ease), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.3s var(--ease);
  pointer-events: none;
}

.sidenav-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s var(--ease);
}

.sidenav-link:hover .sidenav-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--text);
}

.sidenav-link:hover .sidenav-dot {
  transform: scale(1.45);
  background: var(--text);
}

.sidenav-link.active .sidenav-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--text);
}

.sidenav-link.active .sidenav-dot {
  width: 26px;
  background: var(--text);
}

@media (max-width: 880px) {
  .sidenav {
    display: none;
  }
}

/* ---------- ENV INTRO (cinematic section opener) ---------- */
.envintro {
  position: relative;
}

.envintro-pin {
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}

.envintro-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform, border-radius;
}

.envintro-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) contrast(1.04);
}

.envintro-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 11, 0.1) 0%,
    rgba(10, 10, 11, 0.15) 50%,
    rgba(10, 10, 11, 0.7) 100%
  );
}

.envintro-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(48px, 11vh, 130px);
  z-index: 2;
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin: 0 auto;
}

.envintro-copy .index {
  display: block;
  margin-bottom: 12px;
}

.envintro-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3rem);
  letter-spacing: -0.01em;
  line-height: 1.04;
}

.envintro-note {
  margin: 16px 0 0;
  max-width: 50ch;
  color: var(--muted);
  font-size: 1.04rem;
}

/* ---------- GALLERY (terrain / sculpt) ---------- */
#craft {
  position: relative;
  overflow: hidden;
}

#craft::before {
  content: "";
  position: absolute;
  inset: 6% -12% auto;
  height: 44%;
  background:
    radial-gradient(circle at 28% 44%, rgba(44, 246, 255, 0.08), transparent 30%),
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.06), transparent 26%);
  pointer-events: none;
}

.gallery-group {
  position: relative;
  z-index: 1;
  margin-top: clamp(36px, 5vw, 74px);
}

.gallery-label {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: rgba(243, 242, 238, 0.66);
  margin-bottom: 18px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);
  padding: clamp(18px, 3vw, 40px) 0 clamp(8px, 2vw, 24px);
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  padding: 7px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  aspect-ratio: 16 / 10;
  cursor: zoom-in;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.026));
  backdrop-filter: blur(14px) saturate(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.38);
  animation: glassBreath 7s ease-in-out infinite;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  filter: brightness(0.95);
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.gallery-item:nth-child(1) {
  grid-column: 1 / span 6;
  grid-row: span 2;
  aspect-ratio: 16 / 11;
}

.gallery-item:nth-child(2) {
  grid-column: 7 / span 3;
  transform: translateY(-34px);
  animation-delay: -1.4s;
}

.gallery-item:nth-child(3) {
  grid-column: 10 / span 3;
  transform: translateY(26px);
  animation-delay: -2.7s;
}

.gallery-item:nth-child(4) {
  grid-column: 6 / span 4;
  transform: translateY(-10px);
  animation-delay: -3.5s;
}

.gallery-item:nth-child(5) {
  grid-column: 10 / span 3;
  transform: translateY(18px);
  animation-delay: -4.2s;
}

.gallery-group + .gallery-group .gallery-item:nth-child(1) {
  grid-column: 1 / span 4;
  aspect-ratio: 4 / 3;
}

.gallery-group + .gallery-group .gallery-item:nth-child(2) {
  grid-column: 5 / span 4;
  transform: translateY(34px);
}

.gallery-group + .gallery-group .gallery-item:nth-child(3) {
  grid-column: 9 / span 4;
  transform: translateY(-22px);
}

.gallery-group + .gallery-group .gallery-item:nth-child(4) {
  grid-column: 3 / span 7;
  aspect-ratio: 21 / 8;
  transform: translateY(-4px);
}

@keyframes glassBreath {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 80px rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.13);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      0 34px 110px rgba(49, 225, 230, 0.12),
      0 24px 80px rgba(0, 0, 0, 0.42);
    border-color: rgba(162, 246, 255, 0.24);
  }
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(6, 6, 8, 0.93);
  backdrop-filter: blur(8px);
  padding: 4vw;
  cursor: zoom-out;
}

.lightbox.open {
  display: grid;
}

.lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}

.lightbox-close:hover {
  background: var(--text);
  color: var(--bg);
}

/* ---------- REEL ---------- */
.reel {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
}

.reel-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36);
}

.reel-screen img {
  filter: grayscale(0.2) brightness(0.7);
  transform: scale(1.05);
  will-change: transform;
}

/* 点击后注入的本地视频铺满播放框 */
.reel-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
  z-index: 4;
}
.reel-screen.is-playing {
  cursor: default;
}
.reel-screen.is-playing .reel-play {
  display: none;
}

.reel-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.reel-play:hover {
  transform: scale(1.08);
  background: var(--text);
  border-color: var(--text);
}

.play-tri {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--text);
  transition: border-color 0.4s var(--ease);
}

.reel-play:hover .play-tri {
  border-left-color: var(--bg);
}

.reel-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.reel-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--bg-2);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.18);
}

.reel-side p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.reel-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reel-links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.reel-links a:hover {
  color: var(--hover);
  border-color: var(--text);
}

/* ---------- TOOLS ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.tool-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.26);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.tool-card:hover {
  border-color: rgba(198, 242, 78, 0.5);
  transform: translateY(-3px);
  box-shadow:
    0 0 18px rgba(198, 242, 78, 0.18),
    0 26px 70px rgba(0, 0, 0, 0.34);
}

.tool-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--line-soft);
}

.tool-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

.tool-video.deferred-embed {
  isolation: isolate;
}

.embed-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.98;
  filter: saturate(0.98) contrast(1.02);
  transform: scale(1.002);
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease), filter 0.4s var(--ease);
}

.tool-video.deferred-embed::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 5, 6, 0.03), rgba(5, 5, 6, 0.16));
  pointer-events: none;
}

.embed-launch {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  font: inherit;
}

.embed-playmark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(7, 7, 8, 0.74);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.embed-playmark .play-tri {
  margin-left: 4px;
}

.embed-launch-copy {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(7, 7, 8, 0.66);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.embed-launch-copy strong {
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 600;
}

.embed-launch-copy span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(243, 242, 238, 0.7);
}

.tool-video.deferred-embed:hover .embed-poster {
  transform: scale(1.025);
  opacity: 1;
  filter: saturate(1.04) contrast(1.03);
}

.tool-video.deferred-embed:hover .embed-playmark,
.embed-launch:focus-visible .embed-playmark {
  transform: scale(1.06);
  border-color: rgba(198, 242, 78, 0.78);
  background: rgba(10, 10, 10, 0.86);
}

.embed-launch:focus-visible {
  outline: 2px solid rgba(198, 242, 78, 0.78);
  outline-offset: -4px;
}

.embed-noscript {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 3;
  color: var(--text);
}


.tool-video.is-embed-loading .embed-playmark {
  cursor: progress;
}

.tool-video.is-embed-loading .embed-playmark .play-tri {
  display: none;
}

.tool-video.is-embed-loading .embed-playmark::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: embed-spin 0.75s linear infinite;
}

@keyframes embed-spin {
  to { transform: rotate(360deg); }
}

.tool-video.is-embed-loaded::before,
.tool-video.is-embed-loaded .embed-poster,
.tool-video.is-embed-loaded .embed-launch {
  display: none;
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  padding: clamp(24px, 3vw, 36px);
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: auto;
  padding-top: 4px;
}

.tool-links a {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.tool-links a:hover {
  color: var(--hover);
  border-color: var(--text);
}

.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-badge {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--bg);
  background: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
}

.tool-flow {
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.tool-flow i {
  color: var(--faint);
  font-style: normal;
  padding: 0 4px;
}

.tool-card h3 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0;
  line-height: 1.1;
}

.tool-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.tool-details {
  border-top: 1px solid var(--line-soft);
}

.tool-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.tool-details summary::-webkit-details-marker {
  display: none;
}

.tool-details summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.tool-details[open] summary::after {
  transform: rotate(45deg);
  color: var(--text);
  border-color: var(--text);
}

.tool-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tool-feats li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.92rem;
  color: var(--text);
}

.tool-feats li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--faint);
  font-family: var(--mono);
}

.tool-link {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text);
  text-decoration: none;
  width: fit-content;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}

.tool-link:hover {
  color: var(--hover);
}

/* ---------- ABOUT ---------- */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.about-lead {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.72rem;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--text);
}

.about-stats {
  display: flex;
  flex-direction: column;
}

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

.stat:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.stat-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.4rem;
  letter-spacing: 0;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ---------- CONTACT ---------- */
.contact-mail {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 5rem;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  color: var(--text);
  word-break: break-word;
  transition: color 0.4s var(--ease);
}

.contact-intro {
  margin: 0 0 clamp(28px, 5vw, 48px);
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.contact-mail:hover {
  color: var(--faint);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
}

.contact-links a {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.contact-links a:hover {
  color: var(--text);
}

/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
}

/* ============================================================
   MOTION is driven by GSAP + ScrollTrigger (see script.js).
   Content is fully visible by default; if JS/GSAP fail to load,
   the page still reads correctly (progressive enhancement).
   GSAP sets the hidden start states only after it has loaded,
   via the .gsap-ready flag below.
   ============================================================ */

/* Images are slightly oversized (scale set in their base rules) so GSAP's
   vertical parallax travel never reveals an edge. */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}

html[data-snapshot-jump="work-list"] .hero,
html[data-snapshot-jump="work-list"] .marquee,
html[data-snapshot-jump="work-list"] #reel,
html[data-snapshot-jump="work-list"] .envintro {
  display: none;
}

html[data-snapshot-jump="craft"] .hero,
html[data-snapshot-jump="craft"] .marquee,
html[data-snapshot-jump="craft"] #reel,
html[data-snapshot-jump="craft"] .envintro,
html[data-snapshot-jump="craft"] #work-list,
html[data-snapshot-jump="craft"] .drift,
html[data-snapshot-jump="craft"] #render {
  display: none;
}

html[data-snapshot-jump="reel"] .hero {
  display: none;
}

html[data-snapshot-jump="drift"] .hero,
html[data-snapshot-jump="drift"] .career,
html[data-snapshot-jump="drift"] .marquee,
html[data-snapshot-jump="drift"] #reel,
html[data-snapshot-jump="drift"] .envintro,
html[data-snapshot-jump="drift"] #work-list {
  display: none;
}

html[data-snapshot-jump="render"] .hero,
html[data-snapshot-jump="render"] .career,
html[data-snapshot-jump="render"] .marquee,
html[data-snapshot-jump="render"] #reel,
html[data-snapshot-jump="render"] .envintro,
html[data-snapshot-jump="render"] #work-list,
html[data-snapshot-jump="render"] .drift {
  display: none;
}

html[data-snapshot-jump="contact"] .hero,
html[data-snapshot-jump="contact"] .career,
html[data-snapshot-jump="contact"] .marquee,
html[data-snapshot-jump="contact"] #reel,
html[data-snapshot-jump="contact"] .envintro,
html[data-snapshot-jump="contact"] #work-list,
html[data-snapshot-jump="contact"] .drift,
html[data-snapshot-jump="contact"] #render,
html[data-snapshot-jump="contact"] #craft,
html[data-snapshot-jump="contact"] #tools {
  display: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
  .hero {
    min-height: auto;
  }
  .hero-inner {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "intro"
      "details";
    align-content: center;
    padding-block: 96px 44px;
  }
  .hero-portrait {
    justify-self: start;
    max-width: 220px;
  }
  .hero-stage {
    min-height: 320px;
    order: -1;
    transform: scale(0.84);
  }
  .hero-copy,
  .hero-intro {
    margin-top: 0;
  }
  .hero-title {
    font-size: clamp(2.4rem, 8vw, 3.2rem);
  }
  .hero-sub {
    margin-top: 24px;
    max-width: 100%;
  }
  .hero-actions {
    margin-top: 28px;
  }
  .hero-resume {
    width: min(100%, 520px);
    align-items: flex-start;
    border-radius: 22px;
    flex-direction: column;
  }
  .hero-resume-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .mood-cluster {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    height: auto;
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mood-bubble,
  .bubble-lg,
  .bubble-md,
  .bubble-sm,
  .bubble-xs,
  .bubble-lg + .bubble-sm,
  .bubble-dim {
    position: static;
    inset: auto;
    width: auto;
    height: 34px;
    padding: 0 12px;
    font-size: 0.62rem;
  }
  .mood-cluster .mood-bubble:nth-child(1),
  .mood-cluster .mood-bubble:nth-child(2),
  .mood-cluster .mood-bubble:nth-child(3),
  .mood-cluster .mood-bubble:nth-child(4),
  .mood-cluster .mood-bubble:nth-child(5) {
    position: static;
    inset: auto;
    width: auto;
    height: 34px;
  }
  .scroll-cue {
    bottom: 28px;
  }
  .reel,
  .tool-grid,
  .about {
    grid-template-columns: 1fr;
  }
  .filter-dock {
    top: 66px;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }
  .filter-note {
    white-space: normal;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  #work-list .work-card,
  #render .work-card,
  .work-card.is-wide {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
  }
  #work-list[data-current-filter] .work-card.is-filter-hit {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
  }
  .work-card.is-wide .work-media,
  .work-media {
    aspect-ratio: 16 / 10;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item,
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5),
  .gallery-group + .gallery-group .gallery-item:nth-child(1),
  .gallery-group + .gallery-group .gallery-item:nth-child(2),
  .gallery-group + .gallery-group .gallery-item:nth-child(3),
  .gallery-group + .gallery-group .gallery-item:nth-child(4) {
    grid-column: 1 / -1;
    transform: none;
    aspect-ratio: 16 / 10;
  }
  #work-list .work-card:nth-child(2) .work-media,
  #work-list .work-card:nth-child(5) .work-media,
  #render .work-card:nth-child(2) .work-media {
    aspect-ratio: 16 / 10 !important;
  }
  .drift {
    display: none;
  }
}

@media (max-width: 520px) {
  .aurora {
    width: 86vw;
    height: 18vh;
  }
  .sound-card {
    width: min(68vw, 240px);
  }
  .hero-stage {
    min-height: 288px;
    transform: scale(0.8);
  }
  .hero-title {
    font-size: 3.1rem;
  }
  .section-head h2,
  .envintro-title {
    font-size: 2.25rem;
  }
  .drift-copy p,
  .about-lead {
    font-size: 1.35rem;
  }
  .contact-mail {
    font-size: 2.5rem;
  }
  .hero-player {
    bottom: 8px;
  }
  .section-head {
    grid-template-columns: 1fr;
  }
  .section-note {
    grid-column: 1;
  }
  .work-meta {
    grid-template-columns: auto 1fr;
  }
  .work-tag {
    display: none;
  }
  .hero-frame {
    aspect-ratio: 4 / 3;
  }
  .portfolio-tabs {
    width: 100%;
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .portfolio-tabs button {
    min-width: 0;
    padding: 0 4px;
    font-size: 0.66rem;
  }
  .hero-resume-actions a {
    flex: 1 1 120px;
  }
}

/* ============================================================
   HERO · 简历式入口（头像卡 + 自我介绍 + 数据 + FOCUS）
   ============================================================ */
.hero-portrait {
  position: relative;
  z-index: 2;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    0 0 18px rgba(198, 242, 78, 0.08),
    0 40px 90px rgba(0, 0, 0, 0.5);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  /* 头像本身已是黑白雕塑 + 酸性绿点缀，不再灰度化，否则绿色会被抹掉 */
  filter: contrast(1.03);
  transition: filter 0.6s var(--ease), transform 0.8s var(--ease);
}

.hero-portrait:hover img {
  filter: contrast(1.06) brightness(1.04);
  transform: scale(1.03);
}

/* 角落 HUD 取景框，呼应参考里的科技感，但只用细白线 */
.hero-portrait-frame {
  position: absolute;
  inset: 14px;
  z-index: 2;
  pointer-events: none;
  border-radius: 14px;
}
.hero-portrait-frame::before,
.hero-portrait-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.hero-portrait-frame::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}
.hero-portrait-frame::after {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

.hero-portrait-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(10, 10, 11, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.hero-portrait-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(198, 242, 78, 0.6);
  animation: pulseDot 2.4s ease-out infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(198, 242, 78, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(198, 242, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 242, 78, 0); }
}

/* 身份 / 服务 / 联系 网格 */
.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 32px;
  margin: 0;
  padding: clamp(20px, 3vh, 28px) 0 0;
  border-top: 1px solid var(--line-soft);
}

.hero-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-meta dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero-meta dd {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text);
}

.hero-meta dd a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.hero-meta dd a:hover {
  border-bottom-color: var(--accent);
}

/* 数据背书 */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.hstat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hstat-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hstat-num i {
  font-style: normal;
  font-size: 0.5em;
  margin-left: 2px;
  color: var(--muted);
}

.hstat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* FOCUS 标签胶囊 */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags .tags-k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin-right: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: rgba(243, 242, 238, 0.86);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.035);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pill:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow:
    inset 0 0 16px rgba(255, 255, 255, 0.055),
    0 0 16px rgba(198, 242, 78, 0.2);
}

.hero .hero-actions {
  margin-top: 26px;
}

/* details 带内部由 gap 统一控制间距，清掉各块自带的上边距 */
.hero-details .hero-stats,
.hero-details .hero-tags,
.hero-details .hero-actions {
  margin-top: 0;
}
.hero-details .hero-stats {
  max-width: 560px;
}

/* ============================================================
   CAREER PATH · 成长时间轴
   ============================================================ */
.career {
  position: relative;
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin: 0 auto;
  padding-block: clamp(44px, 7vh, 84px);
}

.career-head {
  max-width: 60ch;
  margin-bottom: clamp(28px, 4vh, 48px);
}

.career-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: var(--faint);
  margin-bottom: 18px;
}

.career-head h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}

/* 横向、克制的成长动线（左=最新，右=最早），不占大篇幅 */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: clamp(20px, 2.6vw, 40px);
}

/* 水平主线 */
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 6px;
  height: 1px;
  background: var(--line);
}

.tl-item {
  position: relative;
  padding: 26px 0 0 0;
}

.tl-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
/* 第一个节点（至今）用酸性绿点睛 */
.tl-item:first-child .tl-dot {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent);
}

.tl-date {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.tl-item h3 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  letter-spacing: 0;
}

.tl-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .timeline {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0;
  }
  .timeline::before {
    left: 6px;
    right: auto;
    top: 8px;
    bottom: 8px;
    width: 1px;
    height: auto;
  }
  .tl-item {
    padding: 0 0 clamp(26px, 4vh, 40px) 36px;
  }
  .tl-item:last-child {
    padding-bottom: 0;
  }
  .tl-dot {
    top: 3px;
  }
  .tl-item p {
    max-width: 60ch;
  }
}

/* ---------- 简历式 Hero 响应式 ---------- */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "intro"
      "details";
    column-gap: 0;
    row-gap: 30px;
    padding-block: clamp(96px, 16vh, 130px) 60px;
    min-height: auto;
  }
  .hero-copy,
  .hero-intro {
    margin-top: 0;
  }
  .hero-title {
    font-size: clamp(2.4rem, 8vw, 3.2rem);
  }
  .hero-portrait {
    justify-self: start;
    max-width: 220px;
  }
  .hero-stats {
    gap: 12px;
  }
  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
  }
}

@media (max-width: 520px) {
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero-meta {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CARD FX — 探照灯(SpotlightCard) + 边缘绿光(BorderGlow)
   纯 CSS 视觉 + JS 只喂 --mx/--my 鼠标位置；黑白 + 酸性绿。
   ============================================================ */
.card-fx {
  position: relative;
  isolation: isolate;
  --mx: 50%;
  --my: 50%;
  --edge: 0;
  --angle: 0deg;
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

/* 边缘附近才亮：窄、亮，不做大范围绿雾 */
.card-fx::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(198, 242, 78, 0.9);
  opacity: calc(max((var(--edge) - 0.62) * 2.8, 0));
  -webkit-mask:
    conic-gradient(
      from var(--angle) at center,
      #000 0deg,
      #000 18deg,
      transparent 38deg,
      transparent 322deg,
      #000 342deg,
      #000 360deg
    );
  mask:
    conic-gradient(
      from var(--angle) at center,
      #000 0deg,
      #000 18deg,
      transparent 38deg,
      transparent 322deg,
      #000 342deg,
      #000 360deg
    );
  filter: drop-shadow(0 0 6px rgba(198, 242, 78, 0.78));
  transition: opacity 0.22s var(--ease);
}

.card-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(90px circle at var(--mx) var(--my), rgba(198, 242, 78, 0.18), transparent 58%);
  opacity: calc(max((var(--edge) - 0.72) * 1.8, 0));
  transition: opacity 0.22s var(--ease);
}

.card-fx:hover {
  box-shadow:
    0 0 0 1px rgba(198, 242, 78, 0.08),
    0 0 14px rgba(198, 242, 78, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .card-fx::before,
  .card-fx::after {
    display: none;
  }
}

/* ============================================================
   CONTACT — 大字 + 磨砂 CONTACT 卡（含二维码）
   ============================================================ */
.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.contact-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}

.contact-big {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.015em;
}

.contact-arrow {
  color: var(--accent);
  font-weight: 400;
}

.contact-sub {
  margin: 26px 0 0;
  max-width: 50ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.contact-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 22px;
}
.contact-secondary a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.contact-secondary a:hover {
  border-bottom-color: var(--accent);
}

.contact-card {
  position: relative;
  padding: 28px 28px 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  overflow: hidden;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.34);
}

.cc-title {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 20px;
}

.cc-rows {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
}

.cc-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.cc-row:first-child {
  border-top: 0;
}

.cc-row dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.cc-row dd {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text);
  word-break: break-word;
}
.cc-row dd a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.cc-row dd a:hover {
  border-bottom-color: var(--accent);
}

.cc-tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin: 0;
}

/* 卡片底部：左侧扫码引导文案 + 右侧二维码，填满原本左下空白 */
.cc-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 6px;
}
.cc-foot-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 20ch;
}
.cc-foot-k {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.cc-foot-text {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text);
}

.cc-qr {
  margin: 0;
  width: 128px;
  height: 128px;
  flex: none;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(198, 242, 78, 0.4);
  background: #0b0b0c;
  box-shadow: 0 0 18px rgba(198, 242, 78, 0.12), 0 10px 30px rgba(0, 0, 0, 0.45);
}
.cc-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 880px) {
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .cc-qr {
    margin-left: 0;
  }
}
