/* ============================================================
   个人网站复刻 —— 设计系统
   灵感：lex.sh（Vercel/Linear 式暗色极简）
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 背景层级（OLED 黑，逐层提亮） */
  --bg-0: #0a0a0a;
  --bg-1: #111;
  --bg-2: #161616;
  --bg-3: #1f1f1f;

  /* 边框：低透明度白，而非灰色（高级感来源） */
  --border: #ffffff14;
  --border-strong: #ffffff24;
  --border-hover: #ffffff38;

  /* 文字层级 */
  --text-primary: #ededed;
  --text-secondary: #a1a1a1;
  --text-tertiary: #717171;
  --text-disabled: #525252;

  /* 唯一强调色：蓝 */
  --accent: #3b82f6;
  --accent-bright: #60a5fa;
  --accent-soft: #3b82f61f;
  --accent-glow: #3b82f640;

  /* 字体（Vercel/Linear 同款） */
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* 字号阶梯 */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 44px;
  --text-4xl: 60px;
  --text-5xl: 80px;

  /* 布局 */
  --maxw: 1080px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* 动效：expo-out 缓动 */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-quick: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: .12s;
  --dur: .2s;
  --dur-slow: .4s;

  color-scheme: dark;
}

/* ---------- 浅色模式（整套镜像） ---------- */
:root[data-theme="light"] {
  --bg-0: #fcfcfc;
  --bg-1: #fff;
  --bg-2: #f5f5f5;
  --bg-3: #ededed;
  --border: #00000014;
  --border-strong: #00000024;
  --border-hover: #00000038;
  --text-primary: #171717;
  --text-secondary: #525252;
  --text-tertiary: #737373;
  --text-disabled: #a3a3a3;
  --accent: #2563eb;
  --accent-bright: #1d4ed8;
  --accent-soft: #2563eb14;
  --accent-glow: #2563eb2e;
  color-scheme: light;
}

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

html {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  background: var(--bg-0);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizelegibility;
  scroll-behavior: smooth;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body {
  background: var(--bg-0);
  min-height: 100vh;
  color: var(--text-primary);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  line-height: 1.55;
  overflow-x: hidden;
}

/* 顶部固定蓝色光晕（氛围感关键） */
body::before {
  content: "";
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  opacity: .45;
  pointer-events: none;
  z-index: 0;
  width: 90vw;
  height: 80vh;
  transition: opacity var(--dur-slow) var(--ease);
  position: fixed;
  top: -40vh;
  left: 50%;
  transform: translateX(-50%);
}

:root[data-theme="light"] body::before {
  opacity: .25;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-quick);
}

a:hover {
  color: var(--accent-bright);
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  z-index: 1;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}

/* ---------- 导航（毛玻璃） ---------- */
.site-nav {
  z-index: 50;
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  background: #0a0a0aa6;
  align-items: center;
  height: 60px;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

:root[data-theme="light"] .site-nav {
  background: #fcfcfcb8;
}

.site-nav .container {
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.nav-brand {
  font-size: var(--text-sm);
  letter-spacing: -.01em;
  color: var(--text-primary);
  align-items: center;
  gap: 9px;
  font-weight: 600;
  display: flex;
}

.nav-brand:hover {
  color: var(--text-primary);
}

.nav-left {
  align-items: center;
  gap: 18px;
  display: flex;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  padding: 2px;
  object-fit: cover;
  border: 1px solid #ffffff38;
  border-radius: 9px;
  background: #ffffff14;
  box-shadow: inset 0 1px 0 #ffffff42, 0 5px 16px #0000002e;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  flex-shrink: 0;
  display: block;
}

.nav-initials {
  padding: 4px 7px;
  border: 1px solid #ffffff38;
  border-radius: 7px;
  background: #ffffff0d;
  box-shadow: inset 0 1px 0 #ffffff2e, 0 4px 14px #0000001f;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

:root[data-theme="light"] .nav-avatar,
:root[data-theme="light"] .nav-initials {
  border-color: #0000001f;
  background: #ffffff8c;
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px #00000014;
}

.nav-right {
  align-items: center;
  gap: 4px;
  display: flex;
}

.nav-links {
  gap: 2px;
  margin-right: 8px;
  list-style: none;
  display: flex;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-quick), background var(--dur-fast) var(--ease-quick);
  border-radius: 7px;
  padding: 6px 12px;
  font-weight: 500;
  display: block;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-2);
}

.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.icon-btn {
  width: 34px;
  height: 34px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-quick);
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  place-items: center;
  display: grid;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-2);
  border-color: var(--border);
}

.nav-socials {
  gap: 4px;
  list-style: none;
  display: flex;
}

.nav-socials li {
  position: relative;
  display: flex;
}

.nav-socials .social-link {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--text-secondary);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav-socials .social-link:hover {
  color: var(--text-primary);
  background: var(--bg-2);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.social-icon-xiaohongshu {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  background: currentColor;
  -webkit-mask: url("../img/Xiaohongshu.svg") center / contain no-repeat;
  mask: url("../img/Xiaohongshu.svg") center / contain no-repeat;
}

:root[data-theme="light"] .nav-socials .social-link {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

:root[data-theme="light"] .nav-socials .social-link:hover {
  background: #fff;
  border-color: #00000038;
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px #0000001f;
}

.nav-socials .social-email {
  position: absolute;
  top: 38px;
  left: 0;
  z-index: 60;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-1);
  box-shadow: 0 8px 24px #00000026;
  white-space: nowrap;
}

/* ---------- Hero（全屏） ---------- */
.hero {
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 100px 0 80px;
  display: flex;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  align-items: stretch;
  gap: clamp(42px, 7vw, 96px);
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero-chat-column {
  min-width: 0;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-eyebrow {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  transition: border-color var(--dur) var(--ease);
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
  padding: 5px 12px 5px 10px;
  font-weight: 500;
  display: inline-flex;
}

.hero-eyebrow:hover {
  border-color: var(--border-hover);
}

.hero-eyebrow::before {
  /* 发光圆点 */
  content: "";
  background: var(--accent);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(48px, 9vw, var(--text-5xl));
  letter-spacing: -.04em;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  margin-left: -.055em;
  font-weight: 600;
  line-height: 1.02;
  white-space: nowrap;
}

.hero-name {
  /* 渐变文字 */
  background: linear-gradient(100deg, var(--text-primary) 30%, var(--text-secondary) 100%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.eye-tracking {
  display: inline-flex;
  width: 1.62em;
  height: .78em;
  margin-left: 1ch;
  gap: .1em;
  vertical-align: middle;
  align-items: center;
  perspective: 500px;
  white-space: nowrap;
  transform: translateY(-.035em);
}

.tracking-eye {
  position: relative;
  display: block;
  width: .72em;
  height: .63em;
  overflow: hidden;
  border: .035em solid #d7d0c7;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fdfbf7 0%, #f5f0eb 62%, #d8d0c6 100%);
  box-shadow: inset 0 .025em .1em #0000001f, 0 .04em .24em #0000001f;
  transform-origin: center;
}

.tracking-iris {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45%;
  height: 55%;
  border: .025em solid #344b31;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #6b8f62, #4a6741 58%, #263824 100%);
  box-shadow: inset 0 .04em .12em #0000004d, 0 0 .08em #4a674166;
  transform: translate(-50%, -50%);
}

.tracking-iris::before,
.tracking-iris::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: .018em solid #d9edcf66;
  border-radius: 50%;
}

.tracking-iris::after {
  inset: 28%;
  border-color: #1c2d1a88;
}

.tracking-pupil {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48%;
  height: 48%;
  border-radius: 50%;
  background: #0a0a0a;
  transform: translate(calc(-50% + var(--pupil-x, 0px)), calc(-50% + var(--pupil-y, 0px)));
  transition: transform .08s linear;
}

.tracking-glint {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: #ffffffeb;
}

.tracking-glint-primary {
  top: 22%;
  left: 28%;
  width: 18%;
  height: 18%;
}

.tracking-glint-secondary {
  right: 24%;
  bottom: 22%;
  width: 8%;
  height: 8%;
  opacity: .75;
}

.eye-tracking.is-blinking .tracking-eye {
  animation: eye-blink .15s ease-in-out;
}

@keyframes eye-blink {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(.06);
  }
}

@media (width <=640px) {
  .hero-title {
    white-space: normal;
  }

  .eye-tracking {
    width: 1.3em;
    height: .7em;
  }
}

.letter-cascade {
  display: inline;
  white-space: normal;
  perspective: 500px;
}

.letter-cascade-slot {
  position: relative;
  display: inline-flex;
  white-space: pre;
  perspective: 500px;
}

.letter-cascade-front,
.letter-cascade-echo {
  display: inline-block;
  transform-origin: bottom center;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
}

.letter-cascade-echo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotateX(-90deg) translateY(6px) scale(.8);
  transform-origin: top center;
}

.hero-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 48ch;
  margin-bottom: 36px;
  font-weight: 400;
  line-height: 1.65;
}

.hero-meta {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.hero-meta-block {
  display: grid;
  gap: 5px;
}

.hero-meta-label {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero-meta-value {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.hero-bot-description {
  margin: 0 0 28px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.4;
}

.hero-cta {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 0;
  display: flex;
}


/* ---------- 按钮 ---------- */
.btn {
  font-size: var(--text-sm);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-1);
  min-height: 38px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-quick);
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
}

.btn:hover {
  background: var(--bg-2);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* 主按钮：反色（暗色下白底黑字），不用蓝色 */
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-0);
  border-color: var(--text-primary);
  box-shadow: 0 1px 2px #0003;
}

.btn-primary:hover {
  color: #0a0a0a;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 4px 12px #0000004d;
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
}

.btn-projects {
  color: var(--accent-bright);
  background: transparent;
  border-color: var(--border-strong);
  box-shadow: none;
}

.btn-projects::after {
  content: "↗";
  font-size: 13px;
  transition: transform var(--dur-fast) var(--ease-quick);
}

.btn-projects:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: none;
}

.btn-projects:hover::after {
  transform: translate(2px, -2px);
}

/* ---------- 社交图标 ---------- */
.socials {
  gap: 6px;
  list-style: none;
  display: flex;
}

.social-link {
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-quick);
  place-items: center;
  display: grid;
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.social-link:hover {
  color: var(--text-primary);
  background: var(--bg-2);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.socials li {
  align-items: center;
  display: flex;
  gap: 8px;
}

.social-email {
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

/* ---------- 文章页（Résumé） ---------- */
.article {
  padding: 140px 0 100px;
  position: relative;
}

.article-head {
  margin-bottom: 64px;
  padding-bottom: 8px;
}

.article-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-weight: 500;
  display: inline-block;
}

.article-title {
  font-size: clamp(32px, 5vw, var(--text-4xl));
  letter-spacing: -.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-left: -.045em;
  font-weight: 600;
  line-height: 1.1;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.prose {
  max-width: 70ch;
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-primary);
  letter-spacing: -.02em;
  margin: 2em 0 .6em;
  font-weight: 600;
  line-height: 1.3;
}

.prose h1 {
  font-size: var(--text-2xl);
  margin-left: -.03em;
}

.prose h2 {
  font-size: var(--text-xl);
  margin-left: -.025em;
}

.prose h3 {
  font-size: var(--text-lg);
}

.prose h4 {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-tertiary);
}

.prose p {
  margin: 1em 0;
}

.prose ul,
.prose ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.prose li {
  margin: .4em 0;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease-quick);
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose code {
  font-family: var(--font-mono);
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 5px;
  padding: .1em .4em;
  font-size: .85em;
}

.prose blockquote {
  border-left: 2px solid var(--border-strong);
  padding-left: 1em;
  color: var(--text-tertiary);
  margin: 1.5em 0;
}

/* ---------- 履历条目 ---------- */
.resume-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  transition: border-color var(--dur) var(--ease);
}

.resume-item:hover {
  border-top-color: var(--border-hover);
}

.resume-period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  padding-top: 4px;
}

.resume-title {
  font-size: var(--text-md);
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.resume-org {
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: 6px;
}

.resume-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- A4 academic CV ---------- */
.resume-page {
  min-height: 100vh;
  padding: 92px 0 72px;
  background: #e8ebef;
}

.resume-toolbar {
  max-width: 920px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resume-back,
.resume-download {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 7px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-1);
}

.resume-download {
  color: var(--accent-bright);
}

.cv-container {
  width: 210mm;
  min-height: 297mm;
  margin: 10px auto;
  padding: 17mm 16mm 15mm;
  box-sizing: border-box;
  background: #fff;
  color: #1d2935;
  box-shadow: 0 10px 35px #15223524;
  font-family: Georgia, "Times New Roman", serif;
}

.cv-header {
  border-bottom: 2px solid #20354b;
  padding-bottom: 13px;
  display: block;
}

.cv-kicker,
.cv-section h2,
.cv-entry time,
.cv-project-heading time {
  font-family: var(--font-mono);
}

.cv-kicker {
  margin-bottom: 8px;
  color: #6a7d90;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cv-header h1 {
  color: #17283a;
  font-size: 38px;
  line-height: 1;
  letter-spacing: .02em;
  font-weight: 700;
}

.cv-interest {
  margin-top: 9px;
  color: #49677f;
  font-size: 13px;
  font-style: italic;
}

.cv-layout {
  display: block;
}

.cv-main-column {
  min-width: 0;
}

.cv-section {
  margin-top: 20px;
}

.cv-section h2 {
  margin-bottom: 9px;
  padding-bottom: 4px;
  border-bottom: 1px solid #bdc9d3;
  color: #315e81;
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.cv-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 10.5px;
  line-height: 1.4;
}

.cv-entry h3,
.cv-project h3 {
  color: #233e55;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.cv-entry p,
.cv-project p {
  margin-top: 2px;
  color: #526475;
}

.cv-entry time,
.cv-project-heading time {
  color: #718394;
  font-size: 9px;
  white-space: nowrap;
}

.publication-list {
  padding-left: 22px;
  color: #526475;
  font-size: 10px;
  line-height: 1.5;
}

.publication-list li {
  margin-bottom: 8px;
  padding-left: 2px;
}

.publication-list strong {
  color: #315e81;
  font-family: var(--font-mono);
  font-size: 9px;
}

.publication-list em {
  color: #314f68;
}

.cv-project {
  margin-bottom: 12px;
  color: #526475;
  font-size: 10px;
  line-height: 1.5;
}

.cv-project-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

@media print {
  body {
    background: #fff;
  }

  .site-nav,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .resume-page {
    padding: 0;
    background: #fff;
  }

  .cv-container {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}

@media (max-width: 760px) {
  .resume-page {
    padding: 78px 12px 40px;
  }

  .resume-toolbar {
    padding: 0;
  }

  .cv-container {
    width: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: 28px 22px;
  }

  .cv-header,
  .cv-layout {
    display: block;
  }

}

/* ---------- 应用卡片 ---------- */
.apps-stack {
  flex-direction: column;
  gap: 16px;
  display: flex;
}

.app-card {
  color: inherit;
  background: var(--bg-1);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--dur) var(--ease);
  border: 1px solid transparent;
  padding: 24px;
  scroll-margin-top: 140px;
  text-decoration: none;
  display: block;
  box-shadow: 0 1px 2px #0000000a, 0 4px 16px #0000000f;
}

:root[data-theme="dark"] .app-card {
  box-shadow: 0 1px 2px #0003, 0 6px 20px #00000047;
}

.app-card-header {
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
  display: flex;
  color: inherit;
  text-decoration: none;
}

.app-icon {
  background: none;
  border: none;
  border-radius: 0;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  overflow: visible;
}

.app-icon img {
  object-fit: contain;
  border-radius: 22.37%;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px #0000001a) drop-shadow(0 2px 6px #0000000f);
}

:root[data-theme="dark"] .app-icon img {
  filter: drop-shadow(0 1px 2px #00000059) drop-shadow(0 3px 8px #00000040);
}

.app-header-text {
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.app-name {
  font-size: var(--text-xl);
  letter-spacing: -.02em;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
}

.app-subtitle,
.app-meta {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
  overflow: hidden;
}

.app-meta {
  color: var(--text-disabled);
}

.app-get {
  min-width: 64px;
  font-size: var(--text-sm);
  letter-spacing: -.01em;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), filter .22s var(--ease);
  border: none;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  box-shadow: 0 1px 2px #00000014;
}

.app-get:hover {
  background: var(--accent-bright);
  box-shadow: 0 2px 6px #0000001a, 0 8px 20px var(--accent-glow);
  filter: brightness(1.05);
  transform: scale(1.06);
}

.app-get:active {
  filter: brightness(.98);
  transition-duration: 90ms;
  transform: scale(.96);
}

.app-screens-wrap {
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

/* 左右渐隐指示 */
.app-screens-wrap::before,
.app-screens-wrap::after {
  content: "";
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  width: 36px;
  transition: opacity .28s var(--ease);
  position: absolute;
  top: 0;
  bottom: 0;
}

.app-screens-wrap::before {
  background: linear-gradient(to right, var(--bg-1) 0, var(--bg-1) 1px, transparent 100%);
  left: 0;
}

.app-screens-wrap::after {
  background: linear-gradient(to left, var(--bg-1) 0, var(--bg-1) 1px, transparent 100%);
  right: 0;
}

.app-screens-wrap.can-scroll-left::before,
.app-screens-wrap.can-scroll-right::after {
  opacity: 1;
}

.app-screens {
  perspective: 900px;
  perspective-origin: 50%;
  scrollbar-width: none;
  scroll-behavior: auto;
  gap: 12px;
  margin: -10px 0;
  padding: 14px 0;
  display: flex;
  overflow-x: auto;
}

.app-screens::-webkit-scrollbar {
  display: none;
}

.app-screen-tilt {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 50%;
  --g-angle: 145deg;
  cursor: zoom-in;
  width: fit-content;
  height: 200px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  z-index: 0;
  will-change: transform;
  flex-shrink: 0;
  display: block;
  position: relative;
}

.app-screen-tilt.is-tilting {
  z-index: 2;
}

.app-screen {
  object-fit: contain;
  opacity: 0;
  width: auto;
  height: 100%;
  transition: opacity .32s var(--ease);
  pointer-events: none;
  background: none;
  border: none;
  display: block;
}

.app-screen.is-loaded {
  opacity: 1;
}

/* 光泽层：跟随光标的径向 glare + 随光标方向的线性 wash */
.app-screen-glare {
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx) var(--gy), #ffffff8c 0%, #ffffff29 28%, transparent 58%);
  transition: opacity .28s var(--ease);
  z-index: 2;
  position: absolute;
  inset: 0;
}

.app-screen-wash {
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  background: linear-gradient(var(--g-angle), #ffffff52 0%, #ffffff14 42%, transparent 72%);
  transition: opacity .28s var(--ease);
  z-index: 1;
  position: absolute;
  inset: 0;
}

.app-screen-tilt.is-tilting .app-screen-glare,
.app-screen-tilt.is-tilting .app-screen-wash {
  opacity: 1;
}

.app-description-wrap {
  margin-top: 16px;
  position: relative;
}

.app-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: pre-line;
  -webkit-line-clamp: 3;
  transition: -webkit-line-clamp .3s var(--ease);
  -webkit-box-orient: vertical;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
}

.app-description-wrap.is-open .app-description {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

.app-description-fade {
  background: linear-gradient(to bottom, transparent, var(--bg-1));
  pointer-events: none;
  opacity: 1;
  height: 2.6em;
  transition: opacity .3s var(--ease);
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
}

.app-description-wrap.is-open .app-description-fade {
  opacity: 0;
}

.app-description-toggle {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-quick);
  background: none;
  border: none;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 0;
  display: inline-flex;
}

.app-description-toggle:hover {
  color: var(--text-primary);
}

.app-description-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform .3s var(--ease);
}

.app-description-wrap.is-open .app-description-toggle svg {
  transform: rotate(180deg);
}

/* ---------- Lightbox ---------- */
.lightbox {
  z-index: 100;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  background: #00000061;
  justify-content: center;
  align-items: center;
  padding: 32px;
  display: none;
  position: fixed;
  inset: 0;
}

.lightbox.is-open {
  display: flex;
}

:root[data-theme="light"] .lightbox {
  background: #ffffff6b;
}

.lightbox-stage {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(86vw, 520px);
  display: flex;
  position: relative;
}

.lightbox-frame {
  place-items: center;
  min-width: min(40vw, 200px);
  min-height: min(50vh, 320px);
  display: grid;
  position: relative;
}

.lightbox-stage.is-loaded .lightbox-frame {
  min-width: 0;
  min-height: 0;
}

.lightbox-img {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  width: auto;
  max-width: min(86vw, 520px);
  height: auto;
  max-height: min(90vh, 1100px);
  transition: opacity .24s var(--ease);
  border-radius: 10px;
  grid-area: 1 / 1;
}

.lightbox-img.is-loaded {
  opacity: 1;
}

.lightbox-spinner {
  pointer-events: none;
  opacity: 1;
  width: 36px;
  height: 36px;
  transition: opacity .18s var(--ease);
  z-index: 1;
  border: 2px solid #ffffff38;
  border-top-color: #ffffffe6;
  border-radius: 50%;
  grid-area: 1 / 1;
  animation: .7s linear infinite lightbox-spin;
}

.lightbox-stage.is-loaded .lightbox-spinner {
  opacity: 0;
  animation: none;
}

@keyframes lightbox-spin {
  to {
    transform: rotate(360deg);
  }
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #ffffffe0;
  letter-spacing: .06em;
  text-shadow: 0 1px 4px #00000059;
  font-weight: 500;
}

:root[data-theme="light"] .lightbox-counter {
  color: #000000b8;
  text-shadow: 0 1px 3px #ffffff80;
}

.lightbox-close,
.lightbox-arrow {
  color: #ffffffd9;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-quick), background var(--dur-fast) var(--ease-quick), transform var(--dur-fast) var(--ease-quick);
  background: #00000047;
  border: none;
  border-radius: 50%;
  place-items: center;
  padding: 0;
  display: grid;
  z-index: 2;
}

.lightbox-close {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 20px;
  right: 20px;
}

.lightbox-close:hover {
  color: #fff;
  background: #0000006b;
  transform: scale(1.08);
}

.lightbox-arrow {
  width: 48px;
  height: 48px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-arrow.left {
  left: max(16px, calc(50% - min(43vw, 260px) - 72px));
}

.lightbox-arrow.right {
  right: max(16px, calc(50% - min(43vw, 260px) - 72px));
}

.lightbox-arrow[hidden] {
  display: none;
}

.lightbox-arrow:hover {
  color: #fff;
  background: #00000073;
  transform: translateY(-50%) scale(1.08);
}

:root[data-theme="light"] .lightbox-close {
  color: #000000b3;
  background: #ffffff8c;
}

:root[data-theme="light"] .lightbox-close:hover {
  color: #000;
  background: #ffffffc7;
}

:root[data-theme="light"] .lightbox-arrow {
  color: #000000b8;
  background: #ffffff8c;
}

:root[data-theme="light"] .lightbox-arrow:hover {
  color: #000;
  background: #ffffffd1;
}

/* ---------- 页脚 ---------- */
.site-footer {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 40px;
  padding: 60px 0 40px;
}

.site-footer .container {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  display: flex;
}

/* ---------- AI 助手 ---------- */
.ai-box {
  margin-top: 56px;
  width: min(100%, 680px);
  max-width: 680px;
  max-height: 500px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur) var(--ease);
}

.ai-box:hover {
  border-color: var(--border-hover);
}

.ai-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.ai-label-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-reset {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--text-tertiary);
  background: transparent;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-quick), background var(--dur-fast) var(--ease-quick);
}

.ai-reset svg {
  width: 14px;
  height: 14px;
}

.ai-reset:hover,
.ai-reset:focus-visible {
  color: var(--text-primary);
  background: var(--bg-2);
  outline: none;
}

.ai-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 50%;
  flex-shrink: 0;
}

.ai-dot.off {
  background: var(--text-disabled);
  box-shadow: none;
}

.ai-form {
  position: relative;
  flex-shrink: 0;
}

.ai-input {
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  resize: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: 12px 52px 12px 14px;
  outline: none;
  overflow-y: auto;
  transition: border-color var(--dur-fast) var(--ease-quick);
}

.ai-input::placeholder {
  color: var(--text-disabled);
}

.ai-input:focus {
  border-color: var(--accent);
}

.ai-send {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 32px;
  height: 32px;
  background: var(--bg-3);
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 0;
  transform: translateY(-50%);
  transition: background var(--dur-fast) var(--ease-quick), transform var(--dur-fast) var(--ease-quick);
}

.ai-send svg {
  display: block;
  width: 15px;
  height: 15px;
}

.ai-send:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.ai-send:hover {
  background: var(--bg-2);
  transform: translateY(calc(-50% - 1px));
}

.ai-form.has-input .ai-send {
  background: var(--accent);
  color: #fff;
}

.ai-form.has-input .ai-send:hover {
  background: var(--accent-bright);
}

.ai-messages {
  min-height: 220px;
  max-height: 330px;
  padding: 8px 4px 14px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ai-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 4px 10px;
}

.ai-prompts button {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.2;
  transition: color var(--dur-fast) var(--ease-quick), background var(--dur-fast) var(--ease-quick), border-color var(--dur-fast) var(--ease-quick), transform var(--dur-fast) var(--ease-quick), box-shadow var(--dur-fast) var(--ease-quick);
}

.ai-prompts button:hover,
.ai-prompts button:focus-visible {
  color: var(--text-primary);
  background: var(--bg-2);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px #0000001a;
  outline: none;
}

:root[data-theme="dark"] .ai-prompts button {
  border-color: #ffffff1a;
  color: #b0b0b0;
}

.ai-empty {
  display: grid;
  flex: 1;
  min-height: 190px;
  place-items: center;
  padding: 24px;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.ai-empty-title {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.ai-empty-description {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
}

.ai-message {
  max-width: 82%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre-wrap;
  animation: ai-message-in .22s var(--ease);
}

.ai-message-user {
  align-self: flex-end;
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  border-bottom-right-radius: 5px;
}

.ai-message-assistant {
  align-self: flex-start;
  background: var(--bg-2);
  border-bottom-left-radius: 5px;
}

.ai-message.is-pending {
  color: var(--text-tertiary);
  font-style: italic;
}

/* 知识依据状态提示：贴在气泡外的浅色小字，不喧宾夺主 */
.ai-hint {
  align-self: flex-start;
  max-width: 85%;
  color: var(--text-disabled);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  padding-left: 2px;
}

@keyframes ai-message-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-send:active {
  transform: translateY(-50%) scale(.96);
}

.ai-send:focus-visible,
.ai-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ai-send:disabled {
  background: var(--bg-3);
  color: var(--text-disabled);
  cursor: not-allowed;
}

/* ---------- 加载骨架 ---------- */
.skeleton {
  background: var(--bg-1);
  border-radius: var(--radius-lg);
  height: 200px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--bg-2), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.empty-state {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: 40px 0;
}

/* ---------- 无障碍：降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}

/* ---------- 响应式（只有一个断点） ---------- */
@media (width <=640px) {
  .site-nav {
    height: 52px;
  }

  .site-nav .container {
    padding: 0 18px;
  }

  .nav-left {
    gap: 8px;
  }

  .nav-socials {
    gap: 0;
  }

  .nav-socials .social-link {
    width: 28px;
    height: 28px;
  }

  .nav-links a {
    font-size: var(--text-xs);
    padding: 5px 9px;
  }

  .nav-brand {
    font-size: var(--text-xs);
  }

  .nav-avatar {
    width: 28px;
    height: 28px;
  }

  .nav-right {
    gap: 0;
  }

  .hero {
    padding: 90px 0 60px;
  }

  .hero-grid {
    display: block;
  }

  .hero-chat-column {
    margin-top: 42px;
    padding-top: 0;
  }

  .container {
    padding: 0 18px;
  }

  .resume-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .app-card {
    padding: 18px;
  }

  .app-icon {
    width: 56px;
    height: 56px;
  }
}
