/* ============================================================
   布局：参考 design/resume-ui-v2.html（工程档案 / Spec Sheet）
   主题：暖纸 + 深青 + 陶土红，标题用宋体
   不引用任何外部字体 / CDN（国内服务器加载 Google Fonts 会失败）
   ============================================================ */

/* ---------- 1. 令牌 ---------- */
:root {
  --f-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --f-serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia, serif;
  --f-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --maxw: 1160px;
  --gutter: 40px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --bg: #f6f3ec;
  --bg2: #efeae0;
  --card: #fffdf9;
  --ink: #18201f;
  --ink2: #3a4442;
  --muted: #66716d;
  --line: #e2dbcd;
  --accent: #0f4c4d;
  --accent2: #c8553d;
  --soft: #e3eeeb;
  --on-accent: #f6f3ec;
  --live: #2e9e6b;
  --shadow: 0 1px 2px rgba(24, 32, 31, .05), 0 24px 48px -30px rgba(24, 32, 31, .3);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1413; --bg2: #131a19; --card: #182120; --ink: #e8edeb; --ink2: #c5cecb; --muted: #95a29e;
    --line: #26312f; --accent: #7fcbbd; --accent2: #f08a6c; --soft: #1d2e2b; --on-accent: #0f1413; --live: #5fd39b;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 24px 48px -30px rgba(0, 0, 0, .8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1413; --bg2: #131a19; --card: #182120; --ink: #e8edeb; --ink2: #c5cecb; --muted: #95a29e;
  --line: #26312f; --accent: #7fcbbd; --accent2: #f08a6c; --soft: #1d2e2b; --on-accent: #0f1413; --live: #5fd39b;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 24px 48px -30px rgba(0, 0, 0, .8); color-scheme: dark;
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.75 var(--f-sans); -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}
h1, h2, h3, h4, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
b { font-weight: 650; color: var(--ink); }
svg { display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; border-radius: 3px; }
.wrap { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }
.print-only { display: none; }
.mono-label {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--ink); color: var(--bg); border-radius: var(--r-sm); font-size: 14px; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- 3. 顶栏 ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-in {
  width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; height: 68px;
  display: flex; align-items: center; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--f-serif); font-size: 15px; font-weight: 700; letter-spacing: .04em;
}
.logo-txt { display: flex; flex-direction: column; line-height: 1.2; }
.logo-txt b { font-family: var(--f-serif); font-size: 16px; letter-spacing: .1em; }
.logo-txt small {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--muted); text-transform: uppercase; margin-top: 2px;
}
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  display: flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--muted); transition: color .15s, background-color .15s; white-space: nowrap;
}
.nav a i { font-family: var(--f-mono); font-size: 10px; font-style: normal; color: color-mix(in srgb, var(--muted) 60%, transparent); }
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="true"] { color: var(--accent); background: var(--soft); font-weight: 600; }
.nav a[aria-current="true"] i { color: var(--accent); }
.acts { display: flex; align-items: center; gap: 8px; }
.ibtn {
  width: 34px; height: 34px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent; color: var(--ink2);
  transition: color .15s, border-color .15s, background-color .15s;
}
.ibtn:hover { color: var(--accent); border-color: var(--accent); background: var(--soft); }
.ibtn svg { width: 16px; height: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: filter .15s;
}
.pill:hover { filter: brightness(1.12); }
.pill svg { width: 14px; height: 14px; }
.progress { height: 2px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent2); }

/* ---------- 4. 首屏 ---------- */
.hero { position: relative; padding: 132px 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 620px; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 80% at 78% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(120% 80% at 78% 0%, #000 10%, transparent 72%);
}
.hero::after {
  content: ""; position: absolute; top: -140px; right: -80px; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 15%, transparent), transparent 68%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.status {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; color: var(--ink2);
}
.status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 20%, transparent);
}
.hero h1 {
  margin-top: 20px; font-family: var(--f-serif);
  font-size: clamp(48px, 7.4vw, 84px); font-weight: 700; line-height: 1.05; letter-spacing: .08em;
}
.name-en {
  display: block; margin-top: 14px; font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .42em; text-transform: uppercase; color: var(--muted);
}
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.roles li {
  padding: 5px 13px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 600; color: var(--ink2);
}
.roles li:first-child { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pitch { margin-top: 24px; max-width: 31em; font-size: 17px; line-height: 1.9; color: var(--ink2); }
.contacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.contact {
  display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); overflow: hidden; transition: border-color .15s;
}
.contact:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.contact-main { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 46px; min-width: 0; color: var(--ink); }
.contact-main svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.contact-main span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.contact-main small, .big small {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; font-weight: 400;
}
.copy {
  flex: none; padding: 0 13px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted);
  cursor: pointer; font-size: 12px; letter-spacing: .04em; transition: background-color .15s, color .15s;
}
.copy:hover { background: var(--soft); color: var(--accent); }

/* 右侧档案卡 */
.profile {
  position: relative; margin-top: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden;
}
.profile-top {
  display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--soft), transparent 140%);
}
.avatar {
  flex: none; position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent); font-family: var(--f-serif); font-size: 24px; font-weight: 700;
}
.avatar::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--live); border: 2.5px solid var(--card);
}
.profile-top div { min-width: 0; }
.profile-top strong { display: block; font-family: var(--f-serif); font-size: 18px; letter-spacing: .08em; }
.profile-top div span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.profile dl { padding: 4px 24px 12px; }
.profile dl > div { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 14px; padding: 11px 0; }
.profile dl > div + div { border-top: 1px dashed var(--line); }
.profile dt { font-size: 13px; color: var(--muted); }
.profile dd { font-size: 14.5px; font-weight: 600; }
.profile-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px;
  border-top: 1px solid var(--line); background: var(--bg2);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted);
}
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 14px; height: 3px; background: var(--line); border-radius: 2px; }
.dots i:first-child { background: var(--accent); }

/* 指标带 */
.metrics-band {
  position: relative; margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.metrics-band li { padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 4px; }
.metrics-band li + li { border-left: 1px solid var(--line); }
.metrics-band .num {
  font-family: var(--f-serif); font-size: 42px; font-weight: 700; line-height: 1; color: var(--accent2); font-variant-numeric: tabular-nums;
}
.metrics-band .txt { margin-top: 8px; font-size: 14.5px; font-weight: 600; }
.metrics-band .sub { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- 5. 板块 ---------- */
.sec { padding: 96px 0; }
.sec-alt { background: var(--bg2); }
.sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; align-items: baseline; margin-bottom: 48px; }
.sec-head .idx {
  grid-row: 1 / span 2; align-self: start; padding-top: 10px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--accent2);
}
.sec-head h2 { font-family: var(--f-serif); font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: .06em; line-height: 1.3; }
.sec-head p { color: var(--muted); font-size: 14.5px; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li {
  padding: 4px 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card);
  font-family: var(--f-mono); font-size: 11.5px; line-height: 1.5; color: var(--ink2);
}

/* ---------- 6. 项目 ---------- */
.proj { display: grid; grid-template-columns: 210px minmax(0, 1fr); border-top: 1px solid var(--line); padding: 40px 0 48px; }
.proj:last-child { border-bottom: 1px solid var(--line); }
.proj-meta { padding-right: 32px; min-width: 0; }
.proj-meta .no {
  display: inline-block; vertical-align: middle; font-family: var(--f-serif); font-size: 44px; font-weight: 700; line-height: 1;
  color: color-mix(in srgb, var(--accent2) 80%, var(--ink));
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; vertical-align: middle; padding: 3px 9px; border-radius: 4px;
  background: color-mix(in srgb, var(--accent2) 13%, transparent); color: var(--accent2); font-size: 11.5px; font-weight: 600;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.proj-meta dl { margin-top: 22px; display: grid; gap: 10px; }
.proj-meta dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.proj-meta dd { font-size: 13.5px; font-weight: 600; margin-top: 1px; }
.proj-meta .stack { margin-top: 20px; }
.proj-meta .stack li { font-size: 11px; }
.proj-body { border-left: 1px solid var(--line); padding-left: 40px; min-width: 0; }
.proj-body h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.4; }
.lead { margin-top: 12px; font-size: 16px; line-height: 1.85; color: var(--ink2); max-width: 42em; }
.results {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 22px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.results li { background: var(--soft); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.results b { font-family: var(--f-serif); font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.results span { font-size: 12.5px; color: var(--muted); }
.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.modules li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px;
  transition: border-color .15s;
}
.modules li:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.modules li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mod-head { display: flex; align-items: center; gap: 9px; }
.mod-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--soft); color: var(--accent); }
.mod-ic svg { width: 14px; height: 14px; }
.modules h5 { margin: 0; font-size: 14.5px; font-weight: 700; }
.modules p { margin-top: 6px; font-size: 13.5px; line-height: 1.75; color: var(--ink2); }
.did-title { margin: 26px 0 12px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; color: var(--muted); font-weight: 500; }
.did, .points { display: grid; gap: 10px; }
.did li, .points li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.8; color: var(--ink2); }
.did li::before, .points li::before {
  content: ""; position: absolute; left: 3px; top: .82em; width: 6px; height: 6px; border-radius: 1px;
  background: var(--accent2); transform: rotate(45deg);
}
.tech { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 14px; }
.tech summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; user-select: none;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--muted); font-weight: 500; padding: 4px 0;
}
.tech summary::-webkit-details-marker { display: none; }
.tech summary:hover { color: var(--accent); }
.tech summary svg { width: 16px; height: 16px; transition: transform .2s var(--ease); transform: rotate(-90deg); }
.tech[open] summary svg { transform: none; }
.kv { margin-top: 16px; display: grid; }
.kv > div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv dt { font-weight: 650; color: var(--accent); font-size: 13.5px; }
.kv dd { color: var(--ink2); line-height: 1.85; }
.p-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.link {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: border-color .15s, color .15s;
}
.link:hover { border-color: var(--accent); color: var(--accent); }
.link svg { width: 14px; height: 14px; }
.link-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.link-primary:hover { color: var(--on-accent); filter: brightness(1.1); }
.note { font-size: 12.5px; color: var(--muted); }

/* ---------- 7. 工作经历 ---------- */
.tl { position: relative; display: grid; }
.tl::before { content: ""; position: absolute; left: 176px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.job { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 40px; padding: 28px 0; }
.job + .job { border-top: 1px solid var(--line); }
.job-when { position: relative; text-align: right; padding-right: 18px; }
.job-when::after {
  content: ""; position: absolute; right: -5px; top: 9px; width: 9px; height: 9px; border-radius: 2px;
  background: var(--bg2); border: 1.5px solid var(--accent2); transform: rotate(45deg);
}
.period {
  display: block; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dur { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.live { font-style: normal; color: var(--live); margin-right: 8px; }
.live::before { content: "● "; font-size: 8px; vertical-align: 2px; }
.job-body { min-width: 0; }
.job-body h3 { font-size: 19px; font-weight: 700; }
.job-role { margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--accent); }
.job-sum { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.points { margin-top: 14px; gap: 8px; }
.job .stack { margin-top: 16px; }

/* ---------- 8. 技能 ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: -24px 0 32px; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.dot.prod { background: var(--accent); }
.dot.good { border: 1.5px solid var(--accent); }
.dot.learn { border: 1.5px dashed var(--muted); }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.skill:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.skill-head { display: flex; align-items: center; gap: 11px; }
.skill-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--soft); color: var(--accent); }
.skill-ic svg { width: 18px; height: 18px; }
.skill-head h3 { font-size: 16px; font-weight: 700; }
.proof { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.proof::before { content: "■"; flex: none; font-size: 7px; color: var(--accent2); line-height: 1.9; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 5px 9px; border-radius: 5px; font-size: 12.5px; line-height: 1.4; }
.chips .prod { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.chips .good { border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.chips .learn { border: 1px dashed var(--muted); color: var(--muted); }

/* ---------- 9. 教育 ---------- */
.edu {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px 28px;
}
.edu h3 { font-family: var(--f-serif); font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.edu .job-role { margin-top: 4px; }
.edu .period { text-align: right; }
.edu .stack { grid-column: 1 / -1; margin-top: 10px; padding-top: 16px; border-top: 1px dashed var(--line); }
.edu .stack .label { border: 0; background: none; padding-left: 0; color: var(--muted); font-family: var(--f-sans); font-size: 12px; align-self: center; }

/* ---------- 10. 联系 ---------- */
.cta { position: relative; overflow: hidden; background: var(--accent); color: var(--on-accent); padding: 80px 0; }
.cta::before {
  content: attr(data-mark); position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-serif); font-size: 320px; font-weight: 700; line-height: 1; letter-spacing: -.04em;
  color: var(--on-accent); opacity: .06; pointer-events: none;
}
.cta-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.cta .mono-label { color: color-mix(in srgb, var(--on-accent) 60%, transparent); }
.cta h2 { margin-top: 10px; font-family: var(--f-serif); font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: .06em; }
.cta p { margin-top: 10px; font-size: 15px; color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.cta-list { display: grid; gap: 10px; }
.big {
  display: flex; align-items: stretch; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--on-accent) 18%, transparent);
  background: color-mix(in srgb, var(--on-accent) 6%, transparent); transition: border-color .15s, background-color .15s;
}
.big:hover { border-color: color-mix(in srgb, var(--on-accent) 45%, transparent); background: color-mix(in srgb, var(--on-accent) 10%, transparent); }
.big-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.big-main svg { width: 18px; height: 18px; flex: none; color: color-mix(in srgb, var(--on-accent) 82%, transparent); }
.big-main span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.big small { color: color-mix(in srgb, var(--on-accent) 55%, transparent); }
.big b { font-size: 16.5px; font-weight: 600; color: var(--on-accent); overflow-wrap: anywhere; }
.big .copy { color: var(--on-accent); border-left-color: color-mix(in srgb, var(--on-accent) 18%, transparent); padding: 0 20px; }
.big .copy:hover { background: color-mix(in srgb, var(--on-accent) 12%, transparent); color: var(--on-accent); }

.foot { padding: 22px 0; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.beian { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.beian a { color: var(--muted); }
.beian a:hover { color: var(--accent); text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); font-size: 13.5px;
  transition: opacity .2s, transform .2s var(--ease); box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 11. 进入视口 ---------- */
.js-on .rv { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js-on .rv.in { opacity: 1; transform: none; }

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1080px) {
  :root { --gutter: 32px; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj { grid-template-columns: 176px minmax(0, 1fr); }
  .proj-body { padding-left: 32px; }
  .tl::before { left: 148px; }
  .job { grid-template-columns: 148px minmax(0, 1fr); gap: 32px; }
  .nav a i { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .cta-grid { grid-template-columns: 1fr; gap: 36px; }
  .profile { margin-top: 0; }
  .proj { grid-template-columns: 1fr; }
  .proj-meta { padding: 0 0 18px; }
  .proj-meta dl { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px; }
  .proj-meta .stack { margin-top: 14px; }
  .proj-body { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
  .tl::before, .job-when::after { display: none; }
  .job { grid-template-columns: 1fr; gap: 10px; }
  .job-when { text-align: left; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .dur { margin-top: 0; }
  .edu { grid-template-columns: 1fr; }
  .edu .period { text-align: left; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 112px; }
  .bar-in { height: auto; flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .logo-txt small { display: none; }
  .acts { margin-left: auto; gap: 6px; }
  .pill { padding: 0 12px; height: 32px; font-size: 12.5px; }
  .ibtn { width: 32px; height: 32px; }
  .nav { order: 3; width: 100%; margin: 8px 0 0; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; font-size: 13px; padding: 6px 10px; }
  .nav a:first-child { margin-left: -10px; }
  .hero { padding-top: 124px; }
  .hero::before { background-size: 40px 40px; }
  .hero::after { width: 320px; height: 320px; right: -120px; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .name-en { letter-spacing: .3em; }
  .pitch { font-size: 15.5px; }
  .contacts { flex-direction: column; }
  .contact { width: 100%; }
  .contact-main { flex: 1; }
  .profile dl, .profile-top, .profile-foot { padding-inline: 18px; }
  .metrics-band { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
  .metrics-band li { padding: 18px 14px; }
  .metrics-band li:nth-child(3) { border-left: 0; }
  .metrics-band li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metrics-band .num { font-size: 32px; }
  .sec { padding: 64px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 6px; margin-bottom: 32px; }
  .sec-head .idx { grid-row: auto; padding-top: 0; }
  .proj { padding: 28px 0 32px; }
  .modules { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; }
  .results li { flex-direction: row; align-items: baseline; gap: 10px; padding: 11px 14px; }
  .kv > div { grid-template-columns: 1fr; gap: 4px; }
  .skills { grid-template-columns: 1fr; }
  .legend { margin-top: -16px; }
  .edu { padding: 20px 18px; }
  .cta { padding: 56px 0; }
  .cta::before { font-size: 200px; right: -30px; }
  .big .copy { padding: 0 14px; }
}
@media (max-width: 400px) {
  .logo-txt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 13. 打印 / 另存 PDF（A4） ---------- */
@page { size: A4; margin: 12mm 13mm; }
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --bg2: #fff; --card: #fff; --ink: #111; --ink2: #333; --muted: #666; --line: #ddd;
    --accent: #0f4c4d; --accent2: #b4472f; --soft: #eef4f2; --on-accent: #fff; --shadow: none;
  }
  html { scroll-behavior: auto; }
  body { font-size: 9.5pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar, .toast, .copy, .skip, .hero::before, .hero::after, .cta::before, .tech summary, .p-links .link svg { display: none !important; }
  .print-only { display: inline; }
  .js-on .rv { opacity: 1 !important; transform: none !important; }
  .wrap { width: auto; }
  .hero { padding: 0 0 8px; }
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 20px; }
  .hero h1 { font-size: 26pt; margin-top: 8px; }
  .name-en { font-size: 8pt; margin-top: 4px; }
  .roles { margin-top: 10px; }
  .pitch { font-size: 9.5pt; margin-top: 10px; }
  .contacts { margin-top: 10px; gap: 6px; }
  .contact-main { min-height: 0; padding: 4px 8px; }
  .profile { box-shadow: none; }
  .profile dl > div { padding: 5px 0; }
  .metrics-band { margin-top: 14px; }
  .metrics-band li { padding: 8px 10px; }
  .metrics-band .num { font-size: 16pt; }
  .sec { padding: 14px 0; }
  .sec-alt { background: none; }
  .sec-head { margin-bottom: 10px; }
  .sec-head h2 { font-size: 14pt; }
  .legend { margin: 0 0 8px; }
  .proj { grid-template-columns: 130px 1fr; padding: 12px 0; }
  .proj-body { padding-left: 18px; }
  .proj-body h3 { font-size: 12pt; }
  .tech { margin-top: 10px; padding-top: 0; border: 0; }
  .kv { margin-top: 4px; }
  .kv > div { padding: 5px 0; }
  .stack li { font-size: 7.5pt; padding: 2px 5px; }
  .skills { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .skill { padding: 10px 12px; gap: 6px; }
  .tl::before, .job-when::after { display: none; }
  .job { grid-template-columns: 100px 1fr; gap: 14px; padding: 10px 0; }
  .cta { background: none; color: var(--ink); padding: 12px 0; }
  .cta-grid { grid-template-columns: 1fr 1.4fr; gap: 12px; }
  .cta .mono-label, .cta p { color: var(--muted); }
  .cta h2 { font-size: 14pt; }
  .big { border-color: var(--line); background: none; }
  .big b, .big-main svg { color: var(--ink); }
  .big small { color: var(--muted); }
  .big-main { padding: 6px 12px; }
  .foot { display: none; }
  .modules li { padding: 6px 10px; }
  .modules p { font-size: 8.5pt; line-height: 1.5; margin-top: 2px; }
  .job, .skill, .edu, .results, .kv > div, .modules li { break-inside: avoid; }
}
