/* ============================================================
   作品集 · 设计系统
   视觉语言：米白点阵底 + 粗黑描边 + 硬边阴影 + 高饱和色块
   ============================================================ */

:root {
  /* 底色 */
  --bg: #f5f5f0;
  --surface: #ffffff;
  --surface-2: #fafaf6;
  --ink: #0d0d0d;
  --ink-2: #2a2a2a;
  --ink-3: #5a5a5a;
  --ink-4: #8a8a85;

  /* 描边与阴影 */
  --stroke: #0d0d0d;
  --stroke-w: 2px;
  --stroke-w-lg: 3px;
  --hard-shadow: 4px 4px 0 var(--stroke);
  --hard-shadow-sm: 2px 2px 0 var(--stroke);
  --hard-shadow-lg: 6px 6px 0 var(--stroke);

  /* 高饱和色板 */
  --red: #f4513b;
  --yellow: #f7c548;
  --blue: #3f62f6;
  --green: #4cc3a5;
  --cyan: #6ed1e3;
  --purple: #7b61f5;
  --pink: #f57bb5;
  --orange: #f78c3d;

  /* 点阵 */
  --dot: #d2d2cb;
  --dot-size: 22px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 100px;

  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --w-body: 500;
  --w-med: 700;
  --w-bold: 900;
}

[data-theme="dark"] {
  --bg: #17171a;
  --surface: #202024;
  --surface-2: #26262b;
  --ink: #f2f2ee;
  --ink-2: #d8d8d2;
  --ink-3: #a0a09a;
  --ink-4: #6e6e68;

  --stroke: #f2f2ee;
  --hard-shadow: 4px 4px 0 var(--stroke);
  --hard-shadow-sm: 2px 2px 0 var(--stroke);
  --hard-shadow-lg: 6px 6px 0 var(--stroke);

  --red: #ff6b56;
  --yellow: #ffd166;
  --blue: #6b8bff;
  --green: #5fd4b4;
  --cyan: #7ddcec;
  --purple: #9a85ff;
  --pink: #ff8fc4;
  --orange: #ffa15c;

  --dot: #34343a;

  /* 暗色补偿：字重降 40 */
  --w-body: 400;
  --w-med: 600;
  --w-bold: 800;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-weight: var(--w-body);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.2px);
  background-size: var(--dot-size) var(--dot-size);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
  text-wrap: pretty;
  overflow-x: hidden;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
a { color: inherit; }
::selection { background: var(--yellow); color: #0d0d0d; }

svg { vertical-align: -0.125em; }

/* ---------------------------------------------------------------- nav */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: var(--bg);
  border-bottom: var(--stroke-w) solid var(--stroke);
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-name {
  font-weight: var(--w-bold);
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-sub {
  font-size: 11.5px;
  font-weight: var(--w-med);
  color: #0d0d0d;
  background: var(--yellow);
  border: var(--stroke-w) solid var(--stroke);
  padding: 1px 8px;
  border-radius: var(--r-pill);
}
[data-theme="dark"] .nav-sub { color: #0d0d0d; border-color: #0d0d0d; }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 6px; margin-right: 6px; }
.nav-links a {
  font-size: 13px;
  font-weight: var(--w-med);
  color: var(--ink);
  text-decoration: none;
  padding: 5px 13px;
  border: var(--stroke-w) solid transparent;
  border-radius: var(--r-pill);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav-links a:hover {
  background: var(--surface);
  border-color: var(--stroke);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: var(--stroke-w) solid var(--stroke);
  background: var(--surface);
  border-radius: var(--r-pill);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--hard-shadow-sm);
  transition: transform 0.18s var(--spring), box-shadow 0.18s var(--ease);
}
.icon-btn:hover { background: var(--yellow); }
.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--stroke);
}
.icon-btn svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- layout */

main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

section { padding: clamp(52px, 7vw, 84px) 0; }

.sec-head { margin-bottom: clamp(26px, 4vw, 40px); }

.sec-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: var(--w-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  padding: 3px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: var(--w-bold);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 em {
  font-style: normal;
  color: var(--red);
}

.sec-desc {
  font-size: 14.5px;
  color: var(--ink-3);
  max-width: 56ch;
  font-weight: var(--w-body);
}

/* ---------------------------------------------------------------- hero */

.hero { padding-top: clamp(52px, 7vw, 84px); padding-bottom: clamp(44px, 6vw, 64px); }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: var(--w-med);
  background: var(--surface);
  border: var(--stroke-w) solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  margin-bottom: 26px;
  box-shadow: var(--hard-shadow-sm);
}
.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  border: 1.5px solid var(--stroke);
}

h1 {
  font-size: clamp(30px, 5.4vw, 58px);
  font-weight: var(--w-bold);
  letter-spacing: -0.04em;
  line-height: 1.18;
  max-width: 18ch;
  margin-bottom: 22px;
  overflow-wrap: break-word;
  word-break: break-word;
}
h1 em {
  font-style: normal;
  color: var(--red);
  position: relative;
}
/* 手绘下划线 */
h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.28em;
  background: var(--yellow);
  z-index: -1;
  border-radius: 2px;
}
h1 .line { display: block; }

/* 首页标题：每行「前提 → 结果」，左半收、右半放 */
#heroTitle {
  max-width: 100%;
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.3;
  letter-spacing: -.045em;
}
#heroTitle .line + .line { margin-top: .18em; }
.hl-pre {
  color: var(--ink-3);
  font-weight: var(--w-med);
}
.hl-arrow {
  display: inline-block;
  margin: 0 .2em 0 .26em;
  padding: .1em .34em .16em;
  font-size: .56em;
  font-weight: 900;
  line-height: 1;
  vertical-align: .14em;
  color: #0d0d0d;
  background: var(--yellow);
  border: .11em solid var(--stroke);
  border-radius: .3em;
  box-shadow: .1em .1em 0 var(--stroke);
}
.hl-post {
  color: var(--ink);
  font-weight: var(--w-bold);
  font-size: 1.15em;
  letter-spacing: -.05em;
}

/* 流式打字：单字 90ms，blur(6px)→清晰，相邻错开 30ms */
.type-char {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(0.08em);
  animation: charIn 0.62s var(--ease) forwards;
}
@keyframes charIn {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.hero-lede {
  font-size: clamp(15px, 1.6vw, 16.5px);
  color: var(--ink-2);
  max-width: 54ch;
  line-height: 1.85;
  margin-bottom: clamp(30px, 4vw, 44px);
}
.hero-lede b {
  font-weight: var(--w-med);
  color: var(--ink);
  background: linear-gradient(transparent 62%, var(--yellow) 62%);
  padding: 0 2px;
}

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-md);
  padding: 18px 18px 16px;
  box-shadow: var(--hard-shadow);
  transition: transform 0.22s var(--spring), box-shadow 0.22s var(--ease);
}
.stat:nth-child(1) { background: var(--surface); }
.stat:nth-child(2) { background: var(--yellow); }
.stat:nth-child(3) { background: var(--surface); }
.stat:nth-child(4) { background: var(--cyan); }
.stat:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--hard-shadow-lg);
}
.stat-v {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: var(--w-bold);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.stat-v .unit {
  font-size: 0.44em;
  font-weight: var(--w-med);
  letter-spacing: 0;
  margin-left: 2px;
}
.stat-k { font-size: 11.5px; font-weight: var(--w-med); }

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-lg);
  text-decoration: none;
  box-shadow: var(--hard-shadow);
  transition: transform 0.24s var(--spring), box-shadow 0.24s var(--ease);
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--stroke);
}
.card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--stroke);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-idx {
  font-size: 12px;
  font-weight: var(--w-bold);
  color: var(--bg);
  background: var(--ink);
  padding: 1px 9px;
  border-radius: var(--r-pill);
}
.card-tag {
  font-size: 11.5px;
  font-weight: var(--w-med);
  padding: 2px 10px;
  border: var(--stroke-w) solid var(--stroke);
  border-radius: var(--r-pill);
}
/* 按序号轮换标签底色 */
.card:nth-child(4n+1) .card-tag { background: var(--yellow); }
.card:nth-child(4n+2) .card-tag { background: var(--green); }
.card:nth-child(4n+3) .card-tag { background: var(--cyan); }
.card:nth-child(4n+4) .card-tag { background: var(--pink); }

.card-title {
  font-size: 19px;
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 8px;
}

.card-claim {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 18px;
  flex: 1;
}
.card-claim b { color: var(--ink); font-weight: var(--w-med); }

.card-metrics {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: var(--stroke-w) solid var(--stroke);
}
.card-metric { display: flex; flex-direction: column; gap: 1px; }
.card-metric-v {
  font-size: 17px;
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
}
.card-metric-k { font-size: 11px; color: var(--ink-4); font-weight: var(--w-med); }

.card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: var(--w-med);
  padding-top: 10px;
  border-top: var(--stroke-w) solid var(--stroke);
}

/* ---------------------------------------------------------------- about */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.about-body p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.9;
  margin-bottom: 14px;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body b {
  font-weight: var(--w-med);
  background: linear-gradient(transparent 62%, var(--yellow) 62%);
  padding: 0 2px;
}

.about-side {
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--hard-shadow);
}
.about-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 16px;
  font-size: 13px;
  border-bottom: var(--stroke-w) solid var(--stroke);
}
.about-row:last-child { border-bottom: none; }
.about-row span { color: var(--ink-4); font-size: 11.5px; font-weight: var(--w-med); }
.about-row b { font-weight: var(--w-med); text-align: right; }

/* ---------------------------------------------------------------- project page */

.proj { padding-bottom: 30px; }

.proj-head { padding: clamp(36px, 5vw, 56px) 0 clamp(28px, 4vw, 40px); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: var(--w-med);
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: var(--stroke-w) solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 4px 14px;
  margin-bottom: 22px;
  box-shadow: var(--hard-shadow-sm);
  transition: transform 0.18s var(--spring), box-shadow 0.18s var(--ease);
}
.back:hover { background: var(--yellow); }
.back:active { transform: translate(2px, 2px); box-shadow: none; }

.proj-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: var(--w-med);
  background: var(--green);
  border: var(--stroke-w) solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 2px 11px;
  margin-bottom: 14px;
}

.proj-head h1 {
  font-size: clamp(26px, 4.6vw, 46px);
  max-width: 100%;
  margin-bottom: 14px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.proj-claim {
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.8;
  margin-bottom: 28px;
}
.proj-claim b { font-weight: var(--w-med); color: var(--ink); }

.proj-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--hard-shadow);
}
.meta-row {
  background: var(--surface);
  padding: 13px 16px;
  border-right: var(--stroke-w) solid var(--stroke);
  border-bottom: var(--stroke-w) solid var(--stroke);
}
.meta-row:nth-child(3n) { border-right: none; }
.meta-row:nth-last-child(-n+3) { border-bottom: none; }
/* 末行不满 3 个时，前几格仍保留下边线 */
.meta-row:nth-last-child(3):not(:nth-child(3n+1)) { border-bottom: var(--stroke-w) solid var(--stroke); }
.meta-row:nth-last-child(2):not(:nth-child(3n+1)) { border-bottom: var(--stroke-w) solid var(--stroke); }
.meta-k { font-size: 11px; color: var(--ink-4); font-weight: var(--w-med); margin-bottom: 2px; }
.meta-v { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.meta-v b { font-weight: var(--w-med); color: var(--ink); }

/* problem cards */
.problems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.problems > .p-card:last-child:nth-child(odd) {
  grid-column: span 2;
}
.p-card {
  padding: 18px;
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-md);
  box-shadow: var(--hard-shadow);
  transition: transform 0.22s var(--spring), box-shadow 0.22s var(--ease);
}
.p-card:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-shadow-lg); }
.p-idx {
  display: inline-block;
  align-self: flex-start;   /* 卡片是 flex 列，否则会被拉成整行黑条 */
  font-size: 11px;
  font-weight: var(--w-bold);
  color: var(--bg);
  background: var(--ink);
  padding: 0 8px;
  border-radius: var(--r-pill);
  margin-bottom: 9px;
}
.p-title {
  font-size: 15px;
  font-weight: var(--w-bold);
  letter-spacing: -0.015em;
  margin-bottom: 7px;
  line-height: 1.4;
}
.p-body { font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.p-body b { color: var(--ink); font-weight: var(--w-med); }
.p-body em {
  font-style: normal;
  font-weight: var(--w-med);
  color: var(--ink);
  background: var(--yellow);
  padding: 0 3px;
  border-radius: 3px;
}

/* decision blocks */
.actions { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }

.action {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(18px, 3vw, 36px);
  padding: 22px;
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-shadow);
}

.action-side { padding-right: 18px; border-right: var(--stroke-w) dashed var(--stroke); }
.action-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: var(--w-bold);
  background: var(--ink);
  color: var(--bg);
  padding: 0 8px;
  border-radius: var(--r-pill);
  margin-bottom: 9px;
}
.action-title {
  font-size: 16px;
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.action-body { min-width: 0; }
.action-think {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: 14px;
}
.action-think b { font-weight: var(--w-med); color: var(--ink); }

.steps { display: flex; flex-direction: column; gap: 9px; }
.step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.7;
}
.step-n {
  font-size: 11px;
  font-weight: var(--w-bold);
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--stroke);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.step b { color: var(--ink); font-weight: var(--w-med); }

/* gallery */
.gal-note {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 20px;
  max-width: 56ch;
}

.gal-mod { margin-bottom: 30px; }
.gal-mod-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.gal-mod-n {
  font-size: 11px;
  font-weight: var(--w-bold);
  color: var(--bg);
  background: var(--ink);
  padding: 0 8px;
  border-radius: var(--r-pill);
}
.gal-mod-t { font-size: 15px; font-weight: var(--w-bold); }
.gal-mod-d { font-size: 12px; color: var(--ink-4); font-weight: var(--w-med); margin-left: auto; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: min-content;   /* 行高由内容决定，不拉平 */
  align-items: start;
  gap: 14px;
}
.shot {
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--hard-shadow);
  transition: transform 0.22s var(--spring), box-shadow 0.22s var(--ease);
  align-self: start;   /* 不被同行竖图拉伸成大黑块 */
}
.shot:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-shadow-lg); }
.shot.w12 { grid-column: span 12; }
.shot.w9 { grid-column: span 9; }
.shot.w7 { grid-column: span 7; }
.shot.w6 { grid-column: span 6; }
.shot.w5 { grid-column: span 5; }
.shot.w4 { grid-column: span 4; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-2);
}
/* 竖图（移动端截图）：宽度按自身比例收窄，不撑列也不留黑边 */
.shot.portrait {
  grid-column: span 3 !important;
  max-width: none;
  justify-self: start;
  width: fit-content;
}
.shot.portrait img {
  height: 420px;
  width: auto;
  max-width: 100%;
}
/* 窄屏时竖图恢复常规宽度 */
@media (max-width: 760px) {
  .shot.portrait { grid-column: span 12 !important; width: auto; justify-self: stretch; }
  .shot.portrait img { height: auto; width: 100%; max-height: 520px; object-fit: contain; }
}
.shot figcaption {
  font-size: 12px;
  font-weight: var(--w-med);
  color: var(--ink-2);
  padding: 9px 12px;
  border-top: var(--stroke-w) solid var(--stroke);
  line-height: 1.5;
}

/* review */
.review {
  margin-top: clamp(36px, 5vw, 56px);
  padding: 24px;
  background: var(--yellow);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-shadow);
}
.review .sec-num { background: var(--ink); color: var(--yellow); }
.review p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.85;
  max-width: 58ch;
  font-weight: var(--w-body);
}
.review b { font-weight: var(--w-bold); }

/* copy row */
.copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 16px 18px;
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-md);
  box-shadow: var(--hard-shadow);
  font-size: 13px;
  font-weight: var(--w-med);
  color: var(--ink-2);
}
.copy-row code {
  font-family: var(--font);
  font-size: 13px;
  font-weight: var(--w-bold);
  background: var(--surface-2);
  border: 1.5px solid var(--stroke);
  padding: 3px 10px;
  border-radius: var(--r-sm);
}
.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: var(--r-pill);
  border: var(--stroke-w) solid var(--stroke);
  background: var(--yellow);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: var(--w-bold);
  cursor: pointer;
  box-shadow: var(--hard-shadow-sm);
  transition: transform 0.18s var(--spring), opacity 0.3s var(--ease),
              box-shadow 0.18s var(--ease);
}
.copy-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.copy-btn svg { width: 13px; height: 13px; vertical-align: -0.125em; }
.copy-btn.done { opacity: 0.6; background: var(--green); }

/* ---------------------------------------------------------------- footer */

footer {
  border-top: var(--stroke-w-lg) solid var(--stroke);
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--surface);
}
.foot-grid {
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}
.foot-name { font-weight: var(--w-bold); font-size: 15px; margin-bottom: 5px; }
.foot-meta { font-size: 12px; color: var(--ink-3); line-height: 1.8; font-weight: var(--w-med); }
.foot-meta a { color: var(--ink-2); text-decoration: none; border-bottom: 1.5px solid var(--stroke); }
.foot-meta a:hover { background: var(--yellow); }
.foot-right { text-align: right; }

/* ---------------------------------------------------------------- lightbox */

.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(13, 13, 13, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.lb.on { opacity: 1; pointer-events: auto; }
.lb img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--r-sm);
  border: 3px solid #fff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------- reveal */

.reveal { opacity: 1; transform: none; }
.js-anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js-anim .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .type-char { opacity: 1; filter: none; transform: none; }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .action { grid-template-columns: 1fr; gap: 14px; }
  .action-side {
    border-right: none;
    border-bottom: var(--stroke-w) dashed var(--stroke);
    padding-right: 0;
    padding-bottom: 12px;
  }
  .cards { grid-template-columns: 1fr; }
  .problems { grid-template-columns: 1fr; }
  .problems > .p-card:last-child:nth-child(odd) { grid-column: span 1; }
  .proj-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .proj-meta { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .shot.w12, .shot.w7, .shot.w6, .shot.w5, .shot.w4 { grid-column: span 1; }
  .foot-grid { flex-direction: column; }
  .foot-right { text-align: left; }
  .gal-mod-d { margin-left: 0; width: 100%; }
  :root { --dot-size: 18px; }
}

/* print */
@media print {
  nav, footer, .back { display: none; }
  body { background: #fff; }
  .card, .action, .p-card, .shot { break-inside: avoid; box-shadow: none; }
}

/* ============================================================
   能力板块（新增）
   能力卡 + 路径条 + 紧凑项目网格
   ============================================================ */

.hero-lede-2 {
  color: var(--ink-3);
  font-size: clamp(14px, 1.5vw, 15.5px);
  margin-top: -18px;
}

.ab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 780px) { .ab-grid { grid-template-columns: 1fr; } }

.ab {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-shadow);
  transition: transform .24s var(--spring), box-shadow .24s var(--ease);
}
.ab:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--stroke); }

/* 左侧色条区分能力 */
.ab::before {
  content: "";
  position: absolute;
  left: -3px; top: 22px; bottom: 22px;
  width: 9px;
  border-radius: 6px;
  background: var(--accent-bar, var(--yellow));
}
.ab-yellow { --accent-bar: var(--yellow); }
.ab-blue   { --accent-bar: var(--blue); }
.ab-green  { --accent-bar: var(--green); }
.ab-purple { --accent-bar: var(--purple); }
.ab-orange { --accent-bar: var(--orange); }
.ab-pink   { --accent-bar: var(--pink); }

.ab-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.ab-no {
  font-size: 13px;
  font-weight: var(--w-bold);
  background: var(--accent-bar, var(--yellow));
  color: #0d0d0d;
  border: 2px solid var(--stroke);
  border-radius: 6px;
  padding: 1px 7px;
}
.ab-en {
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--ink-4);
  font-weight: var(--w-med);
}

.ab-title {
  font-size: clamp(18px, 2vw, 21px);
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  line-height: 1.42;
  margin-bottom: 12px;
}
.ab-lead {
  font-size: 14px;
  font-weight: var(--w-med);
  color: var(--ink);
  line-height: 1.75;
  margin-bottom: 10px;
}
.ab-body {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.9;
  margin-bottom: 16px;
}

.ab-case {
  background: var(--surface-2);
  border: 2px dashed var(--stroke);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ab-case-scene {
  font-size: 11.5px;
  font-weight: var(--w-bold);
  letter-spacing: .02em;
  margin-bottom: 6px;
  color: var(--ink);
}
.ab-case-detail {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.8;
}

.ab-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.ab-skill {
  font-size: 11px;
  font-weight: var(--w-med);
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1.5px solid var(--stroke);
  border-radius: 100px;
  padding: 3px 10px;
}

/* 路径条 */
.traj {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: var(--stroke-w-lg) solid var(--stroke);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--hard-shadow);
}
@media (max-width: 780px) { .traj { grid-template-columns: 1fr; } }

.traj-item {
  padding: 22px 20px;
  border-right: 2px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.traj-item:last-child { border-right: none; }
@media (max-width: 780px) {
  .traj-item { border-right: none; border-bottom: 2px solid var(--stroke); }
  .traj-item:last-child { border-bottom: none; }
}
.traj-year {
  font-size: 11px;
  font-weight: var(--w-bold);
  letter-spacing: .1em;
  color: var(--ink-4);
}
.traj-role {
  font-size: 15.5px;
  font-weight: var(--w-bold);
  letter-spacing: -.02em;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 2px;
}
.traj-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

/* 紧凑项目网格 */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 780px) { .tiles { grid-template-columns: 1fr; } }

.tile {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "tag   go"
    "title go"
    "meta  go";
  align-items: center;
  gap: 4px 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 2.5px solid var(--stroke);
  border-radius: var(--r-md);
  text-decoration: none;
  box-shadow: var(--hard-shadow-sm);
  transition: transform .2s var(--spring), box-shadow .2s var(--ease), background .2s var(--ease);
}
.tile:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--hard-shadow);
  background: var(--surface-2);
}
.tile:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--stroke); }

.tile-tag {
  grid-area: tag;
  font-size: 10.5px;
  font-weight: var(--w-med);
  color: var(--ink-4);
  letter-spacing: .04em;
}
.tile-title {
  grid-area: title;
  font-size: 14.5px;
  font-weight: var(--w-bold);
  color: var(--ink);
  line-height: 1.45;
}
.tile-meta {
  grid-area: meta;
  font-size: 11px;
  color: var(--ink-4);
}
.tile-go {
  grid-area: go;
  font-size: 11.5px;
  font-weight: var(--w-med);
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.tile:hover .tile-go { color: var(--ink); transform: translateX(2px); }

/* 长内容约束卡：内容多时自动转为单列，避免挤压 */
.problems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.p-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 2.5px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--hard-shadow-sm);
  transition: transform .22s var(--spring), box-shadow .22s var(--ease);
}
.p-card:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-shadow); }
.p-card .p-body { line-height: 1.85; }
.p-card .p-body b { font-weight: var(--w-med); color: var(--ink); }

/* 决策块加宽行距，长文本更好读 */
.decision .step { line-height: 1.85; }

/* ============================================================
   暗色模式可读性修复
   1) 复盘块：黄底必须配黑字，不能继承主题白字
   2) 荧光笔：暗色下改为深色底+亮字，避免黄底白字
   ============================================================ */

/* 复盘块：底色固定黄，文字强制深色 */
.review { color: #0d0d0d; }
.review p,
.review .rev-body,
.review b,
.review strong { color: #0d0d0d; }
.review .sec-num {
  background: #0d0d0d;
  color: var(--yellow);
  border-color: #0d0d0d;
}

/* 荧光笔：浅色沿用黄色高亮；暗色反转为黄色底+深字 */
.hero-lede b,
.about-body b,
.proj-claim b,
.gal-note b {
  color: var(--ink);
  background: linear-gradient(transparent 62%, var(--yellow) 62%);
  padding: 0 2px;
  border-radius: 2px;
}
[data-theme="dark"] .hero-lede b,
[data-theme="dark"] .about-body b,
[data-theme="dark"] .proj-claim b,
[data-theme="dark"] .gal-note b {
  background: var(--yellow);
  color: #0d0d0d;
  padding: 1px 4px;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 详情页正文里的加粗，暗色下也要保证对比 */
[data-theme="dark"] .p-body b,
[data-theme="dark"] .step b,
[data-theme="dark"] .action-think b,
[data-theme="dark"] .ab-case-detail b,
[data-theme="dark"] .ab-body b,
[data-theme="dark"] .ab-lead b,
[data-theme="dark"] .card-claim b {
  color: var(--ink);
  background: rgba(255, 209, 102, 0.18);
  padding: 0 3px;
  border-radius: 3px;
}

/* ============================================================
   Hero 副文排版：两段分栏 + 引导线，更像编辑设计而非简历
   ============================================================ */
.hero-meta {
  display: grid;
  grid-template-columns: 3px minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0 clamp(18px, 3vw, 36px);
  align-items: start;
  margin-bottom: clamp(30px, 4vw, 44px);
  max-width: 1000px;
}
.hero-rule {
  grid-row: 1 / span 2;
  width: 3px;
  align-self: stretch;
  min-height: 100%;
  border-radius: 2px;
  background: var(--ink);
}
.hero-meta .hero-lede {
  grid-column: 2;
  margin: 0;
  max-width: none;
  font-size: clamp(14.5px, 1.5vw, 16px);
  line-height: 1.9;
}
.hero-lede-2 {
  grid-column: 3;
  margin: 0;
  padding-left: clamp(14px, 2vw, 24px);
  border-left: 2px solid var(--stroke);
  font-size: clamp(13px, 1.3vw, 14px);
  line-height: 1.85;
  color: var(--ink-3);
}
@media (max-width: 860px) {
  .hero-meta {
    grid-template-columns: 3px minmax(0, 1fr);
  }
  .hero-lede-2 {
    grid-column: 2;
    margin-top: 18px;
    padding-left: 14px;
  }
  .hero-rule { grid-row: 1 / span 2; }
}

/* ============================================================
   阅读进度 / 章节导航 / 复盘侧栏 / 灯箱翻页
   ============================================================ */

/* 顶部阅读进度 */
.read-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.read-bar > i {
  display: block;
  height: 100%;
  background: var(--yellow);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform .1s linear;
  box-shadow: 0 0 0 1px var(--stroke);
}

/* 右侧章节圆点 */
/* 章节导航：常显文字的胶囊条，够大够好点 */
.sec-dots {
  position: fixed;
  right: clamp(18px, 2.2vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: auto;
  width: 172px;
  padding: 0;
  overflow: hidden;
  border: 2.5px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--hard-shadow);
}
.sec-dot {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  text-decoration: none;
  border-bottom: 2px solid var(--stroke);
  transition: background .18s var(--ease), padding-left .18s var(--ease);
}
.sec-dot:last-child { border-bottom: none; }
.sec-dot:hover { background: var(--surface-2); padding-left: 19px; }
.sec-dot.on { background: var(--yellow); }
.sec-dot:active { background: var(--surface-2); }
.sec-dot-no {
  font-size: 11px;
  font-weight: var(--w-bold);
  letter-spacing: .06em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  transition: color .18s var(--ease);
}
.sec-dot-label {
  font-size: 15px;
  font-weight: var(--w-bold);
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1;
}
.sec-dot.on .sec-dot-no,
.sec-dot.on .sec-dot-label { color: #0d0d0d; }

/* 窄屏：目录卡放倒，贴底成为一条横向目录 */
@media (max-width: 1380px) {
  .sec-dots {
    right: 50%;
    top: auto;
    bottom: 14px;
    transform: translateX(50%);
    flex-direction: row;
    width: auto;
    border-radius: 100px;
    box-shadow: var(--hard-shadow-sm);
  }
  .sec-dot {
    border-bottom: none;
    border-right: 2px solid var(--stroke);
    padding: 11px 14px;
  }
  .sec-dot:last-child { border-right: none; }
  .sec-dot:hover { padding-left: 14px; background: var(--surface-2); }
  .sec-dot-no { display: none; }
  .sec-dot-label { font-size: 13px; }
}

/* 复盘块：左文右数据 */
.review { color: #0d0d0d; }
.review p, .review b, .review strong { color: #0d0d0d; }
.review .sec-num { background: #0d0d0d; color: var(--yellow); border-color: #0d0d0d; }

.review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: clamp(20px, 3.5vw, 40px);
  align-items: start;
}
.review-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 2.5px solid rgba(13,13,13,.28);
  padding-left: clamp(14px, 2vw, 22px);
}
.rev-stat-v {
  font-size: clamp(20px, 2.3vw, 27px);
  font-weight: var(--w-bold);
  letter-spacing: -.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.rev-stat-k {
  font-size: 11.5px;
  font-weight: var(--w-med);
  opacity: .72;
  margin-top: 2px;
}
@media (max-width: 760px) {
  .review { grid-template-columns: 1fr; }
  .review-side {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    border-top: 2.5px solid rgba(13,13,13,.28);
    padding-left: 0;
    padding-top: 14px;
    gap: 18px;
  }
}

/* ============================================================
   灯箱（可翻页）
   ============================================================ */
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,8,8,.985);
  backdrop-filter: blur(20px) saturate(.8);
  -webkit-backdrop-filter: blur(20px) saturate(.8);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  opacity: 0; pointer-events: none;
  transition: opacity .32s var(--ease);
}
.lb.on { opacity: 1; pointer-events: auto; }

.lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: min(1400px, 92vw);
  max-height: 92vh;
  transform: scale(.97);
  transition: transform .4s var(--spring);
}
.lb.on .lb-stage { transform: scale(1); }
.lb-stage img {
  max-width: 100%;
  max-height: calc(92vh - 56px);
  object-fit: contain;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,.22);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  background: #101010;
}
.lb-stage figcaption {
  color: #e9e7e1;
  font-size: 13px;
  font-weight: var(--w-med);
  text-align: center;
  line-height: 1.6;
  padding: 0 10px;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.32);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s var(--ease), transform .2s var(--spring), border-color .2s var(--ease);
}
.lb-nav:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.lb-nav:active { transform: translateY(-50%) scale(.93); }
.lb-prev { left: clamp(10px, 2.5vw, 34px); }
.lb-next { right: clamp(10px, 2.5vw, 34px); }

.lb-count {
  position: absolute;
  top: clamp(14px, 2.4vw, 26px);
  left: clamp(14px, 2.4vw, 30px);
  color: #fff;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 100px;
  padding: 4px 12px;
}
.lb-x {
  position: absolute;
  top: clamp(12px, 2.2vw, 24px);
  right: clamp(12px, 2.2vw, 24px);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s var(--ease);
}
.lb-x:hover { background: rgba(255,255,255,.2); }
.lb-hint {
  position: absolute;
  bottom: clamp(12px, 2vw, 22px);
  left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.55);
  font-size: 11.5px;
  letter-spacing: .04em;
  pointer-events: none;
}
@media (max-width: 720px) {
  .lb-nav { width: 42px; height: 42px; font-size: 24px; }
  .lb-hint { display: none; }
}
