:root {
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --bg-light: #f5f5f7;
  --bg-dark: #000000;
  --text-dark: #1d1d1f;
  --text-light: #f5f5f7;
  --text-secondary: #6e6e73;
  --text-secondary-light: #a1a1a6;
  --accent: #2997ff;
  --radius: 20px;
  --nav-h: 48px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============ 导航栏 ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(245, 245, 247, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.navbar.scrolled {
  background: rgba(245, 245, 247, 0.8);
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

.nav-content {
  max-width: 1024px;
  margin: 0 auto;
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-dark);
}

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

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-light);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(41, 151, 255, 0.35), transparent 70%);
  top: -120px;
  left: -80px;
  animation: float 12s ease-in-out infinite;
}

.hero-glow-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 45, 85, 0.22), transparent 70%);
  bottom: -100px;
  right: -60px;
  animation: float 14s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(24px); }
}

.hero-inner {
  position: relative;
  padding: 0 22px;
  margin-top: -40px;
}

.hero-eyebrow {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(56px, 10vw, 96px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
  background: linear-gradient(135deg, #1d1d1f 30%, #2997ff 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.hero-role {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 980px;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.03);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-secondary {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary:hover {
  background: rgba(41, 151, 255, 0.1);
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid rgba(29, 29, 31, 0.25);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 3px;
  animation: scroll 1.8s var(--ease) infinite;
}

@keyframes scroll {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ============ 通用区块 ============ */
.section {
  padding: 110px 0;
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
}

.section-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: center;
  margin-bottom: 18px;
}

.section-lead {
  font-size: clamp(17px, 2vw, 21px);
  text-align: center;
  margin-bottom: 64px;
  color: var(--text-secondary);
}

.section-dark .section-lead {
  color: var(--text-secondary-light);
}

/* ============ 关于 ============ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px 26px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 18px 50px rgba(0, 0, 0, 0.1);
}

.about-icon {
  font-size: 34px;
  color: var(--accent);
  margin-bottom: 18px;
}

.about-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.about-card p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ============ 技能 ============ */
.skills-wrap {
  max-width: 640px;
  margin: 0 auto 56px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.skill-item {
  width: 100%;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2997ff, #a855f7);
  border-radius: 6px;
  transition: width 1.2s var(--ease);
}

.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.tech-cloud span {
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
}

/* ============ 项目 ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text-dark);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 20px 50px rgba(0, 0, 0, 0.12);
}

.project-visual {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-visual span {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.visual-1 {
  background: linear-gradient(135deg, #0a84ff, #64d2ff);
}
.visual-2 {
  background: linear-gradient(135deg, #a855f7, #ec4899);
}
.visual-3 {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.28), transparent 45%);
}

.project-info {
  padding: 22px;
}

.project-info h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.project-tag {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

/* ============ 联系 ============ */
.contact-inner {
  text-align: center;
}

.contact-links {
  margin-bottom: 36px;
}

.social-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease, transform 0.3s var(--ease);
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.03);
}

/* ============ 页脚 ============ */
.footer {
  background: #000;
  color: var(--text-secondary-light);
  padding: 30px 0;
  text-align: center;
  font-size: 12px;
}

.footer-note {
  margin-top: 6px;
  color: #6e6e73;
}

/* ============ 滚动显现动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

/* ============ 响应式 ============ */
@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(245, 245, 247, 0.95);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding: 12px 22px 20px;
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
    visibility: hidden;
  }

  .nav-links.open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .about-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-glow,
  .scroll-dot,
  .btn:hover,
  .project-card:hover,
  .about-card:hover {
    animation: none;
    transform: none;
  }
}
