/* ==========================================================================
   个人主页版面 —— 跨页 · 版心 · 界格 · 贴片
   依赖 assets/site.css 的令牌与共用组件，只写主页独有的版式
   --------------------------------------------------------------------------
   结构：.spread（一个跨页）= .page.verso + .axis（版心）+ .page.recto
   全站 border-radius: 0；只有 .seal / .to-top 是正圆。
   ========================================================================== */

/* ---------- 跨页 ---------- */
.spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--rail) 1fr;
  min-height: 100svh;
  border-bottom: 1px solid var(--rule);
}

/* 天头界行 */
.axis-line { position: absolute; left: 34px; right: 34px; height: 1px; background: var(--rule); }
.axis-line.head { top: 76px; }
.axis-line.foot { bottom: 44px; }

.page { position: relative; display: flex; flex-direction: column; min-width: 0; }
/* 网格项必须显式 min-width: 0：否则 1fr 的 auto 最小值会被
   子元素的 min-content 撑开，窄屏直接横向溢出 */
.spread > * { min-width: 0; }
.verso { padding: 128px 72px 88px 76px; border-right: none; }
.recto { padding: 128px 76px 88px 72px; }

/* ---------- 版心 ---------- */
.axis {
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  background: var(--paper-2);
  display: flex; flex-direction: column; align-items: center;
  padding: 84px 0 34px;
  position: relative;
}
.axis .fish { margin: 20px 0 22px; flex: 0 0 8px; }
.eyebrow {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .3em; color: var(--ink-3);
}
.eyebrow span, .eyebrow em { display: block; line-height: 1.6; }
.eyebrow em { font-style: normal; color: var(--red-ink); }

/* 直排导航字 */
.axis-nav {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.axis-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 12.5px; letter-spacing: 0; line-height: 1.9; color: var(--ink-3);
  transition: color .3s var(--ease);
}
.axis-nav a .i { font-family: var(--mono); font-size: 11px; color: var(--ink-4); letter-spacing: .04em; }
.axis-nav a:hover { color: var(--red-ink); }
.axis-nav a.here { color: var(--ink); }
.axis-nav a.here .i { color: var(--red-ink); }

/* 轴底：直排「下卷」+ 朱印（同层，不是上下叠） */
.axis-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.axis-foot .cue {
  writing-mode: vertical-rl; font-size: 11px; letter-spacing: .34em;
  color: var(--ink-4); transition: color .3s var(--ease);
}
.axis-foot a.cue:hover { color: var(--red-ink); }
.axis-foot .seal { width: 32px; height: 32px; font-size: 14px; }

/* ---------- 左页 ---------- */
.verse-head { max-width: 12ch; }

/* 籍贯／年龄／职业：界格排出来的，不是卡片 */
.name-grid {
  margin: 32px 0 0; display: grid; grid-template-columns: 64px 1fr;
  border-top: 1px solid var(--rule);
}
.name-grid dt, .name-grid dd {
  margin: 0; padding: 9px 0; border-bottom: 1px solid var(--rule-soft);
  font-size: 12.5px; line-height: 1.6;
}
.name-grid dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--ink-4); padding-top: 13px;
}
.name-grid dd { color: var(--ink-2); }
.name-grid dd b { color: var(--ink); font-weight: 500; }

/* ---------- 右页 ---------- */
/* 真人照贴片：直接落在纸上，不套卡片、不加圆角 */
.photo-slab { position: relative; width: 220px; }
.photo-slab picture { display: block; }
.photo-slab img {
  width: 220px; height: 150px; object-fit: cover; object-position: center 34%;
}
.photo-slab .cap {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--ink-4);
}
.photo-slab .cap::before { content: ''; width: 14px; height: 1px; background: var(--rule-hard); }

/* 旁注：挂在宽边距上，正文保持干净 */
.sidenote {
  position: absolute; right: 30px; top: 128px; width: 108px;
  font-size: 11px; line-height: 1.85; color: var(--ink-4);
  border-top: 1px solid var(--rule); padding-top: 9px;
}
.sidenote b { color: var(--red); font-weight: 500; }

.recto-copy { margin-top: 20px; }
/* 行宽按 px 而不是 ch：CJK 里 1 汉字 = 1em，而 1ch 只是数字 0 的宽度，
   用 ch 会把中文段落卡到列宽的一半（38ch ≈ 297px ≈ 20 汉字/行）。
   列宽 468px，取 464px ≈ 32 汉字/行，与契约的 38 字同一档。 */
.recto-copy .say {
  margin: 0; font-size: 14.5px; line-height: 1.95; color: var(--ink-2);
  max-width: 464px;
}
.recto-copy .say + .say { margin-top: 18px; }
.recto-copy .say strong { color: var(--ink); font-weight: 500; }
.recto-copy .redline {
  margin: 26px 0 0; font-size: 12.5px; line-height: 1.85;
  color: var(--red-ink); letter-spacing: .05em;
  padding-left: 14px; border-left: 1px solid var(--red);
}
.verso-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
/* 主行动：一行文字，不是按钮 */
.cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13.5px; letter-spacing: .14em; color: var(--ink);
}
.cta .label { padding-bottom: 5px; border-bottom: 1px solid var(--rule-hard); transition: border-color .3s var(--ease); }
.cta:hover .label { border-color: var(--red); color: var(--red); }
.cta .dash { display: block; width: 30px; height: 1px; background: var(--red); }

/* ---------- 内页竖排导航（桌面固定，手机隐藏） ---------- */
.rail { display: none; }

/* ---------- 关于 ---------- */
.lead {
  margin: 0; max-width: 46ch;
  font-size: clamp(21px, 2.5vw, 30px); line-height: 1.55;
  letter-spacing: .01em; font-weight: 500; color: var(--ink);
}
.lead em { font-style: normal; color: var(--ink-4); }
.body-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 56px; margin-top: 48px; max-width: 940px; }
.body-copy p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.95; }
.body-copy strong { color: var(--ink); font-weight: 500; }

/* ---------- 标签 ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; }
.tag {
  font-size: 12.5px; letter-spacing: .06em; padding: 6px 14px;
  color: var(--ink-3); border: 1px solid var(--rule);
  transition: color .28s var(--ease), border-color .28s var(--ease), background-color .28s var(--ease);
}
.tag:hover { color: var(--ink); border-color: var(--rule-hard); }
.tag.hi { color: var(--paper); background: var(--red); border-color: var(--red); }
.tag.hi:hover { color: var(--paper); opacity: .9; }

/* ---------- 四格小事：界行分开，不是卡片 ---------- */
.loves {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft);
}
.love { background: var(--paper); padding: 30px 26px; transition: background-color .35s var(--ease); }
.love:hover { background: var(--tint); }
.love .e {
  font-size: 15px; line-height: 1; margin-bottom: 16px; display: block;
  color: var(--red); font-family: var(--mono); letter-spacing: .1em;
}
.love .k { font-size: 11px; letter-spacing: .28em; color: var(--ink-4); text-transform: uppercase; margin-bottom: 10px; }
.love .t { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.love .t b { color: var(--ink); font-weight: 500; }

/* ---------- 小玩意：一行一条 ---------- */
.rows { display: grid; }
.row {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center;
  gap: 22px; padding: 26px 6px; border-top: 1px solid var(--rule-soft);
  transition: background-color .35s var(--ease), padding-left .35s var(--ease);
}
.row:last-child { border-bottom: 1px solid var(--rule-soft); }
.row:hover { background: var(--tint); padding-left: 16px; }
/* 编号与标题齐平，不随整块垂直居中 */
.row .n { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--red);
  align-self: start; padding-top: 5px; }
.row h3 { margin: 0; font-size: 16.5px; font-weight: 500; letter-spacing: .01em; }
.row p { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
/* 方块界行标记，不是圆形药丸按钮 */
.row .go {
  flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--rule-hard);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .35s var(--ease), background-color .35s var(--ease), transform .35s var(--ease);
}
.row:hover .go { border-color: var(--red); background: var(--red); color: var(--paper); transform: translate(3px, -3px); }
.row .go svg { flex: 0 0 12px; width: 12px; height: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
/* 芯片用正文字体 + 轻字距：中英混排时宽度才均匀 */
.chip {
  font-size: 11px; letter-spacing: .04em;
  padding: 3px 10px; color: var(--ink-4); border: 1px solid var(--rule-soft);
}

/* ---------- 联系 ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft);
}
.cell { background: var(--paper); padding: 30px 26px; }
.cell .k { font-size: 11px; letter-spacing: .28em; color: var(--ink-4); text-transform: uppercase; }
.cell .v {
  margin-top: 12px; font-size: 15px; color: var(--ink); letter-spacing: .02em;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.cell a:hover { color: var(--red); }
.copy {
  font: inherit; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; cursor: pointer;
  color: var(--ink-4); background: none;
  border: 1px solid var(--rule); padding: 2px 10px;
  transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.copy:hover { color: var(--ink); border-color: var(--rule-hard); }
.copy.done { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* 简历入口：页脚一枚直排页签，不是大按钮 */
.resume-tab {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  margin-top: 1px; padding: 28px 26px; border: 1px solid var(--rule-soft);
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.resume-tab:hover { background: var(--tint); border-color: var(--rule); }
.resume-tab .tx { display: block; margin: 10px 0 0; font-size: 15.5px; color: var(--ink); line-height: 1.6; }
.resume-tab .sub { display: block; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-4); line-height: 1.7; }
.resume-tab .go {
  flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--rule-hard);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .35s var(--ease), background-color .35s var(--ease), transform .35s var(--ease);
}
.resume-tab:hover .go { border-color: var(--red); background: var(--red); color: var(--paper); transform: translateX(3px); }
.resume-tab .go svg { flex: 0 0 13px; width: 13px; height: 13px; }

/* ---------- 关于一节的分节 ----------
   首页是一叠纸：卷首是第一张（宣纸，带坐标格），往后每一卷压在上一卷上。
   纸背只在每节的顶边出现一小段，向下化回纸面——是一道压痕，不是一条色带。
   只动背景与界行，不动内容结构。 */
main { position: relative; z-index: 4; background: var(--paper); }
section { padding: 104px 0; border-top: 1px solid var(--rule); scroll-margin-top: 70px; }
section:first-of-type { border-top: 0; }
main > section:nth-of-type(even) {
  background: linear-gradient(to bottom, var(--paper-1), var(--paper) 148px);
  box-shadow: inset 0 20px 22px -26px rgba(27,23,19,.55);
}

/* ---------- 桌面：竖排导航栏（入卷之后才出现） ---------- */
@media (min-width: 1121px) {
  .rail {
    display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 104px; z-index: 20;
    flex-direction: column; align-items: center; justify-content: center;
    background: var(--paper-2); border-right: 1px solid var(--rule);
    box-shadow: inset -8px 0 10px -14px rgba(27,23,19,.35);
    opacity: 0; visibility: hidden; transform: translateX(-8px);
    transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s;
  }
  .rail.on { opacity: 1; visibility: visible; transform: none; }
  .rail ul { display: flex; flex-direction: column; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }  .rail a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 12.5px; line-height: 1.9; color: var(--ink-3);
    transition: color .3s var(--ease);
  }
  .rail a .i { font-family: var(--mono); font-size: 11px; color: var(--ink-4); }
  .rail a:hover { color: var(--red-ink); }
  .rail a.here { color: var(--ink); }
  .rail a.here .i { color: var(--red-ink); }
  .rail .seal { margin-top: 22px; width: 28px; height: 28px; font-size: 12px; }

  /* 有导航栏时整册右移，导航字与栏不重叠 */
  body { padding-left: 104px; }
  .axis-line { left: 22px; right: 22px; }
  .top { padding-left: 34px; }
  .to-top { right: 24px; }
}

@media (max-width: 1120px) {
  .sidenote { display: none; }
  .spread { grid-template-columns: 1fr var(--rail) 1fr; }
  .verso { padding: 112px 48px 72px 56px; }
  .recto { padding: 112px 56px 72px 48px; }
}

@media (max-width: 980px) {
  .spread { grid-template-columns: 1fr 84px 1fr; }
  .verso { padding: 100px 36px 64px 40px; }
  .recto { padding: 100px 40px 64px 36px; }
  .body-copy { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .loves { grid-template-columns: 1fr; }
  section { padding: 76px 0; }
}

/* ---------- 手机：版心翻到顶部，两页依次单列 ---------- */
@media (max-width: 720px) {
  .spread { grid-template-columns: 1fr; min-height: 0; padding-bottom: 56px; }
  .axis {
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center;
    gap: 10px 12px;
    padding: 84px 14px 12px; border-left: 0; border-right: 0;
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 30;
    min-width: 0;
  }
  .axis .fish { margin: 0; flex: 0 0 26px; }
  .axis .fish svg { transform: rotate(-90deg); }
  .eyebrow { flex-direction: row; gap: 5px; letter-spacing: .16em; }
  .eyebrow span { display: inline; }
  .eyebrow em { display: inline; }
  .axis-nav { flex-direction: row; gap: 12px; margin-left: auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
  .axis-nav a { white-space: nowrap; font-size: 12px; }
  .axis-foot { margin: 0; flex-direction: row; gap: 9px; }
  .axis-foot .cue { white-space: nowrap; letter-spacing: .18em; }
  .axis-foot .seal { width: 24px; height: 24px; font-size: 11px; }
  .axis-line { display: none; }

  .verso { padding: 40px 20px 0; }
  .recto { padding: 40px 20px 0; }
  .verse-head { max-width: none; }
  .photo-slab, .photo-slab img { width: 100%; }
  .photo-slab picture { width: 100%; }
  .photo-slab img { height: 200px; object-position: center 30%; }
  .recto-copy .say { max-width: none; }
  .verso-foot { flex-direction: column; align-items: flex-start; gap: 18px; }
  .axis-nav a .i { display: none; }
  .row { grid-template-columns: 36px 1fr auto; gap: 14px; }
  .row .go { flex: 0 0 28px; width: 28px; height: 28px; }
  .love, .cell { padding: 26px 22px; }
  .resume-tab { padding: 26px 22px; gap: 16px; }
}

@media (max-width: 380px) {
  .axis { padding: 80px 12px 10px; gap: 8px 10px; }
  .axis-nav { gap: 10px; }
  .axis-nav a { font-size: 11.5px; }
  .axis .fish { display: none; }
  .axis-foot .cue { display: none; }
  .title-cn { letter-spacing: .04em; font-size: clamp(44px, 15vw, 60px); }
  .name-grid { grid-template-columns: 56px 1fr; }
  .name-grid dt, .name-grid dd { font-size: 12px; }
  .verso, .recto { padding-left: 16px; padding-right: 16px; }
}

/* ---------- 名字 ---------- */
.title-cn {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 6.6vw, 96px); line-height: 1.04; letter-spacing: .06em;
  color: var(--ink);
}
.title-en {
  margin: 16px 0 0; font-size: 11.5px; letter-spacing: .44em;
  color: var(--ink-3); text-transform: uppercase;
}

/* ---------- 开卷：一次自撰的动效，只在这个跨页上发生 ---------- */
.open-rule { transform-origin: left center; transform: scaleX(0); }
.open-rule.on { transform: scaleX(1); transition: transform 1.15s var(--ease); }
.open-up { opacity: 0; transform: translateY(14px); }
.open-up.on { opacity: 1; transform: none; transition: opacity .85s var(--ease), transform .85s var(--ease); }
.open-up.d1 { transition-delay: .16s; }
.open-up.d2 { transition-delay: .3s; }
.open-up.d3 { transition-delay: .46s; }
.open-up.d4 { transition-delay: .6s; }
.fish.draw path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.fish.draw.on path { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease); }
.fish.draw.on path + path { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  .open-rule, .open-up, .fish.draw path { transform: none; opacity: 1; stroke-dashoffset: 0; transition: none; }
  .rail { transition: none; }
}
