:root {
  --bg: #07070d;
  --bg-soft: #0d0d18;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e9e9f2;
  --text-dim: #9aa0b4;
  --accent: #8b5cf6;   /* 霓虹紫 */
  --accent-2: #22d3ee; /* 青 */
  --accent-3: #f472b6; /* 品红 */
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== 导航 ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 7, 13, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
}
.nav__logo span {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-left: 4px;
  vertical-align: middle;
}
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: 15px;
  color: var(--text-dim);
  position: relative;
  transition: color 0.25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}
.hero__glow--1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -120px; left: -80px;
}
.hero__glow--2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  bottom: -140px; right: -60px;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 760px; }
.hero__eyebrow {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--accent-2);
  margin-bottom: 22px;
  text-transform: uppercase;
}
.hero__title {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
}
.hero__sub {
  margin: 22px auto 38px;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-dim);
  max-width: 560px;
}
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

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

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(139, 92, 246, 0.5); }
.btn--ghost {
  background: var(--panel);
  border-color: var(--panel-border);
  color: var(--text);
}
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--accent); color: #fff; }

/* ===== 区块通用 ===== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 24px;
}
.section__head { margin-bottom: 56px; }
.section__kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent-2);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.section__title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ===== 关于 ===== */
.about__lead { font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; margin-bottom: 22px; }
.about__text { color: var(--text-dim); max-width: 720px; }
.about__text b { color: var(--text); }
.stats {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  flex-wrap: wrap;
}
.stat { position: relative; }
.stat__num {
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 800;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__unit { font-size: 22px; font-weight: 700; color: var(--text-dim); margin-left: 2px; }
.stat__label { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

/* ===== 能力 ===== */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.skill-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.skill-card__icon {
  display: inline-flex;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(34,211,238,0.25));
  color: var(--accent-2);
  margin-bottom: 16px;
}
.skill-card h3 { font-size: 18px; margin-bottom: 8px; }
.skill-card p { color: var(--text-dim); font-size: 14px; }

/* ===== 项目 ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.project-card__visual {
  position: relative;
  height: 150px;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, #11111d, #0a0a13);
  border-bottom: 1px solid var(--panel-border);
  display: block;
  width: 100%;
}
.project-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.project-card__visual:hover img { transform: scale(1.06); }
.project-card__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(7, 7, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.project-card__visual:hover .project-card__zoom { opacity: 1; transform: none; }

/* ===== 灯箱 ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  background: rgba(5, 5, 10, 0.93);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.3s var(--ease);
}
.lightbox.open .lightbox__img { transform: scale(1); }
.lightbox__caption {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 1px;
}
.lightbox__close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: rgba(13, 13, 24, 0.7);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, color 0.25s;
}
.lightbox__close:hover {
  transform: rotate(90deg);
  border-color: var(--accent);
  color: var(--accent-2);
}
.project-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-card__meta { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.14);
  color: var(--accent-2);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.project-card__title { font-size: 21px; margin-bottom: 10px; }
.project-card__desc { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.project-card__points { list-style: none; margin-bottom: 18px; }
.project-card__points li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.project-card__points li::before {
  content: "▹";
  position: absolute; left: 0;
  color: var(--accent-2);
}
.project-card__link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2);
  transition: letter-spacing 0.25s;
}
.project-card__link:hover { letter-spacing: 0.5px; }

/* ===== 经历时间线 ===== */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.timeline__item { position: relative; padding-bottom: 46px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -30px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}
.timeline__date { font-size: 13px; color: var(--accent-2); letter-spacing: 1px; margin-bottom: 6px; }
.timeline__role { font-size: 19px; margin-bottom: 8px; }
.timeline__desc { color: var(--text-dim); font-size: 15px; max-width: 640px; }

/* ===== 联系 ===== */
.section--contact { text-align: center; }
.contact { max-width: 640px; margin: 0 auto; }
.contact__title { font-size: clamp(28px, 5vw, 46px); font-weight: 800; margin: 14px 0 14px; }
.contact__sub { color: var(--text-dim); margin-bottom: 36px; }
.contact__links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== 页脚 ===== */
.footer {
  border-top: 1px solid var(--panel-border);
  text-align: center;
  padding: 30px 24px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ===== 滚动入场动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: 64px; right: 16px;
    flex-direction: column;
    gap: 18px;
    background: rgba(13, 13, 24, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 22px 28px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s var(--ease);
  }
  .nav__links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__toggle { display: flex; }
  .section { padding: 80px 20px; }
  .stats { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  html { scroll-behavior: auto; }
}
