:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --border-subtle: rgba(15, 23, 42, 0.06);
  --text-main: #111111;
  --text-body: #444444;
  --text-muted: #777777;
  --accent: #0048ff;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 70px rgba(15, 23, 42, 0.08);
  
  /* Typography Scale */
  --fs-title: 1.5rem;      /* 24px */
  --fs-heading: 1.125rem;  /* 18px */
  --fs-body: 0.9375rem;    /* 15px */
  --fs-caption: 0.8125rem; /* 13px */
  
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Georgia", "Times New Roman", "Songti SC", serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  background: url("181772170247_.pic.jpg") no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  scroll-behavior: smooth;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.7) 100%
  );
  backdrop-filter: blur(120px);
  -webkit-backdrop-filter: blur(120px);
  z-index: -1;
}

body {
  min-height: 100vh;
}

.app-shell {
  max-width: 1160px;
  margin: 32px auto 96px;
  padding: 0 24px;
}

@media (max-width: 900px) {
  .app-shell {
    margin: 20px auto 96px;
    padding: 0 16px;
  }
}

/* 全局粒子背景 Canvas */
#global-particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* 位于背景图之上，内容之下 */
  pointer-events: none; /* 不阻挡交互 */
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px; 
  margin-bottom: 24px;
  position: relative;
  z-index: 100; /* 确保 header 在 hero 粒子之上 */
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(145deg, #111827, #374151);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-tagline {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* 顶部中央一级导航 */

.primary-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(22px);
  z-index: 30;
}

.primary-tab {
  border: none;
  padding: 7px 16px;
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--text-muted);
}

.primary-tab.active {
  background: var(--accent);
  color: #ffffff;
}

/* Screen 切换 */

.screen {
  display: none;
  margin-top: 64px;
}

.screen.active {
  display: block;
}

.screen-placeholder {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 24px 22px;
}

/* Work Screen Case Study */

.case-layout {
  margin-top: 72px;
}

.case-card {
  max-width: 880px;
  margin: 0 auto 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.85); /* 统一毛玻璃 */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.18);
}

.case-image-wrap {
  position: relative;
  overflow: hidden;
}

.case-image {
  width: 100%;
  max-height: 280px; /* 限制大图高度 */
  display: block;
  object-fit: cover; /* 保证不变形 */
  object-position: center top; /* 让裁切重心靠上，露出网页/硬件顶部核心部分 */
  transform: scale(1);
  transition: transform 0.25s ease-out;
}

.img-center {
  object-position: center center !important;
}

.case-card:hover .case-image {
  transform: scale(1.02);
}

.case-body {
  padding: 24px 28px; /* 收紧并统一内边距 */
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
}

.case-title {
  margin: 0;
  font-size: var(--fs-heading);
  font-weight: 700;
  color: var(--text-main);
}

.case-subtitle {
  margin: 4px 0 0;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.case-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.case-badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  font-size: var(--fs-caption);
  color: var(--text-body);
}

.case-summary {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
}

.case-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Case Details 展开区 */
.case-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: 
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

.case-details.is-open {
  max-height: 2000px; /* 足够大的值 */
  opacity: 1;
  margin-top: 20px;
}

.case-details-inner {
  background: #F9F9F9;
  border-radius: 16px;
  padding: 20px 24px;
}

.case-read {
  border: none;
  background: transparent;
  padding: 0;
  font-size: var(--fs-caption);
  color: var(--text-muted); /* 降噪 */
  cursor: pointer;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  transition: all 0.2s ease;
}

.case-read:hover {
  color: var(--accent);
}

.case-read-arrow {
  font-size: var(--fs-caption);
  transition: transform 0.3s ease;
}

.case-read.is-active .case-read-arrow {
  transform: rotate(180deg);
}

/* 双栏布局（About 专用） */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 左侧 Sidebar */

.about-sidebar {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-block {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 16px 16px 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.4);
  background: #111827;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  margin: 0;
  font-size: var(--fs-heading);
  font-weight: 600;
  color: var(--text-main);
}

.profile-role {
  margin: 0;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* About 垂直导航 */

.about-nav {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-nav-item {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 7px 10px;
  text-align: left;
  font-size: var(--fs-caption);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.about-nav-item::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.about-nav-item.active {
  color: var(--accent) !important; /* 激活态变为科技蓝 */
  font-weight: 600; /* 稍微加粗 */
  background: rgba(0, 72, 255, 0.04);
}

.about-nav-item.active::before {
  background: var(--accent);
}

/* 联系方式卡片 */

.contact-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  padding: 14px 16px;
}

.contact-title {
  margin: 0 0 8px;
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-caption);
  margin-top: 4px;
}

.contact-label {
  color: var(--text-muted);
}

.contact-value {
  color: var(--text-main);
  text-decoration: none;
}

.contact-value:hover {
  color: var(--accent);
}

/* 右侧内容区 */

.about-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Hero Bento Box Layout - DEPRECATED / REMOVED */
/* ... (Old bento styles removed for clarity) ... */

/* =========================================
   Hero Fullscreen Section (Restored & Refined)
   ========================================= */

.hero-fullscreen-section {
  width: 100%;
  min-height: 85vh; /* 占据大部分视口高度 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 64px;
  /* 确保不被 header 遮挡 */
  z-index: 10;
}

.hero-content-layer {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* 1. Giant Particle Canvas (Fixed Size) */
#hero-title-canvas {
  width: 100%;
  height: 200px; /* 强制固定高度，防止遮挡 */
  display: block;
  margin-bottom: 0;
  cursor: crosshair;
  position: relative; 
  z-index: 1;
}

/* 2. Subtitle - Refined & High-end */
.hero-subtitle {
  margin: 0 0 40px;
  font-family: "Noto Sans SC", "PingFang SC", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem; /* 约 15px，更精致 */
  font-weight: 300; /* 细体 */
  color: rgba(255, 255, 255, 0.85); /* 柔和的高级白 */
  text-align: center;
  letter-spacing: 0.15em; /* 增加字间距 */
  position: relative;
  z-index: 10;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  -webkit-font-smoothing: antialiased;
}

/* Interaction Wrapper */
.hero-interaction-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 80px; /* 增加底部间距 */
  width: 100%;
  height: 60px;
}

/* 3. Ethereal Chat Button */
.chat-trigger-ethereal {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50; /* 确保在扑克牌之上 */
}

.chat-trigger-ethereal:hover {
  transform: scale(1.05);
}

/* Button Text Container */
.chat-trigger-ethereal .text {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.1); 
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  /* 极致打磨：白色文字 + 微弱阴影 */
  color: #ffffff; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px); /* 统一磨砂质感 */
  box-shadow: 0 4px 20px rgba(0, 72, 255, 0.05);
  transition: all 0.3s ease;
}

/* 全局优化：字间距 */
body {
  letter-spacing: 0.02em; /* 全局微调 */
}

/* 4. 模块占位提示 (Maintenance Hint) */
.maintenance-hint {
  font-size: 11px;
  color: #BBBBBB;
  text-align: center;
  margin-top: 20px;
  opacity: 0.7;
  letter-spacing: 0.05em;
  font-weight: 300;
  pointer-events: none; /* 不干扰交互 */
  user-select: none;
}

.chat-trigger-ethereal:hover .text {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 30px rgba(0, 72, 255, 0.15);
}

.chat-trigger-ethereal .icon {
  margin-right: 6px;
  font-size: 1.1em;
}

/* Aurora Border Glow */
.chat-trigger-ethereal::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(200, 220, 255, 0.1) 60deg,
    rgba(147, 51, 234, 0.4) 120deg,
    rgba(200, 220, 255, 0.8) 180deg,
    rgba(147, 51, 234, 0.4) 240deg,
    rgba(200, 220, 255, 0.1) 300deg,
    transparent 360deg
  );
  -webkit-mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  animation: rotate-ethereal 6s linear infinite;
  z-index: 1;
  pointer-events: none;
}

.chat-trigger-ethereal::after {
  content: "";
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle at center, rgba(0, 72, 255, 0.15), transparent 70%);
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

.chat-trigger-ethereal:hover::after {
  opacity: 1;
}

/* 4. Burst Poker Decoration (Final Fix) */
.poker-burst-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  z-index: 10; /* 默认层级较低，在按钮下 */
  pointer-events: none;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: z-index 0s linear 0.6s; /* 延迟降低层级，等待动画结束 */
}

/* 激活时提升层级 */
.poker-burst-container.active {
  z-index: 60;
  transition: z-index 0s linear 0s; /* 立即提升 */
}

.burst-card {
  position: absolute;
  width: 55px;
  height: 78px;
  border-radius: 6px;
  /* 初始状态：完全消失 */
  opacity: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(0deg); /* scale 0 */
  
  transition: 
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.4s ease,
    visibility 0s linear 0.6s; /* 延迟隐藏 visibility */
  
  transform-style: preserve-3d;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 8px 20px rgba(100, 150, 255, 0.2); 
  backface-visibility: hidden;
  visibility: hidden; /* 默认不可见 */
}

/* 激活状态：显示 */
.poker-burst-container.active .burst-card {
  opacity: 1 !important;
  visibility: visible;
  transition: 
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.4s ease,
    visibility 0s linear 0s; /* 立即显示 */
}

/* 悬浮动画：使用 margin 避免冲突 */
@keyframes float-card {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}

/* 激活状态：向四周发散 (Scatter OUT) */
/* 使用 CSS 变量来控制翻转，避免 transform 覆盖冲突 */
.burst-card {
  --rotate-y: 0deg; /* 默认不翻转 */
  /* 优化 transition：分别控制 transform 和 opacity */
  transition: 
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.4s ease;
}

.burst-card.flipped {
  --rotate-y: 180deg; /* 翻转 */
}

/* 1: Top Left */
.poker-burst-container.active .burst-card[style*="--i:1"] {
  /* 始终应用 --rotate-y 变量 */
  transform: translate(calc(-50% - 140px), calc(-50% - 60px)) rotate(-25deg) scale(1) rotateY(var(--rotate-y));
  animation: float-card 3s ease-in-out infinite 0.1s;
}

/* 2: Top Right */
.poker-burst-container.active .burst-card[style*="--i:2"] {
  transform: translate(calc(-50% + 140px), calc(-50% - 60px)) rotate(25deg) scale(1) rotateY(var(--rotate-y));
  animation: float-card 3.2s ease-in-out infinite 0.3s;
}

/* 3: Bottom Left */
.poker-burst-container.active .burst-card[style*="--i:3"] {
  transform: translate(calc(-50% - 100px), calc(-50% + 80px)) rotate(-15deg) scale(0.95) rotateY(var(--rotate-y));
  animation: float-card 2.8s ease-in-out infinite 0.5s;
}

/* 4: Bottom Right */
.poker-burst-container.active .burst-card[style*="--i:4"] {
  transform: translate(calc(-50% + 100px), calc(-50% + 80px)) rotate(15deg) scale(0.95) rotateY(var(--rotate-y));
  animation: float-card 3.1s ease-in-out infinite 0.2s;
}

/* 5: Top Center (Ace) */
.poker-burst-container.active .burst-card[style*="--i:5"] {
  transform: translate(-50%, calc(-50% - 120px)) rotate(0deg) scale(1.1) rotateY(var(--rotate-y));
  z-index: 50; 
  animation: float-card 4s ease-in-out infinite 0s;
}

/* Card Faces Update */
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backface-visibility: hidden; /* 关键 */
}

/* Front (Tech Icon): Rotate 180 (initially hidden) */
.card-front {
  transform: rotateY(180deg);
  /* 极浅蓝紫渐变 */
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
  color: #4f46e5;
  font-size: 1.5rem;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 60%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0px, transparent 2px, transparent 10px);
}

/* Back (Texture): Rotate 0 (initially visible) */
.card-back {
  transform: rotateY(0deg);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  background-image: 
    linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%),
    repeating-linear-gradient(45deg, rgba(200, 220, 255, 0.1) 0px, rgba(200, 220, 255, 0.1) 1px, transparent 1px, transparent 6px);
}

/* 浮动背景粒子 */
.hero-floating-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: float-around linear infinite;
}

@keyframes float-around {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-100px) translateX(20px); opacity: 0; }
}

.tech-icon {
  filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

/* 像素碎屑粒子容器 */
#poker-pixel-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

/* Pixel Particles */
.pixel-particle {
  position: fixed; /* 确保不被父容器裁切 */
  width: 8px; /* 放大粒子 */
  height: 8px;
  background: white;
  pointer-events: none;
  z-index: 100;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}



.about-section {
  scroll-margin-top: 96px;
}

.bento-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85); /* 毛玻璃底色 */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5); /* 极细白色内边框 */
  box-shadow: var(--shadow-soft);
  padding: 24px; /* 适当增加默认 Padding */
}

.bento-card.span-2 {
  width: 100%;
}

.section-title {
  margin: 0 0 10px;
  font-size: var(--fs-heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent); /* 统一改为科技蓝 */
}

.card-title {
  margin: 10px 0 4px;
  font-size: var(--fs-body);
  font-weight: 600;
}

.card-subtitle {
  margin: 0 0 4px;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.body-text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
}

.metric {
  color: var(--accent);
  font-weight: 650;
}

/* 列表 */

.bullet-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
}

.bullet-list li + li {
  margin-top: 4px;
}

.number-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
}

.number-list li + li {
  margin-top: 4px;
}

.item-title {
  margin: 12px 0 6px;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-main);
}

.work-block + .work-block {
  margin-top: 18px;
}

.edu-block + .edu-block {
  margin-top: 12px;
}

.recent-card {
  margin-top: 14px;
}

/* Sidebar 内的 Chatbot 按钮 */

.chat-trigger {
  position: relative;
  border: none;
  width: 100%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.chat-trigger-glow {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(
    circle at 50% 120%,
    rgba(0, 72, 255, 0.4),
    transparent 70%
  );
  filter: blur(18px);
  opacity: 0.7;
  pointer-events: none;
}

.chat-trigger-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96),
    rgba(243, 244, 246, 0.98)
  );
  box-shadow:
    0 0 0 0 rgba(0, 72, 255, 0.12),
    0 16px 32px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px);
  font-size: var(--fs-caption);
  color: var(--text-main);
  animation: breathe 2.4s ease-in-out infinite;
}

.chat-trigger-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #ffffff;
  font-size: var(--fs-caption);
}

.chat-trigger:hover .chat-trigger-label {
  box-shadow:
    0 0 0 0 rgba(0, 72, 255, 0.18),
    0 20px 42px rgba(15, 23, 42, 0.4);
}

/* 呼吸灯动画 */

@keyframes breathe {
  0% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 0 rgba(0, 72, 255, 0.16),
      0 22px 55px rgba(15, 23, 42, 0.48);
  }
  50% {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
      0 0 0 10px rgba(0, 72, 255, 0.06),
      0 26px 70px rgba(15, 23, 42, 0.55);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 0 rgba(0, 72, 255, 0.16),
      0 22px 55px rgba(15, 23, 42, 0.48);
  }
}

/* Chat overlay */

.chat-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out;
  z-index: 50;
}

.chat-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-dialog {
  width: min(460px, 92vw);
  max-height: 520px;
  border-radius: 28px;
  background: radial-gradient(
      circle at top left,
      rgba(148, 163, 184, 0.15),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow:
    0 26px 80px rgba(15, 23, 42, 0.78),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  color: #eeeeee;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.chat-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

.chat-title {
  font-size: var(--fs-caption);
  font-weight: 600;
}

.chat-subtitle {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.chat-close {
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: rgba(17, 24, 39, 0.9);
  color: #eeeeee;
  padding: 4px 8px;
  font-size: var(--fs-caption);
  cursor: pointer;
}

.chat-close:hover {
  border-color: rgba(148, 163, 184, 1);
}

.chat-body {
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-messages {
  flex: 1;
  min-height: 160px;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-row {
  display: flex;
}

.chat-row.bot {
  justify-content: flex-start;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 82%;
  padding: 7px 11px;
  border-radius: 16px;
  font-size: var(--fs-caption);
  line-height: 1.6;
}

.chat-row.bot .chat-bubble {
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid rgba(55, 65, 81, 0.95);
}

.chat-row.user .chat-bubble {
  background: #0048ff;
  border: 1px solid #60a5fa;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

#chat-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: rgba(17, 24, 39, 0.94);
  color: #ffffff;
  padding: 7px 12px;
  font-size: var(--fs-caption);
  outline: none;
}

#chat-input::placeholder {
  color: #6b7280;
}

#chat-input:focus {
  border-color: #93c5fd;
}

.chat-send {
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #111827;
  padding: 7px 14px;
  font-size: var(--fs-caption);
  cursor: pointer;
}

.chat-send:hover {
  background: #e5e7eb;
}

/* Work Experience 卡片精细样式 */

.work-card {
  margin-top: 32px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.work-card:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 72, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.work-card + .work-card {
  margin-top: 36px;
}

#about-work .section-title {
  margin-bottom: 24px;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px; /* 增加间距 */
}

.work-company {
  font-size: 1.0625rem; /* 压缩到 17px */
  font-weight: 600; /* 半粗体 */
}

.work-role {
  margin-top: 6px;
  font-size: var(--fs-body);
  color: var(--text-body);
  font-weight: 500;
}

.work-time {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.work-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px; /* 增加间距 */
}

.work-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px; /* 增加内边距 */
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-caption);
  color: var(--text-body);
  transition: all 0.2s ease;
}

.work-badge:hover {
  background: #ffffff;
  border-color: var(--accent);
  color: var(--accent);
}

.badge-icon {
  font-size: var(--fs-caption);
}

.work-summary {
  margin: 12px 0 16px; /* 增加上下间距 */
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
}

.work-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: rgba(0, 72, 255, 0.04); /* 极淡的强调色底 */
  padding: 6px 12px;
  border-radius: 999px;
  font-size: var(--fs-caption);
  color: var(--text-muted); /* 默认用中灰 */
  cursor: pointer;
  transition: all 0.2s ease;
}

.work-toggle:hover {
  background: rgba(0, 72, 255, 0.08);
  color: var(--accent); /* Hover 时才显示强调色 */
  transform: translateX(2px);
}

.work-toggle-arrow {
  font-size: var(--fs-caption);
}

.work-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    transform 0.4s ease;
  margin-top: 0;
  background: rgba(0, 72, 255, 0.02); /* 非常淡的蓝色背景 */
  border-radius: 12px;
  padding: 0 16px;
}

.work-details.is-open {
  opacity: 1;
  transform: translateY(0);
  margin-top: 20px;
  max-height: 1200px; /* 增加最大高度以防内容被截断 */
  padding: 16px;
}

/* Education 卡片对齐样式 */

.edu-block + .edu-block {
  margin-top: 20px;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.edu-school {
  font-size: 1.0625rem; /* 压缩到 17px */
  font-weight: 600; /* 统一字重 */
}

/* TECH & TOOL STACK */
.tech-stack-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tech-pill {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--text-body);
  cursor: default;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-pill:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 72, 255, 0.1);
}