/* ============================================================
   Scene Scroll Portfolio · 设计系统
   暗色电影底色 + 玻璃拟态 + 占位动画背景
   ============================================================ */

:root {
  --bg: #070a10;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.66);
  --faint: rgba(255, 255, 255, 0.18);
  --panel: rgba(10, 16, 26, 0.42);
  --panel-strong: rgba(8, 13, 22, 0.6);
  --stroke: rgba(125, 211, 252, 0.2);
  --stroke-hover: rgba(56, 189, 248, 0.55);
  --accent: #38bdf8;
  --accent-deep: #2563eb;
  --ease-cinema: cubic-bezier(0.7, 0, 0.16, 1);
  --scene-ms: 900ms;
  --app-height: 100vh;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }

img { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- 背景舞台与占位动画 ----------------
 * 性能说明：
 * - 光斑用 radial-gradient 自带透明衰减，不用 filter:blur（大面积模糊是卡顿主因）
 * - 噪点层为静态，不做动画（全屏动画重绘代价极高）
 * - 转场期间 body.is-transitioning 临时关闭玻璃面板的 backdrop-filter，
 *   避免 400vw 轨道每帧移动时 backdrop 逐帧重算
 */

.site-shell {
  position: relative;
  width: 100vw;
  height: var(--app-height);
  overflow: hidden;
  isolation: isolate;
}

.stage { position: absolute; inset: 0; z-index: -1; }

.bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease;
}

.bg-layer.is-active { opacity: 1; }

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Kali 风格深色底：每个场景一种蓝色系基调，由 canvas 特效层叠加动态元素 */
.bg-scene1 { background: #060a13; }
.bg-scene2 { background: #070b15; }
.bg-scene3 { background: #050a10; }
.bg-scene4 { background: #060b14; }

/* 蜂窝六边形网格：静态纹理，透明度极低不干扰阅读 */
.hexgrid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60'%3E%3Cg fill='none' stroke='rgba(86,180,255,0.07)' stroke-width='1'%3E%3Cpath d='M17.32 0L34.64 10V30L17.32 40L0 30V10Z'/%3E%3Cpath d='M0 30L17.32 40V60L0 70L-17.32 60V40Z'/%3E%3Cpath d='M34.64 30L51.96 40V60L34.64 70L17.32 60V40Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 34.64px 60px;
  mask-image: radial-gradient(circle at 50% 42%, rgba(0,0,0,.9), rgba(0,0,0,.35) 62%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, rgba(0,0,0,.9), rgba(0,0,0,.35) 62%, transparent 100%);
}

.cinema-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 42%, rgba(0, 0, 0, 0.34) 78%, rgba(0, 0, 0, 0.72) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Kali 风格特效层 ---------------- */

/* 背景特效画布（粒子 + 代码雨，由 js/bg-effects.js 驱动） */
#bgCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 静态细扫描线：极低透明度，不干扰阅读 */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(125, 211, 252, 0.025) 0 1px,
    transparent 1px 4px
  );
}

/* 循环下扫的高亮扫描光束 */
.scan-sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: -12%;
  height: 12%;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(56, 189, 248, 0.05) 55%,
    rgba(125, 211, 252, 0.12) 92%,
    transparent
  );
  animation: scan-move 9s linear infinite;
}

@keyframes scan-move {
  0% { transform: translateY(0); }
  100% { transform: translateY(960vh); }
}

@media (prefers-reduced-motion: reduce) {
  .scan-sweep { animation: none; opacity: 0.4; }
}

/* 转场期间临时关闭高开销特效：backdrop-filter 逐帧重算是滑动卡顿元凶 */
body.is-transitioning .glass-panel,
body.is-transitioning .project-card,
body.is-transitioning .mobile-scene-btn,
body.is-transitioning .feedback-panel {
  backdrop-filter: none;
}

body.is-transitioning .scan-sweep,
body.is-transitioning .scroll-hint-arrow {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .scan-sweep { animation: none; opacity: 0.4; }
}

/* ---------------- 顶栏与导航 ---------------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.scene-nav { display: flex; gap: 14px; }

.nav-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 240ms ease, transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.nav-dot:hover { border-color: var(--stroke-hover); transform: scale(1.2); }

.nav-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
}

/* ---------------- 移动端场景按钮 ---------------- */

.mobile-scene-controls {
  position: absolute;
  right: 18px;
  bottom: 76px;
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.mobile-scene-btn {
  padding: 10px 18px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(14px);
  cursor: pointer;
}

/* ---------------- 内容轨道 ---------------- */

.content-track {
  display: flex;
  width: 400vw;
  height: 100%;
  transition: transform var(--scene-ms) var(--ease-cinema);
  will-change: transform;
}

.page {
  position: relative;
  flex: 0 0 100vw;
  height: 100%;
  padding: 110px 64px 90px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.small-label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- Scene 1 · 首页 ---------------- */

.page-home {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 48px;
}

.hero-line {
  display: block;
  font-size: clamp(40px, 6.4vw, 84px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
  animation: rise-in 900ms var(--ease-cinema) both;
}

.hero-line-offset { animation-delay: 140ms; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 44px;
  animation: rise-in 900ms var(--ease-cinema) 280ms both;
}

.primary-btn {
  padding: 14px 30px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
  font-size: 15px;
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 240ms ease, background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--stroke-hover);
  box-shadow: 0 10px 34px rgba(14, 165, 233, 0.22);
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.scroll-hint-arrow {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--muted), transparent);
  animation: hint-drop 1.8s ease-in-out infinite;
}

@keyframes hint-drop {
  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; }
}

/* ---------------- 玻璃面板 ---------------- */

.glass-panel {
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(125, 211, 252, 0.14),
    0 24px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(22px) saturate(1.15);
}

.profile-card { padding: 30px 32px; }

.profile-name { margin: 0 0 10px; font-size: 30px; font-weight: 500; }

.profile-motto { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }

.profile-meta { margin: 0; display: grid; gap: 12px; }

.profile-meta div { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.profile-meta dt { color: var(--muted); font-size: 13px; }

.profile-meta dd { margin: 0; font-size: 13px; }

/* ---------------- Scene 2 · 项目作品 ---------------- */

.page-work { display: flex; flex-direction: column; justify-content: center; }

.work-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2.1fr);
  gap: 56px;
  align-items: center;
}

.section-header h2 { margin: 0 0 12px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 500; }

.section-subtitle { margin: 0; color: var(--muted); }

.project-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 280ms var(--ease-cinema), border-color 280ms ease, box-shadow 280ms ease;
  text-align: left;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--stroke-hover);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.project-image-wrap {
  aspect-ratio: 16 / 8;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cover-a, #22344c), var(--cover-b, #101a26));
}

.project-card-image { width: 100%; height: 100%; object-fit: cover; }

.project-cover-fallback { font-size: 26px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.72); }

.project-card-info { padding: 16px 18px 18px; }

.project-card-title { margin: 0 0 6px; font-size: 16px; font-weight: 500; }

.project-card-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* 项目详情弹窗 */

.project-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; }

.project-modal[hidden] { display: none; }

.project-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.78); }

.project-modal-card {
  position: relative;
  width: min(960px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 0;
  background: var(--panel-strong);
  animation: modal-in 360ms var(--ease-cinema) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(26px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: rgba(10, 12, 18, 0.6);
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease;
}

.modal-close-btn:hover { transform: rotate(90deg); border-color: var(--stroke-hover); }

/* 媒体区用固定高度而非 aspect-ratio：防止大图固有高度把容器撑开、把内容顶出滚动条 */
.project-modal-media {
  height: clamp(200px, 38vh, 420px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--cover-a, #22344c), var(--cover-b, #101a26));
  display: grid;
  place-items: center;
}

.project-modal-media .project-card-image,
.project-modal-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
}

.project-modal-content { padding: 18px 28px 20px; }

.project-modal-kicker { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.22em; color: var(--accent); }

.project-modal-title { margin: 0 0 6px; font-size: 23px; font-weight: 500; }

.project-modal-summary { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.project-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }

.project-modal-grid h4 { margin: 0 0 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; color: var(--muted); }

.project-modal-grid p, .project-modal-grid ul { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text); }

.project-modal-grid ul { padding-left: 16px; }

.tech-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tech-tag {
  padding: 3px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}

.project-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-status { font-size: 12px; letter-spacing: 0.1em; color: var(--accent); }

.project-modal-actions { display: flex; gap: 10px; }

.modal-cta {
  padding: 10px 20px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease;
}

.modal-cta:hover { background: rgba(56, 189, 248, 0.16); border-color: var(--stroke-hover); }

/* ---------------- Scene 3 · 3D 相册 ---------------- */

.page-gallery { padding-left: 0; padding-right: 0; }

.gallery-stage {
  position: relative;
  height: 100%;
  perspective: 1200px;
  overflow: hidden;
}

.gallery-head {
  position: absolute;
  top: 96px;
  left: 64px;
  z-index: 5;
  pointer-events: none;
}

.gallery-title { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 500; }

.gallery-hint {
  position: absolute;
  bottom: 96px;
  left: 64px;
  z-index: 5;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--faint);
  pointer-events: none;
}

.photo-column {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(200px, 22vw, 300px);
  overflow: visible;
}

.photo-column-left { left: 16vw; }

.photo-column-right { right: 16vw; }

.photo-track-strip { will-change: transform; }

.photo-card {
  position: relative;
  height: 250px;
  margin-bottom: 30px;
  border-radius: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: box-shadow 260ms ease;
  cursor: pointer;
}

.photo-card.is-hovered { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }

.photo-image { width: 100%; height: 100%; object-fit: cover; }

.photo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--ph-a, #23384e), var(--ph-b, #101a24));
}

.photo-fallback span { font-size: 22px; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.4); }

.shine-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.18), transparent 42%);
  opacity: 0;
  transition: opacity 240ms ease;
}

.photo-card.is-hovered .shine-overlay { opacity: 1; }

.photo-info-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  transform: translateZ(40px);
}

.photo-title { font-size: 15px; font-weight: 500; }

.photo-date { margin-top: 3px; font-size: 12px; color: var(--muted); }

/* 轮播遮罩 */

.carousel-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(8px);
}

/* 用 .is-open 类控制显隐，彻底摆脱 hidden 属性被 display 覆盖的问题 */
.carousel-overlay.is-open {
  display: grid;
  animation: fade-in 260ms ease both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.carousel-figure {
  position: relative;
  width: min(860px, calc(100vw - 120px));
  animation: modal-in 340ms var(--ease-cinema) both;
}

.carousel-media {
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--ph-a, #23384e), var(--ph-b, #101a24));
}

.carousel-media img { width: 100%; height: 100%; object-fit: cover; }

.carousel-caption { margin-top: 16px; text-align: center; }

.carousel-caption h3 { margin: 0 0 6px; font-size: 20px; font-weight: 500; }

.carousel-caption p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.carousel-caption time { font-size: 12px; color: var(--faint); letter-spacing: 0.14em; }

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: rgba(10, 12, 18, 0.6);
  cursor: pointer;
  transition: border-color 220ms ease;
}

.carousel-nav:hover { border-color: rgba(255, 255, 255, 0.4); }

.carousel-nav-prev { left: -70px; }
.carousel-nav-next { right: -70px; }

.carousel-close { position: absolute; top: -54px; right: 0; padding: 8px 18px; border: 1px solid var(--stroke); border-radius: 999px; background: rgba(10, 12, 18, 0.6); font-size: 13px; cursor: pointer; }

/* ---------------- Scene 4 · 联系页 ---------------- */

.page-contact { display: flex; align-items: center; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.9fr);
  gap: 60px;
  align-items: center;
  width: 100%;
}

.contact-title .contact-line { display: block; font-size: clamp(38px, 5.4vw, 72px); font-weight: 500; line-height: 1.16; }

.contact-lead { margin: 18px 0 30px; max-width: 480px; color: var(--muted); line-height: 1.8; }

.contact-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.contact-card { padding: 20px; transition: transform 260ms var(--ease-cinema), border-color 260ms ease; }

.contact-card:hover { transform: translateY(-4px); border-color: var(--stroke-hover); }

.contact-card strong { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 500; word-break: break-all; }

.contact-card p { margin: 0; font-size: 12px; color: var(--faint); }

.contact-reveal { animation: rise-in 760ms var(--ease-cinema) var(--reveal-delay, 0ms) both; }

.feedback-panel { padding: 28px; }

.panel-heading h2 { margin: 0; font-size: 22px; font-weight: 500; }

.feedback-panel label { display: block; margin-top: 16px; }

.feedback-panel label span { display: block; margin-bottom: 7px; font-size: 12px; color: var(--muted); }

.feedback-panel input,
.feedback-panel textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 220ms ease, background 220ms ease;
}

.feedback-panel input:focus,
.feedback-panel textarea:focus { outline: none; border-color: rgba(56, 189, 248, 0.6); background: rgba(56, 189, 248, 0.06); }

.feedback-submit {
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(14, 90, 160, 0.45));
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.feedback-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(14, 120, 210, 0.3); }

.feedback-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

.feedback-toast { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: var(--accent); text-align: center; }

.feedback-toast.is-error { color: #f09a9a; }

/* ---------------- 底部进度指示（分段递进） ---------------- */

.progress-ui {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 26px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

#stateText { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); white-space: nowrap; }

.progress-line {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(125, 211, 252, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

/* 分段刻度：在 25% / 50% / 75% 处画三个分隔缺口 */
.progress-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(25% - 2px),
    var(--bg) calc(25% - 2px),
    var(--bg) 25%
  );
  pointer-events: none;
}

.progress-line i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  transition: width var(--scene-ms) var(--ease-cinema);
}

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

@media (max-width: 768px) {
  .page { padding: 92px 26px 84px; }

  .topbar { padding: 20px 24px; }

  .mobile-scene-controls { display: flex; }

  .page-home { grid-template-columns: 1fr; align-content: center; gap: 30px; }

  .profile-card { padding: 22px; }

  .work-layout { grid-template-columns: 1fr; gap: 26px; align-items: start; }

  .project-cards-grid { grid-template-columns: 1fr; gap: 14px; }

  .project-modal-grid { grid-template-columns: 1fr; }

  .project-modal-footer { flex-direction: column; align-items: stretch; }

  .project-modal-actions { justify-content: stretch; }

  .photo-column-left { left: 6vw; }

  .photo-column-right { right: 6vw; }

  .photo-card { height: 200px; margin-bottom: 22px; }

  .gallery-head, .gallery-hint { left: 26px; }

  .carousel-nav-prev { left: 10px; }

  .carousel-nav-next { right: 10px; }

  .contact-layout { grid-template-columns: 1fr; gap: 34px; align-content: center; }

  .contact-card-grid { grid-template-columns: 1fr; }

  .progress-ui { left: 24px; right: 24px; }
}
