:root {
  --bg: #050507;
  --bg-soft: #0b0d14;
  --cyan: #00f0ff;
  --purple: #a855f7;
  --pink: #ff2d9b;
  --text: #e8ecf4;
  --muted: #8b93a7;
  --glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  cursor: none;
}

/* 自定义鼠标：小地球 */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  /* 海洋蓝底 + 绿色大陆斑点 + 左上高光，模拟小地球 */
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.55), transparent 38%),
    radial-gradient(circle at 62% 64%, #2e8b57 0 20%, transparent 21%),
    radial-gradient(circle at 36% 58%, #3cb371 0 14%, transparent 15%),
    radial-gradient(circle at 70% 34%, #2e8b57 0 11%, transparent 12%),
    radial-gradient(circle at 48% 40%, #228b22 0 12%, transparent 13%),
    radial-gradient(circle at 28% 72%, #3cb371 0 9%, transparent 10%),
    linear-gradient(135deg, #1e90ff 0%, #0066cc 60%, #004a99 100%);
  box-shadow:
    0 0 10px rgba(0,200,255,0.85),
    0 0 22px rgba(0,150,255,0.5),
    inset -4px -4px 8px rgba(0,0,0,0.45),
    inset 3px 3px 6px rgba(255,255,255,0.25);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease;
}
/* 外圈作为地球大气层辉光 */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(120,200,255,0.35);
  box-shadow: 0 0 14px rgba(80,180,255,0.35), inset 0 0 10px rgba(80,180,255,0.18);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, border-color .25s ease;
}
.cursor.hover { width: 30px; height: 30px; }
.cursor-ring.hover { width: 66px; height: 66px; border-color: rgba(140,210,255,0.7); }
@media (hover: none) { .cursor, .cursor-ring { display: none; } body { cursor: auto; } }

/* 首页背景大图：缓慢从右上角丝滑移动至左下角 */
.hero-bg {
  position: fixed;
  top: -20%; left: -20%;
  width: 140%; height: 140%;
  z-index: 0;
  pointer-events: none;
  background: url('../images/Minimalist_calm_deep_space_bac_2026-08-06T08-52-12.png') center / cover no-repeat;
  opacity: 0.55;
  filter: saturate(115%) brightness(0.92);
}

/* 背景发光星星（远景，位于内容之下） */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* 背景散布的多个小黑洞（填充留白，位于内容之下） */
#blackholes {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
}
/* 背景：流动极光层 */
.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(0,240,255,0.18), transparent 60%),
    radial-gradient(45% 55% at 80% 20%, rgba(168,85,247,0.20), transparent 60%),
    radial-gradient(50% 50% at 60% 80%, rgba(255,45,155,0.16), transparent 60%),
    radial-gradient(45% 50% at 15% 85%, rgba(54,120,255,0.18), transparent 60%);
  filter: blur(55px) saturate(180%);
  animation: auroraMove 18s ease-in-out infinite alternate;
}
.aurora.b {
  background:
    radial-gradient(40% 45% at 75% 70%, rgba(0,255,170,0.20), transparent 60%),
    radial-gradient(50% 50% at 30% 60%, rgba(255,180,0,0.16), transparent 60%),
    radial-gradient(45% 50% at 90% 40%, rgba(255,45,155,0.22), transparent 60%);
  animation: auroraMove2 22s ease-in-out infinite alternate;
  opacity: 1;
}
@keyframes auroraMove {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); }
  50%  { transform: translate(4%, -3%) rotate(8deg) scale(1.1); }
  100% { transform: translate(-3%, 4%) rotate(-6deg) scale(1.05); }
}
@keyframes auroraMove2 {
  0%   { transform: translate(0,0) rotate(0deg) scale(1.1); }
  50%  { transform: translate(-5%, 3%) rotate(-10deg) scale(1); }
  100% { transform: translate(4%, -4%) rotate(7deg) scale(1.08); }
}

/* 背景粒子画布 */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

/* 背景高清银河带 */
#galaxy {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* 背景漂浮线状流光 */
#streams {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
  opacity: 1;
}

/* 背景卫星公转 */
#orbits {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
}

/* 鼠标色相光晕（颜色随鼠标流动） */
.glow {
  position: fixed;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glowc, rgba(0,240,255,0.18)) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  filter: blur(30px);
  transition: background .4s ease;
  mix-blend-mode: screen;
}

/* 网格地平线（增加科技感） */
.grid-floor {
  position: fixed;
  left: -25%; right: -25%; bottom: -10%;
  height: 55vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,240,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.10) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(420px) rotateX(68deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, #000 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 90%);
  opacity: .5;
  animation: gridShift 8s linear infinite;
}
@keyframes gridShift { to { background-position: 0 48px, 48px 0; } }

/* 漂浮光斑：增强背景绚丽度与鼠标互动（更清晰 + 满屏飘动） */
.orbs { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  mix-blend-mode: screen;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}

.wrap { position: relative; z-index: 2; }

/* 导航 */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 6vw;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(5,5,7,0.8), transparent);
  transition: padding .3s ease, background .3s ease;
}
nav.shrink { padding: 14px 6vw; background: rgba(5,5,7,0.92); border-bottom: 1px solid var(--border); }
.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 34px; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  position: relative;
  transition: color .25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width .3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* 宇宙星系场景 */
.cosmos {
  position: relative;
  width: clamp(320px, 70vw, 720px);
  height: clamp(320px, 70vw, 720px);
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 1.2s ease .4s forwards;
}
.cosmos canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6vw;
  position: relative;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp .8s ease .2s forwards;
}
.badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.6s infinite;
}

.core-label {
  position: relative;
  z-index: 3;
  text-align: center;
  pointer-events: none;
  user-select: none;
  margin-bottom: -40px;
  opacity: 0;
  animation: fadeUp 1.2s ease .4s forwards;
}
.core-label .name {
  font-size: clamp(64px, 13vw, 150px);
  font-weight: 900;
  letter-spacing: 10px;
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--cyan) 35%, var(--purple) 60%, var(--pink) 80%, #fff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
  filter: drop-shadow(0 0 36px rgba(0,240,255,0.6));
}
.core-label .sub {
  margin-top: 12px;
  font-size: clamp(12px, 1.6vw, 15px);
  letter-spacing: 5px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}
.typed {
  font-size: clamp(18px, 3vw, 30px);
  margin-top: 22px;
  min-height: 1.6em;
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeUp 1s ease .6s forwards;
}
#typed {
  font-weight: 700;
  background: linear-gradient(120deg, var(--cyan), var(--purple), var(--pink), var(--cyan));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
  filter: drop-shadow(0 0 14px rgba(168,85,247,0.35));
}
.typed .caret {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--cyan);
  margin-left: 4px;
  transform: translateY(3px);
  animation: blink 1s step-end infinite, hue 4s linear infinite;
  box-shadow: 0 0 10px var(--cyan);
}
.hero p.desc {
  max-width: 640px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
  opacity: 0;
  animation: fadeUp 1s ease .8s forwards, descShine 9s linear infinite 1.8s;
  background: linear-gradient(100deg,
    var(--muted) 0%, #cfe9ff 25%, var(--cyan) 45%, var(--purple) 60%, #cfe9ff 78%, var(--muted) 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(0,240,255,0.12));
}
@keyframes descShine { to { background-position: 250% center; } }
/* 逐字淡入上浮（inline 不换行，避免重叠） */
.hero p.desc .ch {
  opacity: 0;
  display: inline-block;
  transform: translateY(10px);
  animation: charIn .6s cubic-bezier(.22,.7,.2,1) forwards;
}
@keyframes charIn { to { opacity: 1; transform: none; } }
.cta {
  margin-top: 44px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}
.btn {
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 1px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn.primary {
  color: #050507;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 24px rgba(0,240,255,0.35);
}
.btn.ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--glass);
}
.btn:hover { transform: translateY(-3px); }
.btn.primary:hover { box-shadow: 0 0 40px rgba(168,85,247,0.55); }
.btn.ghost:hover { border-color: var(--cyan); box-shadow: 0 0 24px rgba(0,240,255,0.2); }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 1s ease 1.3s forwards;
}
.scroll-hint .mouse {
  width: 22px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  background: var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: wheel 1.6s infinite;
}

/* Section 通用 */
section.block {
  padding: 120px 6vw;
  position: relative;
}
.sec-title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.sec-title .accent {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-sub { color: var(--muted); max-width: 560px; margin-bottom: 60px; }

/* 数字统计 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 18px;
  padding: 34px 24px;
  text-align: center;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.stat:hover {
  transform: translateY(-6px);
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0,240,255,0.12);
}
.stat .num {
  font-size: 46px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label { color: var(--muted); font-size: 14px; margin-top: 6px; letter-spacing: 1px; }

/* 技能卡片 */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border-radius: 20px;
  padding: 36px 30px;
  overflow: hidden;
  transition: transform .2s ease, border-color .3s ease;
  transform-style: preserve-3d;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(0,240,255,0.15), transparent 40%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(0,240,255,0.4); }
.card .ico {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(168,85,247,0.15));
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transform: translateZ(30px);
}
.card h3 { font-size: 20px; margin-bottom: 10px; transform: translateZ(20px); }
.card p { color: var(--muted); font-size: 14px; transform: translateZ(10px); }
.card .bar {
  margin-top: 20px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  transform: translateZ(10px);
}
.card .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 4px;
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}

/* 作品/时间线 */
.works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.work {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  height: 240px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #0b0d14, #12101c);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.work:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--purple);
  box-shadow: 0 20px 60px rgba(168,85,247,0.18);
}
.work .overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,240,255,0.18), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,45,155,0.18), transparent 50%);
  opacity: .8;
  transition: opacity .35s ease, transform .6s ease;
}
.work:hover .overlay { opacity: 1; transform: scale(1.1); }
.work .info { position: relative; z-index: 2; padding: 26px; }
.work .tag {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 2px;
}
.work h4 { font-size: 22px; margin-top: 6px; }

/* 联系 */
.contact {
  text-align: center;
  padding: 140px 6vw;
}
.contact h2 {
  font-size: clamp(34px, 6vw, 70px);
  font-weight: 900;
  background: linear-gradient(120deg, var(--cyan), var(--purple), var(--pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 7s linear infinite;
}
.contact p { color: var(--muted); margin: 20px auto 40px; max-width: 520px; }
.socials { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.socials a {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.socials a:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0,240,255,0.25);
  color: var(--cyan);
}

footer {
  text-align: center;
  padding: 40px 6vw;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* 进入视口动画 */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes shine { to { background-position: 300% center; } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes wheel { 0% { top: 7px; opacity: 1; } 100% { top: 18px; opacity: 0; } }

/* 响应式 */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
