/* ============================================================
   何典蔚 · 个人作品集
   影院暗黑主题 + Apple 非线性动效
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-soft: #111114;
  --bg-card: #16161a;
  --bg-elevated: rgba(24, 24, 29, 0.78);
  --text: #f5f5f7;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --specular: rgba(255, 255, 255, 0.12);
  --accent: #e8b04b;          /* 暖金 — 影院质感 */
  --accent-2: #ff7a45;        /* 暖橙 */
  --accent-cool: #4cc9c0;     /* 冷青 */
  --radius: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --font-en: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-cn: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --maxw: 1320px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: auto;
  font-feature-settings: "kern" 1;
}

/* 自定义光标就绪后，全站（含弹窗 / 灯箱内部）统一只显示这一套置顶光标，
   避免原生箭头和装饰环同时出现；脚本未执行时仍保留原生光标作为兜底。 */
body.has-custom-cursor,
body.has-custom-cursor * { cursor: none !important; }

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  body.has-custom-cursor,
  body.has-custom-cursor * { cursor: auto !important; }
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
section { position: relative; }

::selection { background: var(--accent); color: #0a0a0b; }

/* ---------- 胶片颗粒 + 暗角（独立 GPU 合成层，避免全屏混色重绘掉帧） ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.032;
  transform: translateZ(0);
  contain: strict;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: fixed; inset: 0; z-index: 8999; pointer-events: none;
  transform: translateZ(0);
  contain: strict;
  background: radial-gradient(120% 100% at 50% 50%, transparent 58%, rgba(0,0,0,0.52) 100%);
}

/* ---------- 自定义光标 ----------
   z-index 高于所有弹窗（10000/10001），保证照片灯箱、视频弹窗、短视频面板
   打开时光标仍在最上层；pointer-events:none 不遮挡任何点击操作。
   显示无过渡（一动即回），隐藏淡出。 */
.cursor {
  position: fixed; top: 0; left: 0;
  z-index: 2147483000;
  pointer-events: none;
  mix-blend-mode: difference;
  transition: opacity .25s ease;
  will-change: opacity;
}
.cursor.is-idle { opacity: 0; transition: opacity .35s ease; }
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  will-change: transform;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.62);
  border-radius: 50%; transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width .32s var(--ease), height .32s var(--ease), background .32s var(--ease), border-color .32s var(--ease);
  will-change: transform;
}
.cursor.is-hover .cursor-ring { width: 64px; height: 64px; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.85); }
.cursor.is-play .cursor-ring { width: 78px; height: 78px; background: rgba(232,176,75,0.18); border-color: var(--accent); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- 滚动进度 ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9998; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  will-change: transform;
}

/* ---------- 开场幕布 ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9990; background: #050506;
  display: flex; align-items: center; justify-content: center;
  transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.preloader.is-done { clip-path: inset(0 0 100% 0); }
.preloader__inner { text-align: center; }
.preloader__name { overflow: hidden; }
.preloader__name .line { display: block; overflow: hidden; }
.preloader__name .line span { display: inline-block; transform: translateY(110%); }
.preloader__name .line.en { margin-top: 8px; }
.preloader__name .line.en span { font-family: var(--font-en); font-weight: 600; letter-spacing: .35em; font-size: clamp(14px, 2vw, 20px); color: var(--accent); }
.preloader__name .line:not(.en) span { font-size: clamp(40px, 9vw, 90px); font-weight: 700; letter-spacing: .06em; }
.preloader__bar { width: min(280px, 60vw); height: 2px; background: rgba(255,255,255,.12); margin: 28px auto 16px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.preloader__role { font-family: var(--font-en); font-size: 12px; letter-spacing: .3em; color: var(--text-faint); }

/* ---------- 导航（Apple 毛玻璃 + 当前区块指示） ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 60px);
}
.nav::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(12, 12, 14, 0.72);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 36px -16px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.nav.is-scrolled::before {
  opacity: 1;
}
.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; transition: opacity .3s ease; }
.nav__logo:hover { opacity: 0.88; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0a0b;
  font-family: var(--font-en); font-weight: 800; letter-spacing: .02em;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.45), 0 6px 18px -6px rgba(232,176,75,0.5);
}
.logo-full { font-size: 17px; letter-spacing: .04em; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav__links a { font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--text-dim); transition: color .3s var(--ease); position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1.5px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav__links a:not(.nav__cta):hover,
.nav__links a:not(.nav__cta).is-active { color: var(--text); }
.nav__links a:not(.nav__cta):hover::after,
.nav__links a:not(.nav__cta).is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  padding: 8px 20px; border: 1px solid rgba(232, 176, 75, 0.55); border-radius: 999px; color: var(--accent) !important;
  background: rgba(232, 176, 75, 0.06);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.nav__cta:hover,
.nav__cta.is-active {
  background: var(--accent); color: #0a0a0b !important; border-color: var(--accent);
  box-shadow: 0 6px 20px -6px rgba(232, 176, 75, 0.55);
}
.nav__toggle { display: none; flex-direction: column; gap: 6px; background: none; border: 0; cursor: none; }
.nav__toggle span { width: 26px; height: 2px; background: var(--text); transition: .3s; }

@media (max-width: 880px) {
  .nav__links {
    position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh;
    flex-direction: column; justify-content: center; gap: 26px;
    background: rgba(8,8,10,.94); backdrop-filter: saturate(180%) blur(28px); -webkit-backdrop-filter: saturate(180%) blur(28px);
    transform: translateY(-100%);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .6s var(--ease), opacity .4s var(--ease), visibility 0s linear .6s; font-size: 22px;
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: transform .6s var(--ease), opacity .4s var(--ease), visibility 0s;
  }
  .nav__toggle { display: flex; z-index: 1001; }
  .nav__toggle.is-open span:first-child { transform: translateY(8px) rotate(45deg); }
  .nav__toggle.is-open span:last-child { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- 通用容器与排版质感 ---------- */
.hero, .about, .reel, .projects, .skills, .experience, .contact {
  padding: clamp(88px, 12vh, 160px) clamp(20px, 5vw, 60px);
  max-width: var(--maxw); margin: 0 auto;
}
.section-label, [class$="__label"] {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-en); font-size: 12px; font-weight: 600;
  letter-spacing: .28em; color: var(--accent); text-transform: uppercase;
}
.section-label::before, [class$="__label"]::before {
  content: ""; width: 18px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.75;
}
.projects__head h2,
.shorts__head h2,
.skills__head h2,
.experience__head h2,
.photos__head h2 {
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding-top: 0; padding-bottom: 0; max-width: none; margin: 0;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__bg-img {
  position: absolute; inset: -10% -5%;
  background:
    radial-gradient(60% 60% at 70% 30%, rgba(232,176,75,.22), transparent 60%),
    radial-gradient(70% 70% at 20% 80%, rgba(76,201,192,.16), transparent 60%),
    url("../images/hero-bg.jpg") center/cover no-repeat;
  filter: saturate(1.05);
  will-change: transform;
}
.hero__bg-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,.55), rgba(10,10,11,.22) 42%, rgba(10,10,11,.92)); }
.hero__content { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 0 clamp(20px, 5vw, 60px); will-change: transform, opacity; }
.hero__eyebrow { font-family: var(--font-en); letter-spacing: .28em; font-size: 13px; font-weight: 500; color: var(--accent); margin-bottom: 22px; }
.hero__title { font-weight: 800; line-height: .98; letter-spacing: -.015em; }
.hero__title .mask { display: block; overflow: hidden; }
.hero__title .mask__inner {
  display: block; font-size: clamp(56px, 13vw, 168px);
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.hero__title .mask.en .mask__inner {
  font-family: var(--font-en); font-weight: 600; letter-spacing: .12em;
  font-size: clamp(20px, 4vw, 46px); color: rgba(245, 245, 247, 0.78); margin-top: 8px;
  text-shadow: none;
}
.hero__sub { font-size: clamp(18px, 2.4vw, 25px); margin-top: 32px; font-weight: 500; letter-spacing: .01em; color: rgba(245, 245, 247, 0.96); text-shadow: 0 2px 16px rgba(8, 8, 12, 0.68); }
.hero__desc { color: rgba(245, 245, 247, 0.88); margin-top: 14px; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.7; text-shadow: 0 2px 14px rgba(8, 8, 12, 0.78); }
.hero__scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-en); font-size: 11px; letter-spacing: .3em; color: var(--text-faint);
  will-change: opacity, transform;
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--text); animation: scrollPulse 2.2s var(--ease) infinite; }
@keyframes scrollPulse { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- 理念 ---------- */
.about__label { margin-bottom: 30px; }
.about__statement {
  font-size: clamp(28px, 5.2vw, 66px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em;
  max-width: 16em;
  color: var(--text);
}
.about__statement .word { display: inline-block; opacity: 1; }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 72px; }
.about__card {
  position: relative;
  background: linear-gradient(180deg, rgba(28, 28, 33, 0.82) 0%, rgba(17, 17, 20, 0.92) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: inset 0 1px 0 var(--specular), 0 18px 44px -24px rgba(0, 0, 0, 0.75);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
  overflow: hidden;
  will-change: transform;
}
.about__card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(232, 176, 75, 0.1), transparent 70%);
  opacity: 0; transition: opacity .45s ease;
}
.about__card:hover {
  transform: translate3d(0, -4px, 0);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 28px 56px -24px rgba(0, 0, 0, 0.85);
}
.about__card:hover::before { opacity: 1; }
.about__card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; color: var(--accent); }
.about__card p { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
@media (max-width: 880px) { .about__grid { grid-template-columns: 1fr; } }

/* ---------- 项目 — 错落网格 ---------- */
.projects__head { margin-bottom: 60px; }
.projects__head h2 { font-size: clamp(30px, 5vw, 60px); font-weight: 700; line-height: 1.1; margin-top: 18px; }
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 32px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.project-card:nth-child(even) { margin-top: 72px; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.project-card__media {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.project-card__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .8s var(--ease);
  filter: saturate(.9) contrast(1.02);
}
.project-card:hover .project-card__img { transform: scale(1.06); }
.project-card__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5); background: rgba(10,10,11,.4);
  backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center;
  transition: transform .4s var(--ease), background .4s, opacity .4s;
  opacity: 0; z-index: 2; cursor: none;
}
.project-card__play svg { margin-left: 3px; }
.project-card:hover .project-card__play { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.project-card:hover .project-card__play:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); }
.project-card__body { padding: 26px; }
.project-card__no { font-family: var(--font-en); font-size: 13px; letter-spacing: .2em; color: var(--accent); }
.project-card__body h3 { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 10px 0 8px; }
.project-card__role { color: var(--accent-2); font-size: 14px; font-weight: 500; }
.project-card__meta { color: var(--text-faint); font-size: 13px; margin-top: 4px; font-family: var(--font-en); }
.project-card__desc { color: var(--text-dim); font-size: 14px; margin-top: 12px; line-height: 1.6; }
.project-card--end {
  grid-column: 1 / -1;
  margin-top: 24px !important;
  background: linear-gradient(135deg, #16161a, #1d1a14);
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
}
.project-card--end .project-card__body--center { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px; }
.project-card--end h3 { font-size: 28px; }
@media (max-width: 880px) {
  .projects__grid { grid-template-columns: 1fr; }
  .project-card:nth-child(even) { margin-top: 0; }
  .project-card--end { grid-column: auto; flex-direction: column; }
}

/* ---------- 短视频专区 ---------- */
.shorts { padding: clamp(80px, 12vh, 160px) clamp(20px, 5vw, 60px); max-width: var(--maxw); margin: 0 auto; }
.shorts__head { margin-bottom: 60px; }
.shorts__head h2 { font-size: clamp(30px, 5vw, 60px); font-weight: 700; line-height: 1.1; margin-top: 18px; }
.shorts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.short-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.short-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.short-card__media {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}
.short-card__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .8s var(--ease);
  filter: saturate(.9) contrast(1.02);
}
.short-card:hover .short-card__img { transform: scale(1.06); }
.short-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.7) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 22px;
  opacity: 0; transition: opacity .4s;
}
.short-card:hover .short-card__overlay { opacity: 1; }
.short-card__count {
  font-family: var(--font-en); font-size: 13px; letter-spacing: .15em;
  color: var(--accent); text-transform: uppercase;
}
.short-card__arrow {
  position: absolute; right: 22px; bottom: 22px;
  color: #fff; transition: transform .3s var(--ease);
}
.short-card:hover .short-card__arrow { transform: translateX(4px); }
.short-card__body { padding: 22px; }
.short-card__body h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.short-card__desc { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
@media (max-width: 880px) {
  .shorts__grid { grid-template-columns: 1fr; }
}

/* ---------- 短视频展开面板 ---------- */
.shorts-panel {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .38s var(--ease), visibility 0s linear .38s;
}
.shorts-panel.is-open {
  visibility: visible; opacity: 1; pointer-events: auto;
  transition: opacity .38s var(--ease), visibility 0s;
}
.shorts-panel__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.84); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); }
.shorts-panel__frame {
  position: relative;
  width: min(96vw, 1200px);
  max-height: 92vh;
  background: linear-gradient(180deg, rgba(26, 26, 30, 0.94) 0%, rgba(16, 16, 19, 0.98) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 var(--specular), 0 36px 90px -20px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(0.96) translateY(10px);
  transition: transform .48s var(--ease);
}
.shorts-panel.is-open .shorts-panel__frame {
  transform: scale(1) translateY(0);
}
.shorts-panel__close {
  position: absolute; top: 16px; right: 18px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 22px; cursor: none;
  display: grid; place-items: center;
  transition: background .28s var(--ease), transform .28s var(--ease), border-color .28s;
}
.shorts-panel__close:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); transform: scale(1.06); }
.shorts-panel__header {
  padding: 32px 32px 0;
  flex-shrink: 0;
}
.shorts-panel__header h3 { font-size: 26px; font-weight: 700; }
.shorts-panel__header p { color: var(--text-dim); font-size: 15px; margin-top: 6px; }
.shorts-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 32px 32px;
  overflow-y: auto;
}
.shorts-panel__item {
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.shorts-panel__item:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.shorts-panel__item-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.shorts-panel__item-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(10,10,11,.5); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.4); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .3s, transform .3s;
}
.shorts-panel__item:hover .shorts-panel__item-play { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.shorts-panel__item-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  font-size: 12px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 1024px) {
  .shorts-panel__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .shorts-panel__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px; }
  .shorts-panel__header { padding: 24px 20px 0; }
}

/* ---------- 技能 ---------- */
.skills__head { margin-bottom: 54px; }
.skills__head h2 { font-size: clamp(30px, 5vw, 60px); font-weight: 700; line-height: 1.1; margin-top: 18px; }
.skills__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); }
.skills__col-title { font-size: 16px; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 26px; font-weight: 500; }
.skill {
  margin-bottom: 22px;
  padding: 12px 14px;
  margin-left: -14px;
  margin-right: -14px;
  border-radius: 14px;
  transition: background .35s var(--ease);
}
.skill:hover { background: rgba(255, 255, 255, 0.03); }
.skill__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 500; margin-bottom: 10px; }
.skill__pct { font-family: var(--font-en); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent); }
.skill__bar {
  position: relative; height: 5px;
  background: rgba(255,255,255,.07);
  border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.45);
}
.skill__bar span {
  position: relative; display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(232, 176, 75, 0.88), var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(232, 176, 75, 0.35);
  will-change: width;
}
.skill__bar span::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 225, 0.85));
  border-radius: 999px;
}
@media (max-width: 880px) { .skills__cols { grid-template-columns: 1fr; } }

/* ---------- 经历时间线 ---------- */
.experience__head { margin-bottom: 54px; }
.experience__head h2 { font-size: clamp(30px, 5vw, 60px); font-weight: 700; line-height: 1.1; margin-top: 18px; }
.timeline {
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: clamp(24px, 4vw, 48px);
}
.timeline__progress {
  position: absolute; left: -1px; top: 0; width: 1.5px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform: scaleY(0); transform-origin: top center;
  box-shadow: 0 0 12px rgba(232, 176, 75, 0.45);
  pointer-events: none;
  will-change: transform;
}
.tl-item { position: relative; padding: 0 0 54px; }
.tl-item:last-child { padding-bottom: 8px; }
.tl-item::before {
  content: ""; position: absolute; left: calc(-1 * clamp(24px, 4vw, 48px) - 5.5px); top: 10px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #27272d; border: 2px solid rgba(232, 176, 75, 0.45);
  box-shadow: 0 0 0 4px rgba(10, 10, 11, 0.9);
  transition: background .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease), transform .45s var(--ease);
}
.tl-item.is-active::before {
  background: var(--accent);
  border-color: #fff3d1;
  transform: scale(1.12);
  box-shadow: 0 0 0 5px rgba(232,176,75,.16), 0 0 16px rgba(232,176,75,.45);
}
.tl-item__year { font-family: var(--font-en); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .12em; color: var(--accent); font-size: 13px; margin-bottom: 8px; }
.tl-item__body h3 { font-size: clamp(19px, 4.6vw, 24px); font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.tl-item__tag {
  display: inline-block;
  color: var(--accent-2); font-size: 13px; font-weight: 500;
  margin: 8px 0 14px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 122, 69, 0.08);
  border: 1px solid rgba(255, 122, 69, 0.22);
}
.tl-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 14px;
}
.tl-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(232, 176, 75, 0.06);
  border: 1px solid rgba(232, 176, 75, 0.18);
  color: var(--text-dim);
  font-size: 12.5px;
}
.tl-metrics strong {
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
}
.tl-item__body p:not(.tl-item__tag) { color: var(--text-dim); max-width: 48em; line-height: 1.72; }
.tl-item__body p:not(.tl-item__tag) + p:not(.tl-item__tag) { margin-top: 10px; }
.tl-item__body p strong { color: var(--text); font-weight: 600; }

/* ---------- 联系 ---------- */
.contact { max-width: none; padding: clamp(100px, 16vh, 200px) clamp(20px, 5vw, 60px); overflow: hidden; isolation: isolate; }
.contact__bg {
  position: absolute; inset: -10% 0; z-index: 0;
  background:
    radial-gradient(50% 60% at 80% 20%, rgba(232,176,75,.18), transparent 60%),
    radial-gradient(60% 70% at 10% 90%, rgba(255,122,69,.14), transparent 60%),
    var(--bg);
  will-change: transform;
}
.contact__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.contact__title {
  font-size: clamp(24px, 6vw, 88px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  margin: 22px 0 56px;
  color: var(--text);
  white-space: nowrap;
}
.contact__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.btn-magnetic {
  display: inline-flex; align-items: center; gap: 8px; padding: 15px 34px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 15px; font-weight: 500; letter-spacing: .02em;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  will-change: transform;
}
.btn-magnetic:hover { border-color: rgba(232, 176, 75, 0.7); background: rgba(255, 255, 255, 0.06); }
.btn--solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0a0b; border-color: transparent;
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 12px 30px -10px rgba(232, 176, 75, 0.55);
}
.btn--solid:hover {
  background: linear-gradient(135deg, #f0bc59, #ff8654);
  border-color: transparent;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), 0 16px 38px -10px rgba(232, 176, 75, 0.7);
}
.contact__info {
  display: inline-flex; gap: clamp(24px, 5vw, 72px); justify-content: center; flex-wrap: wrap;
  padding: 24px 36px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.contact__info div { text-align: left; }
.contact__info span { display: block; font-family: var(--font-en); font-size: 11px; letter-spacing: .22em; color: var(--text-faint); margin-bottom: 6px; text-transform: uppercase; }
.contact__info a, .contact__info p { font-size: 16px; font-weight: 500; color: var(--text); transition: color .25s ease; }
.contact__info a:hover { color: var(--accent); }
.contact__copyable {
  user-select: text;
  -webkit-user-select: text;
  font-variant-numeric: tabular-nums;
}
.contact__copyable:hover { color: var(--accent); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px clamp(20px, 5vw, 60px); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--text-faint); font-size: 13px; }
.footer__made { font-family: var(--font-en); letter-spacing: .1em; }

/* ---------- 视频弹窗（Apple TV / QuickTime 级顺滑开合与玻璃控制条） ---------- */
.modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .36s var(--ease), visibility 0s linear .36s;
}
.modal.is-open {
  visibility: visible; opacity: 1; pointer-events: auto;
  transition: opacity .36s var(--ease), visibility 0s;
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 5, 7, 0.84);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
}
.modal__frame {
  position: relative;
  width: min(92vw, 1100px);
  background: #08080a;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 var(--specular), 0 40px 100px -20px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  transform: scale(0.955) translateY(10px);
  transition: transform .48s var(--ease);
  will-change: transform;
}
.modal.is-open .modal__frame {
  transform: scale(1) translateY(0);
}
.modal__stage {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__frame video { width: 100%; aspect-ratio: 16/9; max-height: 76vh; object-fit: contain; background: #000; }
.modal__watermark {
  position: absolute;
  top: 64px;
  right: 18px;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.24);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
@media (max-width: 640px) {
  .modal__watermark {
    top: 58px;
    right: 14px;
    font-size: 11px;
  }
}
.modal__frame, .modal__frame video, .chroma-media img, .cg-card img, .lightbox__img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.modal__title {
  position: absolute; top: 16px; left: 20px; z-index: 10;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(12, 12, 14, 0.62);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 245, 247, 0.92);
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  pointer-events: none;
  max-width: calc(100% - 100px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal__title:empty { display: none; }
.modal__close {
  position: absolute; top: 14px; right: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(18, 18, 22, 0.65);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 22px; cursor: none;
  display: grid; place-items: center;
  transition: background .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease), transform .28s var(--ease);
}
.modal__close:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); transform: scale(1.06); }
.modal__placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-dim); padding: 30px; }
.modal__placeholder code { color: var(--accent); font-family: var(--font-en); }

/* 视频控制条 */
.modal__controls {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 14px 24px 16px; background: rgba(14, 14, 17, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal__ctrl-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255,255,255,.06);
  color: var(--text); font-size: 13px; font-weight: 500; font-family: var(--font-en);
  transition: background .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease), transform .28s var(--ease);
  cursor: none;
}
.modal__ctrl-btn:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); transform: scale(1.03); }
.modal__ctrl-btn:active { transform: scale(0.96); }
.modal__ctrl-btn svg { display: block; }
.modal__time {
  font-family: var(--font-en); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--text-dim); letter-spacing: .04em; min-width: 106px; text-align: center;
}
.modal__hint {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(14,14,17,.74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12); color: rgba(245,245,247,0.75);
  font-size: 12px; font-family: var(--font-en); letter-spacing: .06em;
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
  white-space: nowrap;
}
.modal.is-open .modal__hint { opacity: 1; transition-delay: 1.2s; }
.modal__hint.is-hidden { opacity: 0; }

/* 弹窗内不再单独恢复原生光标：统一由最上层的自定义光标负责，
   这样视频播放静止隐藏时光标才会真正一起消失。 */

/* 自定义进度条 */
.modal__progress {
  position: relative;
  width: 100%;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(10,10,11,.9);
  border-top: 1px solid var(--line);
  z-index: 5;
  /* 触摸拖动进度条时不要被页面滚动抢走手势 */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.modal__progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.12);
  overflow: visible;
}
.modal__progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .05s linear;
  pointer-events: none;
}
.modal__progress.is-dragging .modal__progress-fill {
  transition: none;
}
.modal__progress-thumb {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 12px rgba(232,176,75,.5);
  transition: transform .2s var(--ease), opacity .2s;
  pointer-events: none;
  z-index: 2;
}
.modal__progress:hover .modal__progress-thumb,
.modal__progress.is-dragging .modal__progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* 播放/暂停按钮 */
.modal__play-btn {
  position: relative;
  min-width: 64px;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}
.modal__play-btn .icon-pause { display: none; }
.modal__play-btn.is-playing .icon-play { display: none; }
.modal__play-btn.is-playing .icon-pause { display: block; }
.modal__play-btn.is-speeding {
  background: var(--accent) !important;
  color: #0a0a0b !important;
  border-color: var(--accent) !important;
  animation: speedPulse .4s ease infinite alternate;
}
@keyframes speedPulse {
  from { box-shadow: 0 0 0 0 rgba(232,176,75,.4); }
  to   { box-shadow: 0 0 0 8px rgba(232,176,75,0); }
}

/* ---------- 图片画廊 ---------- */
.gallery { padding: clamp(80px, 12vh, 160px) clamp(20px, 5vw, 60px); max-width: var(--maxw); margin: 0 auto; }
.gallery__head { margin-bottom: 60px; }
.gallery__head h2 { font-size: clamp(30px, 5vw, 60px); font-weight: 700; line-height: 1.1; margin-top: 18px; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery__item {
  margin: 0; border-radius: 14px; overflow: hidden;
  cursor: pointer; position: relative;
  aspect-ratio: 4/3;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.gallery__item:nth-child(3n+1) { aspect-ratio: 3/4; }
.gallery__item:nth-child(5n+3) { aspect-ratio: 1/1; }
.gallery__item:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.gallery__thumb {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .8s var(--ease);
}
.gallery__item:hover .gallery__thumb { transform: scale(1.06); }
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.35) 100%);
  opacity: 0; transition: opacity .4s;
}
.gallery__item:hover::after { opacity: 1; }
@media (max-width: 1024px) {
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ---------- 图片灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .36s var(--ease), visibility 0s linear .36s;
}
.lightbox.is-open {
  visibility: visible; opacity: 1; pointer-events: auto;
  transition: opacity .36s var(--ease), visibility 0s;
}
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 5, 7, 0.9);
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
}
.lightbox__close {
  position: absolute; top: 20px; right: 24px; z-index: 10;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(20,20,24,.68);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; font-size: 24px; cursor: none;
  display: grid; place-items: center;
  transition: background .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease), transform .28s var(--ease);
}
.lightbox__close:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); transform: scale(1.06); }
.lightbox__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(20,20,24,.68);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; display: grid; place-items: center;
  cursor: none; transition: background .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease), transform .28s var(--ease), opacity .28s ease;
}
.lightbox__arrow:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); transform: translateY(-50%) scale(1.06); }
.lightbox__arrow:active { transform: translateY(-50%) scale(0.94); }
.lightbox__arrow--prev { left: 24px; }
.lightbox__arrow--next { right: 24px; }
.lightbox__arrow.is-hidden { opacity: 0; pointer-events: none; }
.lightbox__stage {
  position: relative; z-index: 2;
  max-width: min(88vw, 1200px);
  max-height: 88vh;
  display: flex; flex-direction: column; align-items: center;
  transform: scale(0.96);
  transition: transform .48s var(--ease);
}
.lightbox.is-open .lightbox__stage {
  transform: scale(1);
}
.lightbox__stage img {
  max-width: 100%; max-height: 82vh;
  object-fit: contain; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 96px rgba(0,0,0,.75);
  transition: opacity .24s ease;
}
.lightbox__counter {
  margin-top: 16px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(22, 22, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-en); font-variant-numeric: tabular-nums;
  font-size: 13px; letter-spacing: .12em; color: var(--text-dim);
}
@media (max-width: 640px) {
  .lightbox__arrow { width: 42px; height: 42px; }
  .lightbox__arrow--prev { left: 10px; }
  .lightbox__arrow--next { right: 10px; }
}

/* ---------- 画廊容器（Apple 深色玻璃展示框） ---------- */
.gallery-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 400px;
  background: linear-gradient(180deg, rgba(255,255,255,0.032) 0%, rgba(255,255,255,0.012) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 28px 64px -32px rgba(0,0,0,0.75);
}
@media (max-width: 640px) {
  .gallery-wrap {
    padding: 10px;
    border-radius: 20px;
  }
}

/* 如果 JS 初始化失败，显示后备网格 */
.gallery-wrap .cg-track:empty::before {
  content: '加载中...';
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-dim);
  font-family: var(--font-en);
  letter-spacing: .1em;
}

/* 画廊卡片兜底：万一 JS 未执行 */
.cg-card {
  position: absolute;
  width: var(--card-w, 280px);
  height: var(--card-h, 360px);
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hero__title .mask__inner, .preloader__name .line span { transform: none !important; }
}
