:root {
  --c-bg-top: #e8f1ff;
  --c-bg-mid: #f4ecff;
  --c-bg-bot: #fff0f5;
  --c-pink: #f472b6;
  --c-purple: #a78bfa;
  --c-blue: #60a5fa;
  --c-ink: #1f2a44;
  --c-muted: #64748b;
  --c-card: rgba(255, 255, 255, 0.72);
  --c-border: rgba(255, 255, 255, 0.85);
  --grad: linear-gradient(120deg, #60a5fa, #a78bfa 45%, #f472b6);
  --shadow-sm: 0 4px 14px rgba(140, 120, 200, 0.12);
  --shadow-md: 0 14px 40px rgba(140, 120, 200, 0.22);
  --radius: 20px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--c-ink);
  line-height: 1.7;
  background: linear-gradient(180deg, var(--c-bg-top), var(--c-bg-mid) 45%, var(--c-bg-bot));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 背景光斑 ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.blob-1 { width: 420px; height: 420px; background: #bfdbfe; top: -120px; left: -100px; animation: float 16s ease-in-out infinite; }
.blob-2 { width: 380px; height: 380px; background: #e9d5ff; top: 20%; right: -140px; animation: float 19s ease-in-out infinite reverse; }
.blob-3 { width: 420px; height: 420px; background: #fbcfe8; bottom: -140px; left: 15%; animation: float 22s ease-in-out infinite; }
.blob-4 { width: 300px; height: 300px; background: #cffafe; bottom: 10%; right: 10%; animation: float 25s ease-in-out infinite reverse; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.94); }
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  transition: box-shadow 0.3s var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.5px; text-decoration: none; color: var(--c-ink); }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  position: relative; text-decoration: none; color: var(--c-muted);
  font-size: 0.95rem; font-weight: 500; padding: 6px 2px; transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--grad); border-radius: 2px; transition: width 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--c-ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--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 { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-inner { text-align: center; max-width: 780px; }
.hero-greet { color: var(--c-purple); font-weight: 600; font-size: 1.05rem; margin-bottom: 18px; }
.hero-name { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 900; line-height: 1.15; letter-spacing: 1px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto;
  animation: gradShift 6s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub {
  color: var(--c-muted); font-size: clamp(1rem, 2.4vw, 1.25rem);
  max-width: 620px; margin: 22px auto 0;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 12px; justify-content: center; margin-top: 42px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 34px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); background-size: 180% auto; }
.btn-primary:hover { transform: translateY(-3px); background-position: right center; box-shadow: 0 18px 44px rgba(167, 139, 250, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.7); color: var(--c-ink); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-3px); background: #fff; }

.chip {
  background: var(--c-card); backdrop-filter: blur(8px);
  border: 1px solid var(--c-border); border-radius: 999px;
  padding: 8px 18px; font-size: 0.9rem; font-weight: 500; color: var(--c-ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- 通用区块 ---------- */
.section { padding: 96px 0; scroll-margin-top: 68px; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 3px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-top: 8px; }

.card {
  background: var(--c-card); backdrop-filter: blur(12px);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 30px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* ---------- 关于我 ---------- */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; }
.about-card h3 { margin-bottom: 14px; font-size: 1.2rem; }
.about-card p { color: var(--c-muted); margin-bottom: 12px; }

.info-list { list-style: none; display: grid; gap: 12px; }
.info-list li { display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; border-bottom: 1px dashed rgba(148, 163, 184, 0.35); padding-bottom: 10px; }
.info-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-list span { color: var(--c-muted); }
.status-dot { position: relative; padding-left: 16px; color: #10b981; }
.status-dot::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.22); }

/* ---------- 技能 ---------- */
.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.skill-group h3 { margin-bottom: 22px; font-size: 1.1rem; }
.skill-bar { margin-bottom: 18px; }
.skill-bar:last-child { margin-bottom: 0; }
.skill-bar-label { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.skill-bar-label span:last-child { color: var(--c-muted); }
.track { height: 9px; background: rgba(255, 255, 255, 0.85); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); }
.fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width 1.1s var(--ease); }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  padding: 8px 16px; border-radius: 12px; font-size: 0.9rem; font-weight: 500;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(244, 114, 182, 0.14));
  color: var(--c-ink);
}

/* ---------- 经历时间线 ---------- */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--c-blue), var(--c-purple), var(--c-pink)); border-radius: 2px; }
.t-item { position: relative; margin-bottom: 30px; }
.t-item:last-child { margin-bottom: 0; }
.t-dot { position: absolute; left: -28px; top: 34px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--c-purple); box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.2); }
.t-card { padding: 24px 28px; }
.t-time { font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.t-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.t-card p { color: var(--c-muted); font-size: 0.95rem; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; max-width: 620px; margin: 0 auto; }
.contact-card { display: block; text-align: center; text-decoration: none; color: inherit; padding: 34px 18px; }
.contact-card p { color: var(--c-muted); font-size: 0.9rem; word-break: break-all; margin-top: 4px; }
.contact-card h3 { margin-top: 10px; font-size: 1.05rem; }
.c-icon { font-size: 2rem; }
.contact-note { text-align: center; color: var(--c-muted); margin-top: 36px; }

/* ---------- 页脚 & 返回顶部 ---------- */
.footer { padding: 34px 24px; text-align: center; color: var(--c-muted); font-size: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.35); }

.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 1.2rem;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all 0.3s var(--ease);
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }

/* ---------- 滚动渐显 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px); border-bottom: 1px solid var(--c-border);
    max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease);
  }
  .nav-links.open { max-height: 320px; box-shadow: var(--shadow-md); }
  .nav-links li { text-align: center; }
  .nav-links a { display: block; padding: 15px 0; }
  .skill-groups { grid-template-columns: 1fr; }
  .timeline { padding-left: 22px; }
  .t-dot { left: -22px; }
  .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
