/*
  视觉目标：
  - 扁平插画 + 大标题高亮块 + 圆角卡片 + 留白
  - 年轻、有趣、但保持专业感
  - 不用框架，尽量结构清晰，方便新手修改
*/

:root {
  /* 基础色 */
  --bg: #020617;
  --paper: #ffffff;
  --text: #121826;
  --muted: rgba(18, 24, 38, 0.72);
  --line: rgba(18, 24, 38, 0.12);

  /* 强调色（高对比、高饱和） */
  --pink: #ff4d6d;
  --blue: #3b82f6;
  --yellow: #ffe36b;
  --ink: #1f2430;

  /* 统一圆角与阴影 */
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 14px;
  --shadow: 0 18px 45px rgba(11, 15, 25, 0.12);
  --shadow-strong: 0 22px 60px rgba(11, 15, 25, 0.2);

  /* 排版 */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    Arial, sans-serif;
  --container: 1120px;

  /* 动画节奏 */
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  --t-fast: 160ms;
  --t-mid: 280ms;

  /* 滚动定位：用于锚点滚动时避免被固定导航遮挡 */
  scroll-padding-top: 96px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(59, 130, 246, 0.4), transparent 60%),
    radial-gradient(1000px 520px at 90% 10%, rgba(147, 51, 234, 0.42), transparent 60%),
    radial-gradient(900px 520px at 40% 100%, rgba(34, 211, 238, 0.24), transparent 60%),
    #020617;
}

/* 星空粒子画布：全屏铺底，不挡交互 */
.ai-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 鼠标跟随光晕（桌面端）：柔和蓝紫能量圈 */
.cursor-light {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(circle at center, rgba(129, 140, 248, 0.22), transparent 75%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 220ms var(--ease);
  z-index: 1;
}

@media (pointer: coarse) {
  .cursor-light {
    display: none;
  }
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部滚动进度条 */
.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--yellow));
  z-index: 1000;
}

/* 固定顶部导航（圆角壳） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 14px 0;
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.12), transparent 60%), rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
}

.brand:focus-visible {
  outline: 3px solid rgba(58, 134, 255, 0.35);
  outline-offset: 3px;
}

.brand__badge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #e5e7eb;
  background: conic-gradient(from 210deg, #22d3ee, #6366f1, #fb7185, #22d3ee);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

.brand__text {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #e5e7eb;
}

.brand__sub {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
  margin-left: 2px;
  display: none;
}

/* 桌面导航链接 */
.nav-panel {
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.9);
  transition:
    background var(--t-mid) var(--ease),
    transform var(--t-fast) var(--ease),
    color var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease);
}

.nav-link:hover {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), rgba(30, 64, 175, 0.3));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.6);
}

.nav-link.is-active {
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.7), rgba(147, 51, 234, 0.7));
  color: #f9fafb;
}

.nav-link--cta {
  background: linear-gradient(120deg, #4f46e5, #22d3ee);
  color: #f9fafb;
}

.nav-link--cta:hover {
  background: linear-gradient(120deg, #6366f1, #22c55e);
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(18, 24, 38, 0.12);
  background: rgba(255, 255, 255, 0.92);
  margin-left: auto;
  padding: 10px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease);
}

.nav-toggle:hover {
  transform: translateY(-1px);
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-toggle__bar + .nav-toggle__bar {
  margin-top: 6px;
}

/* Section 通用 */
.section {
  padding: 72px 0;
}

.section--tint {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.25));
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section__title {
  font-size: clamp(28px, 3.3vw, 42px);
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.section__lead {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
  max-width: 58ch;
}

/* 深色 About 区域的标题与引导文字提亮，防止被背景吃掉 */
#about .section__title {
  color: #e5e7eb;
}

#about .section__lead {
  color: rgba(229, 231, 235, 0.98);
  text-shadow: 0 0 8px rgba(15, 23, 42, 0.95);
}

/* 浅色分区（如 section--tint）使用更深的标题色，保持对比度 */
.section--tint .section__title {
  color: #0f172a;
}

.section--tint .section__lead {
  color: rgba(30, 64, 175, 0.9);
}

/* Hero */
.hero {
  padding-top: 32px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}

.kicker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px 0;
}

.pill {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 38, 0.12);
  background: rgba(255, 255, 255, 0.82);
  transition:
    background var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    transform var(--t-fast) var(--ease);
}

.pill--soft {
  background: rgba(58, 134, 255, 0.08);
  border-color: rgba(58, 134, 255, 0.18);
}

.pill:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.85);
  transform: translateY(-1px);
}

.hero__title {
  margin: 0;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: #f9fafb;
}

.hero__title span {
  font-weight: 800;
}

.hero__title-accent {
  background: linear-gradient(120deg, #38bdf8, #a855f7, #fb7185);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow:
    0 0 18px rgba(56, 189, 248, 0.9),
    0 0 32px rgba(147, 51, 234, 0.75);
  font-weight: 900;
}

.hero__tagline {
  margin: 4px 0 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.98);
}

.hero__subtitle {
  margin: 14px 0 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(209, 213, 219, 0.85);
  max-width: 62ch;
}

/* 高亮块（可复用） */
.hl {
  position: relative;
  display: inline-block;
  padding: 0 6px;
  border-radius: 12px;
  color: var(--ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hl--pink {
  background: rgba(255, 77, 109, 0.22);
}
.hl--blue {
  background: rgba(59, 130, 246, 0.3);
}
.hl--yellow {
  background: rgba(250, 204, 21, 0.7);
}

/* 按钮（圆角统一） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.95));
  color: #e5e7eb;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    background var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.95);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.85);
}

.btn:focus-visible {
  outline: 3px solid rgba(58, 134, 255, 0.35);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, #4f46e5, #0ea5e9, #22c55e);
  color: #f9fafb;
  border-color: rgba(129, 140, 248, 0.6);
}

.btn--primary:hover {
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.95);
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.85);
}

.btn__icon {
  font-weight: 900;
}

.btn--small {
  padding: 10px 14px;
  font-size: 13px;
}

.hero__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
}

/* 卡片 */
.card {
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.93));
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.85);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    background var(--t-mid) var(--ease);
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.98);
}

.card__title {
  margin: 0;
  letter-spacing: -0.02em;
  color: #e5e7eb;
}

.card__text {
  margin: 10px 0 0 0;
  color: rgba(209, 213, 219, 0.9);
  line-height: 1.75;
}

.card__meta {
  margin: 10px 0 0 0;
  color: rgba(156, 163, 175, 0.95);
  line-height: 1.55;
  font-size: 14px;
}

.card--mini {
  border-radius: 22px;
  padding: 14px 14px 12px;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}

.card--mini:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat__num {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.stat__label {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

/* 插画卡片 */
.art-card {
  padding: 16px;
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}

.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  border-color: rgba(129, 140, 248, 0.7);
}

.art-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot--red {
  background: #ff5d5d;
}
.dot--yellow {
  background: #ffc84a;
}
.dot--green {
  background: #49d08a;
}

.art-card__tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.7);
  color: #e5e7eb;
}

.illustration {
  border-radius: 26px;
  border: 1px solid rgba(18, 24, 38, 0.08);
  background: #020617;
}

/* Hero 主展示图容器：复用插画区域的圆角和边框风格 */
.hero-media {
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  overflow: hidden;
  position: relative;
}

.hero-media__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* 如果重要内容被裁切太多，可改为 contain */
  border-radius: 26px;
}

.art-card:hover .hero-media {
  border-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.98);
}

.art-card__bottom {
  margin-top: 12px;
  padding: 0 4px 4px;
}

.art-card__headline {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #e5e7eb;
}

.art-card__desc {
  margin: 6px 0 0 0;
  color: rgba(209, 213, 219, 0.9);
  line-height: 1.7;
  font-size: 14px;
}

/* 头像区域：支持 avatar.jpg + 科技感边框 */
.avatar-ring {
  position: relative;
  margin-bottom: 14px;
}

.avatar-ring__inner {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 28px;
  padding: 3px;
  background: conic-gradient(from 210deg, #22d3ee, #6366f1, #fb7185, #22d3ee);
  box-shadow:
    0 0 22px rgba(56, 189, 248, 0.8),
    0 22px 40px rgba(15, 23, 42, 0.98);
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* 当没有头像或加载失败时，显示缩写作为兜底 */
.avatar-ring__initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.98));
  mix-blend-mode: screen;
}

.avatar-ring__label {
  margin: 8px 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(209, 213, 219, 0.95);
}

.art-card:hover .avatar-ring__inner {
  box-shadow:
    0 0 32px rgba(56, 189, 248, 0.95),
    0 28px 52px rgba(15, 23, 42, 0.99);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .avatar-ring__inner {
    width: 130px;
    height: 130px;
  }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}

.about-card {
  padding: 22px;
}

/* 略微放大 About 区的三张卡片，避免文字被压缩不完整 */
#about .about-grid .card {
  min-height: 260px;
}

/* 后两张卡片的内容整体往下移一点，避免标题被圆角遮挡 */
#about .about-grid .card:nth-child(2),
#about .about-grid .card:nth-child(3) {
  padding: 26px 22px 20px;
}

.tag-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: rgba(226, 232, 240, 0.9);
}

.tag {
  transition:
    background var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    transform var(--t-fast) var(--ease);
}

.tag:hover {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.4), rgba(15, 23, 42, 0.98));
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.85);
  transform: translateY(-1px);
}

.list {
  margin: 12px 0 0 0;
  padding-left: 18px;
  color: rgba(209, 213, 219, 0.9);
  line-height: 1.8;
}

.kv {
  margin: 12px 0 0 0;
}

.kv__row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed rgba(18, 24, 38, 0.12);
}

.kv__row:first-child {
  border-top: 0;
}

.kv dt {
  font-weight: 900;
  color: rgba(226, 232, 240, 0.96);
}

.kv dd {
  margin: 0;
  color: rgba(209, 213, 219, 0.9);
  line-height: 1.6;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.skill {
  padding: 18px;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}

.skill:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.95);
}

.skill__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.8), rgba(37, 99, 235, 0.9));
  border: 1px solid rgba(129, 140, 248, 0.9);
  color: #eff6ff;
  box-shadow:
    0 0 18px rgba(59, 130, 246, 0.85),
    0 14px 28px rgba(15, 23, 42, 0.85);
  transition:
    transform var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    background var(--t-mid) var(--ease);
}

.skill__icon--pink {
  background: radial-gradient(circle at top left, rgba(244, 114, 182, 0.9), rgba(239, 68, 68, 0.9));
  border-color: rgba(248, 113, 113, 0.95);
}
.skill__icon--yellow {
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.9), rgba(251, 191, 36, 0.95));
  border-color: rgba(234, 179, 8, 0.95);
}
.skill__icon--blue {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.9), rgba(59, 130, 246, 0.98));
  border-color: rgba(96, 165, 250, 0.98);
}

.icon {
  width: 24px;
  height: 24px;
}

/* 技能卡片 hover 时，图标轻微放大并更亮 */
.skill:hover .skill__icon {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 24px rgba(59, 130, 246, 0.95),
    0 18px 40px rgba(15, 23, 42, 0.98);
}

/* 简单“进度条”视觉（技能熟练度） */
.meter {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  background: rgba(18, 24, 38, 0.06);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.meter__bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #a855f7);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.85);
  transition: width 900ms var(--ease);
}

.meter__bar.is-fill {
  width: var(--w, 60%);
}

.note {
  margin-top: 16px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 227, 107, 0.55), rgba(58, 134, 255, 0.12));
}

.note__title {
  margin: 0;
  font-weight: 900;
}

.note__text {
  margin: 8px 0 0 0;
  color: rgba(30, 64, 175, 0.9);
  line-height: 1.7;
}

/* Projects */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project {
  padding: 18px;
  transition:
    transform var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease);
}

.project::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 210deg, rgba(59, 130, 246, 0.7), rgba(236, 72, 153, 0.7), rgba(56, 189, 248, 0.7));
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
  z-index: -1;
}

.project:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.98);
  border-color: transparent;
}

.project:hover::before {
  opacity: 1;
}

.card__topline {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.18);
}

.badge {
  transition:
    background var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    transform var(--t-fast) var(--ease);
}

.badge:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.85);
  transform: translateY(-1px);
}

.badge--soft {
  background: rgba(18, 24, 38, 0.06);
  border-color: rgba(18, 24, 38, 0.08);
}

.badge--blue {
  background: rgba(58, 134, 255, 0.12);
  border-color: rgba(58, 134, 255, 0.18);
}

.badge--yellow {
  background: rgba(255, 227, 107, 0.42);
  border-color: rgba(255, 227, 107, 0.6);
}

.card__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tl-item {
  padding: 18px;
}

.tl-item__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: baseline;
  justify-content: space-between;
}

.tl-item__meta {
  margin: 0;
  color: rgba(148, 163, 184, 0.9);
  font-weight: 800;
  font-size: 13px;
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.edu-grid .card {
  padding: 18px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 14px;
  cursor: pointer;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
  text-align: left;
}

.contact:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.98);
  border-color: rgba(59, 130, 246, 0.8);
}

.contact__icon {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #0f172a;
  background: radial-gradient(circle at top left, #fbbf24, #f97316);
  border: 1px solid rgba(250, 204, 21, 0.9);
}

.contact__label {
  margin: 0;
  font-weight: 900;
  color: #e5e7eb;
  text-shadow: 0 0 8px rgba(15, 23, 42, 0.9);
}

.contact__value {
  margin: 4px 0 0 0;
  color: rgba(209, 213, 219, 0.9);
  font-size: 14px;
}

.contact__hint {
  margin-left: auto;
  font-size: 12px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.85);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(18, 24, 38, 0.06);
  border: 1px solid rgba(18, 24, 38, 0.08);
}

/* Toast（复制提示） */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(11, 15, 25, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Footer */
.footer {
  padding: 26px 0 40px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: rgba(148, 163, 184, 0.9);
}

.footer__left,
.footer__right {
  margin: 0;
}

/* 滚动出现动画：先隐藏、进入视口后再出现 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition:
    opacity 520ms var(--ease),
    transform 520ms var(--ease),
    filter 520ms var(--ease);
}

.reveal--delay.is-in {
  transition-delay: 120ms;
}

/* 响应式：平板与手机重点优化 Hero 与网格 */
@media (max-width: 980px) {
  .brand__sub {
    display: inline;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    scroll-padding-top: 92px;
  }

  .nav-shell {
    border-radius: 24px;
    padding: 10px;
  }

  /* 移动端：隐藏横向菜单，改为面板 */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav-panel {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 72px;
    margin: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(18, 24, 38, 0.1);
    border-radius: 26px;
    box-shadow: 0 18px 45px rgba(11, 15, 25, 0.14);
    padding: 10px;
    display: none;
  }

  .nav-panel.is-open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
  }

  .hero__title {
    letter-spacing: -0.04em;
  }

  .section__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .skills-grid,
  .cards-grid,
  .edu-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }
}

/* 减少动效：尊重系统设置（可访问性） */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

