/* ==========================================================================
   个人主页样式 · 深色科技感
   配色变量与 ThreeUI Portal Field 权威源（#020202 / 白芯蓝晕 / #22C55E）保持一致
   ========================================================================== */

@font-face {
  font-family: "Noto Name";
  src: url("../assets/noto-name.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-base: #020202;
  --bg-surface-1: rgba(255, 255, 255, 0.015);
  --bg-surface-2: rgba(255, 255, 255, 0.04);
  --bg-surface-3: rgba(255, 255, 255, 0.08);
  --text-primary: #f4f4f5;
  --text-secondary: #a3a3a3;
  --text-tech: #666666;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --border-glow: rgba(255, 255, 255, 0.08);
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0;
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Portal Field 背景层 —— 与权威源码一致：opacity .8 + screen 混合
   ========================================================================== */
#webgl-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
  mix-blend-mode: screen;
}
#webgl-container canvas {
  display: block;
}

/* CDN 离线兜底：深色径向渐变，保持层次不空屏 */
#webgl-container.bg-fallback {
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(30, 58, 138, 0.35), transparent 70%),
    radial-gradient(ellipse 35% 25% at 50% 45%, rgba(255, 255, 255, 0.06), transparent 70%);
}

/* 可读性遮罩：底部加深，保证文字对比度 */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(2, 2, 2, 0.55) 0%, rgba(2, 2, 2, 0.15) 22%, rgba(2, 2, 2, 0.35) 60%, rgba(2, 2, 2, 0.92) 100%);
}

/* 桌面端结构边框 + 四角对位标记（呼应源设计语言） */
.structural-frame {
  position: fixed;
  inset: 16px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid var(--border-glow);
  display: none;
}
@media (min-width: 1024px) {
  .structural-frame {
    display: block;
    inset: 28px;
  }
}
.structural-frame::before,
.structural-frame::after,
.structural-frame .corner-tr,
.structural-frame .corner-bl {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--text-tech);
}
.structural-frame::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}
.structural-frame::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}
.structural-frame .corner-tr {
  top: -1px;
  right: -1px;
  border-top: 1px solid;
  border-right: 1px solid;
}
.structural-frame .corner-bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: rgba(2, 2, 2, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-glow);
}
.nav-brand {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tech);
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link.active {
  color: var(--text-primary);
}
.nav-link.active::after {
  transform: scaleX(1);
}
@media (max-width: 640px) {
  .site-nav {
    padding: 16px 18px;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-link {
    font-size: 10px;
  }
}

/* ==========================================================================
   通用布局
   ========================================================================== */
main {
  position: relative;
  z-index: 2;
}
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* 锚点跳转时避开固定导航 */
section[id] {
  scroll-margin-top: 88px;
}

/* 键盘焦点可见性 */
a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tech);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}
/* 终端提示符前缀（闪烁） */
.section-label::before {
  content: "//";
  color: var(--accent);
  letter-spacing: 0;
  animation: blink 1.3s steps(1) infinite;
}
.section-label::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--border-glow);
  transform-origin: left;
}
/* 显现时下划线从左向右展开 */
.section-label.reveal::after {
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
}
.section-label.reveal.is-visible::after {
  transform: scaleX(1);
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ==========================================================================
   Hero / 关于我
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 88px;
  padding-bottom: 56px;
}
/* 宽屏时 Hero 单独放宽，给文字更多横向空间 */
@media (min-width: 1500px) {
  .hero {
    max-width: 1500px;
  }
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border-glow);
  background: var(--bg-surface-1);
  padding: 7px 14px;
  border-radius: 2px;
  margin-bottom: 32px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
/* 头像与姓名同行（头像在姓名前） */
.hero-id {
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 3px;
  overflow: visible;
  border: 1px solid var(--border-glow);
  margin-bottom: 0;
  position: relative;
  background: var(--bg-surface-2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  flex: none;
}
/* HUD 四角取景括号 */
.hero-avatar::after {
  content: "";
  position: absolute;
  inset: -8px;
  pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) left 0 top 0 / 16px 1.5px,
    linear-gradient(var(--accent), var(--accent)) left 0 top 0 / 1.5px 16px,
    linear-gradient(var(--accent), var(--accent)) right 0 top 0 / 16px 1.5px,
    linear-gradient(var(--accent), var(--accent)) right 0 top 0 / 1.5px 16px,
    linear-gradient(var(--accent), var(--accent)) left 0 bottom 0 / 16px 1.5px,
    linear-gradient(var(--accent), var(--accent)) left 0 bottom 0 / 1.5px 16px,
    linear-gradient(var(--accent), var(--accent)) right 0 bottom 0 / 16px 1.5px,
    linear-gradient(var(--accent), var(--accent)) right 0 bottom 0 / 1.5px 16px;
  background-repeat: no-repeat;
  opacity: 0.85;
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-avatar:hover img {
  transform: scale(1.05);
}
@media (max-width: 640px) {
  .hero-avatar {
    width: 84px;
    height: 84px;
  }
}

.hero-name {
  font-family: "Noto Name", "Microsoft YaHei", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero-name .name-line {
  display: block;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-tech);
  text-transform: uppercase;
}
.hero-meta .dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-tech);
}
.hero-tagline {
  margin-top: 20px;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 720px;
}
.hero-tagline strong {
  color: var(--text-primary);
  font-weight: 400;
}
.hero-summary {
  margin-top: 16px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-summary p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 2px;
  border: 1px solid var(--border-glow);
  transition: all 0.35s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
/* 按钮扫光 */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 45%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.32),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn:hover::after {
  left: 125%;
}
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-base);
  border-color: var(--text-primary);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-ghost {
  background: var(--bg-surface-1);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: var(--bg-surface-3);
}
.btn svg {
  width: 14px;
  height: 14px;
}
.btn-primary svg {
  transition: transform 0.3s ease;
}
.btn-primary:hover svg {
  transform: translateX(3px);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 28px;
  right: 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tech);
  display: flex;
  justify-content: space-between;
}
.hero-scroll-hint .scroll-line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--text-tech);
  vertical-align: middle;
  margin-left: 10px;
  animation: scrollLine 2s ease-in-out infinite;
  transform-origin: left;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleX(0.3); opacity: 0.4; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* ==========================================================================
   项目作品
   ========================================================================== */
.projects-section {
  padding-top: 130px;
  padding-bottom: 130px;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 1080px;
}
.card {
  --card-accent: #60a5fa;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-glow);
  border-radius: 3px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 30px 28px;
  min-height: 300px;
  overflow: hidden;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}
/* 入场动画落定后：transform 切换为快速跟手（供 3D 倾斜使用） */
.card.is-settled {
  transition: transform 0.25s ease-out, border-color 0.4s ease,
    background-color 0.4s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.06), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-surface-2);
}
.card:hover::before {
  opacity: 1;
}
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover::after {
  opacity: 0.75;
}
.card-index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-tech);
  margin-bottom: 26px;
}
/* 项目封面卡：横版封面默认上图下文；竖版封面在桌面端自动改为左图右文 */
.card.has-cover {
  padding: 0;
  min-height: 0;
}
.card-cover {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-glow);
  background: #04060c;
  height: 420px;
}
.card.has-cover .card-body {
  padding: 34px 34px 32px;
}
.card.has-cover .card-link {
  top: 20px;
  right: 22px;
}
@media (min-width: 761px) {
  .card.has-cover.cover-portrait {
    flex-direction: row;
    align-items: stretch;
  }
  .card.has-cover.cover-portrait .card-cover {
    flex: 0 0 38%;
    min-width: 320px;
    height: auto;
    border-bottom: none;
    border-right: 1px solid var(--border-glow);
  }
  .card.has-cover.cover-portrait .card-body {
    padding: 44px 48px;
    justify-content: center;
  }
  .card.has-cover.cover-portrait .card-link {
    top: 28px;
    right: 32px;
  }
  .card.has-cover.cover-landscape .card-body {
    padding: 40px 44px 38px;
  }
}
/* 无封面卡：编号作左栏 */
.card:not(.has-cover) {
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
  min-height: 0;
  padding: 34px 38px;
}
.card:not(.has-cover) .card-index {
  margin-bottom: 0;
  padding-top: 4px;
  min-width: 52px;
}
.card:not(.has-cover) .card-body {
  flex: 1;
  max-width: 780px;
}
@media (max-width: 760px) {
  .card-cover {
    height: 230px;
  }
  .card.has-cover.cover-portrait .card-cover {
    height: 448px;
  }
  .card.has-cover .card-body {
    padding: 28px 22px 26px;
  }
  .card.has-cover .card-link {
    top: 16px;
    right: 16px;
  }
  .card:not(.has-cover) {
    flex-direction: column;
    gap: 0;
    padding: 28px 22px;
  }
  .card:not(.has-cover) .card-index {
    margin-bottom: 18px;
    padding-top: 0;
  }
}
.cover-strip {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}
/* 拖拽滚动 / 滚轮滚动时临时禁用吸附 */
.cover-strip.no-snap,
.cover-strip.is-dragging {
  scroll-snap-type: none;
}
.cover-strip.is-dragging {
  cursor: grabbing;
}
.cover-strip.is-dragging img {
  pointer-events: none;
}
/* 模糊衬底层：同图放大模糊填充，配合 contain 保证照片完整显示且无黑边 */
.card-cover::before {
  content: "";
  position: absolute;
  inset: -32px;
  z-index: 0;
  background-image: var(--cover-bg);
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.45) saturate(1.15);
  transform: scale(1.1);
}
.cover-strip::-webkit-scrollbar {
  display: none;
}
.card-cover img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  scroll-snap-align: center;
  filter: saturate(0.92) contrast(1.02);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease,
    opacity 0.7s ease;
}
.card-cover img.is-loaded {
  opacity: 1;
}
/* 卡片显现时封面"揭幕"：由轻微放大收拢到原位 */
.card.reveal .card-cover img {
  transform: scale(1.07);
}
.card.reveal.is-visible .card-cover img {
  transform: scale(1);
}
.card-cover:not(.has-gallery):hover img {
  transform: scale(1.06);
  filter: saturate(1) contrast(1.05);
}
/* 画廊指示点 */
.card-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background-color 0.3s ease, width 0.3s ease;
}
.card-dot.is-active {
  background: var(--accent);
  width: 16px;
  border-radius: 3px;
}
.gallery-hint {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(2, 2, 2, 0.5);
  backdrop-filter: blur(6px);
  padding: 4px 9px;
  border-radius: 2px;
  pointer-events: none;
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 2, 2, 0.75), transparent 55%);
  pointer-events: none;
}
.card.has-cover .card-index {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 3;
  color: rgba(244, 244, 245, 0.75);
  margin-bottom: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.card.has-cover .card-body {
  padding: 26px 28px 28px;
}
.card.has-cover .card-link {
  top: 16px;
  right: 16px;
  background: rgba(2, 2, 2, 0.55);
  backdrop-filter: blur(6px);
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--card-accent);
  opacity: 0.9;
  margin-bottom: 14px;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 24px;
  flex: 1;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.02);
  padding: 4px 10px;
  border-radius: 2px;
}
.card-link {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  color: var(--text-tech);
  transition: all 0.35s ease;
}
.card-link svg {
  width: 15px;
  height: 15px;
}
.card:hover .card-link {
  background: var(--card-accent);
  border-color: var(--card-accent);
  color: #020202;
  transform: rotate(-45deg);
}

/* ==========================================================================
   联系方式
   ========================================================================== */
.contact-section {
  padding-top: 130px;
  padding-bottom: 150px;
}
.contact-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  max-width: 720px;
  line-height: 1.15;
  margin-bottom: 18px;
}
.contact-title em {
  font-style: normal;
  color: var(--accent);
}
.contact-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin-bottom: 48px;
}
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  max-width: 900px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border-glow);
  border-radius: 3px;
  background: var(--bg-surface-1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.35s ease;
}
.contact-item:hover {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--bg-surface-2);
}
.contact-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  color: var(--text-secondary);
  transition: all 0.35s ease;
}
.contact-icon svg {
  width: 17px;
  height: 17px;
}
.contact-item:hover .contact-icon {
  color: var(--accent);
  border-color: rgba(34, 197, 94, 0.4);
  background: var(--accent-soft);
}
.contact-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  flex: 1;
  word-break: break-all;
}
.contact-arrow {
  color: var(--text-tech);
  display: flex;
  transition: transform 0.35s ease, color 0.35s ease;
}
.contact-arrow svg {
  width: 15px;
  height: 15px;
}
.contact-item:hover .contact-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-glow);
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tech);
  background: rgba(2, 2, 2, 0.7);
}

/* ==========================================================================
   灯箱
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 2, 2, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border: 1px solid var(--border-glow);
  border-radius: 3px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.is-open img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.lightbox-close:hover {
  background: var(--bg-surface-3);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   科技感动效组件
   ========================================================================== */
/* Hero 双栏：左侧文字，右侧 HUD 档案面板 */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: stretch;
  width: 100%;
}
@media (min-width: 1101px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 420px);
  }
}
.hero-main {
  min-width: 0;
}
/* HUD 档案终端面板（拉伸至与左栏等高，左右对称） */
.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  background: rgba(6, 10, 18, 0.72);
  border: 1px solid var(--border-glow);
  border-radius: 3px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
/* 面板顶部渐变描边 */
.hero-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent) 30%,
    rgba(96, 165, 250, 0.8) 65%,
    transparent
  );
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.02);
}
.panel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
  flex: none;
}
.panel-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.panel-clock {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-tech);
  font-variant-numeric: tabular-nums;
}
.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 8px 18px;
}
.panel-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.panel-row:last-child {
  border-bottom: 0;
}
.panel-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tech);
  flex: none;
}
.panel-label::before {
  content: "> ";
  color: var(--accent);
  opacity: 0.7;
}
.panel-value {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-align: right;
  line-height: 1.5;
}
.panel-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border-glow);
}
.panel-prompt {
  color: var(--accent);
  font-size: 11px;
}
.panel-cursor {
  width: 8px;
  height: 14px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
/* 顶部滚动进度线 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 300;
  background: linear-gradient(90deg, var(--accent), #60a5fa 55%, #a78bfa);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.65);
  pointer-events: none;
}
/* 数据流跑马灯 */
.ticker {
  border-top: 1px solid var(--border-glow);
  border-bottom: 1px solid var(--border-glow);
  padding: 13px 0;
  overflow: hidden;
  background: rgba(2, 4, 10, 0.5);
  user-select: none;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: tickerMove 40s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tech);
  padding: 0 24px;
}
.ticker-sep {
  color: var(--accent);
  font-size: 8px;
}
@keyframes tickerMove {
  to { transform: translateX(-50%); }
}
/* 标语打字机光标 */
.hero-tagline.is-typing::after {
  content: "▌";
  margin-left: 5px;
  color: var(--accent);
  animation: blink 0.9s steps(1) infinite;
}

/* ==========================================================================
   滚动显现
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.project-grid .card:nth-child(2) { transition-delay: 0.08s; --stagger: 0.08s; }
.project-grid .card:nth-child(3) { transition-delay: 0.16s; --stagger: 0.16s; }
.contact-list .contact-item:nth-child(2) { transition-delay: 0.06s; }
.contact-list .contact-item:nth-child(3) { transition-delay: 0.12s; }
.contact-list .contact-item:nth-child(4) { transition-delay: 0.18s; }

/* 卡片显现后，正文元素（标题/时间/描述/标签）逐行浮现（叠加卡片级联延迟） */
.card.reveal .card-body > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.card.reveal.is-visible .card-body > * {
  opacity: 1;
  transform: translateY(0);
}
.card.reveal.is-visible .card-body > *:nth-child(1) { transition-delay: calc(var(--stagger, 0s) + 0.1s); }
.card.reveal.is-visible .card-body > *:nth-child(2) { transition-delay: calc(var(--stagger, 0s) + 0.18s); }
.card.reveal.is-visible .card-body > *:nth-child(3) { transition-delay: calc(var(--stagger, 0s) + 0.26s); }
.card.reveal.is-visible .card-body > *:nth-child(4) { transition-delay: calc(var(--stagger, 0s) + 0.34s); }
.card.reveal.is-visible .card-body > *:nth-child(5) { transition-delay: calc(var(--stagger, 0s) + 0.42s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot, .hero-scroll-hint .scroll-line { animation: none; }
  .card.reveal .card-body > * { opacity: 1; transform: none; transition: none; }
  .card.reveal .card-cover img { opacity: 1; transform: none; transition: none; }
  .hero-avatar::after { opacity: 1; }
  .section-label::before,
  .hero-tagline.is-typing::after,
  .panel-cursor { animation: none; }
  .section-label.reveal::after { transform: none; transition: none; }
  .ticker-track { animation: none; }
  .btn::after { display: none; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 640px) {
  .section { padding: 0 20px; }
  .projects-section,
  .contact-section { padding-top: 90px; padding-bottom: 90px; }
  .hero { padding-top: 90px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-scroll-hint { display: none; }
  .card { min-height: 0; }
}
