/* ============================================================
   贾红乐 · 个人网站
   Direction: 工程蓝图 × 编辑排版
   Warm paper / ink black / vermilion accent
   ============================================================ */

:root {
  --paper: #F4F1E9;
  --paper-2: #ECE8DC;
  --ink: #16130F;
  --ink-soft: #3C362D;
  --muted: #6E6659;
  --accent: #C1362B;
  --rule: rgba(22, 19, 15, .16);
  --rule-strong: rgba(22, 19, 15, .34);

  --serif: "Fraunces", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1320px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 蓝图底格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(22, 19, 15, .038) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 19, 15, .038) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 78%);
}

main, .nav, .rail, .marquee { position: relative; z-index: 1; }

/* 颗粒质感 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.012em;
  margin: 0;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

em { font-style: normal; }

.tag-mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

.tag-mono--accent { color: var(--accent); }

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ───────────────── 进度条 ───────────────── */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 90;
  background: transparent;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .12s linear;
}

/* ───────────────── 竖排导轨 ───────────────── */
.rail {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 40;
  mix-blend-mode: multiply;
}
.rail__mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  border: 1px solid var(--rule-strong);
  width: 26px; height: 26px;
  display: grid; place-items: center;
  color: var(--ink);
}
.rail__line { width: 1px; height: 90px; background: var(--rule-strong); }
.rail__text {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--muted);
}

@media (max-width: 1180px) { .rail { display: none; } }

/* ───────────────── 导航 ───────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
}
.nav__brand-cn {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .04em;
}
.nav__brand-sep { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.nav__brand-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
}

.nav__links {
  display: flex;
  gap: clamp(14px, 2.2vw, 34px);
}
.nav__links a {
  position: relative;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  padding: 4px 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: color .25s;
}
.nav__links a span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  transition: color .25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .4s var(--ease);
}
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav__links a.is-active { color: var(--accent); }
.nav__links a.is-active span { color: var(--accent); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  border: 1px solid var(--rule-strong);
  padding: 8px 14px;
  white-space: nowrap;
  transition: background .28s, color .28s, border-color .28s, transform .28s var(--ease);
}
.nav__cta:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 14px var(--pad) 0; }
  .nav__brand-en { display: none; }
  .nav__links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    border-top: 1px solid var(--rule);
    padding: 10px 0 11px;
    margin-top: 2px;
  }
  .nav__links a { font-size: 12.5px; gap: 0; }
  .nav__links a span { display: none; }
}

/* ───────────────── HERO ───────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(130px, 17vh, 190px) var(--pad) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .85;
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
.rule-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--rule-strong);
}
.status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--accent);
}
.status i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(193, 54, 43, .5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(193, 54, 43, .45); }
  70% { box-shadow: 0 0 0 8px rgba(193, 54, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(193, 54, 43, 0); }
}

.hero__head { margin-top: clamp(28px, 5vh, 56px); }

.hero__kicker {
  font-family: var(--mono);
  font-size: clamp(10.5px, 1vw, 12px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(14px, 2.4vh, 26px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hero__kicker .slash { color: var(--accent); }

.hero__title { position: relative; }
.hero__title-cn {
  display: block;
  font-size: clamp(4.2rem, 15.5vw, 13.5rem);
  line-height: .86;
  letter-spacing: -.045em;
  margin-left: -.045em;
}
.hero__title-en {
  display: block;
  margin-top: clamp(12px, 2vh, 22px);
  padding-left: .35em;
  font-family: var(--mono);
  font-size: clamp(10px, 1.15vw, 13px);
  letter-spacing: .58em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  margin-top: clamp(32px, 6vh, 62px);
  padding-top: clamp(24px, 4vh, 40px);
  border-top: 1px solid var(--rule);
}

.hero__lede {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.12vw, 16.5px);
  line-height: 1.85;
}
.hero__lede p:first-child { color: var(--ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  letter-spacing: .04em;
  padding: 13px 24px;
  border: 1px solid transparent;
  transition: background .3s, color .3s, border-color .3s, transform .35s var(--ease);
  will-change: transform;
}
.btn svg { transition: transform .35s var(--ease); }
.btn--ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--ink:hover { background: var(--accent); border-color: var(--accent); }
.btn--ink:hover svg { transform: translate(3px, -3px); }
.btn--ghost {
  padding: 13px 4px;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
}
.btn--ghost .arrow { transition: transform .35s var(--ease); display: inline-block; }
.btn--ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover .arrow { transform: translateX(5px); }

/* 档案卡 */
.dossier {
  position: relative;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  padding: 18px 20px 20px;
  backdrop-filter: blur(2px);
}
.dossier::before,
.dossier::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--accent);
  pointer-events: none;
}
.dossier::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.dossier::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.dossier__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.dossier__list { margin: 0; padding: 0; }
.dossier__list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--rule);
}
.dossier__list > div:last-child { border-bottom: 0; }
.dossier__list dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.dossier__list dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  text-align: right;
}
.dossier__note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.dossier__note .tag-mono { display: block; margin-bottom: 4px; }

.hero__foot {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 44px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.scroll-hint__line {
  display: block;
  width: 46px;
  height: 1px;
  background: var(--rule-strong);
  position: relative;
  overflow: hidden;
}
.scroll-hint__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: sweep 2.6s var(--ease) infinite;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
.scroll-hint:hover .tag-mono { color: var(--accent); }

/* 矮屏笔记本：压缩首屏，避免档案卡被切掉 */
@media (min-width: 901px) and (max-height: 940px) {
  .hero { padding-top: clamp(104px, 13vh, 132px); }
  .hero__head { margin-top: 26px; }
  .hero__title-cn { font-size: clamp(4rem, 10.5vw, 10rem); }
  .hero__grid { margin-top: 34px; padding-top: 26px; }
  .hero__lede { font-size: 15px; line-height: 1.78; }
  .hero__actions { margin-top: 20px; }
  .dossier__list > div { padding: 7px 0; }
  .dossier__note { margin-top: 10px; padding-top: 10px; }
  .hero__foot { margin-top: 26px; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__lede { max-width: none; }
  .hero__title-en { letter-spacing: .38em; }
  .hero__foot-right { display: none; }
}

/* ───────────────── 技术滚动条 ───────────────── */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  background: var(--paper-2);
  padding: 12px 0;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee__track span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.marquee__track b { color: var(--accent); font-size: 7px; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ───────────────── 通用 section ───────────────── */
.section {
  padding: clamp(76px, 12vh, 148px) var(--pad);
}
.section > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.section--alt {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section__head {
  margin-bottom: clamp(38px, 6vh, 70px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section__head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.section__index {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}
.section__index::after {
  content: "";
  width: 52px; height: 1px;
  background: var(--accent);
  opacity: .5;
}
.section__title {
  font-size: clamp(2.1rem, 5.4vw, 4.4rem);
  letter-spacing: -.03em;
  max-width: 18ch;
}
.section__title .em {
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.section__title .em::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: .02em;
  height: .06em;
  background: var(--accent);
  opacity: .28;
}
.section__sub {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.8;
}
.section__sub--right { text-align: right; max-width: 30ch; }

/* ───────────────── 关于 ───────────────── */
.about {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about__quote {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--ink);
  position: sticky;
  top: 120px;
  padding-left: 22px;
  border-left: 2px solid var(--accent);
}
.about__quote > span {
  display: block;
  font-family: var(--serif);
  color: var(--accent);
  font-size: 3.4rem;
  line-height: .4;
  margin-bottom: 18px;
  opacity: .35;
}
.about__body { color: var(--ink-soft); font-size: 15.5px; line-height: 1.95; }
.about__body p + p { margin-top: 1.2em; }

.about__stats {
  list-style: none;
  margin: 38px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.about__stats li { display: flex; flex-direction: column; gap: 4px; }
.about__stats b {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--ink);
}
.about__stats span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
}

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__quote { position: static; }
}

/* ───────────────── 技能 ───────────────── */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule);
}
.skill {
  position: relative;
  padding: 28px 26px 30px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background .4s var(--ease);
}
.skill__no {
  display: block;
  color: var(--accent);
  margin-bottom: 18px;
}
.skill h3 {
  font-size: 1.32rem;
  margin-bottom: 10px;
  letter-spacing: 0;
}
.skill p {
  font-size: 13.5px;
  line-height: 1.82;
  color: var(--muted);
  min-height: 4.9em;
}
.skill:hover { background: color-mix(in srgb, var(--paper) 85%, #fff); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
}
.chips li {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 3px 9px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  transition: border-color .3s, color .3s;
}
.skill:hover .chips li { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1000px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .skills { grid-template-columns: 1fr; }
  .skill p { min-height: 0; }
}

/* ───────────────── 时间线 ───────────────── */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}
.job {
  display: grid;
  grid-template-columns: minmax(0, .34fr) minmax(0, .66fr);
  gap: clamp(18px, 4vw, 60px);
  padding: clamp(26px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.job__when { display: flex; flex-direction: column; gap: 8px; }
.job__period {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink);
}
.job__body h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  margin-bottom: 6px;
}
.job__org {
  font-size: 13.5px;
  color: var(--accent);
  margin-bottom: 16px;
}
.job__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.job__points li {
  position: relative;
  padding-left: 18px;
}
.job__points li::before {
  content: "";
  position: absolute;
  left: 0; top: .82em;
  width: 8px; height: 1px;
  background: var(--rule-strong);
}
.job--edu .job__org { color: var(--ink-soft); }

@media (max-width: 760px) {
  .job { grid-template-columns: 1fr; gap: 14px; }
}

/* ───────────────── 项目 ───────────────── */
.works {
  display: grid;
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.work {
  --card-fg: var(--ink);
  --card-bg: var(--paper-2);
  --card-muted: var(--muted);
  --card-rule: var(--rule);
  background: var(--card-bg);
  color: var(--card-fg);
  padding: clamp(24px, 3.4vw, 46px);
  transition: background .5s var(--ease), color .5s var(--ease);
}
.work__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--card-rule);
  margin-bottom: 24px;
}
.work__no {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1;
  color: var(--accent);
}
.work__meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.work__meta .tag-mono { color: var(--card-muted); }
.work__meta .tag-mono--accent { color: var(--accent); }

.work__body {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(26px, 4vw, 60px);
  align-items: start;
}
.work h3 {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  line-height: 1.3;
  margin-bottom: 14px;
}
.work__desc {
  color: var(--card-muted);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 34ch;
  margin-bottom: 0;
}
.work__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--card-rule);
  font-size: 12px;
  color: var(--card-muted);
  letter-spacing: .01em;
}
.work__note .tag-mono { color: var(--accent); font-size: 9px; }
@media (max-width: 1080px) {
  .work__note { margin-top: 18px; }
}
.work__points {
  list-style: none;
  margin: 0;
  padding: 0 0 0 clamp(20px, 2.8vw, 42px);
  border-left: 1px solid var(--card-rule);
  display: grid;
  gap: 10px;
  font-size: 13.8px;
  line-height: 1.85;
  color: var(--card-muted);
}
.work__points b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--accent);
  margin-right: 4px;
}

@media (max-width: 1080px) {
  .work__body { grid-template-columns: 1fr; gap: 20px; }
  .work__desc { max-width: 60ch; margin-bottom: 4px; }
  .work__points { border-left: 0; padding-left: 0; }
}
.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--card-rule);
}
.work__tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--card-muted);
  border: 1px solid var(--card-rule);
  padding: 3px 9px;
}

@media (hover: hover) and (pointer: fine) {
  .work:hover {
    --card-bg: var(--ink);
    --card-fg: var(--paper);
    --card-muted: rgba(244, 241, 233, .66);
    --card-rule: rgba(244, 241, 233, .2);
  }
  .work:hover .work__points b,
  .work:hover .work__meta .tag-mono--accent { color: #E8776B; }
  .work:hover .work__no { color: #E8776B; }
}

/* 其他项目 */
.others { margin-top: clamp(48px, 7vh, 84px); }
.others__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-strong);
}
.others__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.other {
  padding: 26px 26px 28px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background .4s;
}
.other:nth-child(2n) { padding-left: 26px; border-left: 1px solid var(--rule); }
.other__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.other h4 {
  font-size: 1.1rem;
  letter-spacing: 0;
  line-height: 1.4;
}
.other p {
  font-size: 13.2px;
  line-height: 1.85;
  color: var(--muted);
}
.other__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.other__tags span { position: relative; }
.other__tags span + span::before {
  content: "/";
  position: absolute;
  left: -8px;
  color: var(--rule-strong);
}

@media (max-width: 760px) {
  .others__list { grid-template-columns: 1fr; }
  .other:nth-child(2n) { padding-left: 0; border-left: 0; }
}

/* ───────────────── 联系 ───────────────── */
.contact {
  background: var(--ink);
  color: var(--paper);
  border-top: 0;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(244, 241, 233, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 233, .05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 72%);
  pointer-events: none;
}
.contact > * { position: relative; }
.contact .section__index { color: #E8776B; }
.contact .section__index::after { background: #E8776B; }
.contact .tag-mono { color: rgba(244, 241, 233, .5); }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: end;
}
.contact__title {
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  margin: 20px 0 22px;
}
.contact__title .em { color: #E8776B; }
.contact__lede {
  color: rgba(244, 241, 233, .6);
  font-size: 15px;
  line-height: 1.9;
  max-width: 42ch;
}

.contact__rows { border-top: 1px solid rgba(244, 241, 233, .2); }
.crow {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(244, 241, 233, .14);
  padding: 6px 0;
}
.crow .tag-mono { padding: 10px 0; }
.crow__value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  background: none;
  border: 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(12.5px, 1.15vw, 14.5px);
  letter-spacing: .02em;
  text-align: left;
  padding: 12px 4px;
  cursor: pointer;
  transition: color .3s, padding-left .35s var(--ease);
}
.crow__value:hover { color: #E8776B; padding-left: 10px; }
.crow__value--static { cursor: default; }
.crow__value--static:hover { color: var(--paper); padding-left: 4px; }
.crow__hint {
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244, 241, 233, .4);
  border: 1px solid rgba(244, 241, 233, .2);
  padding: 2px 7px;
  flex-shrink: 0;
  transition: color .3s, border-color .3s;
}
.crow__value:hover .crow__hint { color: #E8776B; border-color: #E8776B; }

.contact__download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 18px 22px;
  border: 1px solid rgba(244, 241, 233, .28);
  transition: background .35s, border-color .35s, color .35s;
}
.contact__download-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.contact__download-icon {
  font-family: var(--mono);
  font-size: 18px;
  transition: transform .4s var(--ease);
}
.contact__download:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.contact__download:hover .tag-mono { color: var(--muted); }
.contact__download:hover .contact__download-icon { transform: translateY(4px); }

.footer {
  margin-top: clamp(56px, 9vh, 110px);
  padding-top: 22px;
  border-top: 1px solid rgba(244, 241, 233, .16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: rgba(244, 241, 233, .45);
  text-transform: uppercase;
}
.footer__mid { color: rgba(244, 241, 233, .3); }
.footer a { transition: color .3s; }
.footer a:hover { color: #E8776B; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; align-items: start; }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer__mid { display: none; }
}

/* ───────────────── Toast ───────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 22px);
  z-index: 150;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  padding: 11px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ───────────────── 进场动画 ───────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .9s var(--ease) var(--d, 0s),
    transform .9s var(--ease) var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* 打印：给面试官一份干净版本 */
@media print {
  .grain, .progress, .rail, .nav, .marquee, .hero__canvas, .toast, .scroll-hint { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .hero { min-height: auto; padding: 0; }
  .section { padding: 24px 0; page-break-inside: avoid; }
  .contact { background: #fff; color: #000; }
  .work, .skill { border: 1px solid #ddd; }
  .reveal { opacity: 1; transform: none; }
}
