/* ==========================================================================
   home.css — 主页（脉络版）
   设计依据见 DESIGN.md：
     底 = 编辑网格（严格栏栅、大留白、衬线标题、等宽元数据、细线分隔）
     记忆点 = 脉络线（一条有语义的线，不需要图例）
     差异化 = 中文衬线大字 + 英文等宽小字并置
   ========================================================================== */
:root {
  --paper: #fbfaf7;
  --paper-2: #f4f2ec;
  --ink: #14161a;
  --ink2: #565d66;
  --ink3: #8d939a;
  --rule: #e3dfd5;
  --rule-2: #cdc7ba;
  --accent: #0f766e;
  --accent-soft: #e9f4f2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC",
    "Noto Serif SC", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;
  --wrap: 1020px;
  --nav-h: 56px;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 600; letter-spacing: -0.012em; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 44px); }
.mono { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); }
.tag { font-family: var(--mono); font-size: 0.6rem; color: var(--ink3); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 6px; }

/* ---------- 顶栏（四个页面一致） ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner { display: flex; align-items: center; gap: 18px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand__mark {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 0.82rem; font-weight: 700;
  color: var(--paper); background: var(--accent);
}
.brand__name { font-weight: 600; letter-spacing: -0.01em; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 6px 12px; border-radius: 999px; font-size: 0.9rem; color: var(--ink2);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.is-active { color: var(--ink); font-weight: 500; background: var(--paper-2); }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--ink2);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--ink3); background: #fff; }

/* ---------- 首屏 ---------- */
.hero { padding: clamp(46px, 7vw, 86px) 0 clamp(30px, 4vw, 44px); border-bottom: 3px double var(--ink); }
.kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.hero__name {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 14px 0 22px;
}
/* 中文衬线大字 + 英文等宽小字：这一对是全站的视觉签名 */
.hero__mainline {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  max-width: none;
  white-space: nowrap;
}
.hero__mainline-en {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink3);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 44px);
}
.hero__intro { max-width: 52ch; color: var(--ink2); font-size: 1.04rem; }
.hero__side { display: grid; gap: 16px; justify-items: start; }
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 7px 14px;
}
.hero__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; height: 42px; padding: 0 18px;
  border: 1px solid var(--rule-2); border-radius: 999px; font-size: 0.9rem;
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink3); box-shadow: 0 12px 26px -18px rgba(20, 22, 26, 0.5); }
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { border-color: var(--ink); }

/* ---------- 当前阶段：把“正在成为谁”放在时间线之前 ---------- */
.current {
  display: grid;
  grid-template-columns: 126px minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: start;
  padding: 25px 0 27px;
  border-bottom: 1px solid var(--rule);
}
.current__label { display: grid; gap: 8px; }
.current__label .mono { color: var(--accent); }
.current__label h2 { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.current__phase { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.35; }
.current__note { margin-top: 6px; color: var(--ink3); font-size: 0.84rem; }
.current__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.current__facts div { display: grid; gap: 5px; }
.current__facts dt { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; color: var(--ink3); text-transform: uppercase; }
.current__facts dd { margin: 0; color: var(--ink2); font-size: 0.84rem; line-height: 1.6; }

/* ---------- 区块通用 ---------- */
.section { padding: clamp(38px, 5vw, 58px) 0; border-bottom: 1px solid var(--rule); }
.section__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: clamp(24px, 3vw, 34px); flex-wrap: wrap; }
.section__index { color: var(--accent); }
.section__title { font-family: var(--serif); font-size: clamp(1.35rem, 3vw, 1.72rem); }
.section__note { margin-left: auto; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); }
.section__link { margin-top: 22px; }
.section__link a { font-size: 0.92rem; color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); padding-bottom: 1px; }
.section__link a:hover { border-bottom-color: var(--accent); }

/* ---------- 三条线（全站唯一的「形式创新」） ---------- */
.tracks { display: grid; gap: 26px; }
.track {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(0, 250px);
  gap: 18px;
  align-items: center;
}
.track__label { display: grid; gap: 3px; }
.track__name { font-family: var(--serif); font-size: 1.06rem; }
.track__span { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.06em; color: var(--ink3); }

.track__rail-wrap { position: relative; height: 44px; }
.track__rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--rule);
}
/* 只画这条线真正占用的那一段，长度对比本身就是信息 */
.track__rail-fill {
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--k);
  opacity: 0.55;
}
.node {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 0;
  padding: 0;
  background: none;
  color: var(--k);
  cursor: pointer;
}
.node__dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--k);
  box-shadow: 0 0 0 3px var(--paper);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.node:hover .node__dot,
.node:focus-visible .node__dot { transform: scale(1.5); }
.node__tip {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px -20px rgba(20, 22, 26, 0.6);
  font-size: 0.78rem;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.node__tip b { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--ink3); font-weight: 400; margin-right: 7px; }
.node:hover .node__tip,
.node:focus-visible .node__tip { opacity: 1; transform: translateX(-50%) translateY(-3px); }
.track__summary { font-size: 0.84rem; color: var(--ink3); line-height: 1.6; }

.axis { position: relative; height: 18px; margin: 6px 0 0 122px; border-top: 1px solid var(--rule); }
.axis span {
  position: absolute;
  top: 5px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--ink3);
}
.axis span:first-child { transform: none; }
.axis span:last-child { transform: translateX(-100%); }
.axis__caption {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 0 122px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3);
}
.axis__caption span:last-child { color: var(--accent); }

/* ---------- 最近记录（编辑式列表，不是卡片） ---------- */
.recents { display: grid; border-top: 1px solid var(--rule); }
.recent {
  display: grid;
  grid-template-columns: 76px 54px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.recent__date { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink3); padding-top: 3px; }
.recent__track {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--k);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 0;
  text-align: center;
  height: 20px;
  line-height: 18px;
  justify-self: start;
  min-width: 46px;
}
.recent__title { font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.recent__text { margin-top: 5px; color: var(--ink2); font-size: 0.92rem; max-width: 66ch; }
.recent__insight { margin-top: 7px; padding-left: 12px; border-left: 1px solid var(--rule-2); color: var(--ink3); font-size: 0.86rem; max-width: 66ch; }
.recent__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.empty { color: var(--ink3); font-size: 0.94rem; padding: 20px 0; }

/* ---------- 项目（复用 site.js 生成的结构） ---------- */
.projs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.proj { border-top: 2px solid var(--ink); padding-top: 14px; }
.proj__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proj__role { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.proj__period { font-family: var(--mono); font-size: 0.64rem; color: var(--ink3); }
.proj__title { font-family: var(--serif); font-size: 1.16rem; margin: 9px 0 7px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.proj__summary { color: var(--ink2); font-size: 0.92rem; }
.proj__metrics { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.mtr__v { font-family: var(--serif); font-size: 1.42rem; line-height: 1; color: var(--accent); }
.mtr__k { font-size: 0.72rem; color: var(--ink3); margin-top: 4px; }
.proj__insight { margin-top: 14px; padding: 11px 14px; background: var(--accent-soft); border-left: 2px solid var(--accent); font-size: 0.9rem; }
.proj__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.proj__links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.proj__link { font-size: 0.88rem; color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.proj__link:hover { border-bottom-color: var(--accent); }

/* ---------- 结尾 ---------- */
.outro {
  margin: clamp(38px, 5vw, 58px) 0 0;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--rule-2);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.outro__title { font-family: var(--serif); font-size: 1.34rem; }
.outro__text { color: var(--ink2); font-size: 0.94rem; margin-top: 8px; max-width: 52ch; }
.outro__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */
.footer { margin-top: 34px; padding: 24px 0 52px; border-top: 1px solid var(--rule); }
.footer__inner { display: flex; justify-content: space-between; gap: 12px 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__links a:hover { color: var(--accent); }

/* ---------- 滚动入场 ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero__mainline { white-space: normal; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .current { grid-template-columns: 100px minmax(0, 1fr); }
  .current__facts { grid-column: 2; }
  .track { grid-template-columns: 84px minmax(0, 1fr); }
  .track__summary { grid-column: 2; }
  .axis, .axis__caption { margin-left: 102px; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .section__note { display: none; }
  .recent { grid-template-columns: 62px minmax(0, 1fr); }
  .current { grid-template-columns: 1fr; gap: 16px; }
  .current__facts { grid-column: auto; }
  .recent__track { grid-column: 2; grid-row: 1; }
  .recent__body { grid-column: 2; }
  .axis, .axis__caption { margin-left: 0; }
  .track { grid-template-columns: minmax(0, 1fr); }
  .track__label { display: flex; align-items: baseline; gap: 10px; }
  .track__summary { grid-column: 1; }
  .footer__inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 打印 ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  html, body { background: #fff; color: #000; font-size: 10.5pt; }
  .topbar, .outro, .footer, .section__link { display: none !important; }
  .section, .recent, .proj { break-inside: avoid; page-break-inside: avoid; }
  .node__tip { display: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
