:root {
  --bg: #050507;
  --bg-soft: #0c0c12;
  --card: #111119;
  --line: rgba(255, 255, 255, 0.08);
  --txt: #f3f3f7;
  --txt-dim: #9a9aae;
  --cyan: #2ee6d6;
  --magenta: #ff3df0;
  --violet: #8b5cff;
  --grad: linear-gradient(120deg, #2ee6d6, #8b5cff 50%, #ff3df0);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(40vw 40vw at 12% 8%, rgba(46, 230, 214, 0.14), transparent 60%),
    radial-gradient(45vw 45vw at 88% 18%, rgba(255, 61, 240, 0.12), transparent 60%),
    radial-gradient(50vw 50vw at 50% 110%, rgba(139, 92, 255, 0.14), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* 网格纹理 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

.wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 导航 */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 5, 7, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; letter-spacing: 2px; font-size: 18px; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--txt-dim); text-decoration: none; font-size: 14px;
  transition: color .25s; position: relative;
}
.nav-links a:hover { color: var(--txt); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width .3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links .nav-cta {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--txt); font-weight: 600;
}
.nav-links .nav-cta:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-links .nav-cta::after { display: none; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Hero */
.hero { padding: 110px 0 90px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--txt-dim); margin-bottom: 28px;
  background: rgba(255,255,255,0.02);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

h1.hero-title {
  font-size: clamp(40px, 8vw, 84px);
  font-weight: 900; letter-spacing: -1px; line-height: 1.05;
  margin-bottom: 22px;
}
h1.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--txt-dim); font-size: clamp(15px, 2.4vw, 19px); max-width: 640px; margin: 0 auto 38px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 13px 28px; border-radius: 999px; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; transition: transform .2s, box-shadow .2s, border-color .2s, color .2s;
  display: inline-block;
}
.btn-primary { background: var(--grad); color: #07070a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(139,92,255,.4); }
.btn-ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.stats { display: flex; gap: 48px; justify-content: center; margin-top: 64px; flex-wrap: wrap; }
.stat .num { font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { font-size: 13px; color: var(--txt-dim); letter-spacing: 1px; }

/* Section */
section { padding: 80px 0; }
.sec-head { margin-bottom: 44px; }
.sec-head .kicker { color: var(--cyan); font-size: 13px; letter-spacing: 3px; font-weight: 700; text-transform: uppercase; }
.sec-head h2 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; margin-top: 10px; letter-spacing: -.5px; }
.sec-head p { color: var(--txt-dim); margin-top: 12px; max-width: 560px; }
.sec-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.sec-head.center p { margin-left: auto; margin-right: auto; }

/* Filter */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--txt-dim); font-size: 14px; cursor: pointer;
  transition: all .25s;
}
.filter:hover { color: var(--txt); border-color: rgba(255,255,255,.25); }
.filter.active { background: var(--grad); color: #07070a; border-color: transparent; font-weight: 600; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  cursor: pointer; transition: transform .3s, border-color .3s, box-shadow .3s;
  position: relative;
}
.card:hover { transform: translateY(-6px); border-color: rgba(139,92,255,.5); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.thumb { aspect-ratio: 4/3; position: relative; overflow: hidden; background: #0a0a10; }
.thumb .glow { position: absolute; inset: 0; opacity: .9; transition: transform .5s; }
.thumb .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .thumb .glow,
.card:hover .thumb .media { transform: scale(1.08); }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  pointer-events: none;
}
.thumb .play::before {
  content: "▶"; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; color: #fff;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3);
}
.thumb .tag {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff;
}
.card-body { padding: 16px 18px 20px; }
.card-body h3 { font-size: 17px; font-weight: 700; }
.card-body .meta { color: var(--txt-dim); font-size: 13px; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.card-body .meta .pill { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; }
.card.hide { display: none; }

/* 置顶精选混剪：与下方作品卡同尺寸同样式，仅作宽度约束 */
#featured { max-width: 340px; margin: 0 auto; }
#featured .card { cursor: pointer; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 18px; }
.skill {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  transition: border-color .3s, transform .3s;
}
.skill:hover { border-color: rgba(46,230,214,.4); transform: translateY(-4px); }
.skill .ico { font-size: 26px; margin-bottom: 12px; }
.skill h4 { font-size: 16px; }
.skill p { color: var(--txt-dim); font-size: 13px; margin-top: 6px; }
.skill .tools { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.skill .tools span { font-size: 11px; color: var(--txt-dim); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { color: var(--txt-dim); margin-bottom: 16px; }
.about-text strong { color: var(--txt); }
.about-visual {
  aspect-ratio: 3 / 4; max-width: 380px; margin-left: auto;
  border-radius: 20px; border: 1px solid var(--line);
  position: relative; overflow: hidden;
  box-shadow: 0 20px 60px rgba(139, 92, 255, 0.18);
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 820px) { .about-visual { margin: 0 auto; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Contact */
.contact { text-align: center; }
.contact .links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

footer { border-top: 1px solid var(--line); padding: 30px 0; text-align: center; color: var(--txt-dim); font-size: 13px; }
footer a { color: var(--txt-dim); text-decoration: none; }
footer a:hover { color: var(--cyan); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.show { opacity: 1; transform: none; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-back { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.modal-box {
  position: relative; z-index: 1; width: min(820px, 100%); max-height: 90vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  display: grid; grid-template-columns: 1fr;
  animation: pop .3s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-media { background: #000; display: grid; place-items: center; min-height: 220px; border-radius: 20px 20px 0 0; overflow: hidden; }
.modal-media img, .modal-media video { width: 100%; height: 100%; max-height: 52vh; object-fit: contain; background: #000; }
.modal-info { padding: 28px 26px; }
.modal-info .tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.modal-info h3 { font-size: 24px; font-weight: 800; margin: 14px 0 12px; }
.modal-info p { color: var(--txt-dim); font-size: 15px; }
.modal-info .meta { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.modal-info .meta .pill { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--txt-dim); }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(0,0,0,.5); color: #fff; font-size: 20px; cursor: pointer; line-height: 1;
  transition: border-color .2s, color .2s;
}
.modal-close:hover { border-color: var(--magenta); color: var(--magenta); }

  /* 二维码 */
  .qr-box { margin-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .qr-box img { width: 116px; height: 116px; background: #fff; border-radius: 10px; padding: 8px; }
  .qr-box span { font-size: 12px; color: var(--txt-dim); }
  .qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
  .qr-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 20px; text-align: center; }
  .qr-card img { width: 140px; height: 140px; background: #fff; border-radius: 10px; padding: 8px; }
  .qr-card h4 { font-size: 15px; margin-top: 12px; }
  .qr-card p { color: var(--txt-dim); font-size: 12px; margin-top: 4px; }

  /* 弹窗内设定图画廊 */
  .gal-title { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--txt-dim); text-transform: uppercase; margin: 18px 0 10px; }
  .modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
  .modal-actions .btn { text-decoration: none; }
  .concept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
  .concept-grid figure { margin: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s; }
  .concept-grid figure:hover { border-color: var(--magenta); transform: translateY(-3px); }
  .concept-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; }
  .concept-grid figcaption { font-size: 14px; color: var(--txt-dim); padding: 12px 14px; }
  .concept-cat { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--txt); margin-top: 38px; padding-left: 12px; border-left: 3px solid var(--magenta); }
  .concept-cat:first-of-type { margin-top: 26px; }

/* 创作流程（Workflow 展示） */
.flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.flow-card {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; cursor: zoom-in;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.flow-card:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(46,230,214,.12); }
.flow-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; }
.flow-card figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.flow-card figcaption strong { font-size: 14px; color: var(--txt); letter-spacing: .3px; }
.flow-card figcaption span { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 4vh 4vw;
  background: rgba(0,0,0,.88); backdrop-filter: blur(6px); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
