* {
  box-sizing: border-box;
}

:root {
  --bg: #03030a;
  --bg2: #070714;
  --text: #f4f7ff;
  --muted: #94a1c5;
  --pink: #ff2bd6;
  --cyan: #00f5ff;
  --yellow: #f6ff00;
  --card: rgba(10, 12, 32, 0.65);
  --border: rgba(0, 245, 255, 0.18);
  --glow: rgba(0, 245, 255, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 43, 214, 0.15), transparent 35%),
    radial-gradient(circle at 90% 25%, rgba(0, 245, 255, 0.18), transparent 35%),
    linear-gradient(135deg, #03030a 0%, #070714 50%, #12031a 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 43, 214, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 10;
}

.scanline {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(255,255,255,0.015) 51%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 11;
}

/* 导航栏精致化化：增强磨砂玻璃质感与底部线条过渡 */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 7vw;
  background: rgba(3, 3, 10, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 245, 255, 0.12);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.brand {
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text);
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.5);
  font-size: 18px;
}

.brand span {
  color: var(--yellow);
  padding: 0 6px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 28px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav a:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

/* 头像增强：添加更具有科技感的呼吸光晕 */
.avatar-box img {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
}
.avatar-box:hover img {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 0 25px rgba(0, 255, 204, 0.85) !important;
}

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 6vw 7vw 5vw;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  color: var(--cyan);
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.3);
  margin-bottom: 12px;
}

/* 标题优化：摒弃不易读的空心字，采用饱满的高级渐变科技发光字 */
h1 {
  margin: 14px 0 24px;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.15;
  letter-spacing: -1px;
  font-weight: 800;
}

h1 span {
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 30%, #b2f7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 245, 255, 0.35);
}

.hero-desc {
  max-width: 780px;
  color: #cbd1ee;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* 按钮精细化：切角按钮添加平滑过渡与呼吸光效 */
.btn {
  color: var(--text);
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid var(--border);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn.primary {
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #03030a;
  box-shadow: 0 0 20px rgba(255, 43, 214, 0.25);
  border: none;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.5), 0 0 10px rgba(255, 43, 214, 0.5);
}

.btn.ghost {
  background: rgba(0, 245, 255, 0.03);
}

.btn.ghost:hover {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
  transform: translateY(-2px);
}

/* 代码终端区：增强玻璃拟态深度 */
.terminal-card {
  min-height: 380px;
  background: rgba(3, 5, 20, 0.85);
  border: 1px solid rgba(0, 245, 255, 0.25);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 255, 0.1), inset 0 0 20px rgba(255, 43, 214, 0.05);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  overflow: hidden;
}

.terminal-top {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 245, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.terminal-top span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.terminal-top span:nth-child(2) {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
}

.terminal-top span:nth-child(3) {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

pre {
  color: #4efeff;
  white-space: pre-wrap;
  font-family: "Consolas", "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.75;
  padding: 22px;
  margin: 0;
  text-shadow: 0 0 4px rgba(0, 245, 255, 0.3);
}

.section {
  padding: 85px 7vw;
}

.section-title {
  margin-bottom: 42px;
}

.section-title p {
  margin: 0 0 8px;
  color: var(--pink);
  letter-spacing: 4px;
  font-weight: 800;
  font-size: 13px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3.5vw, 42px);
  max-width: 980px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* 统一卡片基础样式：平滑的毛玻璃拟态过渡 */
.about-card,
.timeline article,
.project-card,
.skill-grid div {
  background: var(--card);
  border: 1px solid rgba(0, 245, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.about-card {
  padding: 36px;
  line-height: 1.85;
  color: #d1d7f0;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}

/* 数字化看板数据块美化 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.stats div {
  padding: 20px;
  background: rgba(0, 245, 255, 0.03);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 4px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.stats div:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 43, 214, 0.4);
  box-shadow: 0 0 20px rgba(255, 43, 214, 0.15);
}

.stats strong {
  display: block;
  font-size: 38px;
  color: var(--cyan);
  font-family: 'Impact', 'Arial Black', sans-serif;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* 时间轴美化：加强轨道光效流向感 */
.timeline {
  border-left: 2px solid rgba(0, 245, 255, 0.15);
  margin-left: 12px;
}

.timeline article {
  position: relative;
  margin: 0 0 32px 32px;
  padding: 28px;
  border-radius: 6px;
}

.timeline article:hover {
  border-color: rgba(0, 245, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.1);
}

.timeline article::before {
  content: "";
  position: absolute;
  left: -43px;
  top: 32px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--pink);
  box-shadow: 0 0 12px var(--pink);
  transition: background 0.3s ease;
  z-index: 2;
}

.timeline article:hover::before {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan);
}

.timeline time {
  color: var(--cyan);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
}

.timeline h3 {
  margin: 12px 0;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}

.timeline p,
.project-card p,
.skill-grid p,
.contact p {
  color: #b9c1e1;
  line-height: 1.75;
  font-size: 15px;
}

.project-grid,
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* 项目卡片优化：加强雷达霓虹氛围与边缘高光，优雅修饰原生无序列表 */
.project-card {
  padding: 32px;
  border-radius: 8px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 43, 214, 0.12), transparent 70%);
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 43, 214, 0.35);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 43, 214, 0.15);
}

.project-card span {
  color: var(--pink);
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 900;
}

.project-card h3 {
  font-size: 22px;
  margin: 12px 0 16px;
  font-weight: 700;
  color: #fff;
}

.project-card ul {
  padding-left: 0;
  margin: 12px 0 0 0;
  list-style: none;
}

.project-card li {
  position: relative;
  padding-left: 20px;
  margin: 10px 0;
  color: #b9c1e1;
  font-size: 14px;
  line-height: 1.6;
}

/* 消除原版粗糙的默认小圆点，替换为精致的小电力符号指标线 */
.project-card li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--cyan);
  font-size: 11px;
  text-shadow: 0 0 6px var(--cyan);
}

.project-card strong {
  color: var(--cyan);
  font-weight: 700;
}

/* 能力矩阵卡片微调 */
.skill-grid div {
  padding: 30px;
  border-radius: 8px;
}

.skill-grid div:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 10px 35px rgba(0, 245, 255, 0.12);
}

.skill-grid h3 {
  color: var(--cyan);
  margin-top: 0;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

.contact {
  text-align: center;
}

.contact .target-job {
  font-size: 16px;
  color: #fff;
  margin: 24px 0;
  background: rgba(0, 245, 255, 0.04);
  display: inline-block;
  padding: 10px 24px;
  border-radius: 30px;
  border: 1px dashed rgba(0, 245, 255, 0.2);
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}

.contact-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 43, 214, 0.25);
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  background: rgba(255, 43, 214, 0.02);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.3s ease;
}

.contact-links a:hover {
  border-color: var(--pink);
  background: rgba(255, 43, 214, 0.08);
  box-shadow: 0 0 20px rgba(255, 43, 214, 0.25);
  transform: translateY(-2px);
}

/* 页脚 */
footer {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid rgba(0, 245, 255, 0.08);
  background: rgba(3, 3, 10, 0.4);
}

/* 动效统一化与性能优化 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 移动端完美多端自适应优化 */
@media (max-width: 960px) {
  .nav {
    flex-direction: column;
    padding: 16px 5vw;
    gap: 12px;
  }

  .nav nav {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .nav a {
    margin-left: 0;
    margin-right: 0;
    font-size: 13px;
  }

  .hero {
    padding: 24px 5vw;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .avatar-box {
    margin-bottom: 16px;
  }

  h1 {
    font-size: 36px;
    letter-spacing: 0px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .project-grid,
  .skill-grid,
  .stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 56px 5vw;
  }

  .terminal-card {
    min-height: 280px;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }
}