/* ============================================================
   苹果风格设计语言：米白色系 / 大字排版 / 毛玻璃 / 流畅动效
   ============================================================ */

/* MiSans（小米开源可商用字体，本地托管） */
@font-face {
  font-family: "MiSans";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/MiSans-Normal.ttf") format("truetype");
}
@font-face {
  font-family: "MiSans";
  font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("../assets/fonts/MiSans-Semibold.ttf") format("truetype");
}

:root {
  --bg: #f6f2e9;
  --bg-soft: #efeadd;
  --card: #fffdf7;
  --text: #1d1d1f;
  --text-dim: #6b6b70;
  --line: rgba(0, 0, 0, .09);
  --accent: #0071e3;
  --accent-2: #a259ff;
  --radius: 22px;
  --ease: cubic-bezier(.28, .11, .32, 1);
  --shadow-soft: 0 2px 6px rgba(76, 64, 40, .05), 0 18px 44px rgba(76, 64, 40, .10);
  --shadow-lift: 0 6px 16px rgba(76, 64, 40, .07), 0 32px 72px rgba(76, 64, 40, .17);
  --font: "MiSans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC",
          "PingFang SC", "Helvetica Neue", "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 导航：液态玻璃（完全玻璃透明，iOS 最新风格） ---------- */
#nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(246, 242, 233, .10);
  backdrop-filter: blur(34px) saturate(2);
  -webkit-backdrop-filter: blur(34px) saturate(2);
  border-bottom: 1px solid rgba(255, 255, 255, .30);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .02);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
#nav.scrolled {
  background: rgba(246, 242, 233, .22);
  border-bottom-color: rgba(255, 255, 255, .42);
  box-shadow: 0 10px 34px rgba(76, 64, 40, .08), inset 0 -1px 0 rgba(0, 0, 0, .03);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; height: 56px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 13.5px; }
.nav-links a { color: var(--text-dim); transition: color .3s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { /* 与其余导航链接一致的纯文字样式，无按钮感 */ }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 120px 24px 80px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
/* 底部消散渐变：光晕在到达首屏边缘前化入背景色，杜绝硬边界 */
.hero-bg::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%;
  background: linear-gradient(180deg, rgba(246, 242, 233, 0), var(--bg) 88%);
}
.hero-glow {
  position: absolute; width: 72vmax; height: 72vmax; border-radius: 50%;
  opacity: .55; will-change: transform;
}
.glow-a {
  background: radial-gradient(circle, rgba(188, 216, 255, .85) 0%, rgba(188, 216, 255, .38) 42%, rgba(188, 216, 255, 0) 70%);
  top: -32vmax; left: -22vmax; animation: driftA 9s ease-in-out infinite;
}
.glow-b {
  background: radial-gradient(circle, rgba(255, 201, 214, .8) 0%, rgba(255, 201, 214, .34) 42%, rgba(255, 201, 214, 0) 70%);
  bottom: -36vmax; right: -24vmax; animation: driftB 12s ease-in-out infinite;
}
@keyframes driftA {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(7vmax, 4.5vmax) scale(1.12); }
  66%  { transform: translate(2vmax, 9vmax) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes driftB {
  0%   { transform: translate(0, 0) scale(1.06); }
  50%  { transform: translate(-8vmax, -5.5vmax) scale(1.16); }
  100% { transform: translate(0, 0) scale(1.06); }
}

/* 毛玻璃文字层：半透明玻璃悬浮在浮动光晕之上 */
.hero-content {
  position: relative; max-width: 980px; will-change: transform, opacity;
  padding: 74px 64px;
  background: rgba(255, 253, 247, .36);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 34px;
  box-shadow: 0 30px 90px rgba(101, 88, 64, .16), inset 0 1px 0 rgba(255, 255, 255, .65);
}
.hero-eyebrow { font-size: 17px; color: var(--text-dim); letter-spacing: .12em; margin-bottom: 22px; }
.hero-title {
  font-size: calc(clamp(44px, 8.5vw, 96px) * var(--title-scale, 1));
  font-weight: 700; letter-spacing: -.03em; line-height: 1.08;
}
.hero-sub { margin: 26px auto 0; max-width: 560px; font-size: clamp(16px, 2vw, 21px); color: var(--text-dim); line-height: 1.6; }
.grad {
  background: linear-gradient(92deg, #0071e3 0%, #a259ff 55%, #ff5e8a 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-actions { margin-top: 44px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; font-size: 16px; padding: 14px 30px; border-radius: 980px;
  transition: transform .35s var(--ease), background .3s, box-shadow .35s var(--ease);
}
.btn:hover { transform: scale(1.05); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 30px rgba(10, 132, 255, .3); }
.btn-primary:hover { background: #0a84ff; box-shadow: 0 12px 40px rgba(10, 132, 255, .42); }
.btn-ghost { color: var(--accent); border: 1px solid rgba(0, 113, 227, .45); }
.btn-ghost:hover { background: rgba(0, 113, 227, .08); }

.hero-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-dim); letter-spacing: .2em;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-hint span { width: 1px; height: 44px; background: linear-gradient(var(--text-dim), transparent); animation: hint 2s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 区块通用 ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: var(--section-gap, 130px) 24px 30px; }
.section-head { margin-bottom: 56px; }
.section-eyebrow { font-size: 14px; color: var(--accent); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: calc(clamp(34px, 5vw, 56px) * var(--title-scale, 1)); font-weight: 700; letter-spacing: -.025em; }
.section-sub { margin-top: 14px; font-size: 17px; color: var(--text-dim); max-width: 620px; line-height: 1.65; }

/* ---------- 视频卡片 ---------- */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.video-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid rgba(0, 0, 0, .05);
  box-shadow: var(--shadow-soft);
  cursor: pointer; transform: translateZ(0);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.video-card:nth-child(odd):last-child { grid-column: 1 / -1; }
.video-card:hover { transform: scale(1.02); box-shadow: var(--shadow-lift); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .68));
}
.video-badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-size: 12px; padding: 5px 12px; border-radius: 980px;
  background: rgba(255, 255, 255, .55); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .6); color: #2b2b2e;
}
.video-duration {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  font-size: 12px; padding: 5px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(12px); color: #f2f2f5;
}
.video-play {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .5);
  transition: transform .45s var(--ease), background .3s;
}
.video-card:hover .video-play { transform: scale(1.14); background: rgba(255, 255, 255, .42); }
.video-play svg { margin-left: 3px; width: 20px; height: 20px; }
.video-meta { position: absolute; left: 24px; right: 24px; bottom: 20px; z-index: 2; }
.video-meta h3 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.video-meta p { margin-top: 5px; font-size: 14px; color: rgba(255, 255, 255, .82); }
.video-hd {
  display: inline-block; margin-left: 8px; font-size: 11px; vertical-align: 2px;
  padding: 2px 7px; border-radius: 6px; background: rgba(10, 132, 255, .3);
  color: #cfe6ff; border: 1px solid rgba(120, 190, 255, .55);
}

/* ---------- 摄影：三列瀑布流（最初版排版） ---------- */
.photo-grid { columns: 3; column-gap: 20px; }
.photo-item {
  position: relative; margin-bottom: 20px; border-radius: 18px; overflow: hidden;
  break-inside: avoid; cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .5s var(--ease);
}
.photo-item:hover { box-shadow: var(--shadow-lift); }
.photo-item img { width: 100%; transition: transform .7s var(--ease); }
.photo-item:hover img { transform: scale(1.05); }
.photo-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 14px;
  font-size: 13px; color: #f5f5f7;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.photo-item:hover figcaption { opacity: 1; transform: none; }

/* ---------- 简历 ---------- */
.resume-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 70px; align-items: start; }
.resume-intro { position: sticky; top: 110px; }
.portrait {
  margin-bottom: 30px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; transition: transform 1.2s var(--ease); }
.portrait:hover img { transform: scale(1.04); }
.resume-intro h3 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.resume-intro > p { margin-top: 16px; font-size: 16px; line-height: 1.8; color: var(--text-dim); }
.resume-stats { list-style: none; margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.resume-stats li {
  padding: 20px 22px;
  background: var(--card); border: 1px solid rgba(0, 0, 0, .05); border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.resume-stats li:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.resume-stats b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.resume-stats b i { font-style: normal; color: var(--accent); }
.resume-stats span { font-size: 13px; color: var(--text-dim); }

.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item {
  position: relative; margin-bottom: 22px; padding: 24px 26px;
  background: var(--card); border: 1px solid rgba(0, 0, 0, .05); border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tl-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px rgba(10, 132, 255, .14);
}
.tl-date { font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.tl-item h4 { margin-top: 8px; font-size: 20px; font-weight: 600; }
.tl-item em { display: block; margin-top: 3px; font-style: normal; font-size: 14px; color: var(--text-dim); }
.tl-item p { margin-top: 10px; font-size: 15px; line-height: 1.75; color: #4a4a4f; }
.tl-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tl-tags span {
  font-size: 12px; padding: 5px 12px; border-radius: 980px;
  background: var(--card); border: 1px solid var(--line); color: var(--text-dim);
}

/* ---------- 联系 ---------- */
.section-contact { text-align: center; padding-bottom: 110px; }
.contact-title { font-size: calc(clamp(36px, 6vw, 64px) * var(--title-scale, 1)); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.contact-links { margin-top: 44px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; padding: 13px 26px; border-radius: 980px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(101, 88, 64, .08);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease);
}
.contact-links a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-soft); }
.contact-icon {
  width: 21px; height: 21px; color: #1d1d1f; flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(76, 64, 40, .35));
}
.contact-links a.copied { border-color: var(--accent); color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 30px 24px; text-align: center; font-size: 13px; color: var(--text-dim); }

/* ---------- 影院模式（保持深色，观影体验） ---------- */
.theater { position: fixed; inset: 0; z-index: 200; display: none; }
.theater.open { display: block; }
.theater-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .94); backdrop-filter: blur(30px); animation: fade .35s var(--ease); }
.theater-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.theater-stage video { max-width: 100vw; max-height: 100svh; width: 100%; height: 100%; object-fit: contain; animation: zoomIn .45s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } }

.theater-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 26px calc(20px + env(safe-area-inset-bottom)); opacity: 1; transition: opacity .4s; pointer-events: none; }
.theater-ui.hidden { opacity: 0; }
.theater-top, .theater-bottom { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.theater-top { justify-content: space-between;
  background: linear-gradient(rgba(0,0,0,.55), transparent); margin: -20px -26px 0; padding: 20px 26px 30px; }
.theater-titles h3 { font-size: 19px; font-weight: 600; color: #fff; }
.theater-titles p { font-size: 13px; color: #b9b9bf; margin-top: 3px; }
.theater-bottom {
  background: rgba(18, 18, 22, .55); backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 10px 16px;
}
.t-btn {
  background: none; border: none; color: #fff; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: background .3s, transform .3s var(--ease);
}
.t-btn:hover { background: rgba(255, 255, 255, .12); transform: scale(1.06); }
.t-progress { flex: 1; height: 22px; position: relative; display: flex; align-items: center; cursor: pointer; }
.t-progress::after { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.t-progress-bar { position: absolute; left: 0; height: 4px; width: 0; border-radius: 4px; background: #fff; z-index: 1; }
.t-progress-bar::after { content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .2s; }
.t-progress:hover .t-progress-bar::after { opacity: 1; }
.t-time { font-size: 12.5px; color: #d7d7db; font-variant-numeric: tabular-nums; white-space: nowrap; }

.t-quality { position: relative; }
.t-quality-btn { width: auto; padding: 0 14px; border-radius: 980px; font-size: 13px; border: 1px solid rgba(255,255,255,.25); }
.t-quality-menu {
  position: absolute; bottom: 48px; right: 0; min-width: 128px;
  background: rgba(22, 22, 26, .85); backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 6px;
  display: none; flex-direction: column;
}
.t-quality-menu.open { display: flex; animation: fade .2s var(--ease); }
.t-quality-menu button {
  background: none; border: none; color: #d7d7db; text-align: left;
  padding: 9px 12px; border-radius: 9px; font-size: 13px; cursor: pointer;
  transition: background .2s, color .2s;
}
.t-quality-menu button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.t-quality-menu button.active { color: #58a6ff; font-weight: 600; }

/* ---------- 灯箱（保持深色） ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .92); backdrop-filter: blur(25px); animation: fade .3s var(--ease); }
.lightbox img { position: relative; max-width: 92vw; max-height: 88svh; border-radius: 12px; animation: zoomIn .4s var(--ease); }
.lightbox-close { position: absolute; top: 22px; right: 26px; font-size: 16px; background: rgba(255,255,255,.08); }

/* ---------- 入场动效 ---------- */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .video-grid { grid-template-columns: 1fr; }
  .photo-grid { columns: 2; }
  .hero-content { padding: 60px 40px; }
  .resume-wrap { grid-template-columns: 1fr; gap: 44px; }
  .resume-intro { position: static; }
  .nav-links { gap: 20px; font-size: 12.5px; }
}
@media (max-width: 560px) {
  .photo-grid { columns: 1; }
  .hero { padding: 100px 16px 70px; }
  .hero-content { padding: 44px 24px; border-radius: 26px; }
  .section { padding-top: 96px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .theater-bottom { flex-wrap: wrap; }
  .t-time { display: none; }
}

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