/* ============================================================
   王娅菲 · 视频创作集  —  高级视觉框架（亮色清新 + 暗色）
   Senior Developer 出品
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #16181d;
  --text-soft: #5b6472;
  --text-faint: #97a0ad;
  --accent: #5b6cff;
  --accent-2: #18c5b6;
  --accent-grad: linear-gradient(135deg, #5b6cff 0%, #18c5b6 100%);
  --border: rgba(20, 24, 29, 0.08);
  --bg-overlay: rgba(246, 247, 251, 0.32);
  --bg-img: url("../assets/images/backgrounds/bg-panda.png");
  --shadow: 0 18px 50px -20px rgba(31, 41, 71, 0.25);
  --shadow-soft: 0 8px 30px -12px rgba(31, 41, 71, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --nav-blur: blur(18px) saturate(160%);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0d0f14;
  --bg-soft: #14171f;
  --surface: rgba(28, 32, 42, 0.66);
  --surface-solid: #171b24;
  --text: #eef1f7;
  --text-soft: #aab3c2;
  --text-faint: #6b7689;
  --accent: #7c8bff;
  --accent-2: #2fe0cf;
  --accent-grad: linear-gradient(135deg, #7c8bff 0%, #2fe0cf 100%);
  --border: rgba(255, 255, 255, 0.1);
  --bg-overlay: rgba(13, 15, 20, 0.88);
  --bg-img: url("../assets/images/backgrounds/bg-panda.png");
  --shadow: 0 22px 60px -22px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 10px 34px -14px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.4s var(--ease);
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

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

/* ---------- 全局背景图层（熊猫竹子图，固定右下角 + 主题色罩） ---------- */
.page-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--bg-img);
  background-size: auto 80vh;
  background-position: right bottom;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background: var(--bg-overlay);
  transition: background 0.5s var(--ease);
}
@media (max-width: 768px) {
  .page-bg { background-attachment: scroll; }
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav__inner {
  max-width: 1180px; margin: 0 auto; padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo { font-weight: 800; font-size: 1.25rem; letter-spacing: 0.5px; }
.nav__logo-dot { color: var(--accent); }
.nav__links { display: flex; gap: 30px; }
.nav__link {
  font-size: 0.95rem; color: var(--text-soft); position: relative;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent-grad); transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

.theme-switch {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px;
}
.theme-switch__btn {
  width: 34px; height: 30px; border: none; cursor: pointer; border-radius: 999px;
  background: transparent; color: var(--text-soft); font-size: 1rem;
  transition: all 0.25s var(--ease);
}
.theme-switch__btn:hover { color: var(--text); }
.theme-switch__btn.is-active {
  background: var(--accent-grad); color: #fff;
  box-shadow: var(--shadow-soft);
}

/* ---------- 通用区块 ---------- */
section { padding: 110px 28px; max-width: 1180px; margin: 0 auto; }
.section__head { margin-bottom: 48px; }
.section__eyebrow {
  font-size: 0.8rem; letter-spacing: 4px; color: var(--accent);
  font-weight: 700; text-transform: uppercase; margin-bottom: 10px;
}
.section__title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.5px; }
.section__lead { color: var(--text-soft); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 0 28px; max-width: none; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(91,108,255,0.18), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(24,197,182,0.16), transparent 60%),
    radial-gradient(40% 40% at 60% 90%, rgba(91,108,255,0.1), transparent 60%);
}
[data-theme="dark"] .hero__bg {
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(124,139,255,0.22), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(47,224,207,0.16), transparent 60%),
    radial-gradient(40% 40% at 60% 90%, rgba(124,139,255,0.12), transparent 60%);
}
.hero__inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero__eyebrow { letter-spacing: 6px; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.hero__title {
  font-size: clamp(2.8rem, 8vw, 5.5rem); font-weight: 850; line-height: 1.05;
  letter-spacing: -2px; margin: 18px 0;
}
.hero__sub { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; color: var(--text); }
.hero__desc { color: var(--text-soft); max-width: 540px; margin-top: 14px; font-size: 1.05rem; }
.hero__cta { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--text-faint); border-radius: 14px;
  z-index: 1;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--accent); border-radius: 2px;
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0%{opacity:0;top:8px} 30%{opacity:1} 70%{opacity:1} 100%{opacity:0;top:24px} }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.btn--primary { background: var(--accent-grad); color: #fff; box-shadow: var(--shadow-soft); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--primary:hover, .btn--ghost:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- 关于 ---------- */
.about__grid {
  display: grid; grid-template-columns: 1fr; gap: 24px; justify-items: start;
}
.about__body { max-width: 820px; }
.avatar, .avatar-img {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.avatar {
  background: var(--accent-grad); display: flex; align-items: center; justify-content: center;
  font-size: 5rem; font-weight: 800; color: #fff;
}
.avatar-img {
  object-fit: cover; object-position: center top;
  border: 1px solid var(--border);
}
.about__bio { font-size: 1.12rem; color: var(--text-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag {
  padding: 7px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--surface-solid); border: 1px solid var(--border); color: var(--text-soft);
}

/* ---------- 筛选 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.filter-btn {
  padding: 10px 22px; border-radius: 999px; cursor: pointer; font-size: 0.95rem; font-weight: 600;
  background: var(--surface-solid); border: 1px solid var(--border); color: var(--text-soft);
  transition: all 0.25s var(--ease);
}
.filter-btn:hover { color: var(--text); transform: translateY(-2px); }
.filter-btn.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-soft); }

/* ---------- 作品网格 ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px;
}
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--surface-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow); }
.card__media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(135deg, #5b6cff33, #18c5b633);
}
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.6s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; color: #fff; opacity: 0.9;
  background: var(--accent-grad);
}
.card__ph span { mix-blend-mode: overlay; }
.card__overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 55%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.card:hover .card__overlay { opacity: 1; }
.card__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
  width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center; color: #16181d; font-size: 1.4rem;
  opacity: 0; transition: all 0.35s var(--ease);
}
.card:hover .card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card__body { padding: 18px 20px 22px; }
.card__title { font-size: 1.1rem; font-weight: 700; }
.card__cat { font-size: 0.82rem; color: var(--accent); font-weight: 600; margin-top: 4px; }
.card__tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 5px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: #ff5b78; color: #fff; box-shadow: var(--shadow-soft);
}

/* ---------- 联系 ---------- */
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.contact__card {
  display: flex; flex-direction: column; gap: 8px; padding: 28px;
  border-radius: var(--radius); background: var(--surface-solid);
  border: 1px solid var(--border); box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact__card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact__card--muted { opacity: 0.85; }
.contact__icon { font-size: 1.8rem; }
.contact__label { font-size: 0.82rem; color: var(--text-faint); letter-spacing: 1px; }
.contact__value { font-size: 1.15rem; font-weight: 700; word-break: break-all; }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center; padding: 50px 28px; color: var(--text-faint);
  border-top: 1px solid var(--border);
}
.footer__sub { font-size: 0.85rem; margin-top: 6px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; flex-direction: column;
  background: rgba(8, 10, 14, 0.86); backdrop-filter: blur(8px); padding: 30px;
}
.lightbox.is-open { display: flex; animation: fade 0.3s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage {
  width: min(960px, 92vw); aspect-ratio: 16/9; background: #000;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
}
.lightbox__stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lightbox__close {
  position: absolute; top: 24px; right: 28px; width: 46px; height: 46px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.12); color: #fff; font-size: 1.8rem; cursor: pointer;
  transition: background 0.25s var(--ease);
}
.lightbox__close:hover { background: rgba(255,255,255,0.25); }
.lightbox__meta { margin-top: 18px; text-align: center; color: #fff; display: flex; gap: 12px; align-items: center; }
.lightbox__meta h3 { font-size: 1.2rem; font-weight: 700; }
.lightbox__meta .tag { background: rgba(255,255,255,0.14); border-color: transparent; color: #fff; }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 磁性按钮基准 ---------- */
.magnetic { will-change: transform; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .avatar { max-width: 220px; }
  .nav__links { display: none; }
  section { padding: 80px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
