/* ==========================================================================
   style.css —— 整站样式
   --------------------------------------------------------------------------
   想换主色？改下面 :root 里的 --blue、--blue-dark 和 --blue-soft 即可。
   想换圆角？改 --radius。
   其他样式按「导航 → 首屏 → 作品 → 关于页 → 页脚 → 手机适配」排列。
   ========================================================================== */

/* ==================== 1. 全局变量与基础 ==================== */
:root {
  /* 颜色 */
  --bg: #f6f8fc;
  --bg-soft: #eef3fb;
  --surface: #ffffff;
  --surface-muted: #f8fafd;
  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e3e9f2;
  --line-strong: #d4deeb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-ink: #1e40af;
  --blue-soft: #eaf1ff;
  --blue-pale: #f3f7ff;
  --green: #10b981;
  --amber: #f59e0b;
  --coral: #fb7185;

  /* 圆角与阴影 */
  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .03), 0 8px 22px rgba(30, 64, 175, .04);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, .08), 0 3px 8px rgba(15, 23, 42, .03);
  --shadow-blue: 0 14px 30px rgba(37, 99, 235, .22);

  /* 布局与字体 */
  --container: 1160px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 页面顶部很淡的蓝色光晕，让浅色背景不显得死板 */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(900px 620px at 90% -10%, rgba(37, 99, 235, .13), transparent 62%),
    radial-gradient(720px 520px at -8% 4%, rgba(56, 189, 248, .10), transparent 62%),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 42%, #f7f9fd 100%);
}

::selection {
  background: rgba(37, 99, 235, .18);
  color: var(--blue-ink);
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 94px 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 键盘 Tab 时的焦点圈，保证可访问性 */
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .38);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 跳到正文（平时看不见，按 Tab 才出现） */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==================== 2. 按钮与通用小元素 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s ease, border-color .25s ease, color .25s ease;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #3270ff 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .24), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn-primary:hover {
  box-shadow: 0 15px 30px rgba(37, 99, 235, .30), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .72);
  color: var(--ink-2);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: #b9c9e6;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.btn-white {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 12px 26px rgba(8, 22, 60, .20);
}

.btn-white:hover {
  box-shadow: 0 16px 32px rgba(8, 22, 60, .28);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, .30);
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.btn-outline-light:hover {
  border-color: rgba(255, 255, 255, .52);
  background: rgba(255, 255, 255, .14);
}

.btn-sm {
  padding: 9px 15px;
  font-size: 13px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-light {
  color: rgba(255, 255, 255, .62);
}

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
}

.pulse-dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: 50%;
  content: "";
  animation: pulse-ring 2.6s ease-out infinite;
}

@keyframes pulse-ring {
  0% { opacity: .9; transform: scale(.55); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}

/* 标题里的蓝色重点，带一条自制荧光笔下划线 */
.mark {
  position: relative;
  color: var(--blue-dark);
  white-space: nowrap;
  background: linear-gradient(180deg, transparent 70%, rgba(96, 165, 250, .26) 70%, rgba(96, 165, 250, .26) 96%, transparent 96%);
}

/* ==================== 3. 顶部导航 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(246, 248, 252, .70);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.site-header.is-scrolled {
  border-bottom-color: rgba(227, 233, 242, .92);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #fff;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-dot {
  color: var(--blue);
}

.desktop-nav {
  display: flex;
  gap: 3px;
  padding: 5px;
  border: 1px solid rgba(227, 233, 242, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .56);
}

.desktop-nav a {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.desktop-nav a:hover {
  color: var(--ink);
}

.desktop-nav a.is-active {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .07);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-contact .icon {
  width: 14px;
  height: 14px;
}

/* 手机菜单按钮：默认隐藏，屏幕变窄时显示 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, .8);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.nav-toggle:hover {
  border-color: #b9c9e6;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-2);
  transition: transform .28s var(--ease), opacity .2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-wrap {
  display: none;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 22px;
}

.mobile-nav > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 3px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.mobile-nav > a.is-active {
  color: var(--blue-dark);
}

.mobile-nav > a .icon {
  width: 17px;
  height: 17px;
  color: var(--muted-2);
}

.mobile-nav .mobile-nav-contact {
  justify-content: center;
  margin-top: 15px;
  padding: 13px;
  border: 0;
  border-radius: 13px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .2);
}

/* ==================== 4. 首屏 Hero ==================== */
.hero {
  position: relative;
  padding: 80px 0 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center;
  gap: clamp(38px, 5.2vw, 76px);
}

.hero-copy {
  max-width: 650px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 27px;
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .03);
  color: #475569;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.hero-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.15rem, 4.55vw, 4.05rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.11;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-lead {
  max-width: 550px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-top: 27px;
  color: #7c8ca3;
  font-size: 12.5px;
  font-weight: 500;
}

.hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8c5d8;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 40px);
  margin-top: 36px;
  padding-top: 25px;
  border-top: 1px dashed var(--line-strong);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-item strong {
  color: var(--ink);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.04em;
  line-height: 1.2;
}

.stat-item span {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .02em;
}

/* 右侧资料卡区域 */
.hero-visual {
  position: relative;
  display: flex;
  min-height: 545px;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  z-index: -1;
  width: min(88%, 470px);
  aspect-ratio: 1;
  border: 1px solid rgba(37, 99, 235, .11);
  border-radius: 50%;
  content: "";
}

.visual-blob {
  position: absolute;
  z-index: -2;
  width: 420px;
  height: 420px;
  border-radius: 44% 56% 62% 38% / 45% 40% 60% 55%;
  background: linear-gradient(145deg, rgba(191, 219, 254, .6), rgba(224, 242, 254, .2));
  filter: blur(4px);
  animation: blob-drift 14s ease-in-out infinite alternate;
}

.visual-blob::after {
  position: absolute;
  inset: 34px;
  border: 1px dashed rgba(37, 99, 235, .16);
  border-radius: inherit;
  content: "";
}

@keyframes blob-drift {
  from { transform: translate3d(-10px, 6px, 0) rotate(-4deg); }
  to { transform: translate3d(12px, -10px, 0) rotate(5deg); }
}

.profile-window {
  position: relative;
  z-index: 2;
  width: min(100%, 462px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 30px 70px rgba(30, 64, 175, .15), 0 10px 24px rgba(15, 23, 42, .05), inset 0 1px 0 #fff;
  transform: rotate(-1.2deg);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  backdrop-filter: blur(18px);
}

.hero-visual:hover .profile-window {
  box-shadow: 0 36px 80px rgba(30, 64, 175, .19), 0 12px 28px rgba(15, 23, 42, .06), inset 0 1px 0 #fff;
  transform: rotate(0deg) translateY(-4px);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 43px;
  padding: 0 16px;
  border-bottom: 1px solid #edf1f7;
  background: rgba(248, 250, 253, .92);
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb3ae;
}

.window-dots i:nth-child(2) { background: #ffd18a; }
.window-dots i:nth-child(3) { background: #9fe3bd; }

.window-file {
  flex: 1;
  overflow: hidden;
  color: #8b9bb2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7c8ca3;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.window-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}

.window-body {
  padding: 24px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  flex: none;
  border: 3px solid #fff;
  border-radius: 18px;
  background: var(--blue-soft);
  box-shadow: 0 7px 16px rgba(15, 23, 42, .10);
  object-fit: cover;
}

.profile-name {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.profile-name strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.profile-name span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
  color: #fff;
}

.verified svg {
  width: 12px;
  height: 12px;
}

.verified-large {
  width: 24px;
  height: 24px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
}

.verified-large svg {
  width: 14px;
  height: 14px;
}

.code-lines {
  margin: 20px 0 0;
  padding: 15px 14px 14px;
  overflow: hidden;
  border: 1px solid #edf2f9;
  border-radius: 13px;
  background: linear-gradient(180deg, #fafcff, #f7faff);
  font-family: var(--font-mono);
  font-size: 11.2px;
  line-height: 1.95;
}

.code-line {
  display: flex;
  min-width: 0;
  gap: 12px;
  white-space: nowrap;
}

.line-no {
  width: 12px;
  flex: none;
  color: #c2cede;
  font-size: 9.5px;
  text-align: right;
  user-select: none;
}

.code-indent {
  padding-left: 10px;
}

.tok-key { color: #8b5cf6; }
.tok-name { color: #2563eb; }
.tok-prop { color: #0f766e; }
.tok-string { color: #b45309; }
.tok-punc { color: #94a3b8; }

.profile-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 11px;
  border: 1px solid #dff5ea;
  border-radius: 10px;
  background: #f3fcf8;
  color: #237a5c;
  font-size: 10.5px;
  font-weight: 500;
}

.profile-status .pulse-dot {
  width: 6px;
  height: 6px;
}

.profile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #f0f4fa;
  color: var(--blue-dark);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}

.profile-link .link-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: transform .25s var(--ease), background .25s ease, color .25s ease;
}

.profile-link:hover .link-arrow {
  background: var(--blue);
  color: #fff;
  transform: translateX(3px);
}

/* 浮在卡片外面的小标签 */
.float-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  animation: badge-float 6s ease-in-out infinite;
}

.float-badge strong {
  color: var(--ink);
  font-size: 13px;
}

.float-badge-top {
  top: 10px;
  right: -4px;
}

.float-badge-bottom {
  bottom: 14px;
  left: -6px;
  animation-delay: -3s;
}

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

.badge-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.badge-icon svg {
  width: 16px;
  height: 16px;
}

.badge-icon-amber {
  background: #fff7e8;
  color: #d97706;
}

.hero-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
  color: #a4b2c7;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .18em;
}

.hero-scroll i {
  display: block;
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, #cbd5e1, transparent);
}

/* ==================== 5. 作品区 ==================== */
.works {
  position: relative;
  padding-top: 54px;
}

/* 只保留作品页时，顶部直接从作品标题开始 */
.works-page {
  padding: 78px 0 100px;
}

.works-head {
  align-items: flex-end;
  margin-bottom: 36px;
}

.works-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 4.9vw, 3.55rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.14;
}

.works-head-side {
  max-width: 430px;
}

.works-count {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
}

.works-count strong {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.works-count i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8c5d8;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 44px;
  margin-bottom: 32px;
}

.section-title-wrap .eyebrow {
  margin-bottom: 12px;
}

.section-head h2,
.timeline-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.4vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.2;
}

.title-dot {
  color: var(--blue);
}

.section-desc {
  max-width: 360px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease);
}

.filter-btn:hover {
  border-color: #c4d5f4;
  background: #fff;
  color: var(--blue-dark);
  transform: translateY(-1px);
}

.filter-btn[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .20);
}

.filter-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, .05);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.filter-btn[aria-pressed="true"] .filter-count {
  background: rgba(255, 255, 255, .20);
  color: #fff;
}

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

.project-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease;
  animation: card-in .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-card:hover,
.project-card:focus-within {
  border-color: #c9d9f4;
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.project-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
}

.project-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s var(--ease);
}

.project-card:hover .project-cover img {
  transform: scale(1.035);
}

.project-type {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .07);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
}

.project-card-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .13);
  color: var(--blue);
  opacity: 0;
  transform: translateY(4px) scale(.9);
  transition: opacity .25s ease, transform .3s var(--ease);
}

.project-card-arrow svg {
  width: 15px;
  height: 15px;
}

.project-card:hover .project-card-arrow {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 18px 18px;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.project-title a {
  color: inherit;
  text-decoration: none;
}

.project-title a:hover {
  color: var(--blue-dark);
}

.project-year {
  flex: none;
  padding-top: 4px;
  color: #a7b4c7;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
}

.project-subtitle {
  margin: 3px 0 0;
  color: #b0bdcf;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .11em;
  line-height: 1.4;
}

.project-desc {
  margin: 11px 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  margin: 0 0 15px;
  list-style: none;
}

.tag {
  padding: 3px 7px;
  border: 1px solid #e8eef8;
  border-radius: 6px;
  background: #f4f8fe;
  color: #51627a;
  font-size: 10.5px;
  line-height: 1.4;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid #f0f4fa;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.card-btn .icon {
  width: 12px;
  height: 12px;
}

.card-btn-primary {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.card-btn-primary:hover {
  background: var(--blue);
  color: #fff;
}

.card-btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.card-btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .55);
  text-align: center;
}

.empty-icon {
  color: #b7c7dc;
  font-size: 38px;
  line-height: 1;
}

.empty-state h2,
.empty-state h3 {
  margin: 14px 0 5px;
  font-size: 17px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ==================== 6. 首页联系区 ==================== */
.contact-section {
  padding: 10px 0 100px;
}

.contact-panel {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 50px 54px;
  border-radius: 30px;
  background: linear-gradient(118deg, #1e3a8a 0%, #1d4ed8 56%, #3b82f6 100%);
  box-shadow: 0 30px 60px -22px rgba(37, 99, 235, .48);
  color: #fff;
}

.panel-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 55%, transparent 90%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 55%, transparent 90%);
}

.panel-orb {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
}

.panel-orb-one {
  right: 14%;
  bottom: -190px;
  width: 390px;
  height: 390px;
}

.panel-orb-two {
  right: 6%;
  bottom: -120px;
  width: 250px;
  height: 250px;
  border-color: rgba(255, 255, 255, .10);
}

.contact-copy,
.contact-actions {
  position: relative;
  z-index: 2;
}

.contact-panel h2 {
  margin: 0 0 9px;
  color: #fff;
  font-size: clamp(1.85rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.2;
}

.contact-panel p {
  max-width: 450px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 13.5px;
  line-height: 1.8;
}

.contact-panel .eyebrow {
  margin-bottom: 13px;
}

.contact-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==================== 7. 页脚 ==================== */
.site-footer {
  padding: 54px 0 25px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .52);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr .65fr 1fr;
  gap: 40px;
  padding-bottom: 38px;
}

/* 只有作品页：页脚没有“逛逛”导航，改成两栏 */
body[data-page="works"] .footer-main {
  grid-template-columns: 1.5fr 1fr;
}

.footer-brand p {
  max-width: 260px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-label {
  display: block;
  margin-bottom: 3px;
  color: #a4b1c3;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.footer-nav a,
.footer-contact a {
  width: fit-content;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--blue-dark);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
  color: #9aa9be;
  font-size: 11px;
}

.footer-bottom p {
  margin: 0;
}

.footer-made span {
  color: var(--coral);
}

/* ==================== 8. 关于页 · 首屏 ==================== */
.about-hero {
  padding: 76px 0 88px;
}

.about-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  align-items: center;
  gap: clamp(48px, 7vw, 92px);
}

.about-copy {
  max-width: 580px;
}

.about-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.8rem, 5.4vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.1;
}

.about-lead {
  max-width: 530px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.9;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.about-availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 27px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.availability-divider {
  color: #c2cede;
}

/* 深蓝色身份卡 */
.id-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 27px;
  background:
    radial-gradient(420px 260px at 80% -10%, rgba(59, 130, 246, .55), transparent 60%),
    linear-gradient(160deg, #0a1934 0%, #112955 55%, #1a3b82 100%);
  box-shadow: 0 34px 70px -18px rgba(9, 25, 58, .55), inset 0 1px 0 rgba(255, 255, 255, .14);
  color: #fff;
  transform: rotate(1.2deg);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.id-card:hover {
  box-shadow: 0 40px 80px -18px rgba(9, 25, 58, .62), inset 0 1px 0 rgba(255, 255, 255, .14);
  transform: rotate(0deg) translateY(-4px);
}

.id-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .14) .8px, transparent .8px);
  background-size: 17px 17px;
  content: "";
  mask-image: linear-gradient(180deg, #000, transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%);
  opacity: .28;
}

.id-card-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(147, 197, 253, .16);
  border-radius: 50%;
}

.id-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .48);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .14em;
}

.id-card-label {
  color: rgba(255, 255, 255, .72);
}

.id-avatar-wrap {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 25px 0 17px;
}

.id-avatar-wrap img {
  display: block;
  width: 142px;
  height: 142px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 27px;
  background: var(--blue-soft);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .25);
  object-fit: cover;
}

.id-sparkle {
  position: absolute;
  color: #93c5fd;
  font-size: 17px;
  line-height: 1;
  animation: sparkle 3.6s ease-in-out infinite;
}

.id-sparkle-one {
  top: -8px;
  right: -16px;
}

.id-sparkle-two {
  bottom: 3px;
  left: -16px;
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
  animation-delay: -1.8s;
}

@keyframes sparkle {
  0%, 100% { opacity: .45; transform: scale(.92) rotate(0); }
  50% { opacity: 1; transform: scale(1.1) rotate(12deg); }
}

.id-name-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.id-name-row h2 {
  margin: 0;
  color: #fff;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.2;
}

.id-role {
  position: relative;
  z-index: 1;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.id-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  padding: 7px 10px;
  border: 1px solid rgba(110, 231, 183, .17);
  border-radius: 999px;
  background: rgba(16, 185, 129, .10);
  color: #a7f3d0;
  font-size: 10.5px;
}

.id-status .pulse-dot {
  width: 6px;
  height: 6px;
}

.id-facts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 20px 0 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .10);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.id-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.id-facts dt {
  flex: none;
  color: rgba(255, 255, 255, .38);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .10em;
}

.id-facts dd {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 11px;
  text-align: right;
  word-break: break-all;
}

.id-facts a {
  color: inherit;
  text-decoration: none;
}

.id-facts a:hover {
  color: #bfdbfe;
}

.id-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  color: rgba(255, 255, 255, .30);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .14em;
}

.barcode {
  display: block;
  width: 62px;
  height: 18px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .62) 0 1px, transparent 1px 3px, rgba(255, 255, 255, .35) 3px 4px, transparent 4px 6px);
  opacity: .55;
}

/* ==================== 9. 关于页 · 自我介绍 ==================== */
.about-story {
  padding-top: 20px;
}

.story-layout {
  display: grid;
  grid-template-columns: 195px minmax(0, 780px);
  justify-content: center;
  gap: 56px;
}

.story-aside {
  padding-top: 5px;
}

.story-index {
  margin: 0;
  color: #dbe5f3;
  font-family: var(--font-mono);
  font-size: 76px;
  font-weight: 800;
  letter-spacing: -.08em;
  line-height: 1;
}

.story-paragraphs p {
  margin: 0 0 20px;
  color: #475569;
  font-size: 15.5px;
  line-height: 2;
}

.story-paragraphs p:first-child {
  color: var(--ink-2);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.9;
}

.story-paragraphs p:last-child {
  margin-bottom: 0;
}

.story-quote {
  position: relative;
  margin: 32px 0 0;
  padding: 24px 28px 22px 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 255, 255, .75);
  box-shadow: var(--shadow-sm);
}

.story-quote p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.7;
}

.story-quote cite {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.quote-mark {
  position: absolute;
  top: -20px;
  right: 16px;
  color: #eef4fc;
  font-family: Georgia, serif;
  font-size: 110px;
  line-height: 1;
}

/* ==================== 10. 关于页 · 近况 ==================== */
.now-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.now-card {
  position: relative;
  overflow: hidden;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease;
}

.now-card::before {
  position: absolute;
  top: 0;
  right: 23px;
  left: 23px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--blue), #60a5fa, transparent);
  content: "";
  opacity: 0;
  transition: opacity .3s ease;
}

.now-card:hover {
  border-color: #c9d9f4;
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.now-card:hover::before {
  opacity: 1;
}

.now-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.now-label {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
}

.now-index {
  color: #c3cfdf;
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.now-card h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.now-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

/* ==================== 11. 关于页 · 技能 ==================== */
.skills-section {
  padding-top: 20px;
}

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

.skill-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-sm);
}

.skill-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.skill-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.skill-icon svg {
  width: 18px;
  height: 18px;
}

.skill-number {
  color: #c2cede;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .08em;
}

.skill-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.skill-card > p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 15px 0 0;
  margin: 15px 0 0;
  border-top: 1px solid #eff4fa;
  list-style: none;
}

.skill-tag {
  padding: 4px 8px;
  border: 1px solid #e9eff8;
  border-radius: 6px;
  background: #f5f9fe;
  color: #4c5f79;
  font-size: 10.5px;
}

/* ==================== 12. 关于页 · 时间线 ==================== */
.timeline-section {
  padding-top: 40px;
  padding-bottom: 100px;
  background: linear-gradient(180deg, transparent 0%, rgba(238, 244, 252, .72) 45%, transparent 100%);
}

.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(50px, 8vw, 100px);
}

.timeline-intro {
  position: sticky;
  top: 112px;
}

.timeline-intro h2 {
  max-width: 390px;
}

.timeline-intro > p {
  max-width: 370px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--blue-dark);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}

.text-link span {
  transition: transform .2s ease;
}

.text-link:hover span {
  transform: translateX(3px);
}

.timeline {
  position: relative;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 7px;
  bottom: 12px;
  left: 6px;
  width: 1px;
  background: linear-gradient(180deg, #b8cff4, #dbe7f8 70%, transparent);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 0 0 32px 37px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 4px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px #eff5fe;
}

.timeline-year {
  margin-bottom: 4px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
}

.timeline-item h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.timeline-item p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}

/* ==================== 13. 关于页 · 联系方式 ==================== */
.contact-details {
  padding-top: 15px;
  padding-bottom: 105px;
}

.contact-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease;
}

.contact-card:hover {
  border-color: #c9d9f4;
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.contact-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.contact-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
}

.contact-kicker {
  color: #b1bdcd;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.contact-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.contact-value {
  min-height: 24px;
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  word-break: break-all;
}

.contact-value a {
  text-decoration: none;
}

.contact-value a:hover {
  color: var(--blue-dark);
}

.contact-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f0f4fa;
}

.contact-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.contact-action:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--blue-dark);
}

.contact-action-primary {
  border-color: transparent;
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.contact-action-primary:hover {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
}

.contact-action .icon {
  width: 12px;
  height: 12px;
}

.contact-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 21px;
  color: #8fa0b6;
  font-size: 11px;
}

.contact-note p {
  margin: 0;
}

.contact-note-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
}

/* ==================== 14. 404 页面 ==================== */
.not-found {
  display: flex;
  min-height: calc(100vh - var(--header-h) - 120px);
  align-items: center;
  padding: 70px 0;
}

.not-found-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 660px;
}

.not-found-code {
  margin: 4px 0 2px;
  background: linear-gradient(135deg, #bfdbfe 0%, #dbeafe 45%, #eff6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-mono);
  font-size: clamp(7rem, 22vw, 13rem);
  font-weight: 800;
  letter-spacing: -.10em;
  line-height: .88;
  user-select: none;
}

.not-found h1 {
  margin: 20px 0 10px;
  color: var(--ink);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.2;
}

.not-found p:not(.eyebrow) {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.mobile-home-link {
  display: none;
}

.not-found-art {
  position: absolute;
  top: 16%;
  right: 6%;
  width: 260px;
  height: 260px;
  border: 1px dashed rgba(37, 99, 235, .18);
  border-radius: 50%;
  pointer-events: none;
}

.not-found-art::before,
.not-found-art::after {
  position: absolute;
  border: 1px solid rgba(37, 99, 235, .10);
  border-radius: 50%;
  content: "";
}

.not-found-art::before {
  inset: 35px;
}

.not-found-art::after {
  inset: 82px;
  background: rgba(219, 234, 254, .28);
}

/* ==================== 15. 提示条与滚动动画 ==================== */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 250;
  max-width: calc(100vw - 40px);
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(11, 18, 32, .94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .25);
  color: #fff;
  font-size: 12.5px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .25s ease, transform .3s var(--ease);
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

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

/* ==================== 16. 平板适配 ==================== */
@media (max-width: 1080px) {
  .hero-grid {
    gap: 42px;
  }

  .profile-window {
    width: min(100%, 430px);
  }

  .hero-visual {
    min-height: 510px;
  }

  .float-badge-top {
    right: -2px;
  }

  .float-badge-bottom {
    left: -2px;
  }

  .about-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    gap: 48px;
  }

  .id-card {
    padding: 22px;
  }

  .id-avatar-wrap img {
    width: 128px;
    height: 128px;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 62px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero-visual {
    width: 100%;
    min-height: 500px;
    max-width: 600px;
    margin: 0 auto;
  }

  .profile-window {
    width: min(100%, 480px);
  }

  .hero-scroll {
    display: none;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-hero {
    padding-top: 58px;
  }

  .about-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 50px;
  }

  .id-card {
    max-width: 430px;
    margin: 0 auto;
    transform: none;
  }

  .id-card:hover {
    transform: translateY(-4px);
  }

  .story-layout {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 36px;
  }

  .story-index {
    font-size: 60px;
  }

  .now-grid,
  .skills-grid,
  .contact-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid .skill-card:last-child,
  .contact-detail-grid .contact-card:last-child {
    grid-column: 1 / -1;
  }

  .timeline-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .timeline-intro {
    position: static;
  }

  .timeline-intro > p {
    max-width: 520px;
  }

  .contact-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 27px;
    padding: 40px;
  }

  .contact-actions {
    width: 100%;
  }

  .footer-main {
    grid-template-columns: 1.3fr .7fr 1fr;
  }
}

/* ==================== 17. 手机适配 ==================== */
@media (max-width: 860px) {
  :root {
    --header-h: 68px;
  }

  .container {
    padding: 0 22px;
  }

  .desktop-nav,
  .header-contact {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* 只有作品页：手机上也保留右上角的「联系我」 */
  body[data-page="works"] .header-contact {
    display: inline-flex;
  }

  .mobile-home-link {
    display: inline-flex;
  }

  .not-found {
    min-height: calc(100vh - var(--header-h) - 160px);
    padding: 50px 0;
  }

  .not-found-art {
    display: none;
  }

  .mobile-nav-wrap {
    display: block;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    background: rgba(255, 255, 255, .97);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: max-height .4s var(--ease), opacity .25s ease, transform .3s var(--ease), border-color .25s ease;
    backdrop-filter: blur(18px);
  }

  .mobile-nav-wrap.is-open {
    max-height: 430px;
    border-top-color: var(--line);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .brand-text {
    font-size: 17px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }

  .hero {
    padding-bottom: 70px;
  }

  .hero-title {
    font-size: clamp(2.25rem, 9.4vw, 3.55rem);
  }

  .hero-lead {
    font-size: 15px;
  }

  .section {
    padding: 70px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 26px;
  }

  .section-desc {
    max-width: 500px;
  }

  .contact-panel {
    padding: 34px 28px;
    border-radius: 24px;
  }

  .contact-actions .btn {
    flex: 1;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 30px 24px;
  }

  body[data-page="works"] .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .about-title {
    font-size: clamp(2.6rem, 10vw, 3.8rem);
  }

  .about-lead {
    font-size: 15.5px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 62px;
  }

  .hero-eyebrow {
    margin-bottom: 22px;
    font-size: 11.5px;
  }

  .hero-title {
    font-size: clamp(2.05rem, 10.3vw, 2.95rem);
    letter-spacing: -.05em;
  }

  .hero-lead {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.85;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .hero-actions .btn {
    flex: 1;
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-meta {
    margin-top: 22px;
    font-size: 11.5px;
  }

  .hero-stats {
    justify-content: space-between;
    gap: 14px;
    margin-top: 29px;
    padding-top: 20px;
  }

  .stat-item strong {
    font-size: 20px;
  }

  .stat-item span {
    font-size: 10.5px;
  }

  .hero-visual {
    width: 100%;
    min-height: auto;
    padding: 14px 0 18px;
  }

  .hero-visual::before {
    width: 92%;
  }

  .visual-blob {
    width: 300px;
    height: 300px;
  }

  .profile-window {
    border-radius: 18px;
    transform: none;
  }

  .hero-visual:hover .profile-window {
    transform: none;
  }

  .window-body {
    padding: 19px;
  }

  .profile-avatar {
    width: 55px;
    height: 55px;
    border-radius: 16px;
  }

  .profile-name strong {
    font-size: 16px;
  }

  .code-lines {
    margin-top: 16px;
    padding: 13px 11px;
    font-size: 10px;
  }

  .code-line {
    gap: 9px;
  }

  .profile-status {
    font-size: 9.5px;
  }

  .float-badge {
    display: none;
  }

  .works {
    padding-top: 42px;
  }

  .works-page {
    padding: 52px 0 70px;
  }

  .works-head {
    margin-bottom: 25px;
  }

  .works-title {
    font-size: clamp(1.9rem, 8.6vw, 2.5rem);
  }

  .works-head-side {
    max-width: 100%;
  }

  .section {
    padding: 62px 0;
  }

  .section-head h2,
  .timeline-intro h2 {
    font-size: clamp(1.65rem, 7.7vw, 2.1rem);
  }

  .section-desc {
    font-size: 13px;
  }

  .filters {
    gap: 6px;
    margin-bottom: 20px;
  }

  .filter-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .filter-count {
    min-width: 16px;
    height: 16px;
    font-size: 8px;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .project-body {
    padding: 16px;
  }

  .project-title {
    font-size: 17px;
  }

  .contact-section {
    padding-bottom: 68px;
  }

  .contact-panel {
    padding: 30px 23px;
  }

  .contact-panel h2 {
    font-size: 1.75rem;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .about-hero {
    padding-top: 45px;
    padding-bottom: 64px;
  }

  .about-hero-grid {
    gap: 38px;
  }

  .about-title {
    font-size: clamp(2.35rem, 11vw, 3.1rem);
  }

  .about-lead {
    margin-top: 19px;
    font-size: 14.5px;
  }

  .about-actions .btn {
    flex: 1;
    padding-right: 15px;
    padding-left: 15px;
  }

  .about-availability {
    margin-top: 22px;
    font-size: 11px;
  }

  .id-card {
    padding: 21px;
    border-radius: 23px;
  }

  .id-avatar-wrap {
    margin-top: 22px;
  }

  .id-avatar-wrap img {
    width: 116px;
    height: 116px;
    border-radius: 22px;
  }

  .id-name-row h2 {
    font-size: 26px;
  }

  .id-facts dd {
    font-size: 10px;
  }

  .story-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .story-index {
    display: none;
  }

  .story-paragraphs p {
    font-size: 14.5px;
    line-height: 1.95;
  }

  .story-paragraphs p:first-child {
    font-size: 17px;
  }

  .story-quote {
    padding: 21px 21px 19px 23px;
  }

  .story-quote p {
    font-size: 15px;
  }

  .now-grid,
  .skills-grid,
  .contact-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .skills-grid .skill-card:last-child,
  .contact-detail-grid .contact-card:last-child {
    grid-column: auto;
  }

  .now-card {
    padding: 21px;
  }

  .now-card-top {
    margin-bottom: 20px;
  }

  .skill-card > p {
    min-height: 0;
  }

  .timeline-section {
    padding-top: 25px;
    padding-bottom: 68px;
  }

  .timeline-layout {
    gap: 30px;
  }

  .timeline-item {
    padding-bottom: 28px;
  }

  .contact-details {
    padding-top: 5px;
    padding-bottom: 70px;
  }

  .contact-card {
    padding: 19px;
  }
}

@media (max-width: 390px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .about-actions .btn {
    width: 100%;
    flex: none;
  }

  .code-lines {
    font-size: 9.2px;
  }

  .window-file {
    font-size: 9px;
  }

  .profile-name span {
    font-size: 10.5px;
  }

  .hero-meta {
    gap: 8px;
  }

  .about-actions {
    flex-direction: column;
  }

  .id-card {
    padding: 18px;
  }

  .contact-panel {
    padding: 27px 19px;
  }
}

/* ==================== 18. 动效偏好与打印 ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .hero-scroll,
  .contact-section,
  .about-actions,
  .hero-actions,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
  }

  body::before {
    display: none;
  }

  .project-card,
  .now-card,
  .skill-card,
  .contact-card {
    break-inside: avoid;
  }
}
