/* =========================================================
   一、设计变量 TOKENS
   浅色：无印良品奶油色调 + 暖棕文字
   深色：黑/白/黄 高对比配色（按用户要求加深对比）
========================================================= */
:root {
  /* —— 浅色模式（默认） —— */
  --bg-main:    #F3EFE4;
  --bg-sub:     #D8D4C8;
  --text-main:  #1A191E;
  --btn-color:  #d48a1b;
  --text-sub:   #5c5048;
  --text-mute:  #8A8472;
  --line:       #C9C3B3;
  --surface:    #FAF7EF;

  --font-serif: 'Shippori Mincho', serif;
  --font-sans:  'Zen Kaku Gothic New', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;

  --nav-h: 72px;
  --gutter: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* —— 深色模式：黑 / 白 / 黄 高对比 —— */
html[data-theme="dark"] {
  --bg-main:   #0A0A0A;   /* 接近纯黑 */
  --bg-sub:    #1C1C1C;
  --text-main: #F7F6F2;   /* 接近纯白 */
  --btn-color: #F2C641;   /* 高饱和黄，作为强调色/按钮色 */
  --text-sub:  #C4C0B4;
  --text-mute: #6E6A60;
  --line:      #2E2E2E;
  --surface:   #131313;
}

/* =========================================================
   二、基础重置
========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
section[id] { scroll-margin-top: var(--nav-h); }

/* —— 全局颗粒质感叠层（提升“高级感”，极低透明度的噪点纹理） —— */
body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— 对比色重点文字（取代纯黑体加粗，避免"Word文档感"） —— */
.hl {
  color: var(--btn-color);
  font-weight: 700;
}
/* 高亮笔刷样式：用于极少数最重要的强调点，模拟马克笔扫过的效果 */
.hl-mark {
  position: relative;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}
.hl-mark::before {
  content: '';
  position: absolute;
  left: -3px; right: -3px; bottom: 1px;
  height: 38%;
  background: var(--btn-color);
  opacity: 0.32;
  z-index: -1;
}

/* =========================================================
   三、自定义光标（含悬停文字提示）
========================================================= */
html.has-custom-cursor, html.has-custom-cursor * { cursor: none; }
#custom-cursor {
  position: fixed; top: 0; left: 0; width: 0; height: 0;
  pointer-events: none; z-index: 9999; display: none;
}
html.has-custom-cursor #custom-cursor { display: block; }
.cursor-dot {
  position: absolute; width: 6px; height: 6px;
  background: var(--btn-color); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background 0.25s var(--ease);
}
.cursor-ring {
  position: absolute; width: 32px; height: 32px;
  border: 1.5px solid var(--btn-color); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              border-color 0.25s var(--ease), opacity 0.25s var(--ease), background 0.25s var(--ease);
  opacity: 0.6;
}
#custom-cursor.is-hover .cursor-ring { width: 52px; height: 52px; opacity: 0.9; background: color-mix(in srgb, var(--btn-color) 10%, transparent); }
#custom-cursor.is-grabbing .cursor-ring { width: 44px; height: 44px; background: var(--btn-color); opacity: 0.3; }
#custom-cursor.is-grabbing .cursor-dot { width: 8px; height: 8px; }
/* 光标旁的文字提示标签（如 DRAG / DROP） */
.cursor-label {
  position: absolute;
  transform: translate(-50%, 18px);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--bg-main);
  background: var(--btn-color);
  padding: 3px 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.cursor-label.show { opacity: 1; }

/* =========================================================
   四、滚动渐入动效
========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* =========================================================
   五、顶部导航
========================================================= */
nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg-main) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.nav-logo { font-family: var(--font-serif); font-size: 19px; font-weight: 700; letter-spacing: 1px; color: var(--text-main); cursor: pointer; }
.nav-logo .logo-no { font-family: var(--font-sans); font-size: 10px; color: var(--text-mute); letter-spacing: 2px; display: block; margin-top: 1px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 2px; position: relative; }
.nav-links button {
  background: none; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0.4px;
  color: var(--text-sub); padding: 7px 12px; white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-links button:hover { color: var(--text-main); border-color: var(--line); }
.nav-links button.active {
  color: var(--bg-main); background: var(--btn-color); border-color: var(--btn-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--btn-color) 45%, transparent);
}

.theme-toggle {
  width: 36px; height: 36px; border: 1px solid var(--line); background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.theme-toggle:hover { background: var(--bg-sub); }
.theme-toggle svg { position: absolute; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); }
.theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); color: var(--btn-color); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); color: var(--btn-color); }
html[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }
html[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 40px; height: 40px; cursor: pointer; background: none; border: 1px solid var(--line); padding: 0;
}
.hamburger span { display: block; width: 18px; height: 1.5px; background: var(--text-main); transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
body.menu-open .hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 全屏移动端菜单：大号衬线字 + 编号，与杂志风格统一 */
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg-main);
  padding: 18px 24px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; z-index: 99;
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), visibility 0s; }
.mobile-menu button {
  display: flex; align-items: baseline; gap: 16px;
  background: none; border: none; border-bottom: 1px solid var(--line); cursor: pointer;
  font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: var(--text-main);
  padding: 14px 2px; text-align: left; transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
  opacity: 0; transform: translateY(10px);
}
.mobile-menu.open button { opacity: 1; transform: none; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.25s var(--ease); }
.mobile-menu.open button:nth-child(2) { transition-delay: 0.03s; }
.mobile-menu.open button:nth-child(3) { transition-delay: 0.06s; }
.mobile-menu.open button:nth-child(4) { transition-delay: 0.09s; }
.mobile-menu.open button:nth-child(5) { transition-delay: 0.12s; }
.mobile-menu.open button:nth-child(6) { transition-delay: 0.15s; }
.mobile-menu.open button:nth-child(7) { transition-delay: 0.18s; }
.mobile-menu button::before { content: attr(data-no); font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-mute); letter-spacing: 1px; min-width: 22px; }
.mobile-menu button.active, .mobile-menu button:hover { color: var(--btn-color); }
.mobile-menu button.active::before { color: var(--btn-color); }
.mobile-menu-foot { margin-top: auto; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.mobile-menu-foot a {
  flex: 1 1 auto; text-align: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 13px 14px; border: 1px solid var(--btn-color); color: var(--btn-color);
}
.mobile-menu-foot a.primary { background: var(--btn-color); color: var(--bg-main); }
body.menu-open { overflow: hidden; }

/* 顶部阅读进度条 */
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--btn-color); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); pointer-events: none; }
nav.is-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,0.08); }

/* 回到顶部 */
.to-top {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 90;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--text-main); color: var(--bg-main); border: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s, background 0.25s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s, background 0.25s var(--ease); }
.to-top:hover { background: var(--btn-color); }

/* =========================================================
   六、整体布局
========================================================= */
.page-wrap { display: grid; grid-template-columns: 56px minmax(0, 1fr);max-width: 1180px; margin: 0 auto; padding-top: var(--nav-h); position: relative; z-index: 2; }
.side-rail {
  border-right: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: center;
  padding-top: 60px; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h));
  transition: border-color 0.35s var(--ease);
}
.side-rail-text { writing-mode: vertical-rl; font-family: var(--font-serif); font-size: 12px; letter-spacing: 3px; color: var(--text-mute); }

main { padding: 0 var(--gutter) 0; max-width: 1020px; min-width: 0; }
.view { display: none; }
.view.active { display: block; }
.section { padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.section:first-child { padding-top: 56px; }
.section:last-child { border-bottom: none; padding-bottom: 80px; }

/* =========================================================
   七、首页 HOME
========================================================= */
.issue-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--text-mute); margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.issue-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.issue-label .slash { color: var(--btn-color); font-weight: 800; margin-right: 2px; }

/* 打字机效果行：放在标题上方，营造"终端输入"质感 */
.typewriter-line {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 16px;
  min-height: 1.6em;
}
.typewriter-line .tw-prefix { color: var(--text-mute); }
.typewriter-line .tw-typed { color: var(--btn-color); font-weight: 700; }
.typewriter-line .tw-cursor {
  display: inline-block;
  color: var(--btn-color);
  animation: cursorBlink 0.9s steps(1) infinite;
  font-weight: 400;
}
@keyframes cursorBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  position: relative;
}

.home-name { font-family: var(--font-serif); font-size: clamp(46px, 6.4vw, 80px); font-weight: 700; line-height: 0.98; letter-spacing: -1px; color: var(--text-main); margin-bottom: 22px; }
.home-name em { font-style: italic; font-weight: 400; color: var(--text-sub); }

.home-role { font-family: var(--font-sans); font-size: 14.5px; font-weight: 700; letter-spacing: 1px; color: var(--btn-color); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

.home-bio { font-size: 15px; color: var(--text-sub); line-height: 1.9; max-width: 540px; margin-bottom: 30px; }
.home-bio::first-letter { font-family: var(--font-serif); font-size: 42px; font-weight: 700; color: var(--btn-color); float: left; line-height: 0.8; padding-right: 8px; padding-top: 4px; }

.contact-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 0; }
.contact-row {
  display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-sub);
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
  max-width: 360px;
}
.contact-row:hover { color: var(--btn-color); padding-left: 6px; }
.contact-row .label { font-family: var(--font-sans); font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-mute); width: 64px; flex-shrink: 0; }

.home-cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 30px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; letter-spacing: 0.5px;
  padding: 13px 24px; border: 1px solid var(--btn-color); cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  text-transform: uppercase;
}
.cta-btn.primary { background: var(--btn-color); color: var(--bg-main); }
.cta-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px color-mix(in srgb, var(--btn-color) 55%, transparent); }
.cta-btn.secondary { background: transparent; color: var(--btn-color); }
.cta-btn.secondary:hover { background: var(--btn-color); color: var(--bg-main); transform: translateY(-2px); box-shadow: 0 10px 28px color-mix(in srgb, var(--btn-color) 40%, transparent); }
.cta-btn svg { flex-shrink: 0; }

.lang-block { padding-top: 16px; border-top: 1px solid var(--line); }
.lang-block-title { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-mute); margin-bottom: 14px; }
.lang-list { display: flex; flex-direction: column; gap: 13px; }
.lang-row-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.lang-name { font-size: 13px; font-weight: 600; color: var(--text-main); }
.lang-meta { font-size: 10.5px; color: var(--text-mute); letter-spacing: 0.3px; }
.lang-bar-bg { height: 3px; background: var(--bg-sub); }
.lang-bar-fill { height: 100%; background: var(--btn-color); transition: width 1s var(--ease); }

/* =========================================================
   工牌挂绳 LANYARD —— 物理模拟织带 + 可翻转工牌 + HIRE ME 信封
   织带由 JS 的 Verlet 绳索模拟驱动（SVG 绘制），工牌为 HTML 元素
========================================================= */
.badge-zone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: end;
  column-gap: 6px;
  z-index: 5;
}
.lanyard-stage {
  --anchor-x: 0.5;
  position: relative;
  height: 640px;
  margin-top: -190px;          /* 织带向上延伸，像从页面顶部垂下 */
  z-index: 2;                  /* 拖拽时工牌盖在信封上方 */
  pointer-events: none;
  user-select: none; -webkit-user-select: none;
}
.lanyard-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.strap-edge   { fill: none; stroke: color-mix(in srgb, var(--btn-color) 62%, #000); stroke-width: 17; stroke-linecap: butt; stroke-linejoin: round; }
.strap-base   { fill: none; stroke: var(--btn-color); stroke-width: 15; stroke-linecap: butt; stroke-linejoin: round; }
.strap-stitch { fill: none; stroke: color-mix(in srgb, var(--bg-main) 70%, transparent); stroke-width: 12.6; stroke-dasharray: 3 2.4; stroke-linejoin: round; }
.strap-top    { fill: none; stroke: var(--btn-color); stroke-width: 10.6; stroke-linejoin: round; }
.strap-text   { font-family: var(--font-mono); font-size: 7.6px; font-weight: 700; letter-spacing: 2.1px; fill: var(--bg-main); dominant-baseline: central; }

/* —— 工牌本体 —— */
.badge {
  --badge-w: 220px;
  position: absolute; left: 0; top: 0;
  width: var(--badge-w);
  transform-origin: 50% 0;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  will-change: transform;
  outline: none;
  opacity: 0;                     /* JS 初始化后显示 */
  transition: opacity 0.4s var(--ease);
}
.badge.is-ready { opacity: 1; }
.badge.is-dragging { cursor: grabbing; }
.badge:focus-visible .badge-face { box-shadow: 0 0 0 3px var(--btn-color), 0 18px 40px rgba(0,0,0,0.22); }

/* 金属扣（不随卡片翻转） */
.badge-clip { display: block; width: 30px; height: 46px; margin: -7px auto 0; position: relative; z-index: 3; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); }

.badge-inner {
  position: relative;
  margin-top: -14px;
  transform-style: preserve-3d;
  transition: transform 0.75s var(--ease);
}
.badge.is-flipped .badge-inner { transform: rotateY(180deg); }

.badge-face {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 18px 40px rgba(0,0,0,0.22), 0 3px 8px rgba(0,0,0,0.12);
}
.badge-face::after {               /* 随摆动移动的光泽 */
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.28) 45%, transparent 60%);
  background-size: 260% 100%;
  background-position: var(--sheen, 50%) 0;
  mix-blend-mode: soft-light;
}
.badge-front { background: var(--surface); border: 1px solid var(--line); }
.badge-back  { position: absolute; inset: 0; transform: rotateY(180deg); background: var(--text-main); color: var(--bg-main); border: 1px solid var(--text-main); }
.badge:not(.is-flipped) .badge-back,
.badge.is-flipped .badge-front { pointer-events: none; }

/* 卡孔（扣子穿过的位置） */
.badge-slot {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 8px; border-radius: 6px;
  background: var(--bg-main);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
  z-index: 2;
}

.badge-head {
  position: relative;
  background: var(--text-main); color: var(--bg-main);
  padding: 24px 14px 9px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 1.6px;
}
.badge-head .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--btn-color); margin-right: 6px; vertical-align: 1px; }
.badge-head .yr { color: var(--btn-color); }

.badge-body { padding: 12px 14px 12px; }
.badge-photo {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
  background: var(--bg-sub); border: 1px solid var(--line);
}
#avatar-img { width: 100%; height: 100%; object-fit: cover; display: none; -webkit-user-drag: none; pointer-events: none; }
.avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.avatar-placeholder .ph-mark { font-family: var(--font-serif); font-size: 38px; font-weight: 700; color: var(--text-sub); }
.badge-photo-tag {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 8px; font-weight: 700; letter-spacing: 1.2px;
  background: var(--btn-color); color: var(--bg-main); padding: 3px 7px; border-radius: 3px;
}

.badge-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--text-main); line-height: 1.15; margin-top: 11px; letter-spacing: -0.2px; }
.badge-role { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--btn-color); margin-top: 3px; }

.badge-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
.badge-meta div { min-width: 0; }
.badge-meta .full { grid-column: 1 / -1; }
.badge-meta dt { font-family: var(--font-mono); font-size: 7.5px; font-weight: 700; letter-spacing: 1.3px; color: var(--text-mute); line-height: 1.3; }
.badge-meta dd { font-size: 11.5px; font-weight: 700; color: var(--text-main); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--btn-color); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn-color) 60%, transparent); animation: statusPulse 2s ease-out infinite; }
@keyframes statusPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn-color) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }

.badge-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 11px; }
.badge-barcode { display: block; height: 24px; flex: 1; min-width: 0; color: var(--text-main); }
.badge-barcode-id { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 1.5px; color: var(--text-mute); margin-top: 3px; }
.badge-flip-hint { font-family: var(--font-mono); font-size: 8px; font-weight: 700; letter-spacing: 1px; color: var(--text-mute); white-space: nowrap; padding-bottom: 12px; }

/* 背面：联系方式 */
.badge-back-inner { position: absolute; inset: 0; padding: 32px 16px 14px; display: flex; flex-direction: column; }
.badge-back .badge-slot { background: var(--bg-main); }
.badge-back-label { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: color-mix(in srgb, var(--bg-main) 55%, transparent); }
.badge-back-label .slash { color: var(--btn-color); }
.badge-back-title { font-family: var(--font-serif); font-size: 22px; font-weight: 700; line-height: 1.2; margin-top: 10px; }
.badge-back-title em { color: var(--btn-color); font-style: normal; }
.badge-back-sub { font-size: 11px; line-height: 1.6; color: color-mix(in srgb, var(--bg-main) 70%, transparent); margin-top: 8px; }
.badge-links { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.badge-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--bg-main) 28%, transparent); border-radius: 8px;
  color: var(--bg-main); cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.badge-link:hover, .badge-link:focus-visible { background: var(--btn-color); border-color: var(--btn-color); color: var(--text-main); outline: none; }
html[data-theme="dark"] .badge-link:hover, html[data-theme="dark"] .badge-link:focus-visible { color: #0A0A0A; }
.badge-link.primary { background: var(--btn-color); border-color: var(--btn-color); color: var(--bg-main); }
html[data-theme="dark"] .badge-link.primary { color: #0A0A0A; }
.badge-back-foot { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 1.2px; color: color-mix(in srgb, var(--bg-main) 45%, transparent); }

/* 提示语 */
.drag-hint {
  grid-column: 1 / -1;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.4px; color: var(--text-mute);
  text-align: center; margin-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.drag-hint kbd { font-family: inherit; font-size: 9.5px; font-weight: 700; color: var(--text-main); border: 1px solid var(--line); border-bottom-width: 2px; padding: 1px 6px; border-radius: 4px; background: var(--surface); }
.drag-hint .sep { color: var(--btn-color); }

/* —— HIRE ME 信封 —— */
.envelope-col { display: flex; flex-direction: column; align-items: center; margin-bottom: 64px; position: relative; z-index: 1; }
.hire-envelope { width: 100%; max-width: 150px; position: relative; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.hire-envelope:focus-visible .envelope-airmail-frame { box-shadow: 0 0 0 3px var(--btn-color); }
.envelope-airmail-frame {
  padding: 5px;
  background: repeating-linear-gradient(45deg, var(--btn-color) 0 9px, var(--bg-main) 9px 18px, var(--btn-color) 18px 27px, var(--bg-sub) 27px 36px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}
.envelope-body {
  position: relative; height: 96px;
  background: color-mix(in srgb, var(--surface) 70%, var(--bg-sub));
  border: 1.5px solid var(--text-main);
  perspective: 500px;
}
.envelope-letter {
  position: absolute; left: 10px; right: 10px; top: 10px; height: 74px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 10px 10px 0; display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.45s var(--ease);
  z-index: 1;
}
.envelope-letter span { display: block; height: 3px; background: var(--line); border-radius: 2px; }
.envelope-letter span:nth-child(1) { width: 60%; background: var(--btn-color); opacity: 0.7; }
.envelope-letter span:nth-child(3) { width: 75%; }
.envelope-pocket {
  position: absolute; inset: 0; z-index: 2;
  background: var(--surface);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.envelope-pocket::before {          /* 口袋的折线阴影 */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom right, transparent 49.3%, var(--line) 49.6%, transparent 50.2%) left / 50% 100% no-repeat,
              linear-gradient(to bottom left, transparent 49.3%, var(--line) 49.6%, transparent 50.2%) right / 50% 100% no-repeat;
}
.envelope-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%;
  background: var(--bg-sub);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.45s var(--ease), background 0.3s var(--ease);
  z-index: 3;
}
.envelope-stamp {
  position: absolute; right: 8px; bottom: 7px; z-index: 4;
  width: 50px; height: 50px; border-radius: 50%;
  border: 2px dashed var(--btn-color);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-12deg);
  background: color-mix(in srgb, var(--btn-color) 10%, var(--surface));
  transition: transform 0.3s var(--ease);
}
.envelope-stamp .stamp-text { font-family: var(--font-serif); font-size: 10px; font-weight: 800; letter-spacing: 0.5px; color: var(--btn-color); text-align: center; line-height: 1.15; }
.envelope-caption { text-align: center; margin-top: 10px; }
.envelope-caption .env-title { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 1px; color: var(--text-main); }
.envelope-caption .env-sub { font-size: 10px; color: var(--text-mute); margin-top: 2px; }

.hire-envelope:hover .envelope-airmail-frame { transform: translateY(-3px) rotate(-1deg); }
.hire-envelope.drop-ready .envelope-airmail-frame { transform: scale(1.08) rotate(-2deg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--btn-color) 45%, transparent), 0 16px 34px rgba(0,0,0,0.18); }
.hire-envelope.drop-ready .envelope-flap,
.hire-envelope.is-open .envelope-flap { transform: rotateX(180deg); background: var(--btn-color); z-index: 0; }
.hire-envelope.drop-ready .envelope-letter,
.hire-envelope.is-open .envelope-letter { transform: translateY(-26px); }
.hire-envelope.is-sealed .envelope-letter { transform: translateY(0); }
.hire-envelope.is-sealed .envelope-stamp { animation: stampThump 0.5s var(--ease); }
@keyframes stampThump { 0% { transform: rotate(-12deg) scale(1.6); opacity: 0; } 60% { transform: rotate(-12deg) scale(0.9); opacity: 1; } 100% { transform: rotate(-12deg) scale(1); } }
.hire-envelope.is-sealed .envelope-airmail-frame { animation: envWiggle 0.6s var(--ease); }
@keyframes envWiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-3deg) translateY(-4px); } 60% { transform: rotate(2deg); } }

/* 小提示 toast */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 300;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text-main); color: var(--bg-main);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.4px;
  padding: 11px 18px; border-left: 3px solid var(--btn-color);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); }
}
@media (max-width: 900px) {
  /* 单栏：名字 → 工牌 → 简介，手机上先看到名字 */
  .home-hero { display: flex; flex-direction: column; gap: 0; }
  .hero-text { display: contents; }
  .home-name { order: 1; font-size: clamp(42px, 12vw, 60px); }
  .home-role { order: 2; }
  .badge-zone { order: 3; width: 100%; max-width: 480px; margin: 0 auto 28px; }
  .home-bio { order: 4; }
  .contact-list { order: 5; }
  .home-cta-row { order: 6; }
  .lang-block { order: 7; }
  .lanyard-stage { margin-top: -24px; height: 560px; }
  .envelope-col { margin-bottom: 40px; }
}
@media (max-width: 560px) {
  .badge-zone { grid-template-columns: 1fr; max-width: 360px; }
  .lanyard-stage { height: 540px; }
  .badge { --badge-w: 196px; }
  .badge-photo { aspect-ratio: 6 / 5; }
  .badge-photo img { object-position: 50% 30%; }
  .badge-name { font-size: 18px; }
  .envelope-col { margin: 18px 0 0; }
  .hire-envelope { max-width: 190px; }
  .envelope-body { height: 84px; }
  .envelope-letter { height: 60px; }
}

/* 跑马灯滚动条：advanced portfolio 标志性元素，呼应深色插页语言 */
.ticker-strip {
  overflow: hidden;
  background: var(--text-main);
  margin: 48px calc(-1 * var(--gutter)) 0;
  padding: 15px 0;
  transition: background 0.35s var(--ease);
}
@media (min-width: 901px) { .ticker-strip { margin: 48px 0 0; } }
.ticker-track { display: flex; gap: 28px; white-space: nowrap; width: max-content; animation: tickerScroll 26s linear infinite; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-track span {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--bg-main);
  text-transform: uppercase;
}
.ticker-track .ticker-dot { color: var(--btn-color); font-size: 10px; }

/* 数据统计：支持数字滚动计数动画 */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
.stat-card { padding: 0 24px; border-right: 1px solid var(--line); }
.stat-card:first-child { padding-left: 0; }
.stat-card:last-child { border-right: none; }
.stat-num { font-family: var(--font-serif); font-size: 40px; font-weight: 700; color: var(--btn-color); line-height: 1; margin-bottom: 8px; }
.stat-desc { font-size: 12.5px; color: var(--text-sub); line-height: 1.6; }

/* =========================================================
   八、栏目标题
========================================================= */
.sec-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 44px; padding-bottom: 18px; border-bottom: 2px solid var(--text-main); }
.sec-title-group .sec-eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--text-mute); margin-bottom: 6px; }
.sec-title-group .sec-eyebrow .slash { color: var(--btn-color); font-weight: 800; margin-right: 4px; }
.sec-title { font-family: var(--font-serif); font-size: 38px; font-weight: 700; color: var(--text-main); letter-spacing: -0.5px; }
.sec-folio { font-family: var(--font-mono); font-size: 13px; color: var(--text-mute); letter-spacing: 1px; }

/* 关于我 / 经历 / 教育 —— 见 css/sections.css */
.hl-nowrap { white-space: nowrap; }

/* 技能 / 作品集 / 成就 / 生活片段 / 数据墙 —— 见 css/sections.css */

/* =========================================================
   十四、Gallery 旅行画廊（独立页面）
========================================================= */
.gallery-intro { background: var(--text-main); color: var(--bg-main); padding: 56px var(--gutter); margin: 0 calc(-1 * var(--gutter)) 64px; transition: background 0.35s var(--ease), color 0.35s var(--ease); }
@media (min-width: 901px) { .gallery-intro { margin: 0 0 64px; padding: 64px 56px; } }
.gallery-intro .issue-label { color: color-mix(in srgb, var(--bg-main) 55%, transparent); }
.gallery-intro .issue-label::after { background: color-mix(in srgb, var(--bg-main) 20%, transparent); }
.gallery-intro .issue-label .slash { color: var(--btn-color); }
.gallery-intro-title { font-family: var(--font-serif); font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.15; max-width: 720px; margin-top: 16px; }
.gallery-intro-sub { font-size: 14px; color: color-mix(in srgb, var(--bg-main) 70%, transparent); margin-top: 16px; max-width: 540px; line-height: 1.8; }

.location-section { margin-bottom: 96px; }
.location-section:last-child { margin-bottom: 40px; }
.location-header { display: flex; align-items: baseline; gap: 20px; margin-bottom: 40px; padding-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.location-num { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--bg-main); background: var(--btn-color); padding: 4px 12px; flex-shrink: 0; }
.location-name { font-family: var(--font-serif); font-size: clamp(28px, 4vw, 42px); font-weight: 700; color: var(--text-main); letter-spacing: -0.5px; }
.location-coord { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute); letter-spacing: 1px; margin-left: auto; }

.collage-wrap { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 20px 10px 40px; }
.collage-photo { position: relative; background: var(--surface); padding: 14px 14px 40px; border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,0.18); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), z-index 0s; cursor: default; }
.collage-photo.tilt-a { transform: rotate(-3.5deg) translateY(10px); z-index: 1; }
.collage-photo.tilt-b { transform: rotate(2deg) translateY(-12px); z-index: 2; }
.collage-photo.tilt-c { transform: rotate(-1.5deg) translateY(6px); z-index: 1; }
.collage-photo:hover { transform: rotate(0deg) translateY(-6px) scale(1.04); box-shadow: 0 18px 34px rgba(0,0,0,0.3); z-index: 10; }
.collage-photo-frame { width: 100%; aspect-ratio: 1/1; background: var(--bg-sub); overflow: hidden; position: relative; }
.collage-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: none; }
.collage-photo-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-mute); text-align: center; padding: 0 10px; }
.collage-photo-placeholder .ph-icon { font-size: 22px; opacity: 0.55; }
.collage-photo-placeholder .ph-filename { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--btn-color); background: var(--bg-main); padding: 2px 8px; border: 1px dashed var(--text-mute); word-break: break-all; }
.collage-caption { position: absolute; bottom: 12px; left: 14px; right: 14px; text-align: center; }
.collage-caption .coord-text { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--btn-color); letter-spacing: 0.5px; }
.collage-caption .place-text { font-size: 10px; color: var(--text-mute); margin-top: 2px; letter-spacing: 0.5px; }
.collage-photo::before { content: '📌'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 18px; opacity: 0.85; z-index: 3; }

@media (max-width: 900px) {
  .collage-wrap { grid-template-columns: 1fr; gap: 44px; max-width: 320px; margin: 0 auto; padding: 16px 0 32px; }
  .collage-photo.tilt-a { transform: rotate(-2.5deg); }
  .collage-photo.tilt-b { transform: rotate(2deg); }
  .collage-photo.tilt-c { transform: rotate(-1.5deg); }
  .collage-photo:hover { transform: rotate(0deg) scale(1.03); }
  .location-coord { margin-left: 0; width: 100%; }
}

.gallery-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--bg-main); background: none; border: 1px solid color-mix(in srgb, var(--bg-main) 40%, transparent);
  padding: 9px 18px; cursor: pointer; margin-top: 24px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  text-transform: uppercase;
}
.gallery-back-btn:hover { background: var(--btn-color); color: var(--text-main); border-color: var(--btn-color); }


/* =========================================================
   十五、作品集 PORTFOLIO — Archive 入口
========================================================= */
.portfolio-intro {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}
.portfolio-intro-copy {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.85;
  max-width: 600px;
}
.portfolio-archive-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--btn-color);
  padding-bottom: 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--btn-color) 55%, transparent);
  transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}
.portfolio-archive-link:hover { gap: 15px; border-color: var(--btn-color); }

@media (max-width: 900px) {
  .portfolio-intro { grid-template-columns: 1fr; gap: 18px; }
  .portfolio-archive-link { justify-self: start; }
}

/* =========================================================
   十六、页脚
========================================================= */
footer { text-align: center; padding: 36px 24px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute); border-top: 1px solid var(--line); letter-spacing: 0.5px; }

/* =========================================================
   十七、响应式总适配
========================================================= */
@media (max-width: 960px) {
  /* 7 个导航按钮在中等宽度放不下 → 提前切换为汉堡菜单 */
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .page-wrap { grid-template-columns: minmax(0, 1fr); }
  .side-rail { display: none; }
  .section { padding: 52px 0 44px; }
  .sec-header { margin-bottom: 32px; }
}
@media (max-width: 700px) {
  :root { --nav-h: 64px; }
  nav { padding: 0 16px; }
  .nav-logo { font-size: 17px; }
  .theme-toggle { width: 40px; height: 40px; }
  .typewriter-line { min-height: 3.3em; font-size: 15px; }
  .home-cta-row { flex-direction: column; }
  .cta-btn { justify-content: center; padding: 15px 24px; }
  .contact-row { padding: 6px 0 10px; font-size: 14px; max-width: none; }
  .stats-row { grid-template-columns: 1fr; margin-top: 36px; }
  .stat-card { display: flex; align-items: center; gap: 18px; border-right: none; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .stat-card:first-child { padding-top: 0; }
  .stat-card:last-child { border-bottom: none; padding-bottom: 0; }
  .stat-num { font-size: 34px; min-width: 92px; margin-bottom: 0; }
  .sec-title { font-size: 30px; }
  .sec-header { flex-direction: row; align-items: flex-end; gap: 12px; }
}
@media (max-width: 420px) { .home-bio::first-letter { font-size: 32px; } }

/* 无障碍：用户偏好减少动态效果时，关闭装饰性动画 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .status-dot, .tw-cursor { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
