/* ============================================================
   个人主页 style.css
   主题：深色（默认）/ 亮色可切换  ·  响应式  ·  动效丰富
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --primary: #7c6cf5;
  --primary-2: #a78bfa;
  --accent: #22d3ee;
  --grad: linear-gradient(120deg, #6366f1, #8b5cf6 52%, #22d3ee);
  --grad-soft: linear-gradient(120deg, rgba(99,102,241,.16), rgba(139,92,246,.16) 52%, rgba(34,211,238,.14));

  --bg: #07080d;
  --bg-soft: #0b0d14;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .065);
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);

  --heading: #f4f6fb;
  --text: #c2c8d6;
  --muted: #8a92a6;
  --shadow: 0 30px 70px -24px rgba(0, 0, 0, .7);
  --shadow-card: 0 20px 48px -20px rgba(0, 0, 0, .6);
  --ring: rgba(124, 108, 245, .45);
  --glass: rgba(10, 12, 20, .72);

  --radius: 20px;
  --radius-sm: 14px;
  --font-latin: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="light"] {
  --primary: #5b4bdb;
  --primary-2: #7c3aed;
  --accent: #0891b2;
  --grad: linear-gradient(120deg, #5b4bdb, #7c3aed 52%, #0891b2);
  --grad-soft: linear-gradient(120deg, rgba(91,75,219,.12), rgba(124,58,237,.12) 52%, rgba(8,145,178,.12));

  --bg: #f7f8fc;
  --bg-soft: #eef0f8;
  --surface: rgba(255, 255, 255, .82);
  --surface-2: rgba(255, 255, 255, .96);
  --border: rgba(15, 23, 42, .08);
  --border-2: rgba(15, 23, 42, .16);

  --heading: #0f172a;
  --text: #3d4658;
  --muted: #667085;
  --shadow: 0 28px 64px -28px rgba(30, 27, 75, .25);
  --shadow-card: 0 16px 42px -20px rgba(30, 27, 75, .2);
  --ring: rgba(91, 75, 219, .3);
  --glass: rgba(255, 255, 255, .78);
}

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

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

body {
  font-family: var(--font-latin);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -12%, rgba(124, 108, 245, .12), transparent 70%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(34, 211, 238, .06), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}

::selection { background: var(--primary); color: #fff; }

:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 键盘用户跳转链接 */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 3000;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .25s ease;
}
.skip-link:focus { transform: translateY(0); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--accent)); border-radius: 20px; }

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* ---------- 通用工具 ---------- */
.container {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section { padding: 112px 0; position: relative; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 64px; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .35em;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-tag::before, .section-tag::after {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary));
}
.section-tag::after { background: linear-gradient(90deg, var(--primary), transparent); }

.section-title {
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -.5px;
  line-height: 1.25;
}

.section-sub { margin-top: 12px; color: var(--muted); }

/* 统一的卡片质感：顶部内高光 + 层次阴影 */
.about-facts,
.stat,
.skill-group,
.contact-panel,
.cw-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
[data-theme="light"] .about-facts,
[data-theme="light"] .stat,
[data-theme="light"] .skill-group,
[data-theme="light"] .contact-panel,
[data-theme="light"] .cw-card {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -24px rgba(30, 27, 75, .4);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: var(--transition);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform var(--transition); }
.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 160% 160%;
  box-shadow: 0 12px 30px -10px rgba(124, 108, 245, .55);
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -10px rgba(124, 108, 245, .65);
}
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost {
  color: var(--heading);
  border: 1.5px solid var(--border-2);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- 粒子画布 ---------- */
.particles {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ---------- 导航 ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 76px;
  transition: background .35s ease, box-shadow .35s ease, height .35s ease;
}
.header.scrolled {
  height: 64px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--heading); }
.logo-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad);
  color: #fff; font-size: 19px; font-weight: 800;
  box-shadow: 0 8px 20px -6px rgba(124, 108, 245, .55);
}
.logo-text { font-size: 20px; letter-spacing: -.3px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: var(--transition);
}
.nav-link:hover { color: var(--heading); background: var(--surface); }
.nav-link.active {
  color: var(--heading);
  background: var(--surface-2);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="light"] .nav-link.active { box-shadow: 0 2px 10px -6px rgba(30, 27, 75, .35); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta { display: inline-flex; }

.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: var(--transition);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; position: absolute; transition: opacity .35s, transform .35s; }
.theme-toggle { position: relative; }

[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .icon-moon { opacity: 1; }
[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="light"] .icon-sun { opacity: 1; }

.hamburger { display: none; width: 42px; height: 42px; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; z-index: 1102; }
.hamburger span {
  height: 2px; width: 100%;
  background: var(--heading);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
[data-theme="light"] .blob { opacity: .35; }
.blob-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(124,108,245,.5), transparent 65%); top: -140px; left: -120px; animation: float 11s ease-in-out infinite; }
.blob-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(34,211,238,.42), transparent 65%); bottom: -120px; right: -100px; animation: float 13s ease-in-out infinite reverse; }
.blob-3 { width: 320px; height: 320px; background: radial-gradient(circle, rgba(167,139,250,.38), transparent 65%); top: 42%; left: 58%; animation: float 15s ease-in-out 2s infinite; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(34px, -30px) scale(1.06); }
  66% { transform: translate(-22px, 24px) scale(.96); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 60px;
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
  z-index: 1;
}

.hero-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  margin-bottom: 26px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; position: relative; flex: none; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #34d399;
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

.hero-title {
  font-size: clamp(40px, 6.6vw, 70px);
  font-weight: 800;
  color: var(--heading);
  line-height: 1.12;
  letter-spacing: -2px;
  margin-bottom: 10px;
}

.hero-typed {
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 22px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.typed-wrap { display: inline-flex; align-items: baseline; }
.typed { color: var(--primary); }
.typed-cursor {
  width: 3px; height: 1.15em;
  background: var(--primary);
  margin-left: 4px;
  display: inline-block;
  animation: blink .8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { max-width: 540px; font-size: 16.5px; line-height: 1.85; color: var(--muted); margin-bottom: 34px; }

.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 38px; }

.socials { display: flex; gap: 12px; }
.socials a, .contact-socials a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: var(--transition);
}
.socials a svg, .contact-socials a svg { width: 19px; height: 19px; }
.socials a:hover, .contact-socials a:hover {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 12px 26px -10px rgba(124, 108, 245, .6);
}

/* Hero 视觉区 */
.hero-visual { display: flex; justify-content: center; }
.avatar-card { position: relative; width: min(100%, 380px); aspect-ratio: 1; }

.avatar-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(150deg, rgba(139, 92, 246, .9), rgba(34, 211, 238, .45) 48%, rgba(255, 255, 255, .08));
  box-shadow:
    0 40px 90px -34px rgba(99, 102, 241, .75),
    0 0 0 1px rgba(255, 255, 255, .05);
}

.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 108, 245, .22), transparent 62%),
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .14), transparent 40%),
    linear-gradient(160deg, #1a2036, #0a0c14);
  display: grid; place-items: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
[data-theme="light"] .avatar-inner {
  background: linear-gradient(160deg, #eef0f8, #d9def0);
  box-shadow: inset 0 0 40px rgba(90, 75, 207, .16);
}
.avatar-initials {
  font-size: clamp(70px, 9vw, 106px);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.avatar-float-card {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-card);
  animation: bob 5s ease-in-out infinite;
  z-index: 2;
}
.avatar-float-card svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
.avatar-float-card strong { display: block; font-size: 13.5px; color: var(--heading); line-height: 1.3; }
.avatar-float-card span:not(.code-tag) { font-size: 12px; color: var(--muted); }
.card-loc { bottom: 16px; left: -26px; }
.card-role { top: 16%; right: -34px; animation-delay: 1.2s; }
.code-tag {
  font-family: var(--font-mono);
  font-size: 12px !important;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--grad);
  color: #fff !important;
}

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

/* 滚动提示 */
.scroll-hint {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; justify-content: center;
}
.mouse {
  width: 26px; height: 42px;
  border: 2px solid var(--border-2);
  border-radius: 16px;
  display: flex; justify-content: center;
  padding-top: 7px;
}
.wheel {
  width: 4px; height: 8px;
  border-radius: 4px;
  background: var(--primary);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 关于 ---------- */
.about { background: var(--bg-soft); }
.about-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.photo-frame { position: relative; width: min(100%, 360px); margin-inline: auto; }
.photo-inner {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.photo-inner::before {
  content: "";
  position: absolute; inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,108,245,.35), transparent 40%),
    radial-gradient(circle at 80% 75%, rgba(34,211,238,.3), transparent 42%);
  animation: pan 16s ease-in-out infinite alternate;
}
@keyframes pan {
  0% { transform: translate(-3%, -3%) rotate(0deg) scale(1); }
  100% { transform: translate(3%, 3%) rotate(4deg) scale(1.12); }
}
.photo-initials { font-size: clamp(120px, 16vw, 190px); font-weight: 800; color: rgba(255,255,255,.92); text-shadow: 0 18px 44px rgba(0,0,0,.3); z-index: 1; line-height: 1; }
[data-theme="light"] .photo-initials { color: rgba(90,75,207,.8); text-shadow: none; }

.photo-code {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--glass);
  border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  z-index: 1;
  white-space: nowrap;
}
.photo-code-1 { top: 18px; left: 18px; }
.photo-code-2 { bottom: 18px; right: 18px; }

.photo-badge {
  position: absolute;
  right: -18px; top: 26px;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 16px 36px -8px rgba(124, 108, 245, .6);
  animation: bob 5s ease-in-out infinite;
}

.about-name { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--heading); margin-bottom: 18px; line-height: 1.4; }
.about-info p { color: var(--text); margin-bottom: 14px; }
.about-info b { color: var(--heading); font-weight: 600; }

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 26px;
  margin: 26px 0 32px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.about-facts li { display: flex; align-items: baseline; gap: 12px; font-size: 14.5px; color: var(--heading); font-weight: 500; }
.about-facts span { font-size: 13px; color: var(--muted); min-width: 46px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  text-align: center;
  padding: 20px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.stat:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow-card); }
.stat-num {
  display: block;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  color: var(--heading);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 13px; color: var(--muted); }

/* ---------- 技能 ---------- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 46px; }

.skill-group {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.skill-group:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow-card); }

.skill-group-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 700; color: var(--heading);
  margin-bottom: 24px;
}
.skill-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  font-size: 20px;
}
.skill-icon-front { background: linear-gradient(135deg, #6c5ce7, #a855f7); box-shadow: 0 8px 20px -6px rgba(167,139,250,.55); }
.skill-icon-back { background: linear-gradient(135deg, #0891b2, #06b6d4); box-shadow: 0 8px 20px -6px rgba(34,211,238,.55); }

.skill { margin-bottom: 20px; }
.skill:last-child { margin-bottom: 0; }
.skill-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 14.5px; font-weight: 500; color: var(--text); }
.skill-val { color: var(--primary); font-weight: 700; font-size: 13.5px; }
.skill-track {
  height: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.skill-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--grad);
  transition: width 1.4s cubic-bezier(.22, .9, .3, 1);
}

.skill-tags {
  text-align: center;
  padding: 30px 34px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-2);
}
.tags-title { display: block; font-size: 13px; letter-spacing: .28em; color: var(--muted); text-transform: uppercase; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tag {
  padding: 7px 17px;
  font-size: 13.5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
  cursor: default;
}
.tag:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); box-shadow: 0 8px 18px -8px rgba(124,108,245,.5); }

/* ---------- 联系 ---------- */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
}

.contact-info h3 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; color: var(--heading); margin-bottom: 14px; }
.contact-info > p { color: var(--text); margin-bottom: 28px; max-width: 420px; }

.contact-items { display: grid; gap: 16px; margin-bottom: 30px; }
.contact-items li { display: flex; align-items: center; gap: 16px; }
.ci-icon {
  width: 50px; height: 50px;
  flex: none;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--primary);
  transition: var(--transition);
}
.ci-icon svg { width: 22px; height: 22px; }
.contact-items li:hover .ci-icon { background: var(--grad); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 22px -8px rgba(124,108,245,.55); }
.contact-items strong { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.contact-items a, .contact-items div > span { color: var(--heading); font-weight: 600; font-size: 15px; transition: color var(--transition); }
.contact-items a:hover { color: var(--primary); }

.contact-socials { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.contact-socials a { width: 40px; height: 40px; }

/* 扫码关注面板 */
.contact-panel {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="light"] .contact-panel {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.panel-head { margin-bottom: 22px; }
.panel-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  color: var(--primary); background: rgba(124,108,245,.12);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.panel-head h4 { font-size: 22px; font-weight: 800; color: var(--heading); margin-bottom: 6px; }
.panel-head p { font-size: 13.5px; color: var(--muted); }

/* 二维码关注卡片 */
.contact-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cw-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 20px 12px 18px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: var(--transition);
}
.cw-card:hover { transform: translateY(-6px); border-color: rgba(124,108,245,.5); box-shadow: var(--shadow); }
.cw-qr {
  width: 132px; height: 132px; padding: 6px; border-radius: 12px;
  background: #fff; overflow: hidden; margin-bottom: 14px;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.4);
}
.cw-qr img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .45s cubic-bezier(.22, .9, .3, 1); }
.cw-card:hover .cw-qr img { transform: scale(1.06); }
.cw-tag {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--primary);
  background: rgba(124,108,245,.12); padding: 3px 12px; border-radius: 999px; margin-bottom: 9px;
}
.cw-tag-mini { color: #10b981; background: rgba(16,185,129,.12); }
.cw-info h4 { font-size: 18px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.cw-info p { font-size: 13px; color: var(--muted); }
@media (max-width: 768px) {
  .contact-channels { grid-template-columns: 1fr; }
  .cw-card { flex-direction: row; align-items: center; text-align: left; gap: 18px; }
  .cw-qr { width: 116px; height: 116px; margin-bottom: 0; flex: none; }
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  padding: 46px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: .45;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer .logo { margin-bottom: 2px; }
.footer p { font-size: 14px; color: var(--muted); }

.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 14px; }
.footer-nav a { color: var(--muted); transition: color var(--transition); }
.footer-nav a:hover { color: var(--primary-2); }
.heart { color: #f43f5e; display: inline-block; animation: heartbeat 1.5s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.22); } 40% { transform: scale(1); } 60% { transform: scale(1.14); } }
.copyright { font-size: 12.5px !important; opacity: .8; }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 48px; height: 48px;
  z-index: 900;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(124, 108, 245, .6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: var(--transition);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, .9, .3, 1);
  will-change: opacity, transform;
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .hero-content { grid-template-columns: 1fr; gap: 72px; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-typed { justify-content: center; }
  .hero-visual { order: -1; }
  .avatar-card { width: min(100%, 300px); }
  .card-role { right: -10px; }
  .card-loc { left: -10px; }
  .hero-desc { margin-inline: auto; }

  .about-grid { grid-template-columns: 1fr; gap: 54px; }
  .photo-frame { width: min(100%, 300px); }
  .about-facts { justify-self: stretch; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--glass);
    -webkit-backdrop-filter: blur(26px);
    backdrop-filter: blur(26px);
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-link { font-size: 22px; padding: 13px 26px; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .header.scrolled { height: 64px; }

  .skills-grid { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 36px, 1160px); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-facts { grid-template-columns: 1fr; padding: 18px 20px; }
  .hero-actions { justify-content: center; }
  .socials { justify-content: center; }
  .avatar-float-card { padding: 10px 14px; }
  .card-role { right: -6px; }
  .card-loc { left: -6px; }
  .to-top { right: 16px; bottom: 16px; }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  html { scroll-behavior: auto; }
}
