:root {
  --bg: #07050c;
  --bg-soft: #0d0916;
  --line: rgba(255, 255, 255, 0.08);
  --text: #efebff;
  --muted: rgba(239, 235, 255, 0.55);
  --accent: #7c5cff;
  --accent-2: #b18cff;
  --accent-3: #5ad2ff;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(9, 6, 16, 0.92), rgba(9, 6, 16, 0.65));
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav__brand img { height: 34px; width: auto; }
.nav__links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.nav__links a {
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: #fff; background: rgba(124, 92, 255, 0.18); }
.nav__cta {
  margin-left: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  color: #07050c;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(30% 26% at 50% 43%, rgba(196, 170, 255, 0.22), rgba(140, 100, 255, 0.10) 45%, transparent 72%),
    radial-gradient(62% 52% at 50% 40%, rgba(88, 62, 200, 0.28), rgba(10, 6, 22, 0.9) 62%, #05030a 100%),
    radial-gradient(40% 40% at 15% 82%, rgba(90, 210, 255, 0.08), transparent 70%),
    #05030a;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__content { max-width: 1000px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #6cffb0; box-shadow: 0 0 10px #6cffb0; }
.hero__wordmark { width: min(820px, 92vw); margin: 0 auto; filter: drop-shadow(0 18px 50px rgba(124, 92, 255, 0.35)); }
.hero__sub { margin-top: 18px; font-size: clamp(15px, 2vw, 22px); letter-spacing: .18em; color: rgba(239, 235, 255, 0.72); }
.hero__actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn--primary {
  background: linear-gradient(120deg, var(--accent), #8e7bff);
  color: #fff;
  box-shadow: 0 12px 34px rgba(124, 92, 255, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124, 92, 255, 0.5); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,0.03); }
.btn--ghost:hover { background: rgba(255,255,255,0.07); }
.hero__scroll {
  position: absolute;
  right: 34px;
  bottom: 40px;
  font-size: 11px;
  letter-spacing: .4em;
  color: rgba(239,235,255,.35);
  writing-mode: vertical-rl;
}

/* ---------- 通用区块 ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: 110px 28px; }
.section__head { margin-bottom: 48px; }
.kicker { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-2); }
.section__head h2 { font-size: clamp(30px, 4vw, 46px); margin-top: 14px; letter-spacing: .02em; }
.section__lead { margin-top: 16px; max-width: 640px; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- 关于 ---------- */
.about__grid { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: 40px; align-items: start; }
.about__text p + p { margin-top: 18px; }
.about__text p { color: rgba(239,235,255,.78); }
.timeline { list-style: none; margin-top: 20px; display: grid; gap: 18px; }
.timeline li {
  display: grid;
  gap: 2px;
  padding: 16px 20px;
  border-left: 2px solid rgba(124, 92, 255, .5);
  background: linear-gradient(90deg, rgba(124,92,255,.1), transparent 70%);
  border-radius: 0 12px 12px 0;
}
.timeline span { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.timeline b { font-weight: 600; }
.timeline i { font-style: normal; font-size: 13px; color: var(--muted); }
.about__card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.about__card img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; }
.about__meta { padding: 22px 24px 26px; }
.about__meta .name { font-size: 20px; font-weight: 700; }
.about__meta .role { color: var(--muted); font-size: 14px; margin-top: 4px; }
.about__meta .status { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #9dffcf; }
.about__meta dl { margin-top: 20px; display: grid; grid-template-columns: 76px 1fr; row-gap: 10px; font-size: 13px; }
.about__meta dt { color: var(--muted); }
.about__meta dd a { color: var(--accent-2); }
.stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.03);
}
.stats > div { padding: 26px 24px; text-align: center; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-size: 26px; letter-spacing: .02em; }
.stats span { font-size: 12px; color: var(--muted); }

/* ---------- 项目案例：两个入口 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-grid--quad { grid-template-columns: repeat(2, 1fr); }
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 350px;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  text-align: left;
  width: 100%;
}
.cat-card:hover { transform: translateY(-6px); border-color: rgba(177,140,255,.55); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.cat-card__media { position: absolute; inset: 0; z-index: 0; }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.cat-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,5,12,.12) 0%, rgba(7,5,12,.7) 52%, rgba(7,5,12,.96) 100%);
}
.cat-card--empty .cat-card__media {
  background: radial-gradient(60% 60% at 30% 20%, rgba(124,92,255,.35), transparent 70%),
              radial-gradient(50% 50% at 80% 80%, rgba(90,210,255,.18), transparent 70%),
              #0b0714;
}
.cat-card__body { position: relative; z-index: 1; }
.cat-card__count { font-size: 12px; letter-spacing: .22em; color: var(--accent-2); }
.cat-card__title { font-size: clamp(19px, 1.75vw, 25px); font-weight: 700; margin-top: 10px; line-height: 1.35; }
.cat-card__sub { margin-top: 10px; color: var(--muted); font-size: 13px; max-width: 420px; }
.cat-card__go {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #fff;
}
.cat-card__go i {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(124,92,255,.22);
  border: 1px solid rgba(177,140,255,.4);
  font-style: normal;
}

/* ---------- 核心能力 ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill {
  position: relative;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  transition: border-color .3s, transform .3s;
}
.skill:hover { border-color: rgba(177,140,255,.45); transform: translateY(-4px); }
.skill .idx { position: absolute; right: 26px; top: 24px; font-size: 13px; color: rgba(239,235,255,.3); letter-spacing: .2em; }
.skill h3 { font-size: 20px; }
.skill p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: rgba(239,235,255,.7);
}

/* ---------- 联系 ---------- */
.contact { padding-bottom: 140px; }
.contact__row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.contact__mail { font-size: clamp(22px, 3vw, 40px); font-weight: 600; letter-spacing: .02em; }
.contact__mail:hover { color: var(--accent-2); }
.contact__foot {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 子页面（覆盖层） ---------- */
.page {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: pageIn .28s ease;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page.is-hidden { display: none; }
.page__bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(9, 6, 16, .9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.page__crumb { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.page__crumb b { color: var(--text); font-weight: 600; }
.page__back {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, border-color .2s;
}
.page__back:hover { background: rgba(124,92,255,.22); border-color: rgba(177,140,255,.5); }
.page__body { flex: 1; overflow-y: auto; padding: 40px 28px 90px; }
.page__body > .wrap { max-width: 1240px; margin: 0 auto; }

/* 分类页 */
.cat-head h2 { font-size: clamp(26px, 3.4vw, 40px); }
.cat-head p { color: var(--muted); margin-top: 10px; font-size: 14px; }
.proj-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  text-align: left;
  transition: transform .25s, border-color .25s;
  width: 100%;
}
.proj-card:hover { transform: translateY(-4px); border-color: rgba(177,140,255,.5); }
.proj-card__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.proj-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.proj-card:hover .proj-card__thumb img { transform: scale(1.05); }
.proj-card__idx {
  position: absolute; left: 12px; top: 12px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; letter-spacing: .12em;
  background: rgba(7,5,12,.72);
  border: 1px solid var(--line);
  color: var(--accent-2);
}
.proj-card__meta { padding: 16px 18px 18px; }
.proj-card__meta h3 { font-size: 16px; font-weight: 600; }
.proj-card__meta span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* 缩略图墙 */
.thumbs__head h2 { font-size: clamp(24px, 3vw, 34px); }
.thumbs__head p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.thumb-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s, border-color .25s;
  width: 100%;
  display: block;
}
.thumb:hover { transform: translateY(-3px); border-color: rgba(177,140,255,.55); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__num {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; background: rgba(7,5,12,.78); color: rgba(239,235,255,.8);
}

/* 大图浏览 */
.viewer { padding: 0 0 60px; }
.viewer__list { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; display: grid; gap: 18px; }
.viewer__list figure { background: #0b0714; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.viewer__list img { width: 100%; height: auto; }
.viewer__list figcaption { padding: 10px 16px; font-size: 12px; color: var(--muted); }

/* 空状态 */
.empty {
  margin-top: 40px;
  padding: 70px 30px;
  border: 1px dashed rgba(177,140,255,.35);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: rgba(124,92,255,.06);
}
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 10px; }
.empty p { font-size: 13px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .about__grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(1), .stats > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 76px 20px; }
  .page__bar { padding: 12px 18px; }
  .page__body { padding: 28px 18px 70px; }
}
@media (max-width: 620px) {
  .cat-grid { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__actions .btn { flex: 1; justify-content: center; }
}

/* ---------- 全站鼠标流体拖尾 ---------- */
.glow-cursor {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.glow-cursor__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
@media (hover: none), (pointer: coarse) {
  .glow-cursor { display: none; }
}

/* ---------- 全站文字扫光（ShinyText） ---------- */
.shiny-text {
  --st-base: #e9e5ff;
  --st-shine: #ffffff;
  --st-delay: 0s;
  background-image: linear-gradient(
    112deg,
    var(--st-base) 0%,
    var(--st-base) 45%,
    var(--st-shine) 50%,
    var(--st-base) 55%,
    var(--st-base) 100%
  );
  background-repeat: repeat-x;
  background-size: 320% 100%;
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.shiny-text.is-shining {
  animation: shinySweep 14s linear infinite;
  animation-delay: var(--st-delay, 0s);
}
@keyframes shinySweep {
  0% { background-position: 0 0; }
  100% { background-position: -320% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shiny-text { animation: none; background-position: 0 0; }
}
