:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1a1a1a;
  --text-soft: #666;
  --border: #e7ebf0;
  --accent: #2f7fe0;
  --accent-2: #6bb3f0;
  --accent-soft: #eaf3fd;
  --card: #ffffff;
  --shadow: 0 10px 34px rgba(31,84,153,.12);
}
:root[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-alt: #11151d;
  --text: #e8ecf2;
  --text-soft: #8a95a5;
  --border: #1e2532;
  --accent: #5aa2ff;
  --accent-2: #86c1ff;
  --accent-soft: #10203a;
  --card: #11151d;
  --shadow: 0 10px 34px rgba(0,0,0,.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 6vw;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 800; font-size: 1.3rem; letter-spacing: 2px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { position: relative; color: var(--text-soft); font-size: .95rem; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0; border-radius: 2px; background: var(--accent); transition: width .3s cubic-bezier(.2,.7,.2,1); }
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.theme-btn {
  background: none; border: 1px solid var(--border); cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1rem;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .2s, background .2s;
}
.theme-btn:hover { transform: rotate(35deg); border-color: var(--accent); background: var(--accent-soft); }
.theme-btn:active { transform: rotate(35deg) scale(.9); }

/* 首屏 */
.hero {
  min-height: 88vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 6vw; position: relative;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent);
}
.hero-hi { color: var(--text-soft); font-size: 1.1rem; margin-bottom: 10px; }
.hero-name { font-size: clamp(2.4rem, 7vw, 4.5rem); font-weight: 800; letter-spacing: -1px; }
.hero-name span { color: var(--accent); font-weight: 400; font-size: .5em; }
.hero-tagline { color: var(--text-soft); font-size: 1.15rem; margin: 18px 0 34px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-scroll { position: absolute; bottom: 26px; color: var(--text-soft); font-size: .85rem; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; font-size: .98rem; font-weight: 600; transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, background .25s ease; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn-primary:hover { box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 48%, transparent); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 全站动画层 ===== */
/* 首屏依次入场 */
.hero-inner > * { opacity: 0; animation: heroUp .9s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-inner > *:nth-child(1) { animation-delay: .10s; }
.hero-inner > *:nth-child(2) { animation-delay: .22s; }
.hero-inner > *:nth-child(3) { animation-delay: .34s; }
.hero-inner > *:nth-child(4) { animation-delay: .46s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-scroll { animation: bob 1.8s ease-in-out infinite, fadeIn 1s ease .9s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 滚动揭示 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .85s cubic-bezier(.2,.7,.2,1), transform .85s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .10s; }
.reveal.d2 { transition-delay: .20s; }
.reveal.d3 { transition-delay: .30s; }

/* 通用区块 */
.section { max-width: 960px; margin: 0 auto; padding: 90px 6vw; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt .section-title, .section-alt .section-sub, .section-alt .photo-preview, .section-alt .center { max-width: 960px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.section-title::after { content: ""; display: block; width: 44px; height: 4px; background: var(--accent); border-radius: 2px; margin-top: 12px; }
.section-sub { color: var(--text-soft); margin-bottom: 30px; }
.center { text-align: center; margin-top: 34px; }

/* 关于 */
.about { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.about-avatar { flex-shrink: 0; }
.avatar-placeholder {
  width: 160px; height: 160px; border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; box-shadow: var(--shadow);
}
.about-text { flex: 1; min-width: 260px; }
.about-text p { margin-bottom: 14px; color: var(--text-soft); }
.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tag { padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 600; transition: transform .25s cubic-bezier(.2,.7,.2,1), background .2s; cursor: default; }
.tag:hover { transform: translateY(-3px); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.car-track { transition: transform .7s cubic-bezier(.16,.84,.28,1); }
.car-btn { transition: background .25s ease, transform .25s cubic-bezier(.2,.7,.2,1); }
.car-btn:active { transform: translateY(-50%) scale(.88); }

/* 摄影预览 */
/* 首页摄影轮播 */
.carousel { position: relative; max-width: 720px; margin: 0 auto; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.car-track { display: flex; transition: transform .6s cubic-bezier(.4,.0,.2,1); }
.car-slide { position: relative; flex: 0 0 100%; height: clamp(340px, 52vw, 500px); overflow: hidden; display: block; }
.car-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(28px) brightness(.7) saturate(1.35); transform: scale(1.2); }
.car-slide img { position: relative; height: 100%; max-width: 100%; margin: 0 auto; display: block; object-fit: contain; z-index: 1; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.car-slide:hover img { transform: scale(1.04); }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.22); backdrop-filter: blur(8px); color: #fff;
  font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.car-btn:hover { background: rgba(255,255,255,.4); }
.car-prev { left: 14px; }
.car-next { right: 14px; }
.car-dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.car-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: rgba(255,255,255,.5); transition: all .2s; }
.car-dots button.active { background: #fff; width: 22px; border-radius: 5px; }

/* 联系 */
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-item { padding: 14px 24px; border: 1px solid var(--border); border-radius: 14px; font-weight: 600; transition: border-color .2s, transform .15s, background .2s; }
.contact-item:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* 页脚 */
.footer { text-align: center; padding: 40px 6vw; color: var(--text-soft); font-size: .9rem; border-top: 1px solid var(--border); }

/* ============ 摄影页 · 沉浸式玻璃画廊 ============ */
.photo-page {
  color: #eef2f8;
  overflow: hidden;              /* 由 .stage 滚动 */
  background: #0c1424;           /* 深底，被每张照片的色调光覆盖 */
}
.stage, .back-fab, .counter { position: relative; z-index: 2; }

/* 每张照片的色调氛围光：同图放大虚化，铺满整屏 */
.glow {
  position: absolute; inset: -12%; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(90px) saturate(1.8) brightness(.9);
  transform: scale(1.05);
  opacity: 0; transition: opacity 1.4s ease, transform 6s ease;
  pointer-events: none;
}
.frame.in .glow { opacity: .9; transform: scale(1.18); }

/* 磨砂玻璃 */
.glass {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 30px 70px rgba(10,20,45,.45),
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -1px 0 rgba(255,255,255,.06);
  border-radius: 22px;
}

/* 悬浮返回 & 计数 */
.back-fab {
  position: fixed; top: 26px; left: 30px; z-index: 30;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(12,16,24,.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  color: #dfe6ef; font-size: .9rem; transition: all .2s;
}
.back-fab:hover { background: rgba(20,28,42,.8); color: #fff; transform: translateX(-2px); }
.counter {
  position: fixed; top: 30px; right: 34px; z-index: 30;
  font-size: .95rem; letter-spacing: 2px; color: #aeb9c8;
  font-variant-numeric: tabular-nums;
}
.counter #cur { color: #fff; font-weight: 700; }

/* 滚动吸附容器 */
.stage {
  height: 100vh; overflow-y: scroll;
  scroll-snap-type: y mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.stage::-webkit-scrollbar { display: none; }

/* 每一屏 */
.frame {
  height: 100vh; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
  position: relative; padding: 6vh 6vw; overflow: hidden;
}
/* 玻璃相框 */
.frame .glass {
  position: relative; z-index: 1;
  padding: 16px; line-height: 0; border-radius: 20px;
  opacity: 0; transform: scale(.94) translateY(26px); filter: blur(10px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(.16,.84,.28,1), filter 1s ease;
}
.frame.in .glass { opacity: 1; transform: none; filter: blur(0); }
.frame img {
  max-height: 78vh; max-width: 84vw; object-fit: contain;
  border-radius: 8px; display: block; cursor: zoom-in;
}
.frame-meta {
  position: absolute; left: 6vw; bottom: 5vh; z-index: 1;
  color: #cdd6e2; font-size: .85rem; letter-spacing: 3px;
  opacity: 0; transition: opacity 1s ease .2s;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.frame.in .frame-meta { opacity: .95; }
.frame-meta b { color: #fff; font-weight: 700; margin-right: 6px; }

/* 首屏标题页 */
.frame.intro .intro-card { padding: 60px 70px; text-align: center; line-height: 1.5; }
.intro h1 { font-size: clamp(2.2rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: 4px; color: #fff; }
.intro .sub { color: #d3dbe6; margin-top: 16px; font-size: 1.02rem; letter-spacing: 1px; }
.intro .line { width: 1px; height: 56px; margin: 30px auto 0; background: linear-gradient(#bcd4ff, transparent); }
.intro .hint { margin-top: 14px; color: #aeb9c8; font-size: .85rem; animation: bob 1.8s ease-in-out infinite; }

/* 点击放大（真·全屏原图） */
.lightbox { position: fixed; inset: 0; background: rgba(12,20,40,.72); backdrop-filter: blur(30px) saturate(140%); -webkit-backdrop-filter: blur(30px) saturate(140%); display: none; align-items: center; justify-content: center; z-index: 100; padding: 3vw; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lb-close { position: absolute; top: 20px; right: 30px; font-size: 2.6rem; color: #fff; cursor: pointer; line-height: 1; }
.lb-content { text-align: center; }
.lb-content img { max-width: 94vw; max-height: 90vh; border-radius: 4px; }
.lb-cap { color: #ccc; margin-top: 12px; letter-spacing: 2px; font-size: .85rem; }
.lightbox.open { display: flex; animation: lbFade .35s ease; }
.lightbox.open img { animation: lbZoom .5s cubic-bezier(.16,.84,.28,1); }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* 尊重"减少动态"系统偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-inner > * { opacity: 1 !important; }
  .frame .glass { opacity: 1 !important; transform: none !important; filter: none !important; }
  .frame .glow { opacity: .9 !important; }
  .frame-meta { opacity: .95 !important; }
}

@media (max-width: 720px) {
  .photo-preview { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .nav { padding: 14px 5vw; }
  .nav-links { gap: 16px; }
  .back-fab { top: 16px; left: 16px; padding: 8px 14px; font-size: .82rem; }
  .counter { top: 20px; right: 18px; font-size: .82rem; }
  .frame { padding: 4vh 4vw; }
  .frame img { max-height: 78vh; max-width: 92vw; }
  .frame-meta { left: 5vw; bottom: 4vh; }
}
