@charset "UTF-8";

/* ============================================================
   王政锠 · 个人主页
   设计语言：卡片式 / Apple 官网感 / 单页 H5
   纯静态：无框架、无在线字体、无外部依赖，双击即开
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-inset: rgba(0, 0, 0, 0.035);
  --ink: #1d1d1f;
  --ink-strong: #000000;
  --ink-muted: #5f5f64;
  --ink-faint: #7c7c81;
  --ink-on-dark: #f5f5f7;
  --ink-on-dark-muted: #a1a1a6;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --brand: #c8452f;
  --hairline: rgba(0, 0, 0, 0.09);
  --hairline-strong: rgba(0, 0, 0, 0.14);
  --card: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --card-dark: #1d1d1f;
  --card-dark-2: #2a2a2c;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.06), 0 20px 44px rgba(0, 0, 0, 0.1);
  --shadow-3: 0 8px 20px rgba(0, 0, 0, 0.08), 0 34px 70px rgba(0, 0, 0, 0.14);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-pill: 980px;

  --nav-h: 48px;
  --shell: 1120px;
  --gutter: 22px;
  --gap: 18px;
  /* iOS 刘海屏安全区，供导航与抽屉做左右让位 */
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 深色主题 */
html[data-theme="dark"] {
  --bg: #0d1117;
  --bg-subtle: #121922;
  --bg-elevated: #1b2531;
  --bg-inset: rgba(201, 220, 240, 0.08);
  --ink: #e9eef5;
  --ink-strong: #ffffff;
  --ink-muted: #c0cad7;
  --ink-faint: #a0adbd;
  --ink-on-dark: #f4f7fb;
  --ink-on-dark-muted: #c0cad7;
  --accent: #79b8ff;
  --accent-hover: #a6d0ff;
  --accent-soft: rgba(92, 163, 245, 0.18);
  --brand: #ff6b52;
  --hairline: rgba(194, 214, 238, 0.14);
  --hairline-strong: rgba(194, 214, 238, 0.24);
  --card: #18212c;
  --card-border: rgba(194, 214, 238, 0.13);
  --card-dark: #192538;
  --card-dark-2: #24334a;
  --nav-bg: rgba(18, 26, 37, 0.82);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.5), 0 20px 44px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 8px 20px rgba(0, 0, 0, 0.55), 0 34px 70px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}
a:hover { color: var(--accent-hover); }

strong, b { font-weight: 600; }
em { font-style: normal; }

::selection { background: var(--accent-soft); }

:focus-visible, button:focus, select:focus, [role="button"]:focus,
a.btn:focus, a.scroll-hint:focus, a.github-card__link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 3. 版心与排版工具 ---------- */
.shell {
  width: 100%;
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 96px 0 8px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.section--tight { padding-top: 64px; }
.section--last { padding-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.eyebrow--accent { color: var(--accent); }

.h-display {
  font-size: clamp(30px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink-strong);
}

.h-section {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-strong);
}

.h-card {
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.24;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ink-strong);
}

.h-mini {
  font-size: 18px;
  line-height: 1.32;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink-strong);
}

.lead {
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.5;
  color: var(--ink-muted);
  font-weight: 400;
}

.body-muted { color: var(--ink-muted); font-size: 15px; line-height: 1.62; }

/* 首屏标题第二行不拆行，避免出现单字换行 */
.nowrap { white-space: nowrap; }

.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head .h-section { margin-bottom: 14px; }
.section-head .lead { font-size: clamp(16px, 1.7vw, 19px); }

.text-gradient {
  background: linear-gradient(92deg, var(--ink-strong) 0%, var(--accent) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 4. 卡片栅格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
    background-color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

.card--flat { box-shadow: none; }
.card--flat:hover { transform: none; box-shadow: var(--shadow-1); }

.card--inset { background: var(--bg-subtle); border-color: transparent; }
.card--dark {
  background: var(--card-dark);
  border-color: transparent;
  color: var(--ink-on-dark);
}
.card--dark .h-card,
.card--dark .h-mini,
.card--dark .h-section { color: var(--ink-on-dark); }
.card--dark .body-muted { color: var(--ink-on-dark-muted); }
.card--dark .card-label { color: var(--ink-on-dark-muted); }
.card--dark .card-label::before { background: var(--accent); }
.card--dark .btn--quiet { color: var(--ink-on-dark); background: rgba(255, 255, 255, 0.12); }
.card--dark .btn--quiet:hover { color: #fff; background: rgba(255, 255, 255, 0.2); }

.card--dark::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 320px;
  background: radial-gradient(60% 100% at 50% 100%, rgba(10, 132, 255, 0.28), transparent 70%);
  pointer-events: none;
}

.card--accent {
  background: linear-gradient(160deg, #eef4ff 0%, #fdfdff 62%);
  border-color: rgba(0, 113, 227, 0.16);
}
html[data-theme="dark"] .card--accent {
  background: linear-gradient(160deg, #1b304b 0%, #1b2531 62%);
  border-color: rgba(121, 184, 255, 0.26);
}

.card > * { position: relative; z-index: 1; }

.card-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.card-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.card-note {
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* 跨列 */
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* ---------- 5. 导航 ---------- */
/* 全局按钮基类（首屏另有深色皮肤的 .hero .btn 覆盖） */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease),
    color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:active { transform: scale(0.975); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 8px 22px rgba(0, 113, 227, 0.28); }
html[data-theme="dark"] .btn--primary { background: #246fbe; }
html[data-theme="dark"] .btn--primary:hover { background: #3185d8; }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn--quiet { background: var(--bg-inset); color: var(--ink); }
.btn--quiet:hover { background: var(--hairline); color: var(--ink); }
.btn--light { background: #fff; color: #1d1d1f; }
.btn--light:hover { background: #f0f0f2; color: #1d1d1f; }
.btn--sm { padding: 9px 16px; font-size: 14px; }

/* 全局颗粒质感与鼠标光晕（取自参考站） */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 150, 255, 0.16), rgba(80, 150, 255, 0) 62%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s;
}

/* ---------- 5. 导航（照搬参考站 nav，附加本页的主题按钮与移动端抽屉） ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 14px;
  padding: 18px clamp(20px, 4vw, 52px);
  border-bottom: 1px solid transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background 0.45s, backdrop-filter 0.45s, border-color 0.45s, padding 0.45s;
}
.nav.is-scrolled {
  background: rgba(4, 7, 17, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(150, 180, 255, 0.14);
  padding-top: 12px;
  padding-bottom: 12px;
}

/* 刘海屏左右留出安全区 */
.shell { padding-left: calc(var(--gutter) + var(--safe-l)); padding-right: calc(var(--gutter) + var(--safe-r)); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #eef3ff;
  flex: none;
  white-space: nowrap;
}
.brand:hover { color: #fff; }
.brand-mark {
  position: relative;
  display: block;
  width: 72px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #3f7dff, #8b6bff);
  box-shadow: 0 6px 22px rgba(63, 125, 255, 0.45);
  padding: 0;
  overflow: visible;
}
.brand-mark img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 60px;
  height: auto;
  max-width: none;
  transform: translate(-50%, -50%);
}
.brand-text { font-size: 15px; color: var(--ink-strong); transition: color 0.45s; }
.nav.is-scrolled .brand-text { color: #fff; }

.nav-links {
  display: flex;
  gap: clamp(10px, 1.5vw, 26px);
  font-size: 14px;
  color: #a3b3d8;
  margin-left: auto;
  min-width: 0;
  flex-wrap: nowrap;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  border-radius: 0;
  color: #a3b3d8;
  white-space: nowrap;
  transition: color 0.3s;
}
.nav-links a:hover { color: #fff; background: transparent; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, #63d9ff, #3f7dff);
  transition: right 0.35s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.nav-links a:hover::after { right: 0; }
.nav-links a.is-active {
  color: #fff;
  font-weight: inherit;
}
.nav:not(.is-scrolled) .nav-links a[href="#about"] { color: var(--ink-strong); }
.nav.is-scrolled .nav-links a[href="#about"] { color: #fff; }
.nav-links a.is-active::after {
  right: 0;
  width: auto;
  left: 0;
  transform: none;
  border-radius: 0;
  height: 1px;
}

.nav-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a3b3d8;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.icon-btn:hover { background: rgba(140, 175, 255, 0.14); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.theme-btn .i-moon { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: none; }
html[data-theme="dark"] .theme-btn .i-moon { display: block; }
.nav-toggle { display: none; }

.drawer {
  position: fixed;
  inset: 62px 0 auto 0;
  z-index: 99;
  padding: 10px clamp(20px, 4vw, 52px) 22px;
  background: rgba(4, 7, 17, 0.94);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(150, 180, 255, 0.14);
  display: none;
  flex-direction: column;
  gap: 2px;
}
.drawer.is-open { display: flex; }
.drawer a {
  padding: 13px 12px;
  border-radius: 12px;
  color: #eef3ff;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(150, 180, 255, 0.12);
}
.drawer a:last-child { border-bottom: 0; }
.drawer a:hover { background: rgba(140, 175, 255, 0.12); }
/* ---------- 6. 首屏（3D 场景见下方专节） ---------- */
/* ============================================================
   首屏：人物卡（Apple 产品页式）
   一张大卡片 + 大量留白；抠像人像从卡片上沿溢出，
   硬切边正好落在卡内被圆角收住，成为设计语言而非瑕疵。
   ============================================================ */
.hero--card {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 30px) 0 clamp(44px, 6vh, 72px);
  background:
    radial-gradient(120% 80% at 78% 6%, rgba(63, 125, 255, 0.14), transparent 62%),
    radial-gradient(90% 70% at 12% 26%, rgba(139, 107, 255, 0.1), transparent 60%),
    var(--bg);
  overflow: hidden;
}
html[data-theme="dark"] .hero--card {
  background:
    radial-gradient(120% 80% at 78% 6%, rgba(10, 132, 255, 0.2), transparent 62%),
    radial-gradient(90% 70% at 12% 26%, rgba(139, 107, 255, 0.16), transparent 60%),
    var(--bg);
}

.hero__inner { display: flex; flex-direction: column; gap: 0; width: 100%; }

/* ---------- 标题区：大留白 ---------- */
.hero--card .hero__copy {
  position: static;
  min-height: 0;
  padding: 0;
  max-width: 860px;
  display: block;
  z-index: auto;
}
.hero--card .eyebrow {
  display: block;
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}
.hero--card .hero__name {
  margin: 0;
  font-size: clamp(42px, 6.6vw, 76px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
  background: linear-gradient(170deg, var(--ink-strong) 32%, var(--accent) 128%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero--card .hero__role {
  margin: 12px 0 0;
  font-size: clamp(14.5px, 1.35vw, 17px);
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}
.hero--card .hero__role span { color: var(--accent); margin: 0 8px; }

/* ---------- 人物卡 ---------- */
.hero-card {
  position: relative;
  margin: clamp(22px, 3.2vw, 40px) 0 0;
  border-radius: clamp(24px, 3vw, 36px);
  background: linear-gradient(168deg, #2a3550 0%, #17203a 46%, #0d1424 100%);
  border: 1px solid rgba(140, 175, 255, 0.16);
  box-shadow: 0 40px 90px -40px rgba(12, 26, 60, 0.55), 0 2px 6px rgba(12, 26, 60, 0.08);
  overflow: visible;                 /* 让人物溢出卡边 */
  isolation: isolate;
}
html[data-theme="dark"] .hero-card {
  background: linear-gradient(168deg, #1b2440 0%, #101830 46%, #080d1a 100%);
  border-color: rgba(140, 175, 255, 0.2);
}
/* 卡片上沿的高光，模拟顶光 */
.hero-card::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 200, 255, 0.6), transparent);
  z-index: 3;
}

.hero-card__body {
  position: relative;
  height: clamp(260px, 32vw, 380px);
  border-radius: inherit;
  overflow: visible;
}

/* ---------- 卡内现场场景（背景回来了，但做成氛围层） ---------- */
/* 外层负责按卡片圆角裁切，否则模糊放大的底图会溢出圆角 */
.hero-card__scene {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 0;
}
.hero-card__plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  filter: blur(2.5px) saturate(1.02) brightness(0.5);
  transform: scale(1.06);            /* 盖住模糊边缘 */
  opacity: 0.85;
}
/* 场景之上的压暗与渐隐，让文字与人物都压得住 */
.hero-card__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(56% 60% at 50% 74%, rgba(6, 12, 28, 0.06), transparent 72%),
    linear-gradient(180deg, rgba(6, 12, 28, 0.5) 0%, rgba(6, 12, 28, 0.34) 40%, rgba(6, 12, 28, 0.82) 100%),
    linear-gradient(90deg, rgba(6, 12, 28, 0.66) 0%, transparent 36%, transparent 64%, rgba(6, 12, 28, 0.66) 100%);
}
html[data-theme="dark"] .hero-card__plate { filter: blur(2.5px) saturate(1.02) brightness(0.42); }
/* 卡内的装饰圆环，暗示“光晕舞台” */
.hero-card__ring {
  position: absolute;
  left: 50%;
  bottom: -22%;
  width: min(58%, 520px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(99, 217, 255, 0.28), rgba(63, 125, 255, 0.12) 46%, transparent 68%);
  filter: blur(8px);
  z-index: 2;
}
.hero-card__ring--2 {
  width: min(42%, 380px);
  bottom: -14%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 66%);
  filter: blur(16px);
}

/* 人像：从卡片上沿溢出 */
.hero-card__person {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 132%;                       /* >100% 才会溢出上沿 */
  width: auto;
  max-width: none;
  transform: translateX(-50%) translate3d(0, var(--py, 0px), 0) scale(var(--pys, 1));
  transform-origin: 50% 100%;
  object-fit: contain;
  object-position: center bottom;
  z-index: 3;
  will-change: transform;
  filter:
    drop-shadow(0 30px 34px rgba(4, 10, 26, 0.5))
    drop-shadow(0 0 60px rgba(96, 170, 255, 0.22));
}
/* 落地投影 */
.hero-card__shadow {
  position: absolute;
  left: 50%;
  bottom: 1.5%;
  width: min(46%, 400px);
  height: 4%;
  transform: translateX(-50%) translate3d(0, calc(var(--py, 0px) * 0.4), 0);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(2, 6, 18, 0.62), rgba(2, 6, 18, 0.24) 52%, transparent 76%);
  filter: blur(12px);
  z-index: 2;
}

/* 卡片下半的文字区：留白 + 一行说明 + 按钮 */
.hero-card__meta {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3.4vw, 40px) clamp(24px, 3vw, 36px);
  border-top: 1px solid rgba(140, 175, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 0 0 clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(8, 14, 30, 0.2), rgba(8, 14, 30, 0.55));
}
.hero-card__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hero-card__desc {
  margin: 0;
  flex: 1 1 320px;
  max-width: 62ch;
  color: #c3d0ea;
  font-size: clamp(13.5px, 1.1vw, 15px);
  line-height: 1.7;
}
.hero-card__desc b { color: #fff; font-weight: 600; }
.hero-card__cta { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }

.hero-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-card__tags li {
  font-size: 12px;
  color: #bfcdea;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(150, 180, 255, 0.18);
  background: rgba(140, 175, 255, 0.08);
}

/* 深色卡片内的按钮皮肤 */
.hero-card .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}
.hero-card .btn--primary {
  color: #fff;
  background: linear-gradient(120deg, #3f7dff, #8b6bff);
  box-shadow: 0 12px 30px rgba(63, 125, 255, 0.4);
}
.hero-card .btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(63, 125, 255, 0.52); }
.hero-card .btn--ghost {
  color: #dce7ff;
  border-color: rgba(160, 190, 255, 0.34);
  background: rgba(140, 175, 255, 0.07);
}
.hero-card .btn--ghost:hover { color: #fff; transform: translateY(-2px); background: rgba(140, 175, 255, 0.16); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 4;
  width: 22px;
  height: 34px;
  margin-left: -11px;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 14px;
}
.scroll-hint svg {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 13px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: scrollArrow 1.9s ease-in-out infinite;
}
@keyframes scrollArrow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 5px); }
}

/* 深色首屏之后，内容区从圆角处浮起 */
.hero + .section {
  position: relative;
  z-index: auto;
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  background: var(--bg);
}
/* ---------- 7. 数据条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
#metrics .stats { position: relative; z-index: 3; }
.stat {
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
    background-color 0.45s var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.stat-kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.stat-value {
  margin: 10px 0 6px;
  font-size: clamp(34px, 4.6vw, 46px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: 0.5em; font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.stat p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.5; }

/* ---------- 8. 细节组件 ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.tag--accent { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

.rows { display: flex; flex-direction: column; gap: 0; }
.row {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14.5px;
  line-height: 1.5;
}
.row:first-child { border-top: 0; padding-top: 0; }
.row dt { flex: none; width: 74px; color: var(--ink-faint); font-size: 13.5px; }
.row dd { margin: 0; color: var(--ink); }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 35px 22px; }
.principle { display: flex; gap: 12px; font-size: 14.5px; line-height: 1.5; color: var(--ink-muted); }
.principle b {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 3px;
}

.interest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.interest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  font-size: 14px;
}
.interest span { font-size: 16px; line-height: 1; }

/* 软件 Dock */
.software-dock-card {
  grid-column: span 12;
  margin-top: clamp(22px, 3vw, 34px);
  gap: 0;
  padding: 0 0 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}
.software-dock-card:hover { transform: none; box-shadow: none; }
.software-dock-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.software-dock-head .body-muted {
  max-width: 520px;
  text-align: right;
  font-size: 13px;
}
.software-dock-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 10px 8px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, var(--bg-inset), transparent);
}
.software-dock__viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 28px 8px 20px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  touch-action: pan-x;
}
.software-dock__viewport::-webkit-scrollbar { display: none; }
.software-dock {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  min-width: max-content;
  padding: 0 10px 2px;
}
.software-dock__item {
  display: flex;
  flex: 0 0 70px;
  width: 70px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transform-origin: center bottom;
  transition: transform .18s var(--ease-out), color .25s var(--ease);
}
.software-dock__item:hover { color: var(--accent); }
.software-dock__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 9px;
  border: 1px solid var(--card-border);
  border-radius: 17px;
  background: var(--card);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.software-dock__icon img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 10px;
}
.software-dock__item.is-active .software-dock__icon,
.software-dock__item:hover .software-dock__icon {
  border-color: var(--card-border);
  box-shadow: var(--shadow-1);
}
html[data-theme="dark"] .software-dock__icon {
  border-color: rgba(255, 255, 255, 0.92);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.36), 0 8px 18px rgba(0, 0, 0, 0.24);
}
html[data-theme="dark"] .software-dock__item .software-dock__icon,
html[data-theme="dark"] .software-dock__item:hover .software-dock__icon,
html[data-theme="dark"] .software-dock__item.is-active .software-dock__icon {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.36), 0 8px 18px rgba(0, 0, 0, 0.24);
}
.software-dock__item:focus,
.software-dock__item:focus-visible { outline: 0; }
.software-dock__item:focus-visible .software-dock__icon { outline: 0; }
.software-dock__name {
  max-width: 84px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.software-dock__item.is-active .software-dock__name { color: var(--accent); font-weight: 600; }
.software-dock__nav {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: var(--bg-inset);
  color: var(--ink-muted);
  cursor: pointer;
  transition: color .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.software-dock__nav:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}
.software-dock__nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.software-dock__nav svg { width: 17px; height: 17px; fill: currentColor; }
.software-dock__detail {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
}
.software-dock__detail b { color: var(--ink-strong); }

/* 研究方向 */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 15px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  font-size: 13.5px;
  color: var(--ink);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.card--dark .pill { background: rgba(255, 255, 255, 0.1); color: var(--ink-on-dark); }

.formula {
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--bg-inset);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  overflow-x: auto;
}
.formula .k { color: var(--accent); font-weight: 600; }
.formula .c { color: var(--ink-faint); }

.quote {
  margin-top: 4px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
}

/* 流程图 */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow-step {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: var(--ink-on-dark);
  white-space: nowrap;
}
.flow-arrow { color: var(--ink-on-dark-muted); font-size: 12px; }

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }

.mini-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-number { text-align: center; }
.mini-number b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}
.card--dark .mini-number b { color: var(--ink-on-dark); }
.mini-number span { font-size: 12px; color: var(--ink-faint); }
.card--dark .mini-number span { color: var(--ink-on-dark-muted); }

.tech-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.tech {
  padding: 6px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-on-dark-muted);
}

.lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lesson {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg-inset);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lesson b { font-size: 14.5px; font-weight: 600; color: var(--ink-strong); }
.lesson small { font-size: 12.5px; color: var(--ink-muted); }
.lesson i { font-size: 18px; font-style: normal; line-height: 1; margin-bottom: 4px; }

.step-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.step-path span {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  color: var(--ink-muted);
}
.step-path i { color: var(--ink-faint); font-style: normal; font-size: 12px; }

/* ---------- 关于区：个人名片 + 联系卡（参考卡片式布局） ---------- */
.profile-card { gap: 18px; overflow: visible; z-index: 2; }

.profile-head { display: flex; align-items: flex-start; gap: 18px; }
.profile-avatar {
  width: 92px;
  height: 92px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 0 0 0 1px var(--hairline), 0 8px 22px rgba(0, 0, 0, 0.14);
}
.profile-id { min-width: 0; }
.profile-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink-strong);
}
.profile-en {
  margin-top: 2px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.profile-sub { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.minitag {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--bg-inset);
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.fact-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.fact {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  line-height: 1.5;
}
.fact b { flex: none; width: 42px; color: var(--ink-faint); font-weight: 500; }
.fact span { color: var(--ink); }

.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; }
#honorExportAll { justify-content: center; text-align: center; }
.btn--sm { padding: 9px 16px; font-size: 14px; }

.seal {
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(180, 140, 60, 0.55);
  background: linear-gradient(150deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.04));
  color: #8a6d1f;
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.seal b { display: block; font-size: 11.5px; letter-spacing: 0.04em; }
html[data-theme="dark"] .seal {
  border-color: rgba(212, 175, 55, 0.5);
  background: linear-gradient(150deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.05));
  color: #e2c778;
}

/* 联系与链接面板 —— 方卡 + 真实品牌图标（沿用旧站 feature 卡片语言） */
.link-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-label { padding-left: 2px; }
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 14px 15px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  min-width: 0;
  min-height: 116px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
    background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: var(--ink); }
.link-card[data-copy] { cursor: pointer; }
.link-card.is-copied { border-color: var(--accent); background: var(--accent-soft); }

/* 每种卡片一个柔和品牌底色（旧站 ins/linkedin/tw/github 各有一个色调） */
.link-card--mail { background: linear-gradient(160deg, rgba(0, 113, 227, 0.1), rgba(0, 113, 227, 0.02)); }
.link-card--qq { background: linear-gradient(160deg, rgba(18, 183, 245, 0.13), rgba(18, 183, 245, 0.02)); }
.link-card--wechat { background: linear-gradient(160deg, rgba(7, 193, 96, 0.13), rgba(7, 193, 96, 0.02)); }
.link-card--phone { background: linear-gradient(160deg, rgba(52, 199, 89, 0.12), rgba(52, 199, 89, 0.02)); }
.link-card--site { background: linear-gradient(160deg, rgba(88, 86, 214, 0.13), rgba(88, 86, 214, 0.02)); }
html[data-theme="dark"] .link-card--mail,
html[data-theme="dark"] .link-card--qq,
html[data-theme="dark"] .link-card--wechat,
html[data-theme="dark"] .link-card--phone,
html[data-theme="dark"] .link-card--site {
  background: var(--card);
}
html[data-theme="dark"] .link-card--mail { background: linear-gradient(160deg, rgba(62, 136, 231, 0.19), var(--card)); }
html[data-theme="dark"] .link-card--qq { background: linear-gradient(160deg, rgba(56, 175, 221, 0.17), var(--card)); }
html[data-theme="dark"] .link-card--wechat { background: linear-gradient(160deg, rgba(43, 173, 107, 0.17), var(--card)); }
html[data-theme="dark"] .link-card--phone { background: linear-gradient(160deg, rgba(67, 169, 104, 0.17), var(--card)); }

.link-emblem {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--card-border);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
}
html[data-theme="dark"] .link-emblem { background: rgba(255, 255, 255, 0.12); }
.link-card--qq .link-emblem { background: #fff; }
.link-emblem img { width: 30px; height: 30px; object-fit: contain; display: block; }
.link-card--qq .link-emblem img { width: 34px; height: 34px; }
.link-emblem--square img { width: 28px; height: 28px; border-radius: 7px; }
.link-emblem--tiny img { width: 24px; height: 24px; }
.link-emblem--round img { border-radius: 50%; }

.link-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; width: 100%; }
.link-body b { font-size: 13px; font-weight: 600; color: var(--ink-strong); }
.link-body em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.link-body i { font-style: normal; font-size: 11px; color: var(--ink-faint); }
.link-card--todo { border-style: dashed; background: transparent; box-shadow: none; }
.link-card--todo:hover { transform: none; box-shadow: none; }
.todo-value { color: var(--ink-faint) !important; }

/* GitHub 卡片：填满联系区右下方空位，并展示贡献热力图 */
.link-card--github {
  grid-column: 1 / -1;
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 20px 22px 18px;
  overflow: hidden;
  background:
    radial-gradient(90% 160% at 100% 0%, rgba(46, 164, 79, 0.14), transparent 58%),
    linear-gradient(145deg, var(--card), var(--bg-subtle));
}
.link-card--github:hover { transform: translateY(-3px); }
html[data-theme="dark"] .link-card--github {
  background:
    radial-gradient(90% 160% at 100% 0%, rgba(63, 185, 80, 0.18), transparent 58%),
    linear-gradient(145deg, var(--card), var(--bg-subtle));
}
.github-card__header,
.github-card__identity,
.github-card__footer,
.github-card__legend { display: flex; align-items: center; }
.github-card__header { width: 100%; justify-content: space-between; gap: 16px; }
.github-card__identity { min-width: 0; gap: 12px; }
.github-card__icon {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow-1);
}
.github-card__icon img { width: 36px; height: 36px; object-fit: contain; }
.github-card__identity h4 { font-size: 18px; line-height: 1.25; color: var(--ink-strong); }
.github-card__identity p { margin-top: 2px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 11.5px; }
.github-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: none;
  margin-left: auto;
  padding: 8px 13px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease-out);
}
.github-card__link:hover { border-color: rgba(0, 113, 227, 0.28); background: var(--card); color: var(--accent); transform: translateY(-1px); }
.github-card__link span { margin-left: 4px; font-size: 15px; }
.github-card__main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(210px, 0.9fr); gap: 14px; flex: 1; min-height: 0; margin-top: 15px; }
.github-card__activity { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; min-height: 0; }
.github-card__summary { display: flex; align-items: baseline; gap: 8px; }
.github-card__summary strong { color: var(--ink-strong); font-family: var(--font-mono); font-size: 25px; line-height: 1; }
.github-card__summary span { color: var(--ink-muted); font-size: 12px; }
.github-card__heatmap {
  flex: 0 0 128px;
  min-height: 0;
  margin-top: 10px;
  padding: 11px 10px 8px;
  overflow-x: auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.45);
  scrollbar-width: thin;
}
html[data-theme="dark"] .github-card__heatmap { background: rgba(0, 0, 0, 0.16); }
.github-card__heatmap svg { display: block; width: 100%; min-width: 0; height: auto; }
.github-card__heatmap.is-error { display: grid; place-items: center; color: var(--ink-faint); font-size: 12px; text-align: center; }
.github-heatmap__cell { stroke: rgba(0, 0, 0, 0.045); stroke-width: 0.5; }
.github-day--0 { fill: #ebedf0; background-color: #ebedf0; }
.github-day--1 { fill: #9be9a8; background-color: #9be9a8; }
.github-day--2 { fill: #40c463; background-color: #40c463; }
.github-day--3 { fill: #30a14e; background-color: #30a14e; }
.github-day--4 { fill: #216e39; background-color: #216e39; }
html[data-theme="dark"] .github-day--0 { fill: #2d333b; background-color: #2d333b; }
html[data-theme="dark"] .github-day--1 { fill: #0e4429; background-color: #0e4429; }
html[data-theme="dark"] .github-day--2 { fill: #006d32; background-color: #006d32; }
html[data-theme="dark"] .github-day--3 { fill: #26a641; background-color: #26a641; }
html[data-theme="dark"] .github-day--4 { fill: #39d353; background-color: #39d353; }
.github-card__footer { justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--ink-faint); font-size: 10.5px; line-height: 1.4; }
.github-card__footer > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.github-card__legend { flex: none; gap: 4px; white-space: nowrap; }
.github-card__legend .github-day { width: 10px; height: 10px; display: inline-block; border-radius: 3px; }
.github-card__repos { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-left: 14px; border-left: 1px solid var(--card-border); }
.github-card__repos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--ink-muted); font-size: 12px; }
.github-card__repos-head small { color: var(--ink-faint); font-size: 10px; }
.github-card__repo-list { display: flex; flex-direction: column; gap: 7px; min-height: 0; overflow: auto; }
.github-repo-pill {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.github-repo-pill:hover { border-color: rgba(0, 113, 227, 0.28); background: var(--card); color: var(--ink); transform: translateY(-1px); }
.github-repo-pill__name { overflow: hidden; color: var(--ink-strong); font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.github-repo-pill__desc { display: -webkit-box; overflow: hidden; color: var(--ink-faint); font-size: 10.5px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.github-repo-pill__meta { color: var(--ink-faint); font-size: 9.5px; }
html[data-theme="dark"] .github-card__link,
html[data-theme="dark"] .github-repo-pill { background: rgba(255, 255, 255, 0.07); }

@media (max-width: 640px) {
  .link-card.link-card--github { flex-direction: column; align-items: stretch; padding: 18px 16px 16px; }
  .github-card__link { font-size: 11px; }
  .github-card__footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .link-grid { grid-template-rows: none; }
  .github-card__main { grid-template-columns: 1fr; }
  .github-card__repos { padding: 12px 0 0; border-top: 1px solid var(--card-border); border-left: 0; }
}

/* ---------- 荣誉与认证 ---------- */
.honor-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  position: relative;
  z-index: 10;
}
.honor-export-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.honor-export-actions [hidden] { display: none; }
.honor-export-actions .btn:disabled { opacity: 0.48; cursor: not-allowed; transform: none; }
.honor-export-images { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill); background: var(--card); color: var(--ink-muted); font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.honor-export-images:hover { background: var(--bg-inset); }
.honor-export-images:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.honor-export-images input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.honor-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}
.honor-filters select {
  appearance: none;
  min-width: 132px;
  min-height: 42px;
  padding: 9px 36px 9px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-pill);
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  color: var(--ink);
  font: inherit;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.honor-filters select:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow-2); }
.honor-select { position: relative; }
.honor-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 132px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.honor-select__trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 1.6px solid var(--ink-muted);
  border-bottom: 1.6px solid var(--ink-muted);
  transform: translateY(-2px) rotate(45deg);
}
.honor-select__trigger:hover, .honor-select__trigger[aria-expanded="true"] {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-2);
}
.honor-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  box-sizing: border-box;
  width: max-content;
  min-width: 100%;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 110px));
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-2);
}
.honor-select__menu.is-above { top: auto; bottom: calc(100% + 8px); }
.honor-select__menu[hidden], .honor-filters select[hidden] { display: none; }
.honor-select__option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.honor-select__option:hover, .honor-select__option:focus { background: var(--bg-inset); }
.honor-select__option[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.resume-select__trigger { justify-content: center; }
.resume-select__trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.resume-select__trigger[aria-expanded="true"] { background: var(--hairline); }
.resume-select__menu { min-width: 100%; }
.resume-select__menu .honor-select__option { text-decoration: none; }
.honor-filters select:focus, .honor-select__trigger:focus,
.honor-select__option:focus, .honor-more:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.honor-empty { margin-top: 24px; color: var(--ink-muted); }
.honor-more-wrap { margin: 20px 0 34px; text-align: center; }
#honors .honor[hidden], #honors .honor-group[hidden], #honors .honor-more-wrap[hidden], #honors .honor-empty[hidden],
#practice .honor[hidden], #practice .honor-more-wrap[hidden] { display: none; }
.honor-group { margin-bottom: 14px; }
.honor-year {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.honor-year i { flex: 1; height: 1px; background: var(--hairline); font-style: normal; }

.honor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

.honor {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
    background-color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.honors--selecting .honor { cursor: pointer; }
.honors--selecting .honor:hover { transform: none; }
.honors--selecting .honor.is-picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-1); }
.honor-pick { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: flex-end; width: 100%; padding: 12px; border: 0; border-radius: inherit; background: transparent; color: var(--ink); cursor: pointer; }
.honor-pick[hidden] { display: none; }
.honor-pick__tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill); background: var(--card); box-shadow: var(--shadow-1); font-size: 12px; font-weight: 600; }
.honor.is-picked .honor-pick__tag { border-color: var(--accent); background: var(--accent); color: #fff; }
.honor:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.honor h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.005em;
  color: var(--ink-strong);
}
.honor-meta { font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); margin-top: auto; }

/* 带证书图的荣誉卡 */
.honor--cert { gap: 12px; padding: 14px 14px 20px; }
.honor--cert h3 { font-size: 15.5px; padding: 0 6px; }
.honor--cert .honor-badge { margin-left: 6px; }
.honor--cert .honor-meta { padding: 0 6px; }
.honor-grid--cert { align-items: start; }
.honor-grid--cert .honor { height: 100%; }
/* 证明/认定材料偏多，用四列更紧凑 */
.honor-grid--cert { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.honor-grid--cert .honor--cert h3 { font-size: 14.5px; }
.honor-grid--cert .honor--cert .honor-meta { font-size: 12px; }

.honor-badge {
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.honor-badge--high { background: var(--accent-soft); color: var(--accent); }
.honor-badge--plain { background: transparent; border: 1px solid var(--hairline-strong); color: var(--ink-faint); }

/* ---------- 证书 / 截图 ---------- */
.shot {
  position: relative;
  display: block;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--hairline);
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.6s var(--ease-out);
}
.shot img:hover { transform: scale(1.015); }
.shot figcaption {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-faint);
  background: var(--card);
  border-top: 1px solid var(--hairline);
  overflow-wrap: anywhere;
}
.honor--cert .shot {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.07));
}
html[data-theme="dark"] .honor--cert .shot {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}
.honor--cert .shot img {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 10px;
}
.honor--cert .shot figcaption { flex: none; }
.card .shot--paper {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card .shot--paper img {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 6px;
}
.card .shot--paper figcaption { flex: none; }

/* 项目卡里的横版配图 */
.card .shot--wide {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;   /* image on top, caption underneath */
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
}
.card .shot--wide img {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  padding: 8px;
}
.card .shot--wide figcaption { flex: none; }
.card--dark .shot--wide {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.card--dark .shot--wide figcaption {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.1);
  color: var(--ink-on-dark-muted);
}
.shot--on-dark { margin-top: 22px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-inner {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-inner figcaption {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
body.lightbox-open { overflow: hidden; }

/* ---------- 项目卡细节 ---------- */
.research-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: center;
}
.research-feature__content { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.research-feature .split { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.research-feature > .shot, .research-feature > .project-media { align-self: center; }
.research-feature .shot--wide { height: min(360px, 30vw); aspect-ratio: auto; }
.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: center;
  overflow: clip;
}
.project-feature .split { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.project-feature > .shot, .project-feature > .project-media { align-self: center; }
.project-feature .shot--wide { height: min(410px, 34vw); aspect-ratio: auto; margin-top: 0; }
.project-feature .flow--spaced { margin-top: 16px; }
.project-feature .tech-strip--spaced { margin-top: 16px; }
.project-feature .hero-actions--spaced { margin-top: 18px; }
.project-entry { gap: 10px; }
.project-entry--wide { grid-column: span 12; }
.project-entry .shot--wide { height: 245px; aspect-ratio: auto; }
.project-entry .shot--paper { height: 310px; aspect-ratio: auto; }
.project-entry .project-media .shot--wide { height: 310px; }
.project-entry .shot + .shot { margin-top: 4px; }
.project-media { width: 100%; min-width: 0; }
.project-media__viewport { width: 100%; overflow: hidden; border-radius: var(--r-md); touch-action: pan-y; }
.project-media__track { display: flex; min-width: 0; transition: transform 0.4s var(--ease); }
.project-media__track > .shot { flex: 0 0 100%; width: 100%; min-width: 0; margin: 0; }
.project-media__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.project-media__arrow {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--hairline-strong); border-radius: 50%;
  background: var(--bg-inset); color: var(--ink); cursor: pointer;
}
.project-media__arrow svg { width: 17px; height: 17px; fill: currentColor; }
.project-media__arrow:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.project-media__arrow[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.project-media__dots { display: flex; align-items: center; justify-content: center; gap: 7px; }
.project-media__dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--hairline-strong); cursor: pointer; }
.project-media__dots button.is-active { width: 20px; border-radius: var(--r-pill); background: var(--accent); }
.project-media:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card--dark .project-media__arrow { color: var(--ink-on-dark); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.card--dark .project-media__dots button { background: rgba(255, 255, 255, 0.28); }
.card--dark .project-media__dots button.is-active { background: var(--accent); }

.sub-title {
  margin: 46px 0 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sub-title::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.card-gap { margin-top: var(--gap); }

.chips-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.mchip {
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--ink-on-dark-muted);
  white-space: nowrap;
}
.card:not(.card--dark) .mchip {
  background: var(--bg-inset);
  border-color: transparent;
  color: var(--ink-muted);
}

.doc-list { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-list span {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: var(--ink-on-dark-muted);
}
.doc-list--spaced { margin-top: 14px; }

.mini-numbers--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.mini-numbers--wide .mini-number b { font-size: 21px; }

/* 可点击放大的图片提示 */
.shot--zoomable::after {
  content: "点击放大";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.shot--zoomable:hover::after { opacity: 1; }
.honor--cert .shot--zoomable::after { bottom: 10px; }

/* 局部修饰 */
.card-title-lg { margin: 10px 0 8px; }
.lead--on-dark { color: var(--ink-on-dark-muted); font-size: 17px; }
.body-muted--spaced { margin-top: 14px; }
.flow--spaced { margin-top: 20px; }
.tech-strip--spaced { margin-top: 22px; }
.hero-actions--spaced { margin-top: 24px; }
.card-note--on-dark { color: var(--ink-on-dark-muted); }
.grid--spaced { margin-top: var(--gap); }
.formula--code { font-size: 12.5px; }
.mini-numbers--tight { margin-top: 6px; }
.eyebrow--on-dark { color: var(--ink-on-dark-muted); }

/* 收尾 */
.closing {
  position: relative;
  padding: 76px 44px;
  border-radius: var(--r-xl);
  background: var(--card-dark);
  color: var(--ink-on-dark);
  text-align: center;
  overflow: hidden;
}
.closing::after {
  content: "";
  position: absolute;
  inset: auto 10% -70% 10%;
  height: 340px;
  background: radial-gradient(50% 100% at 50% 100%, rgba(10, 132, 255, 0.35), transparent 70%);
  pointer-events: none;
}
.closing > * { position: relative; z-index: 1; }
.closing .h-section { color: var(--ink-on-dark); max-width: 880px; margin: 12px auto 18px; }
.closing p { color: var(--ink-on-dark-muted); font-size: 15px; }
.closing .btn { margin-top: 28px; }

/* 页脚 */
.footer {
  margin-top: 96px;
  padding: 34px 0 46px;
  border-top: 1px solid var(--hairline);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--ink-faint); }
.footer-links a:hover { color: var(--accent); }

/* ---------- 9. 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background-color 0.3s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--bg-inset); }
.to-top svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- 10. 响应式：桌面 / 平板 / 手机 三档，含细分断点 ----------
   断点策略
   ≥1200px 桌面          4 列卡片、通栏布局
   1025–1199px 小桌面     导航收紧、间距变小
   769–1024px 平板横屏    卡片 2 列
   641–860px 平板竖屏     导航收纳进抽屉、卡片 1 列
   ≤640px 手机            单列、行内元素换行、点击目标放大
   ≤420px 小屏手机        进一步压缩字号与内边距
   ------------------------------------------------------------------ */

/* ===== 平板横屏 / 小桌面：1025–1199px ===== */
@media (max-width: 1199px) {
  :root { --gutter: 22px; }
  .nav-links { gap: clamp(10px, 1.4vw, 20px); font-size: 13.5px; }
}

/* ===== 平板横屏：769–1024px ===== */
@media (max-width: 1024px) {
  :root { --gutter: 20px; --gap: 16px; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .honor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 6; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .card { padding: 26px; }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-title { margin-top: 38px; }
  .project-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; }
  .project-feature .shot--wide { height: 340px; }
  .research-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; }
  .research-feature .shot--wide { height: 340px; }
}

/* ===== 平板竖屏：≤860px（导航收纳进抽屉） ===== */
@media (max-width: 860px) {
  :root { --nav-h: 56px; --gutter: 20px; }

  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav { padding-top: 12px; padding-bottom: 12px; }
  .nav.is-scrolled { padding-top: 10px; padding-bottom: 10px; }
  .drawer { inset: 56px 0 auto 0; }

  .section { padding: 76px 0 6px; scroll-margin-top: calc(var(--nav-h) + 16px); }
  .section--tight { padding-top: 52px; }
  .section-head { margin-bottom: 30px; }

  /* 平板竖屏：人物卡变矮一点，人像溢出幅度收小 */
  .hero--card .hero__copy { max-width: 100%; }
  .hero-card__body { height: clamp(260px, 46vw, 360px); }
  .hero-card__person { height: 132%; }
  .hero-card__line { gap: 16px; }
  .hero-card__desc { flex: 1 1 100%; max-width: 100%; }
  .hero--card .hero__name { font-size: clamp(46px, 11vw, 78px); }
  .scroll-hint { display: none; }

  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 6; }
  .project-entry--wide { grid-column: span 6; }
  .project-feature { grid-template-columns: minmax(0, 1fr); }
  .project-feature .shot--wide { height: 300px; }
  .research-feature { grid-template-columns: minmax(0, 1fr); }
  .research-feature .shot--wide { height: 300px; }
  .footer { margin-top: 72px; }
}

/* ===== 手机：≤640px ===== */
@media (max-width: 640px) {
  :root { --gutter: 16px; --gap: 14px; --r-lg: 20px; --r-xl: 24px; }

  body { font-size: 15.5px; line-height: 1.65; }
  .shell { padding: 0 var(--gutter); }

  /* 排版降级 */
  .h-section { font-size: clamp(24px, 7vw, 30px); }
  .h-card { font-size: 19px; }
  .lead { font-size: 15.5px; }
  .section-head .lead { font-size: 15px; }

  /* 首屏：人物卡 */
  .hero--card { padding-top: calc(var(--nav-h) + 32px); }
  .hero--card .hero__name { font-size: clamp(40px, 14vw, 62px); }
  .hero--card .hero__role { font-size: 14.5px; }
  .hero-card { margin-top: 28px; }
  .hero-card__body { height: clamp(230px, 62vw, 320px); }
  .hero-card__person { height: 128%; }
  .hero-card__desc { font-size: 13.5px; }
  .hero-card__cta { width: 100%; }
  .hero-card__cta .btn { flex: 1 1 46%; justify-content: center; padding: 11px 16px; font-size: 13.5px; }
  .hero-card__tags li { font-size: 11.5px; padding: 5px 11px; }
  .hero-card__meta { padding: 20px 20px 24px; gap: 14px; }

  /* 单列化 */
  .stats { grid-template-columns: 1fr; }
  .honor-grid, .honor-grid--cert { grid-template-columns: 1fr; }
  .honor-export-actions { width: 100%; }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles, .lesson-grid, .interest-grid { grid-template-columns: 1fr; }
  .mini-numbers, .mini-numbers--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  .card, .stat, .honor { padding: 20px; }
  .honor--cert { padding: 12px 12px 18px; }
  .card { gap: 10px; }
  .sub-title { margin: 32px 0 14px; font-size: 14px; }
  .grid--spaced { margin-top: var(--gap); }

  /* 名片与联系卡 */
  .profile-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .profile-avatar { width: 76px; height: 76px; }
  .profile-name { font-size: 21px; }
  .fact { gap: 10px; font-size: 13px; }
  .fact b { width: 40px; }
  .link-card { min-height: 132px; padding: 14px; flex-direction: column; align-items: flex-start; }
  .link-grid > .link-card:not(.link-card--github) .link-body em { white-space: normal; overflow-wrap: anywhere; }
  .link-emblem { width: 36px; height: 36px; }
  .link-emblem img { width: 26px; height: 26px; }
  .profile-actions .btn { flex: 1 1 100%; justify-content: center; }
  .profile-actions .resume-select { flex: 1 1 100%; }
  .profile-actions .resume-select__trigger { width: 100%; }

  /* 软件工具 Dock：手机端保留横向探索空间 */
  .software-dock-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .software-dock-head .body-muted { max-width: none; text-align: left; }
  .software-dock-shell { padding: 8px 6px 6px; }
  .software-dock__viewport { padding-right: 2px; padding-left: 2px; }
  .software-dock { justify-content: flex-start; gap: 8px; }
  .software-dock__item { flex-basis: 64px; width: 64px; }
  .software-dock__icon { width: 50px; height: 50px; padding: 8px; }
  .software-dock__nav { width: 28px; height: 28px; }

  /* 项目卡与图表 */
  .mini-numbers--wide .mini-number b { font-size: 19px; }
  .tech-strip span, .chip { font-size: 12px; }
  .flow { gap: 6px; }
  .flow-step { font-size: 12px; padding: 6px 11px; }
  .formula { font-size: 12.5px; }
  .shot figcaption { font-size: 11.5px; padding: 9px 10px; }
  .project-feature { gap: 16px; }
  .project-feature .shot--wide { height: 220px; }
  .research-feature { gap: 16px; }
  .research-feature .shot--wide { height: 220px; }
  .project-feature .mini-numbers { gap: 8px; }
  .project-entry .shot--wide { height: 205px; }
  .project-entry .shot--paper { height: 255px; }
  .project-entry .project-media .shot--wide { height: 255px; }

  /* 荣誉卡图片比例更方，避免单列时过高 */
  .honor--cert .shot { aspect-ratio: 5 / 4; }
  .card .shot--paper { aspect-ratio: 4 / 5; }
  .project-entry .shot--paper { aspect-ratio: auto; }

  /* 收尾与页脚 */
  .closing { padding: 48px 22px; }
  .closing .h-section { font-size: 24px; }
  .footer { margin-top: 64px; padding: 28px 0 40px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { gap: 14px; }

  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .drawer { padding-bottom: 20px; }
  .drawer a { padding: 12px; font-size: 15.5px; }
}

/* ===== 小屏手机：≤420px ===== */
@media (max-width: 420px) {
  :root { --gutter: 14px; --gap: 12px; }
  body { font-size: 15px; }
  .hero__name { font-size: clamp(42px, 16vw, 56px); }
  .hero__role { font-size: 14px; }
  .card, .stat, .honor { padding: 18px; }
  .honor--cert { padding: 10px 10px 16px; }
  .profile-avatar { width: 68px; height: 68px; }
  .link-grid { gap: 10px; }
  .link-card { padding: 12px; }
  .link-grid > .link-card:not(.link-card--github) .link-body em { font-size: 10.5px; }
  .brand-text { display: none; }
  .mini-numbers, .mini-numbers--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closing .btn { width: 100%; justify-content: center; }
}

/* ===== 超宽屏：≥1600px 限制阅读宽度 ===== */
@media (min-width: 1600px) {
  :root { --shell: 1240px; }
  .hero__copy { max-width: 760px; }
}

/* ============================================================
   影像轮播 / 宫格（现场照片 + 证书）
   支持：拖拽滑动、滚动吸附、圆点跳转、箭头翻页、轮播/宫格切换
   ============================================================ */
.gallery-card { gap: 18px; }

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.gallery-head h3 { margin: 8px 0 6px; }
.gallery-tools { display: flex; align-items: center; gap: 12px; }

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  border: 1px solid var(--card-border);
}
.seg__btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.seg__btn.is-active {
  background: var(--card);
  color: var(--ink-strong);
  box-shadow: var(--shadow-1);
}

.car-nav { display: flex; gap: 8px; }
.car-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.car-btn:hover { background: var(--bg-inset); transform: translateY(-2px); }
.car-btn[disabled] { opacity: 0.35; pointer-events: none; }
.car-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- 轨道 ---------- */
.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 12px;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.carousel__track.is-dragging .pcard { pointer-events: none; }

/* ---------- 卡片 ---------- */
.pcard {
  flex: 0 0 auto;
  width: min(360px, 74vw);
  margin: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pcard__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-subtle);
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.3s var(--ease);
}
.pcard__btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--hairline-strong); }
.pcard__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(8, 12, 24, 0.62);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.pcard figcaption {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-faint);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 证书卡片：竖版比例，宫格时更紧凑 */
.pcard--cert { width: min(240px, 52vw); }
.pcard--cert .pcard__btn { aspect-ratio: 3 / 4; background: #fff; }
.pcard--cert .pcard__img { object-fit: contain; padding: 8px; }

/* ---------- 圆点 ---------- */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding-top: 2px;
}
.carousel__dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--hairline-strong);
  cursor: pointer;
  transition: width 0.35s var(--ease), background-color 0.35s var(--ease);
}
.carousel__dots button.is-active { width: 22px; border-radius: 4px; background: var(--accent); }

/* ---------- 宫格视图 ---------- */
.carousel[data-view="grid"] .carousel__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  overflow: visible;
  scroll-snap-type: none;
  cursor: default;
}
.carousel[data-view="grid"] .pcard,
.carousel[data-view="grid"] .pcard--cert { width: auto; scroll-snap-align: none; }
.carousel[data-view="grid"] .pcard--cert .pcard__btn { aspect-ratio: 3 / 4; }
.carousel[data-view="grid"] .carousel__dots { display: none; }

/* ---------- 证书区块（荣誉区顶部） ---------- */
.cert-band { gap: 16px; }
.cert-band .carousel__track { padding-bottom: 8px; }
.cert-band__note { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .gallery-head { align-items: flex-start; }
  .gallery-tools { width: 100%; justify-content: space-between; }
  .pcard { width: min(300px, 78vw); }
  .pcard--cert { width: min(210px, 58vw); }
}

@media (max-width: 640px) {
  .gallery-head { gap: 12px; }
  .gallery-tools { flex-wrap: wrap; gap: 10px; }
  .pcard { width: min(268px, 82vw); }
  .pcard--cert { width: min(172px, 46vw); }
  .carousel[data-view="grid"] .carousel__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .carousel[data-view="grid"] .pcard figcaption { font-size: 11.5px; }
  .car-btn { width: 34px; height: 34px; }
  .seg__btn { padding: 6px 13px; font-size: 12.5px; }
}

@media (max-width: 420px) {
  .carousel[data-view="grid"] .carousel__track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pcard { width: min(240px, 86vw); }
}
/* ---------- 11. 打印 & 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .drawer, .to-top, .closing::after, .card--dark::after { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .stat { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}
