/* ===== 变量 ===== */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: rgba(255, 255, 255, 0.04);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --accent: #6c63ff;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --pink: #ff6b9d;
  --cyan: #00d4aa;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== 背景装饰 ===== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--pink);
  top: 40%;
  right: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  bottom: -100px;
  left: 30%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.05); }
  66%  { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
}

.hero-content {
  max-width: 650px;
}

.avatar {
  margin-bottom: 28px;
}

.avatar-emoji {
  font-size: 5rem;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%  { transform: translateY(-12px); }
}

.hero-name {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.name-cn {
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.name-sep {
  color: var(--text-secondary);
  font-weight: 300;
}

.name-en {
  color: var(--text-primary);
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-style: italic;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  letter-spacing: 1px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #7b73ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* 滚动指示 */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  animation: fadeInUp 1s 1.5s both;
}

.scroll-mouse {
  font-size: 1.2rem;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%  { transform: translateY(8px); opacity: 0.5; }
}

/* ===== 通用 Section ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 90px 24px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text-primary);
}

/* ===== 关于 ===== */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(10px);
}

.about-card p {
  margin-bottom: 14px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.about-card p:last-of-type {
  margin-bottom: 0;
}

.about-stats {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== 教育经历时间线 ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--accent),
    var(--pink)
  );
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 12px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
  padding: 4px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 技能 ===== */
.skills-group {
  margin-bottom: 36px;
}

.skills-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text-primary);
  text-align: center;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: default;
}

.tag:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* ===== 项目 ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.project-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent);
}

/* ===== 联系 ===== */
.contact-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.social-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: var(--accent);
}

.social-link i {
  font-size: 1.3rem;
}

/* ===== 页脚 ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ===== 动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-container {
    height: 56px;
  }

  .nav-links {
    display: none; /* 移动端隐藏导航链接，保持简洁 */
  }

  .hero {
    min-height: 90vh;
    padding: 80px 20px 50px;
  }

  .avatar-emoji {
    font-size: 3.6rem;
  }

  .hero-tagline {
    font-size: 1.05rem;
  }

  .section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
  }

  .about-card {
    padding: 24px;
  }

  .about-stats {
    gap: 16px;
  }

  .stat {
    min-width: 80px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline-dot {
    left: -30px;
    width: 24px;
    height: 24px;
  }

  .timeline-dot::after {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 1.7rem;
  }

  .orb {
    opacity: 0.05;
  }
}
