/* ============================================================
   克莱因蓝粗野主义个人站
   Core: #002FA7 (IKB) + #FFFFFF
   ============================================================ */

:root {
  --primary: #002FA7;
  --primary-dark: #001f73;
  --primary-light: #1565c0;
  --primary-soft: #e8f0fe;
  --foreground: #FFFFFF;
  --danger: #EF4444;
  --success: #4ADE80;
  --warning: #FACC15;
  --info: #60A5FA;
  --border: rgba(255, 255, 255, 0.8);
  --muted: rgba(255, 255, 255, 0.6);
  --faint: rgba(255, 255, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--primary);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--foreground);
  color: var(--primary);
}

/* 网格底纹 — 两层叠加 + 跟随鼠标微变形 */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.grid-layer {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  will-change: transform;
  transition: transform 0.3s ease-out;
}

.grid-layer.grid-back {
  background-size: 80px 80px;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.grid-vignette {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  pointer-events: none;
  background: radial-gradient(ellipse 120vmax 60vmax at 50% 0%, rgba(255, 255, 255, 0.06), transparent 70%);
  will-change: transform;
}

/* Swiper 覆盖 */
.swiper {
  position: relative;
  width: 100%;
  height: 100vh;
  z-index: 1;
}

.swiper-wrapper {
  height: 100%;
}

.section {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.swiper-slide {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 60px 80px 60px 80px;
  display: flex;
  flex-direction: column;
}

.swiper-slide::-webkit-scrollbar {
  width: 0;
}

/* 区块头部 */
.section-header {
  flex-shrink: 0;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.section-tag-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.7;
  letter-spacing: 0.1em;
}

.section-tag-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.4;
  letter-spacing: 0.15em;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.section-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.section-title-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ===== 右上角台灯拉线开关 ===== */
.pull-switch {
  position: fixed;
  top: 0;
  right: 40px;
  z-index: 100;
  width: 200px;
  height: 300px;
  pointer-events: none;
  color: var(--foreground);
}

/* 整根拉线 SVG：灯座+线都在里面，viewBox 200x300 */
.pull-cord {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  overflow: visible;
}

.cord-fixture-dot {
  transition: fill 0.3s ease, filter 0.3s ease;
}

/* 透明感应区：整根拉线的可点击范围（加宽到60px，绳子太难点） */
.pull-switch::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 260px;
  pointer-events: auto;
  cursor: pointer;
}

/* 开灯时开关处的光晕 */
.pull-switch::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 240, 200, 0.35) 0%, rgba(255, 230, 180, 0.15) 30%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: -1;
}

body.is-light-on .pull-switch::after {
  opacity: 1;
  transition: opacity 0.6s ease 0.2s;
}

/* 拉线末端的拉钮（挂在绳端的重物） */
.pull-knob {
  position: absolute;
  top: 180px;
  left: 89px;
  /* 100 - 22/2 = 89 */
  width: 22px;
  height: 32px;
  cursor: grab;
  pointer-events: auto;
  transform-origin: top center;
  will-change: transform;
  user-select: none;
  touch-action: none;
}

.pull-knob:active {
  cursor: grabbing;
}

.pull-knob-body {
  width: 100%;
  height: 24px;
  background: var(--foreground);
  border-radius: 4px 4px 8px 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}

.pull-knob-body::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 3px;
  background: var(--danger);
  border-radius: 2px;
  opacity: 0.8;
}

.pull-knob-tip {
  width: 10px;
  height: 8px;
  margin: -1px auto 0;
  background: var(--foreground);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 开灯状态：整页亮度提高（暖色感） */
body.is-light-on .grid-overlay {
  filter: brightness(1.08) saturate(1.05);
}

body.is-light-on .cord-fixture-dot {
  fill: #FACC15;
  filter: drop-shadow(0 0 8px #FACC15);
}

body.is-light-on .pull-knob-body::before {
  background: var(--warning);
}

/* ===== 全局灯光控制 ===== */
/* 关灯：灰色滤镜效果 */
body:not(.is-light-on) #mainSwiper,
body:not(.is-light-on) .side-nav,
body:not(.is-light-on) .page-indicator {
  filter: grayscale(0.85) brightness(0.8);
  transition: filter 0.4s ease;
}

body.is-light-on #mainSwiper,
body.is-light-on .side-nav,
body.is-light-on .page-indicator {
  filter: grayscale(0) brightness(1);
  transition: filter 0.4s ease;
}

/* ===== 关灯状态：禁用所有动画和交互（开关本身除外） ===== */
body:not(.is-light-on):not(.is-flickering) * {
  animation-play-state: paused !important;
}

/* 开关本身及其内部元素保持可交互和动画 */
body:not(.is-light-on) .pull-switch,
body:not(.is-light-on) .pull-switch * {
  animation-play-state: initial !important;
  pointer-events: auto !important;
}

/* 频闪期间，主内容的闪烁动画必须运行 */
body.is-flickering #mainSwiper,
body.is-flickering .side-nav,
body.is-flickering .page-indicator {
  animation-play-state: running !important;
}

/* 关灯时禁用导航、页码等外围交互（页面滚动保持可用） */
body:not(.is-light-on) .side-nav,
body:not(.is-light-on) .page-indicator {
  pointer-events: none;
}

/* 开灯过程中的闪频动画（明暗交替闪烁） */
body.is-flickering #mainSwiper,
body.is-flickering .side-nav,
body.is-flickering .page-indicator {
  animation: filterFlicker 0.9s steps(1) forwards;
}

@keyframes filterFlicker {
  0% {
    filter: grayscale(0.85) brightness(0.8);
  }

  8% {
    filter: grayscale(0.3) brightness(1.1);
  }

  16% {
    filter: grayscale(0.85) brightness(0.8);
  }

  24% {
    filter: grayscale(0.1) brightness(1.15);
  }

  32% {
    filter: grayscale(0.85) brightness(0.8);
  }

  45% {
    filter: grayscale(0.05) brightness(1.1);
  }

  58% {
    filter: grayscale(0.85) brightness(0.8);
  }

  72% {
    filter: grayscale(0.02) brightness(1.05);
  }

  85% {
    filter: grayscale(0.85) brightness(0.8);
  }

  100% {
    filter: grayscale(0) brightness(1);
  }
}



/* 左上角下拉导航（整体） */
.side-nav {
  position: fixed;
  top: 0;
  left: 40px;
  z-index: 80;
}

/* 导航面板：整体一块，底部46px背景透明，露出实体书签标签（不露白色） */
.nav-panel {
  pointer-events: auto;
  cursor: pointer;
  background: var(--foreground);
  color: var(--primary);
  padding: 18px 0;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  transform: translateY(calc(-100%));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  border: 1px solid var(--border);
  border-top: none;
  border-bottom: none;
  min-width: 160px;
  position: relative;
}

.side-nav:hover .nav-panel,
.side-nav.is-open .nav-panel {
  transform: translateY(0);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

/* 书签标签：白色实体标签（不透明背景），贴菜单底部右侧，内含细长红色书签 */
.nav-hint {
  position: absolute;
  right: 10px;
  top: calc(100% - 13px);
  width: 36px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.side-nav:hover .nav-hint,
.side-nav.is-open .nav-hint {
  opacity: 1;
}

.nav-hint-icon {
  width: 18px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.nav-hint-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: #ED1C24;
  filter: drop-shadow(0 0 2px rgba(237, 28, 36, 0.4));
}

/* 滑动指示器 */
.nav-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  background: var(--danger);
  border-radius: 0 2px 2px 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.nav-item {
  padding: 9px 18px 9px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-left: none;
  position: relative;
}

.nav-item:hover {
  background: rgba(0, 47, 167, 0.08);
}

.nav-item.active {
  background: transparent;
}

.nav-item.active .nav-label {
  color: var(--primary);
  font-weight: 700;
  opacity: 1;
}

.nav-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.35;
  min-width: 18px;
  transition: opacity 0.15s ease;
}

.nav-item.active .nav-num {
  opacity: 0.8;
  font-weight: 700;
}

.nav-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--primary);
  opacity: 0.55;
  transition: opacity 0.15s ease;
  flex: 1;
}

.nav-item:hover .nav-label {
  opacity: 0.8;
}

.nav-label-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  opacity: 0.25;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.15s ease;
}

.nav-item.active .nav-label-en {
  opacity: 0.5;
}

/* 页面左侧滚动进度条 */
.page-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 999;
  cursor: pointer;
  overflow: visible;
  transition: width 0.2s ease, background 0.2s ease;
}

.page-scroll-progress:hover {
  width: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.page-scroll-progress-fill {
  width: 100%;
  height: 100%;
  background: var(--danger);
  transform-origin: top center;
  transform: scaleY(0);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  pointer-events: none;
  will-change: transform, top;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.page-scroll-progress-extra {
  width: 100%;
  height: 8.3%;
  background: var(--warning);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  transform-origin: top center;
  transform: scaleY(0);
  will-change: transform;
}

/* 页码指示器 */
.page-indicator {
  position: fixed;
  bottom: 32px;
  right: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  z-index: 80;
  opacity: 0.6;
  letter-spacing: 0.1em;
}

.page-sep {
  margin: 0 4px;
  opacity: 0.4;
}

/* ============================================================
   HOME / 工牌
   ============================================================ */

.section-home {
  justify-content: center;
}

.home-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.home-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.home-eyebrow-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0.2em;
  margin-top: -8px;
}

.home-title {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-line {
  display: block;
}

.title-invert {
  background: var(--foreground);
  color: var(--primary);
  padding: 0 16px;
  margin-left: -4px;
}

.home-desc {
  font-size: 16px;
  line-height: 1.7;
  max-width: 480px;
  opacity: 0.9;
}

.home-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 8px;
  max-width: 480px;
}

.meta-item {
  background: var(--primary);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease;
}

.meta-item:hover {
  background: var(--foreground);
  color: var(--primary);
}

.meta-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.6;
  letter-spacing: 0.05em;
  order: -1;
}

.meta-value {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.meta-value-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0.1em;
}

.home-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 0.1em;
}

.hint-icon {
  font-size: 16px;
  animation: hintBounce 2s ease-in-out infinite;
}

@keyframes hintBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* 工牌与挂绳 */
.home-right {
  position: relative;
  height: 620px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.lanyard {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 40px;
  z-index: 15;
  pointer-events: none;
}

.pushpin-img {
  position: absolute;
  top: -32px;
  left: calc(50% + 20px);
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(2px 3px 3px rgba(0, 0, 0, 0.25));
  z-index: 16;
}

/* ===== 弹性绳 SVG（铺满整个 right 区域） ===== */
.cord-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 4;
}

.cord-path {
  opacity: 0.9;
}

.cord-loop {
  opacity: 0.9;
}

/* ===== 工牌：双面 3D 翻转 ===== */
.id-card {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 460px;
  cursor: grab;
  user-select: none;
  z-index: 10;
  transform-origin: top center;
  perspective: 1200px;
}

.id-card:active {
  cursor: grabbing;
}

.id-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.01s;
}

.id-card-face {
  position: absolute;
  inset: 0;
  background: var(--foreground);
  color: var(--primary);
  border: 2px solid var(--foreground);
  padding: 24px;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
}

.id-card-back {
  transform: rotateY(180deg);
  background: var(--primary);
  color: var(--foreground);
  border-color: var(--foreground);
}

.id-card-back .id-card-hole {
  background: var(--foreground);
  border-color: var(--foreground);
}

.id-card-back .id-card-header {
  border-bottom-color: var(--foreground);
}

.id-card-back .id-card-label,
.id-card-back .id-card-num {
  color: var(--foreground);
}

.id-card-back .id-card-footer {
  border-top-color: rgba(255, 255, 255, 0.2);
  justify-content: center;
}

.id-card-back .id-card-code {
  color: var(--foreground);
  writing-mode: initial;
}

/* 背面联系方式 */
.id-card-contact {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 20px 0;
}

.id-contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.id-contact-item:last-child {
  border-bottom: none;
}

.id-contact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  opacity: 0.6;
  text-transform: uppercase;
}

.id-contact-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.id-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
}

.id-status .status-signal {
  width: 18px;
  height: 18px;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.id-card-hole {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  background: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 0 0 10px 10px;
}

.id-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--primary);
}

.id-card-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.id-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
}

.id-card-avatar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  perspective: 600px;
}

.avatar-scene {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 800px;
  box-shadow:
    inset 0 0 30px rgba(0, 20, 60, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 1;
  pointer-events: none;
}

.avatar-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: 170px;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 2;
  transition: opacity 0.4s ease;
  pointer-events: none;
  transform-style: preserve-3d;
}

.avatar-stack.active {
  opacity: 1;
}

.wakeup-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  display: block;
  visibility: visible;
}

/* 视频始终可见（关灯时也停在休眠帧，不隐藏） */
.wakeup-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
}

/* 关灯时头像层保持可见（停在休眠帧） */
body:not(.is-light-on) .avatar-stack {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  animation-play-state: running !important;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
  transition: transform 0.08s ease-out;
}

.layer-bg {
  z-index: 1;
  transform: translateZ(0px);
}

.layer-mid {
  z-index: 2;
  transform: translateZ(20px);
}

.layer-front {
  z-index: 3;
  transform: translateZ(40px);
}

/* 呼吸浮动动画，每层幅度不同 */
.avatar-stack.active .layer-bg {
  animation: floatBg 3.5s ease-in-out infinite;
}

.avatar-stack.active .layer-mid {
  animation: floatMid 3s ease-in-out infinite;
}

.avatar-stack.active .layer-front {
  animation: floatFront 2.5s ease-in-out infinite;
}

@keyframes floatBg {

  0%,
  100% {
    transform: translateZ(0) translateY(0);
  }

  50% {
    transform: translateZ(0) translateY(-2px);
  }
}

@keyframes floatMid {

  0%,
  100% {
    transform: translateZ(20px) translateY(0);
  }

  50% {
    transform: translateZ(20px) translateY(-5px);
  }
}

@keyframes floatFront {

  0%,
  100% {
    transform: translateZ(40px) translateY(0);
  }

  50% {
    transform: translateZ(40px) translateY(-8px);
  }
}

.avatar-eye {
  transition: cx 0.08s ease-out, cy 0.08s ease-out;
  will-change: cx, cy;
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(100, 180, 255, 0.35) 0%, transparent 70%);
  z-index: 0;
  animation: glowPulse 2.5s ease-in-out infinite;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

.id-card-info {
  text-align: center;
  padding: 14px 0;
  border-top: 1px solid var(--primary);
  border-bottom: 1px solid var(--primary);
}

.id-name {
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.id-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.id-card-footer {
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.id-barcode {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 30px;
}

.barcode-line {
  height: 100%;
  background: var(--primary);
}

.id-card-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.7;
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
}

.id-card-drag-hint {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--foreground);
  opacity: 0.5;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

/* ===== 章节侧标（每页统一） ===== */
.section-side-mark {
  position: absolute;
  top: 40px;
  right: 80px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  text-align: right;
}

.side-mark-number {
  font-size: 180px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.85;
  -webkit-text-stroke: 2px var(--foreground);
  color: transparent;
}

.side-mark-label {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.15em;
  margin-top: 16px;
  padding: 4px 14px;
  border: 1px solid var(--border);
  display: inline-block;
  background: repeating-linear-gradient(45deg,
      transparent,
      transparent 6px,
      rgba(255, 255, 255, 0.1) 6px,
      rgba(255, 255, 255, 0.1) 12px);
}

.side-mark-label-en {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0.25em;
  margin-top: 3px;
  padding: 0 14px 4px;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-left {
  position: sticky;
  top: 0;
  height: fit-content;
  padding-top: 20px;
}

.about-number {
  font-size: 120px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.85;
  -webkit-text-stroke: 2px var(--foreground);
  color: transparent;
}

.about-stripe-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-top: 16px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  display: inline-block;
  background: repeating-linear-gradient(45deg,
      transparent,
      transparent 6px,
      rgba(255, 255, 255, 0.1) 6px,
      rgba(255, 255, 255, 0.1) 12px);
}

.about-stripe-label-en {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.6;
  letter-spacing: 0.2em;
  margin-top: 2px;
  padding: 0 12px 4px;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-text {
  font-size: 18px;
  line-height: 1.8;
  max-width: 640px;
}

.about-text strong {
  background: var(--foreground);
  color: var(--primary);
  padding: 0 6px;
  font-weight: 900;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.stat-card {
  background: var(--primary);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease;
  cursor: default;
}

.stat-card:hover {
  background: var(--foreground);
  color: var(--primary);
}

.stat-num {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-label-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0.15em;
}

/* 时间线 */
/* ===== 左右交替卡片式时间线 ===== */
.timeline {
  position: relative;
  padding: 20px 0;
}

/* 中心竖线 */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 0;
  background: var(--foreground);
  opacity: 0.3;
  transition: height 1s ease;
}

.timeline.is-grown::before {
  height: 100%;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.tl-left {
  left: 0;
  transform: translateX(-40px);
  text-align: right;
}

.timeline-item.tl-right {
  left: 50%;
  transform: translateX(40px);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item.is-visible:nth-child(1) {
  transition-delay: 0.2s;
}

.timeline-item.is-visible:nth-child(2) {
  transition-delay: 0.4s;
}

.timeline-item.is-visible:nth-child(3) {
  transition-delay: 0.6s;
}

/* 圆点节点 */
.tl-dot {
  position: absolute;
  top: 46px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 3px solid var(--foreground);
  border-radius: 50%;
  z-index: 2;
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item.is-visible .tl-dot {
  transform: scale(1);
}

.timeline-item.tl-left .tl-dot {
  right: -8px;
}

.timeline-item.tl-right .tl-dot {
  left: -8px;
}

/* 高亮项脉冲 */
.timeline-item.tl-highlight .tl-dot {
  background: var(--warning);
  animation: tlDotPulse 2s ease-in-out infinite;
  animation-delay: 0.8s;
}

@keyframes tlDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.6);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(250, 204, 21, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
  }
}

/* 卡片 */
.tl-card {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.tl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* 卡片朝向中线的小箭头 */
.tl-card::after {
  content: '';
  position: absolute;
  top: 40px;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline-item.tl-left .tl-card::after {
  right: -10px;
  border-width: 8px 0 8px 10px;
  border-color: transparent transparent transparent var(--foreground);
}

.timeline-item.tl-right .tl-card::after {
  left: -10px;
  border-width: 8px 10px 8px 0;
  border-color: transparent var(--foreground) transparent transparent;
}

/* 卡片头部（彩色条） */
.tl-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--foreground);
  color: var(--primary);
  position: relative;
}

.timeline-item.tl-left .tl-card-head {
  justify-content: flex-end;
}

.tl-num {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.9;
  min-width: 44px;
  text-align: center;
}

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

.tl-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.7;
  text-transform: uppercase;
}

.tl-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* 高亮项头部用强调色 */
.timeline-item.tl-highlight .tl-card-head {
  background: var(--warning);
  color: var(--primary);
}

.timeline-item.tl-highlight .tl-card-head .tl-sub {
  opacity: 0.8;
}

.timeline-item.tl-highlight.tl-left .tl-card::after {
  border-color: transparent transparent transparent var(--warning);
}

.timeline-item.tl-highlight.tl-right .tl-card::after {
  border-color: transparent var(--warning) transparent transparent;
}

/* 卡片正文 */
.tl-card-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
  background: var(--primary);
}

.timeline-item.tl-left .tl-card-body {
  text-align: right;
}

/* ============================================================
   SKILLS
   ============================================================ */

.section-skills {
  justify-content: center;
}

.section-skills .section-header {
  margin-bottom: 24px;
  flex-shrink: 0;
}

/* ===== 跑马灯容器 ===== */
.skills-marquee {
  width: 100%;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 12px;
  row-gap: 20px;
  flex: 1;
  justify-content: center;
  align-content: center;
  padding: 12px 0;
  position: relative;
}

.marquee-row {
  display: contents;
}

.marquee-scroll {
  overflow: hidden;
  position: relative;
  padding: 0;
  mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  align-self: stretch;
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee-track .skill-marquee-chip {
  margin-right: 0;
  transform: skewX(-8deg);
  border-radius: 0;
}

.marquee-track .skill-marquee-chip>* {
  transform: skewX(8deg);
}

.marquee-row[data-direction="right"] .marquee-track {
  animation-direction: reverse;
  animation-duration: 25s;
}

.marquee-row[data-speed="slow"] .marquee-track {
  animation-duration: 45s;
}

.marquee-scroll:hover .marquee-track {
  /* 悬停减速由JS控制 */
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }

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

/* ===== 分类标签（左侧独立列） ===== */
.marquee-category {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground);
  padding: 0 14px 0 12px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  border-left: 3px solid var(--warning);
  background: rgba(255, 255, 255, 0.08);
  margin: 0;
  align-self: stretch;
  justify-self: stretch;
  height: 66px;
  min-height: 66px;
}

.marquee-category .cat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--warning);
  opacity: 0.9;
  line-height: 1;
  flex-shrink: 0;
}

.marquee-category .cat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.marquee-category .cat-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.marquee-category .cat-title-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  opacity: 0.55;
  text-transform: uppercase;
}

/* ===== 跑马灯卡片 ===== */
.skill-marquee-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--foreground);
  border: 1px solid rgba(0, 47, 167, 0.15);
  padding: 14px 22px 14px 16px;
  min-width: 190px;
  min-height: 64px;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 30, 80, 0.08);
  position: relative;
  overflow: hidden;
}

.marquee-track .skill-marquee-chip:nth-child(even) {
  background: #e8f0fe;
}

.skill-marquee-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.skill-marquee-chip:hover {
  transform: skewX(-8deg) translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 47, 167, 0.25);
  border-color: var(--primary);
  z-index: 3;
}

.skill-marquee-chip:hover::before {
  opacity: 1;
}

.skill-marquee-chip:hover .chip-icon,
.skill-marquee-chip:hover .chip-name,
.skill-marquee-chip:hover .chip-level-tag {
  color: #fff;
  position: relative;
  z-index: 1;
}

.skill-marquee-chip.featured:hover .chip-icon {
  background: rgba(255, 255, 255, 0.15);
}

.skill-marquee-chip:hover .chip-progress-mini {
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.skill-marquee-chip:hover .chip-progress-fill {
  background: #fff;
}

.skill-marquee-chip .chip-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.skill-marquee-chip .chip-icon svg {
  width: 24px;
  height: 24px;
}

.skill-marquee-chip .chip-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.skill-marquee-chip .chip-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.chip-progress-mini {
  height: 3px;
  background: rgba(0, 47, 167, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.chip-progress-mini .chip-progress-fill {
  height: 100%;
  width: var(--level, 80%);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.chip-level-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 8px;
  border: 1px solid rgba(0, 47, 167, 0.25);
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0.75;
  margin-left: auto;
}

/* 中间行featured样式 - 浅蓝渐变背景 */
.skill-marquee-chip.featured {
  background: linear-gradient(135deg, var(--foreground) 0%, var(--primary-soft) 100%);
  border-color: rgba(0, 47, 167, 0.25);
}

.marquee-track .skill-marquee-chip.featured:nth-child(even) {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #d6e4ff 100%);
}

.skill-marquee-chip.featured .chip-icon {
  width: 38px;
  height: 38px;
  background: rgba(0, 47, 167, 0.1);
  border-radius: 6px;
}

.skill-marquee-chip.featured .chip-icon svg {
  width: 22px;
  height: 22px;
}

/* ============================================================
   PROJECTS / 堆叠卡片
   ============================================================ */

.projects-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  max-width: 100%;
}

.projects-intro p {
  font-size: 14px;
  opacity: 0.8;
}

.projects-intro strong {
  font-weight: 900;
  background: var(--foreground);
  color: var(--primary);
  padding: 0 6px;
}

.projects-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border: 1px solid var(--border);
}

.card-stack-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - 280px);
  min-height: 480px;
  margin: 0 auto;
}

.card-stack {
  position: relative;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.project-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 480px;
  margin-left: -170px;
  margin-top: -240px;
  background: var(--foreground);
  color: var(--primary);
  border: 2px solid var(--foreground);
  padding: 0;
  display: flex;
  flex-direction: column;
  cursor: grab;
  user-select: none;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
  will-change: transform;
  touch-action: none;
  overflow: hidden;
}

.project-card:active {
  cursor: grabbing;
}

.card-corner-label {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  background: var(--primary);
  color: var(--foreground);
  letter-spacing: 0.05em;
  z-index: 2;
}

/* 项目截图区 */
.card-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--primary);
  position: relative;
  flex-shrink: 0;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  pointer-events: none;
}

.project-card:hover .card-thumb img {
  transform: scale(1.05);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.card-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.8;
  flex: 1;
}

.card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 2px solid var(--primary);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--primary);
  color: var(--foreground);
  letter-spacing: 0.05em;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.05em;
  align-self: flex-end;
  transition: gap 0.2s ease;
}

.card-link:hover {
  gap: 10px;
}

.card-drag-hint {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--foreground);
  opacity: 0.5;
  letter-spacing: 0.15em;
  white-space: nowrap;
  display: none;
}

.stack-reset-btn {
  position: absolute;
  bottom: -44px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.stack-reset-btn:hover {
  background: var(--foreground);
  color: var(--primary);
  opacity: 1;
}

.btn-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  opacity: 0.6;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* 联系页 */
.section-contact {
  justify-content: center;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.contact-big-text {
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.invert-word {
  background: var(--foreground);
  color: var(--primary);
  padding: 0 16px;
  margin-left: -4px;
  display: inline-block;
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-list {
  border: 1px solid var(--border);
}

.contact-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item:hover {
  background: var(--foreground);
  color: var(--primary);
}

.contact-label {
  font-size: 13px;
  font-weight: 900;
  padding: 18px 20px;
  opacity: 0.8;
  letter-spacing: 0.05em;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.contact-value-wrap {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-value {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
}

.contact-value-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-available {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--success);
}

.status-signal {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.status-signal .signal-dot {
  animation: signalDotPulse 1.8s ease-in-out infinite;
}

.status-signal .signal-bar {
  transform-origin: bottom center;
  animation: signalBarGrow 1.8s ease-in-out infinite;
}

.status-signal .signal-bar-1 {
  animation-delay: 0s;
}

.status-signal .signal-bar-2 {
  animation-delay: 0.15s;
}

.status-signal .signal-bar-3 {
  animation-delay: 0.3s;
}

.status-signal .signal-arc {
  stroke-dasharray: 3 4;
  animation: signalArcRotate 6s linear infinite;
  transform-origin: center;
}

@keyframes signalDotPulse {

  0%,
  100% {
    opacity: 1;
    r: 1.5;
  }

  50% {
    opacity: 0.6;
    r: 2;
  }
}

@keyframes signalBarGrow {

  0%,
  100% {
    transform: scaleY(0.3);
    opacity: 0.4;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes signalArcRotate {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -14;
  }
}

.contact-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 0.1em;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1024px) {
  .side-nav {
    left: 24px;
  }

  .nav-panel {
    padding: 14px 16px 0;
    min-width: 160px;
  }

  .nav-item {
    padding: 8px 12px;
  }

  .swiper-slide {
    padding: 48px 48px 48px 48px;
  }

  .home-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .home-right {
    height: 420px;
    order: -1;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-left {
    position: relative;
  }

  .about-number {
    font-size: 80px;
  }

  /* 移动端时间线：单侧布局 */
  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item.tl-left,
  .timeline-item.tl-right {
    width: 100%;
    left: 0;
    padding: 16px 16px 16px 50px;
    text-align: left;
    transform: translateX(30px);
  }

  .timeline-item.tl-left .tl-card-head,
  .timeline-item.tl-left .tl-card-body {
    justify-content: flex-start;
    text-align: left;
  }

  .tl-dot,
  .timeline-item.tl-left .tl-dot,
  .timeline-item.tl-right .tl-dot {
    left: 12px;
    right: auto;
  }

  .tl-card::after,
  .timeline-item.tl-left .tl-card::after,
  .timeline-item.tl-right .tl-card::after {
    left: -10px;
    right: auto;
    border-width: 8px 10px 8px 0;
    border-color: transparent var(--foreground) transparent transparent;
  }

  .timeline-item.tl-highlight.tl-left .tl-card::after,
  .timeline-item.tl-highlight.tl-right .tl-card::after {
    border-color: transparent var(--warning) transparent transparent;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-card {
    width: 440px;
    height: 400px;
    margin-left: -220px;
    margin-top: -200px;
    padding: 24px;
  }

  .card-title {
    font-size: 26px;
  }
}

@media (max-width: 640px) {
  .side-nav {
    left: 16px;
  }

  .nav-panel {
    padding: 10px 10px 12px;
    min-width: 110px;
  }

  .nav-item {
    padding: 6px 8px;
  }

  .nav-label,
  .nav-label-en {
    display: none;
  }

  .nav-num {
    font-size: 12px;
    min-width: auto;
  }

  .nav-hint {
    width: 40px;
    height: 46px;
    font-size: 9px;
    right: -6px;
  }

  .nav-hint-icon {
    width: 18px;
    height: 36px;
  }

  .swiper-slide {
    padding: 40px 24px 40px 24px;
  }

  .section-title {
    font-size: 40px;
  }

  .home-meta {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-item {
    grid-template-columns: 80px 24px 1fr;
  }

  .timeline-date {
    font-size: 10px;
    padding: 16px 12px;
  }

  .timeline-content {
    padding: 16px;
  }

  .timeline-role {
    font-size: 15px;
  }

  .project-card {
    width: 320px;
    height: 380px;
    margin-left: -160px;
    margin-top: -190px;
    padding: 20px;
  }

  .card-title {
    font-size: 20px;
  }

  .card-desc {
    font-size: 12px;
  }

  .id-card {
    width: 240px;
    height: 380px;
  }

  .page-indicator {
    bottom: 16px;
    right: 20px;
    font-size: 12px;
  }

  .contact-item {
    grid-template-columns: 1fr;
  }

  .contact-label {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }

  .contact-value-wrap {
    padding: 12px 16px;
  }

  .contact-value {
    font-size: 14px;
  }
}

/* ===== 联系页向下滚动提示 ===== */
.contact-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.7;
}

.scroll-hint-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #fff);
  animation: hintLinePulse 2s ease-in-out infinite;
}

.scroll-hint-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--foreground);
  text-transform: uppercase;
}

.scroll-hint-arrow {
  font-size: 14px;
  animation: hintArrowBounce 1.5s ease-in-out infinite;
  color: var(--foreground);
}

@keyframes hintLinePulse {

  0%,
  100% {
    opacity: 0.3;
    height: 20px;
  }

  50% {
    opacity: 1;
    height: 45px;
  }
}

@keyframes hintArrowBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* ===== 彩蛋页（1/3屏高度） ===== */
.section-bonus.swiper-slide {
  height: 33vh !important;
  min-height: 240px;
  flex-shrink: 0;
}

.section-bonus {
  --pull-glow: 0;
  --bonus-bg: linear-gradient(180deg, #0a2a78 0%, #061848 100%);
  --bonus-accent: #93c5fd;
  --bonus-accent-strong: #60a5fa;
  --bonus-text: #f1f5f9;
  --bonus-text-sub: #93c5fd;
  --bonus-dot: rgba(147, 197, 253, 0.15);
  --bonus-glow: rgba(59, 130, 246, 0.3);
  --bonus-handle-bg: rgba(6, 24, 72, 0.95);
  --bonus-no-bg: #0a2a78;
  --bonus-qr-bg: rgba(255, 255, 255, 0.06);
  --bonus-border: rgba(147, 197, 253, 0.3);
  background: var(--bonus-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-top: none;
}

/* 顶部渐变过渡带 — 柔化和上一屏的分界 */
.section-bonus .bonus-top-fade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(10, 42, 120, 0) 0%, var(--bonus-handle-bg) 100%);
  pointer-events: none;
  z-index: 2;
}

/* 方案 A：蓝金延伸（克莱因蓝深档底色 + 金色点缀，色相与主站连续） */
.section-bonus.scheme-black-gold {
  --bonus-bg: linear-gradient(180deg, #041a4d 0%, #00112f 100%);
  --bonus-accent: #fbbf24;
  --bonus-accent-strong: #d97706;
  --bonus-text: #fef3c7;
  --bonus-text-sub: #fcd34d;
  --bonus-dot: rgba(251, 191, 36, 0.12);
  --bonus-glow: rgba(251, 191, 36, 0.35);
  --bonus-handle-bg: rgba(0, 17, 47, 0.95);
  --bonus-no-bg: #041a4d;
  --bonus-qr-bg: rgba(251, 191, 36, 0.04);
  --bonus-border: rgba(251, 191, 36, 0.22);
}

.section-bonus.scheme-black-gold .bonus-top-fade {
  background: linear-gradient(180deg, rgba(0, 47, 167, 0) 0%, rgba(0, 17, 47, 0.95) 100%);
}

/* 方案 B：荧光橙（撞色·活力） */
.section-bonus.scheme-accent-orange {
  --bonus-bg: linear-gradient(180deg, #1a0f05 0%, #0d0702 100%);
  --bonus-accent: #ff7a1a;
  --bonus-accent-strong: #ff5500;
  --bonus-text: #fff7ed;
  --bonus-text-sub: #fdba74;
  --bonus-dot: rgba(255, 122, 26, 0.12);
  --bonus-glow: rgba(255, 85, 0, 0.35);
  --bonus-handle-bg: rgba(13, 7, 2, 0.95);
  --bonus-no-bg: #1a0f05;
  --bonus-qr-bg: rgba(255, 122, 26, 0.06);
  --bonus-border: rgba(255, 122, 26, 0.25);
}

.section-bonus.scheme-accent-orange .bonus-top-fade {
  background: linear-gradient(180deg, rgba(10, 42, 120, 0) 0%, rgba(13, 7, 2, 0.9) 100%);
}

/* 方案 C：酸橙绿（撞色·科技） */
.section-bonus.scheme-accent-lime {
  --bonus-bg: linear-gradient(180deg, #0a1f10 0%, #041008 100%);
  --bonus-accent: #a3e635;
  --bonus-accent-strong: #65a30d;
  --bonus-text: #ecfccb;
  --bonus-text-sub: #bef264;
  --bonus-dot: rgba(163, 230, 53, 0.12);
  --bonus-glow: rgba(101, 163, 13, 0.35);
  --bonus-handle-bg: rgba(4, 16, 8, 0.95);
  --bonus-no-bg: #0a1f10;
  --bonus-qr-bg: rgba(163, 230, 53, 0.06);
  --bonus-border: rgba(163, 230, 53, 0.25);
}

.section-bonus.scheme-accent-lime .bonus-top-fade {
  background: linear-gradient(180deg, rgba(10, 42, 120, 0) 0%, rgba(4, 16, 8, 0.9) 100%);
}

/* 方案 D：洋红粉（撞色·酷感） */
.section-bonus.scheme-accent-magenta {
  --bonus-bg: linear-gradient(180deg, #1a0514 0%, #0d0209 100%);
  --bonus-accent: #f472b6;
  --bonus-accent-strong: #ec4899;
  --bonus-text: #fce7f3;
  --bonus-text-sub: #f9a8d4;
  --bonus-dot: rgba(244, 114, 182, 0.12);
  --bonus-glow: rgba(236, 72, 153, 0.35);
  --bonus-handle-bg: rgba(13, 2, 9, 0.95);
  --bonus-no-bg: #1a0514;
  --bonus-qr-bg: rgba(244, 114, 182, 0.06);
  --bonus-border: rgba(244, 114, 182, 0.25);
}

.section-bonus.scheme-accent-magenta .bonus-top-fade {
  background: linear-gradient(180deg, rgba(10, 42, 120, 0) 0%, rgba(13, 2, 9, 0.9) 100%);
}

/* 方案 E：同色系深蓝图（柔和·统一） */
.section-bonus.scheme-deep-blue {
  --bonus-bg: linear-gradient(180deg, #0a2a78 0%, #061848 100%);
  --bonus-accent: #93c5fd;
  --bonus-accent-strong: #60a5fa;
  --bonus-text: #f1f5f9;
  --bonus-text-sub: #93c5fd;
  --bonus-dot: rgba(147, 197, 253, 0.15);
  --bonus-glow: rgba(59, 130, 246, 0.3);
  --bonus-handle-bg: rgba(6, 24, 72, 0.95);
  --bonus-no-bg: #0a2a78;
  --bonus-qr-bg: rgba(255, 255, 255, 0.06);
  --bonus-border: rgba(147, 197, 253, 0.3);
}

.section-bonus.scheme-deep-blue .bonus-top-fade {
  background: linear-gradient(180deg, rgba(10, 42, 120, 0) 0%, rgba(6, 24, 72, 0.95) 100%);
}

/* 顶部分隔线 + 辉光 */
.section-bonus::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(1px + var(--pull-glow) * 2px);
  background: linear-gradient(90deg, transparent 0%, var(--bonus-accent) 20%, var(--bonus-accent) 80%, transparent 100%);
  box-shadow:
    0 0 calc(20px + var(--pull-glow) * 30px) var(--bonus-glow),
    0 0 calc(40px + var(--pull-glow) * 40px) var(--bonus-glow);
  z-index: 3;
  transition: height 0.1s ease;
  opacity: 0.7;
}

/* 点阵底纹 */
.bonus-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--bonus-dot) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* 扫描光线 */
.bonus-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg,
      transparent 0%,
      var(--bonus-glow) 50%,
      transparent 100%);
  pointer-events: none;
  z-index: 1;
  animation: bonusScan 6s ease-in-out infinite;
}

@keyframes bonusScan {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }

  50% {
    transform: translateY(calc(33vh - 80px));
    opacity: 0.8;
  }
}

/* 环境光晕 */
.section-bonus::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 60%, var(--bonus-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 30%, var(--bonus-glow) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.bonus-inner {
  width: 100%;
  max-width: 1200px;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.bonus-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.bonus-tag-wrap {
  display: inline-flex;
  align-items: center;
}

.bonus-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--bonus-accent);
  padding: 4px 10px;
  border: 1px solid var(--bonus-accent);
  border-radius: 2px;
  text-shadow: 0 0 6px var(--bonus-glow);
  box-shadow: 0 0 12px var(--bonus-glow), inset 0 0 8px var(--bonus-glow);
  background: var(--bonus-qr-bg);
}

.bonus-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--bonus-text);
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.bonus-title-rule {
  width: 40px;
  height: 2px;
  background: var(--bonus-accent);
  box-shadow: 0 0 8px var(--bonus-glow);
}

.bonus-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--bonus-text-sub);
  text-transform: uppercase;
  margin-top: 2px;
  opacity: 0.7;
}

.bonus-qr-grid {
  display: flex;
  gap: 28px;
  align-items: stretch;
}

.bonus-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* 二维码外框 */
.bonus-qr-frame {
  position: relative;
  padding: 8px;
  background: var(--bonus-qr-bg);
  border: 1px solid var(--bonus-border);
  transition: all 0.3s ease;
}

.bonus-qr-item:hover .bonus-qr-frame {
  border-color: var(--bonus-accent);
  box-shadow:
    0 0 20px var(--bonus-glow),
    inset 0 0 20px var(--bonus-glow);
  transform: translateY(-3px);
}

/* 四角装饰 */
.qr-frame-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--bonus-accent);
  border-style: solid;
  border-width: 0;
}

.qr-frame-corner.tl {
  top: -1px;
  left: -1px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.qr-frame-corner.tr {
  top: -1px;
  right: -1px;
  border-top-width: 2px;
  border-right-width: 2px;
}

.qr-frame-corner.bl {
  bottom: -1px;
  left: -1px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.qr-frame-corner.br {
  bottom: -1px;
  right: -1px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.bonus-qr-code {
  width: 88px;
  height: 88px;
  background: #f8fafc;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qr-svg {
  width: 100%;
  height: 100%;
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 编号条码底 */
.qr-item-footer {
  width: 88px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(90deg,
      var(--bonus-border) 0px,
      var(--bonus-border) 1px,
      transparent 1px,
      transparent 3px);
  border: 1px solid var(--bonus-border);
  position: relative;
}

.qr-item-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  color: var(--bonus-accent);
  letter-spacing: 0.15em;
  background: var(--bonus-no-bg);
  padding: 0 6px;
  text-shadow: 0 0 4px var(--bonus-glow);
}

.bonus-qr-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--bonus-text);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.bonus-qr-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--bonus-text-sub);
  opacity: 0.8;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.bonus-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  align-items: flex-end;
}

.bonus-social-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--bonus-text-sub);
  opacity: 0.7;
  text-transform: uppercase;
}

.bonus-social-links {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.bonus-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--bonus-border);
  color: var(--bonus-text-sub);
  text-decoration: none;
  transition: all 0.25s ease;
  background: var(--bonus-qr-bg);
}

.bonus-social-link:hover {
  background: var(--bonus-qr-bg);
  color: var(--bonus-text);
  border-color: var(--bonus-accent);
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px var(--bonus-glow),
    inset 0 0 12px var(--bonus-glow);
}

.social-icon {
  width: 16px;
  height: 16px;
}

.bonus-footer-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--bonus-text-sub);
  opacity: 0.5;
  letter-spacing: 0.2em;
  margin-top: 4px;
}

/* 顶部弹性拉环：工程线条风格 */
.bonus-pull-tab {
  position: absolute;
  top: 0;
  right: 80px;
  width: 96px;
  height: 56px;
  /* 初始总高度 = 刻度尺20px + 拉柄36px */
  cursor: grab;
  z-index: 20;
  user-select: none;
  touch-action: none;
  transform-origin: top center;
}

.bonus-pull-tab:active {
  cursor: grabbing;
}

/* 刻度尺：用before伪元素画，顶端贴彩蛋区顶部，底端连接拉柄 */
.pull-scale {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  pointer-events: none;
}

.pull-scale::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--bonus-accent) 0%, var(--bonus-accent-strong) 100%);
  box-shadow: 0 0 6px var(--bonus-glow);
}

/* 刻度线 */
.scale-tick {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 2px;
  background: var(--bonus-accent);
  opacity: 0.8;
  box-shadow: 0 0 4px var(--bonus-glow);
}

.scale-tick:nth-child(1) {
  bottom: 14px;
}

.scale-tick:nth-child(2) {
  bottom: 22px;
  width: 6px;
  opacity: 0.5;
}

.scale-tick:nth-child(3) {
  bottom: 30px;
}

/* 拉柄 */
.pull-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 96px;
  height: 36px;
  background: var(--bonus-handle-bg);
  border: 1px solid var(--bonus-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 2px 12px var(--bonus-glow),
    inset 0 0 20px var(--bonus-glow);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.bonus-pull-tab:hover .pull-handle {
  box-shadow:
    0 4px 20px var(--bonus-glow),
    inset 0 0 30px var(--bonus-glow);
  background: var(--bonus-qr-bg);
}

/* 四角装饰 */
.pull-handle-corner {
  position: absolute;
  width: 5px;
  height: 5px;
  border-color: var(--bonus-accent);
  border-style: solid;
  border-width: 0;
}

.pull-handle-corner.tl {
  top: -2px;
  left: -2px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.pull-handle-corner.tr {
  top: -2px;
  right: -2px;
  border-top-width: 2px;
  border-right-width: 2px;
}

.pull-handle-corner.bl {
  bottom: -2px;
  left: -2px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.pull-handle-corner.br {
  bottom: -2px;
  right: -2px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.pull-handle-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--bonus-accent);
  text-shadow: 0 0 6px var(--bonus-glow);
}

/* 防滑条纹 */
.pull-handle-grip {
  display: flex;
  gap: 2px;
}

.grip-line {
  width: 2px;
  height: 14px;
  background: var(--bonus-accent);
  border-radius: 1px;
  opacity: 0.7;
  box-shadow: 0 0 3px var(--bonus-glow);
}

.grip-line:nth-child(2) {
  opacity: 1;
}

.grip-line:nth-child(3) {
  opacity: 0.7;
}