@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2?v=c9407645") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-italic.woff2?v=6ee678c3") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --blue: #ffffff;
  --acid: #e5e5e5;
  --coral: #f4f4f4;
  --paper: #ffffff;
  --white: #fff;
  --black: #090909;
  --grey: #747474;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Instrument Serif", "Songti SC", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --gutter: clamp(1rem, 2vw, 2rem);
  --rule: 1px solid currentColor;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--black);
}

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

body.viewer-open {
  overflow: hidden;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  font: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: 1rem;
  padding: 0.7rem 1rem;
  background: var(--acid);
  color: var(--black);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.serif,
em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
}

.section-code,
.hero-eyebrow,
.head-status,
.site-nav,
.local-time,
.section-banner > span,
.group-index,
.project-number,
.project-caption > span,
.contact-top,
.footer-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/*
 * 顶栏，参照 Obys DES 顶栏（1440 宽实测）：高 50px，左侧标志；
 * 布局：左字标、中间 ● OPEN FOR WORK、右侧 [ 简介 ] 方括号导航与本地时间，全部等宽大写小字。
 * 底部一条细线；滚动时常驻顶部、不透明，不隐藏也不反色。
 */
.site-head {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.125rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0 var(--gutter);
  color: var(--black);
  background: var(--paper);
  border-bottom: 1px solid var(--black);
}

/* 顶栏常驻：锚点跳转的落点让出顶栏高度，标题不被盖住 */
section[id],
.group-head h3[id] {
  scroll-margin-top: 3.125rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  width: max-content;
}

.wordmark span {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.wordmark small {
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.12em;
}

.head-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0.2; }
}

.site-nav {
  display: flex;
  gap: 0.45rem;
}

.site-nav a,
.contact-bottom a,
.contact-wechat-id,
.footer-meta button {
  transition: opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.contact-bottom a:hover,
.contact-bottom a:focus-visible,
.contact-wechat-id:hover,
.contact-wechat-id:focus-visible,
.footer-meta button:hover,
.footer-meta button:focus-visible {
  opacity: 0.55;
}

.local-time {
  min-width: 5.8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5.25rem var(--gutter) var(--gutter);
  background: var(--blue);
  color: var(--black);
  overflow: hidden;
}

.hero-eyebrow {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: var(--rule);
  color: var(--white);
}

.hero-title {
  margin: auto 0;
  padding-block: clamp(2rem, 4vw, 4rem);
  font-size: clamp(3.4rem, 10.5vw, 10rem);
  font-weight: 760;
  line-height: 0.8;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.hero-line {
  display: flex;
  align-items: baseline;
  width: 100%;
  white-space: nowrap;
}

.hero-title .serif {
  font-size: 1.08em;
  letter-spacing: -0.04em;
  text-transform: none;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) 1fr auto;
  align-items: end;
  gap: 2rem;
  padding-top: 1rem;
  border-top: var(--rule);
  color: var(--white);
}

.hero-foot p {
  grid-column: 2;
  max-width: 44rem;
  margin: 0;
  font-size: clamp(0.85rem, 1.3vw, 1.15rem);
}

.round-link {
  grid-column: 3;
  width: clamp(6rem, 9vw, 8rem);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: var(--rule);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.58rem;
  transition: background 0.25s ease, color 0.25s ease, transform 0.35s ease;
}

.round-link b {
  font-size: 1.4rem;
  font-weight: 400;
}

.round-link:hover,
.round-link:focus-visible {
  background: var(--acid);
  color: var(--black);
  transform: rotate(-8deg);
}

/* work */
.work {
  background: var(--paper);
}

.section-banner {
  min-height: clamp(19rem, 47vw, 45rem);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: start;
  padding: var(--gutter);
  background: var(--black);
  color: var(--white);
  border-bottom: var(--rule);
}

.section-banner h2 {
  grid-column: 1 / -1;
  align-self: end;
  margin: 0;
  font-size: clamp(4.25rem, 15.6vw, 15rem);
  line-height: 0.74;
  letter-spacing: -0.085em;
  font-weight: 760;
  white-space: nowrap;
}

.section-banner em {
  color: var(--acid);
}

.section-banner > span:last-child {
  text-align: right;
}

.work-group {
  border-bottom: 0.12rem solid var(--black);
}

/*
 * 类目标题，参照 Obys DES 课程区的标题行（实测：12 栏网格、底边对齐）：
 * 左 3 栏小字信息「序号 / 总数 / 作品数」；中 6 栏描边圆角英文标签叠在中文标题上；
 * 右 3 栏简介。标题克制在 2.5rem 常规偏中字重，整行下方一条细线接作品图。
 */
.group-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  column-gap: 1.25rem;
  margin: 0 var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 1.25rem;
  border-bottom: var(--rule);
}

.group-index {
  grid-column: 1 / 4;
  margin: 0;
}

.group-title {
  grid-column: 4 / 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}

.group-tag {
  padding: 0.2rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.group-head h3 {
  margin: 0;
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.group-summary {
  grid-column: 10 / 13;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #555;
}

.work-group-2 .group-head {
  background: var(--acid);
}

.work-group-3 .group-head {
  background: var(--coral);
}

.work-group-4 .group-head {
  background: var(--blue);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--gutter);
  padding: 0 var(--gutter) clamp(2.5rem, 5vw, 5rem);
}

.project-card {
  grid-column: auto;
  min-width: 0;
}

/* 分组内只有一个案例时，双列网格会留下半边空白。
   让它横跨整行——LOGO 合集本身是 16:9 横图，铺满反而能把标志放大到可读。 */
.work-group[data-count="1"] .project-card {
  grid-column: 1 / -1;
}

.project-hit {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.project-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d5d2ca;
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--acid);
  pointer-events: none;
  transition: border-width 0.25s ease;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.project-hit:hover .project-media img,
.project-hit:focus-visible .project-media img {
  transform: scale(1.025);
}

.project-hit:hover .project-media::after,
.project-hit:focus-visible .project-media::after {
  border-width: 0.45rem;
}

.project-hit:focus-visible {
  outline: 0.2rem solid var(--blue);
  outline-offset: 0.3rem;
}

.project-caption {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: var(--rule);
}

.project-caption strong {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.15;
}

.project-caption > span:not(.project-number) {
  color: var(--grey);
}

.project-action {
  text-align: right;
}

/* profile */
.profile {
  padding: clamp(5rem, 10vw, 10rem) var(--gutter);
  background: var(--blue);
}

.profile-intro {
  margin-bottom: clamp(5rem, 12vw, 12rem);
}

.section-code {
  margin: 0 0 2rem;
}

.profile-intro h2 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(3rem, 8.4vw, 8.2rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.profile-intro .serif {
  color: var(--acid);
  white-space: nowrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 3rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
}

.profile-aside {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

/* 姓名/地点/经验移到右栏顶部，横排成一条元信息带，
   与下方 01/02/03 正文同起一条基线 */
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 0 0 2rem;
  padding-bottom: 0.9rem;
  list-style: none;
  border-bottom: var(--rule);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.profile-copy p {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  max-width: 54rem;
  margin: 0 0 2.4rem;
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  line-height: 1.5;
}

/* 只作用于序号 01/02/03。
   原来写的是 .profile-copy p span，把正文那个 span 也选中了，
   特异性还高于 .intro-text，正文一直被压成 0.62rem 的等宽小字——
   改 p 的 font-size 完全不起作用，因为文字并不在 p 上渲染。 */
.profile-copy p > span:first-child {
  padding-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* automation */
.automation {
  display: grid;
  grid-template-columns: minmax(20rem, 0.85fr) minmax(0, 1.6fr);
  gap: clamp(3rem, 7vw, 7rem);
  padding: clamp(5rem, 10vw, 10rem) var(--gutter);
  background: var(--acid);
}

.automation-head {
  position: sticky;
  top: 5rem;
  align-self: start;
}

.automation-head h2 {
  margin: 0 0 2rem;
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.07em;
}

.automation-head h2 em {
  color: var(--blue);
}

.automation-head > p:last-child {
  max-width: 30rem;
  margin: 0;
}

.auto-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule);
}

.auto-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(7rem, 0.7fr) minmax(0, 1.7fr) auto;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: var(--rule);
}

.auto-item > span {
  font-family: var(--mono);
  font-size: 0.65rem;
}

.auto-item > span:last-child {
  font-size: 1.2rem;
}

.auto-item h3,
.auto-item p {
  margin: 0;
}

.auto-item h3 {
  font-size: 1.05rem;
}

.auto-item p {
  font-size: 0.9rem;
}

/* experience */
.resume {
  padding: clamp(5rem, 10vw, 10rem) var(--gutter);
  background: var(--paper);
}

.resume-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.resume-head .section-code {
  grid-column: 1 / -1;
}

.resume-head h2 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.8;
  letter-spacing: -0.075em;
}

.resume-head > span:last-child {
  font-family: var(--mono);
  font-size: 0.65rem;
}

.exp-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule);
}

.exp-item {
  display: grid;
  grid-template-columns: 3rem minmax(7rem, 0.55fr) minmax(0, 2fr);
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  border-bottom: var(--rule);
}

.exp-count,
.exp-date,
.exp-main > span {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.exp-count,
.exp-date,
.exp-main h3,
.exp-main p {
  margin: 0;
}

.exp-main {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: 0.5rem 1.5rem;
}

.exp-main h3 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.exp-main > span {
  color: var(--blue);
  text-align: right;
}

.exp-main p {
  grid-column: 1 / -1;
  max-width: 60rem;
  color: #4f4d48;
}

/* credentials */
.credentials {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
}

.skills-panel,
.awards-panel {
  padding: clamp(4rem, 7vw, 7rem) var(--gutter);
}

.skills-panel {
  background: var(--black);
  color: var(--white);
}

.awards-panel {
  background: var(--coral);
  color: var(--black);
}

.skills-panel > h2,
.awards-panel > h2 {
  margin: 0 0 clamp(3rem, 6vw, 6rem);
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.skills-panel > h2 em {
  color: var(--acid);
}

.skill-group {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: var(--rule);
}

.skill-group:last-child {
  border-bottom: var(--rule);
}

.skill-group h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.skill-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.skill-group div span {
  font-size: 0.9rem;
}

.award-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule);
}

.award-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: var(--rule);
}

.award-list li span {
  font-family: var(--mono);
  font-size: 0.62rem;
}

.award-list li p {
  margin: 0;
}

.edu {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 1rem;
  align-items: start;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: var(--rule);
}

.edu > span {
  font-family: var(--mono);
  font-size: 0.62rem;
}

.edu strong,
.edu p {
  display: block;
  margin: 0;
}

/* contact + footer */
.contact {
  min-height: 85svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--gutter);
  background: var(--blue);
}

.contact-top,
.contact-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-top: var(--rule);
}

.contact-top {
  color: var(--white);
}

.contact-bottom {
  color: var(--acid);
}

.contact h2 {
  margin: clamp(5rem, 12vw, 12rem) 0;
  font-size: clamp(3.7rem, 10.5vw, 10rem);
  line-height: 0.78;
  letter-spacing: -0.08em;
}

.contact h2 em {
  color: var(--acid);
  white-space: nowrap;
}

.contact-bottom {
  align-items: end;
  font-size: clamp(1rem, 2vw, 1.8rem);
  font-weight: 600;
}

.footer {
  padding: 4rem var(--gutter) 1.5rem;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  /* 让 .footer-name 按页脚内容宽度（不含左右边距）算字号 */
  container-type: inline-size;
  /* 联系区与页脚交界落在小数像素上，两块黑底抗锯齿会透出白色 body，形成一条灰线；往上盖 1px 黑边遮住 */
  box-shadow: 0 -1px 0 var(--black);
}

.footer-name {
  /* 字距不能再压：-0.095em 时 LI、HA、AI、PA、AN 五对字母笔画重叠，L 和 I 糊成「U」形。
     实测 Inter 800 下 -0.02em 相邻字母最小留白 0.035em（最紧处 PA），手机上也不粘连。
     铺满整行：实测 LIUHAIPANG 从 L 左边笔画到 G 右边笔画宽 5.9554em，L 左侧自带 0.0567em 空白；
     字号 = 内容宽 ÷ 5.9554，再往左收回 0.0567em，墨迹正好左右贴边。
     旧浏览器不认 cqi 时整条忽略，退回上一行的 clamp。 */
  font-size: clamp(3.5rem, 14.2vw, 13.75rem);
  font-size: calc(100cqi / 5.9554);
  margin-left: -0.0567em;
  font-weight: 800;
  line-height: 0.72;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--acid);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: var(--rule);
}

.footer-meta button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* project viewer */
.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--black);
  overflow: hidden;
}

.viewer::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.viewer[open] { display: block; }
.viewer-content { display: grid; grid-template-columns: 35% 65%; height: 100%; }
.viewer-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-height: 0;
  overflow-y: auto;
  padding: 6rem 2rem 2rem;
  border-right: var(--rule);
  background: #fff;
}
.viewer-description h3 {
  margin: 1rem 0 2rem;
  font-size: clamp(2rem, 3.5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.viewer-description > span, .viewer-hint { font-family: var(--mono); font-size: .7rem; }
.viewer-description p { font-size: clamp(.95rem, 1.2vw, 1.15rem); line-height: 1.9; }
.viewer-description dl { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; border-top: var(--rule); padding-top: 1.5rem; margin-top: 2rem; font-size: .8rem; }
.viewer-description dt, .viewer-hint span { color: #666; }
.viewer-description dd { margin: 0; }
.viewer-hint { line-height: 2; }

.viewer-close {
  position: absolute;
  top: 1rem;
  left: 2rem;
  z-index: 3;
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.68rem;
  cursor: pointer;
}

.viewer-stage {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  background: #f2f2f2;
}

.viewer-stage img,
.viewer-stage video {
  display: block;
  width: 100%;
  height: auto;
}
.viewer-stage video { max-height: 90dvh; background: var(--black); }
.viewer-stage:focus-visible { outline: 2px solid var(--black); outline-offset: -3px; }
.viewer-stage p { padding: 1rem; }
@media (max-width: 768px) {
  .viewer[open] { display: block; overflow: hidden; }
  .viewer-content { display: block; overflow-y: auto; }
  .viewer-info { overflow: visible; padding: 5rem 1.25rem 1.25rem; border-right: 0; border-bottom: var(--rule); gap: 1.5rem; }
  .viewer-close { position: absolute; top: 1rem; left: auto; right: 1rem; background: #fff; border: 1px solid var(--black); padding: .5rem .75rem; z-index: 3; }
  .viewer-description h3 { margin: .75rem 0 1rem; }
  .viewer-hint { margin: 0; }
  .viewer-stage { overflow: visible; }
}

.viewer-stage p {
  font-family: var(--mono);
  font-size: 0.65rem;
}

/* Monochrome editorial layout and interaction */
/* 首屏紧贴顶栏：顶栏自带底线，眉标不再画上边线，上方只留顶栏高度 */
.hero { min-height: 0; padding-top: 3.125rem; }
.hero-eyebrow { padding-top: 1rem; border-top: 0; }
.hero-eyebrow, .hero-foot, .contact-top { color: var(--black); }
.hero-title { margin: 3rem 0; padding: 0; font-size: clamp(2.6rem, 6.5vw, 8rem); line-height: 1.12; letter-spacing: -.055em; text-transform: none; }
.hero-line { gap: .3em; justify-content: space-between; }
.hero-title .serif { letter-spacing: -.055em; }
/* 首屏底栏：简介和圆形入口垂直居中，细线下方不再因为圆比文字高而空出一条 */
.hero-foot { padding-top: .75rem; padding-bottom: 1.25rem; grid-template-columns: 1fr auto; align-items: center; }
.hero-foot p { grid-column: 1; max-width: 38rem; }
/* 圆形入口缩小；英文和箭头作为一组在圆心居中 */
.round-link { grid-column: 2; width: 4.25rem; gap: .2rem; }
.round-link span { display: block; font-size: .52rem; line-height: 1; text-align: center; }
.round-link b { font-size: 1rem; line-height: 1; }
.section-banner { min-height: 0; padding-block: 1.25rem; grid-template-columns: 1fr auto auto; grid-template-rows: auto; align-items: center; gap: 2rem; background: #fff; color: var(--black); border-top: 1px solid var(--black); }
.section-banner h2 { grid-column: auto; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; align-self: center; }
.section-banner em { color: #777; }
.work-group-2 .group-head, .work-group-3 .group-head, .work-group-4 .group-head { background: #fff; }
.project-grid { gap: 3rem 2rem; }
.work-nav { display: flex; flex-wrap: wrap; gap: .75rem 2rem; padding: 1.5rem var(--gutter); border-bottom: var(--rule); }
.work-nav a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.work-nav a:hover, .work-nav a:focus-visible { border-color: currentColor; }
.project-caption { grid-template-columns: 2rem 1fr auto; }
.project-caption > span:nth-child(3) { display: none; }
.project-media::after { display: none; }
.project-media img { transition: transform 1s cubic-bezier(.2,.7,.2,1), filter .7s; }
.project-hit:hover .project-media img, .project-hit:focus-visible .project-media img { transform: scale(1.065); }
.project-caption strong { transition: transform .4s; }
.project-hit:hover .project-caption strong { transform: translateX(.5rem); }
.project-action { transition: transform .4s; }
.project-hit:hover .project-action { transform: translate(3px,-3px); }
.profile-intro .serif, .automation-head h2 em, .exp-main > span { color: #777; }
.profile-intro h2 { font-size: clamp(2.4rem,6vw,6rem); line-height: 1.16; max-width: none; }
.profile-intro { margin-bottom: 4rem; }
.automation { background: #f3f3f3; }
.automation-head h2 { line-height: 1.15; font-size: clamp(2.5rem,4.5vw,4.5rem); }
.auto-item { transition: padding .35s, background .35s; }
.auto-item:hover { padding-left: 1rem; padding-right: 1rem; background: #e6e6e6; }
.awards-panel { background: #f3f3f3; }
.contact { background: var(--black); color: white; min-height: 65svh; }
.contact-top, .contact-bottom { color: #fff; }
.contact h2 { font-size: clamp(2.5rem,7vw,7rem); line-height: 1.13; margin-block: 5rem; }
.contact h2 em { color: #aaa; }
.viewer[open] { animation: viewer-enter .5s cubic-bezier(.2,.7,.2,1); }
@keyframes viewer-enter { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
.media-label { position: absolute; right: 1rem; bottom: 1rem; padding: .65rem .9rem; background: #fff; color: var(--black); font-size: .75rem; border: 1px solid var(--black); pointer-events: none; transform: translateY(8px); opacity: 0; transition: opacity .25s, transform .25s; }
.project-hit:hover .media-label, .project-hit:focus-visible .media-label { opacity: 1; transform: none; }
.project-media-video { background: #ededed; }
.project-media-video img { object-fit: contain; }
.project-hit:hover .project-media-video img, .project-hit:focus-visible .project-media-video img { transform: none; }
.project-media-video .media-label { opacity: 1; transform: none; }
.portrait { position: relative; margin: 0 0 1.5rem; max-width: 320px; padding: 12px; border: 1px solid currentColor; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { padding-top: 12px; font-size: .6rem; letter-spacing: .1em; }
.portrait::before { content: '+'; position: absolute; top: -14px; right: -7px; font-size: 24px; background: white; }
.contact-invitation { max-width: 44rem; margin: -2rem 0 3rem; font-size: clamp(1rem, 1.4vw, 1.25rem); color: #ccc; }
@media (hover: none) { .media-label { opacity: 1; transform: none; } }
@media(max-width: 640px) {
  .hero { min-height: 0; }
  .hero-title { font-size: 9vw; line-height: 1.2; margin-block: 2rem; }
  .hero-line { flex-wrap: wrap; }
  .hero-foot { display: flex; align-items: center; gap: 1rem; }
  .hero-foot p { font-size: .8rem; }
  .round-link { min-width: 4rem; width: 4rem; }
  .section-banner { display: flex; flex-wrap: wrap; gap: 1rem; }
  .section-banner h2 { font-size: 2.5rem; }
  .section-banner > span:last-child { margin-left: auto; }
  .project-grid { gap: 2rem; }
}

@media(max-width: 900px) and (min-width: 641px) {
  .project-caption { grid-template-columns: 1.5rem 1fr; }
  .project-action { display: none; }
}

/* motion */
/* 同理：没有 JS 就没有人来加 .is-in，隐藏状态会永久留下 */
.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
}

.js-failed .reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/*
 * 作品按类目吸顶压缩（参照 Obys DES 课程区：容器 sticky，top 取负值，先滚完再停）：
 * 每个类目整块往上滚，底边碰到屏幕底边时停住，下一个类目从下面整块盖上来；
 * 被盖住的类目随进度缩小 10%、压暗到一半。
 * --stick-top：比屏幕高的类目取 屏幕高 − 类目高，先滚完再停；--stick-origin：缩放以屏幕顶边为基准；
 * --press：被盖住的进度 0→1。三个值都由 script.js 的 initStickyCovers 写入。
 */
@media (prefers-reduced-motion: no-preference) {
  .js .work-group {
    position: sticky;
    top: var(--stick-top, 0px);
    background: var(--paper);
  }

  /* 只缩内容、不缩底色：两侧不会露出白边，压暗层也照样铺满整宽 */
  .js .work-group-inner {
    transform-origin: 50% var(--stick-origin, 0px);
    transform: scale(calc(1 - var(--press, 0) * 0.1));
  }

  .js .work-group::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    opacity: calc(var(--press, 0) * 0.5);
    pointer-events: none;
  }

  /* 量类目原本的排版位置时临时取消吸顶和缩放 */
  .is-measuring-covers .work-group {
    position: static !important;
    transform: none !important;
  }
}

/* 整张展示的封面（海报合集是 4×4 拼版，裁成横图会切掉一半）：完整放进框里，留白与拼版底色一致 */
.project-media-contain {
  background: #fff;
}

.project-media-contain img {
  object-fit: contain;
}

@media (max-width: 900px) {
  .site-head {
    grid-template-columns: 1fr auto auto;
  }

  .head-status {
    display: none;
  }

  .hero-title {
    font-size: clamp(3rem, 11.2vw, 6.2rem);
  }

  .hero-foot {
    grid-template-columns: 1fr auto;
  }

  .hero-foot p {
    grid-column: 1;
  }

  .round-link {
    grid-column: 2;
  }

  /* 平板起信息、标题、简介上下排，简介限宽 */
  .group-head {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }

  .group-index,
  .group-title,
  .group-summary {
    grid-column: 1;
  }

  .group-summary {
    max-width: 34rem;
  }

  .automation {
    grid-template-columns: 1fr;
  }

  .automation-head {
    position: static;
  }

  .credentials {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 0.9rem;
  }

  .site-head {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .wordmark small {
    display: none;
  }

  .hero {
    min-height: 92svh;
    padding-top: 3.125rem;
  }

  .hero-eyebrow {
    gap: 1rem;
  }

  .hero-eyebrow span:last-child {
    text-align: right;
  }

  .hero-title {
    font-size: clamp(2.8rem, 14.2vw, 5rem);
    line-height: 0.88;
    letter-spacing: -0.07em;
  }

  .hero-foot {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-foot p {
    grid-column: 1;
  }

  .round-link {
    grid-column: 1;
    justify-self: end;
    width: 4.25rem;
  }

  .section-banner {
    min-height: 18rem;
  }

  .section-banner h2 {
    font-size: clamp(3.7rem, 19vw, 6.3rem);
    line-height: 0.8;
    white-space: normal;
  }

  .group-head h3 {
    font-size: 1.75rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 5rem;
  }

  .project-card,
  .project-card:nth-child(n),
  .project-grid .project-card:only-child,
  .project-grid .project-card:last-child:nth-child(3) {
    grid-column: 1;
    margin-top: 0;
  }

  .project-caption {
    grid-template-columns: 2rem 1fr auto;
  }

  .project-caption > span:nth-child(3),
  .project-action {
    display: none;
  }

  .profile-intro {
    margin-bottom: 5rem;
  }

  .profile-intro h2 {
    font-size: 3.25rem;
  }

  .profile-intro .serif,
  .contact h2 em {
    white-space: normal;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-aside {
    padding-bottom: 1.5rem;
    border-bottom: var(--rule);
  }

  /* 手机上简介区收成单栏，头像按 320px 上限会铺到 82% 屏宽，太抢眼；只在这里收窄，桌面端不变 */
  .portrait {
    max-width: 220px;
  }

  .profile-copy p {
    grid-template-columns: 2rem 1fr;
  }

  .auto-item {
    grid-template-columns: 2rem 1fr auto;
  }

  .auto-item p {
    grid-column: 2 / -1;
  }

  .resume-head {
    grid-template-columns: 1fr;
  }

  .exp-item {
    grid-template-columns: 2rem 1fr;
  }

  .exp-main {
    grid-column: 2;
    grid-template-columns: 1fr;
  }

  .exp-main > span {
    text-align: left;
  }

  .exp-main p {
    grid-column: 1;
  }

  .contact {
    min-height: 75svh;
  }

  .contact-top,
  .contact-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact h2 {
    font-size: clamp(3.2rem, 15vw, 5.5rem);
    line-height: 0.86;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  /* 必须带 .js 前缀：隐藏规则是 .js .reveal (0,2,0)，裸 .reveal 特异性不够会被压住 */
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Final small-screen editorial rhythm. */
@media (max-width: 640px) {
  .hero { min-height: 0; }
  .hero-title { font-size: 9vw; line-height: 1.2; margin-block: 2rem; }
  .section-banner { min-height: 0; }
  .section-banner h2 { font-size: 2.5rem; line-height: 1; }
  .profile-intro h2 { font-size: 2.3rem; }
  .contact h2 { font-size: 2.8rem; line-height: 1.15; }
  .edu { grid-template-columns: 1fr; }
}

/* 开场时标题行从下方升起，需要裁切容器；
   overflow-y 留 visible 以免裁掉「，」「。」等下沉标点 */
.hero-title .hero-line {
  overflow-x: clip;
}

.intro-text {
  display: inline;
}

/* 简介双语：中文承担信息，英文以斜体衬线收束，与首屏的中英混排同一套语言 */
.intro-text { display: block; }



/* 开场层 */
/* 默认不显示：只有内联脚本打上 js 标记后才出现。
   否则 JS 一旦没跑起来，这块不透明的满屏遮罩没人移除，整页就是白的。 */
.boot { display: none; }

.js .boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: block;
  overflow: hidden;
  background: var(--paper);
}

/* 兜底闹钟响了说明主脚本没能收尾，强制撤场 */
.js-failed .boot { display: none; }

.is-booting body { overflow: hidden; }
.js-failed body { overflow: auto; }

/* 顶部居中的小字计数：● 42% */
.boot-count {
  position: absolute;
  top: 1.1rem;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.45em;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.boot-count i {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
}

/* 下落的字母：字重与页脚的 LIUHAIPANG 一致 */
.boot-glyph {
  position: absolute;
  top: 0;
  left: 0;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  will-change: transform;
  /* 和字符后面的 U+FE0E 一起保证 ✳ 走文字字形：iOS 默认把它渲染成彩色 emoji */
  font-variant-emoji: text;
}

.boot-glyph.is-star { font-weight: 400; }

/* ============================================================
   首屏：居中堆叠的大字墙，中间嵌 ✳ ( ) 复合行
   放在文件末尾，覆盖前面几层累积下来的左右分栏规则。
   ============================================================ */

.hero-title {
  margin: auto 0;
  padding-block: clamp(0.6rem, 1.4vw, 1.4rem);
  font-weight: 760;
  line-height: 0.82;
  letter-spacing: -0.075em;
  text-align: center;
  text-transform: none;
}

.hero-line {
  display: block;
  width: 100%;
  white-space: nowrap;
  /* 三行共用一个字号，行宽随字数自然长短，节奏靠内容而不是靠调字号 */
  font-size: clamp(2.2rem, 12vw, 12rem);
}

/* 衬线小写有深降部，0.82 的紧排会让 g 的尾巴压到下一行的汉字上 */
.hero-line-serif {
  padding-bottom: 0.2em;
}

.hero-title .serif {
  font-size: 1.12em;
  letter-spacing: -0.045em;
  text-transform: none;
}

/* 复合行：标记居中，中英文小字贴在左右两端 */
.hero-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-block: clamp(0.2rem, 0.8vw, 0.7rem);
}

.hero-mark {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  font-size: clamp(1.2rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-star {
  font-size: 0.92em;
  margin-right: 0.18em;
}

.hero-paren {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 1.5em;
  color: var(--grey);
}

.hero-thumb {
  display: block;
  width: 1.34em;
  aspect-ratio: 1;
  margin-inline: 0.1em;
  overflow: hidden;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}


@media (max-width: 640px) {
  .hero-title {
    line-height: 0.9;
    letter-spacing: -0.055em;
  }

  .hero-line { font-size: 15vw; }

  .hero-row { margin-block: 0.6rem; }
}

/* 图片与视频：关掉拖拽、选中与 iOS 长按存图菜单 */
img,
video {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* 联系区：窄屏下邮箱与微信换行，而不是挤出屏幕 */
.contact-bottom {
  flex-wrap: wrap;
}

/* 微信号本身就是复制按钮：外观与邮箱链接一致（悬停变淡），光标提示可点；
   保留可选中，剪贴板不可用时仍能手动选中复制 */
.contact-wechat-id {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: text;
  user-select: text;
}

/* 复制结果给读屏软件播报；视觉反馈由微信号文字本身短暂变化承担 */
.contact-copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* WeChat 作为小标签，比微信号小一号；设下限，窄屏父级只有 16px 时不至于缩到看不清 */
.contact-wechat-label {
  margin-right: 0.45em;
  font-size: max(0.72rem, 0.55em);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* 「帮团队提高效率。」不折行。
   这个区块在 900px 以上是左右两栏，标题挤在左栏，字号却按整页宽度算：
   1024 宽时左栏只有 320px，8 个字要约 342px，「率。」被挤成第三行。
   字号跟随左栏宽度收缩（12.5cqi 保证 8 个字放得下），单栏和大屏不受影响。 */
.automation-head {
  container-type: inline-size;
}

.automation-head h2 {
  font-size: min(clamp(2.5rem, 4.5vw, 4.5rem), 12.5cqi);
}

.automation-head h2 em {
  white-space: nowrap;
}

/* ---------- 统一排版 ----------
 * 起因：各区块是分次做的，实测下来章节标题 64/67/80/96/112/128px、行高 0.80–1.16、字重 700 与 760 混用；
 * 正文 13/16/18/20/30px 没有档位；小字大多是 10px 等宽 +0.08em，但简介元信息和经历日期各差一点；
 * 区块上下留白 32/112/160px 也不成节奏。这里收成一套，数值集中在这几条变量里，改一处全站生效。
 * 放在文件末尾是故意的：它要盖住前面按区块零散写的字号，所以全部用 clamp 自适应，
 * 不依赖媒体查询（媒体查询写在上面，会被这一段覆盖）。
 * 首屏大标题、页脚大字、作品类目标题不在其中：它们是刻意的海报级字号，各自有单独规则。
 */
:root {
  --step-section: clamp(2.25rem, 4.4vw, 4.5rem); /* 章节标题：简介 / 作品 / 经历 / 自动化 / 技能 / 联系 */
  --step-entry: clamp(1.05rem, 1.15vw, 1.25rem); /* 条目标题：作品卡片、经历公司、自动化条目、学校 */
  --text-lead: clamp(1.05rem, 1.3vw, 1.4rem); /* 导语：简介正文、联系邀请 */
  --text-body: clamp(0.95rem, 0.95vw, 1.05rem); /* 正文：说明、条目描述、类目简介 */
  --label: 0.65rem; /* 小字：等宽大写，字距 0.08em */
  --section-pad: clamp(3.5rem, 7vw, 7.5rem); /* 区块上下留白 */
}

.section-banner h2,
.profile-intro h2,
.resume-head h2,
.skills-panel h2,
.awards-panel h2,
.contact h2 {
  font-size: var(--step-section);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

/* 自动化标题同档，但保留上面那条按左栏宽度收缩的上限，否则「帮团队提高效率。」会折行 */
.automation-head h2 {
  font-size: min(var(--step-section), 12.5cqi);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.project-caption strong,
.exp-item h3,
.auto-item h3,
.edu strong {
  font-size: var(--step-entry);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.profile-copy p,
.contact-invitation {
  font-size: var(--text-lead);
  line-height: 1.55;
}

.hero-foot p,
.automation-head > p:last-child,
.auto-item p,
.exp-main p,
.award-list li p,
.edu p,
.group-summary,
.skill-group div span,
.work-nav a {
  font-size: var(--text-body);
  line-height: 1.6;
}

.profile-meta,
.exp-date,
.exp-main > span,
.exp-count,
.portrait figcaption,
.skill-group h3 {
  font-family: var(--mono);
  font-size: var(--label);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile,
.resume,
.automation,
.skills-panel,
.awards-panel,
.contact {
  padding-block: var(--section-pad);
}

.resume-head {
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.contact h2 {
  margin-block: clamp(2.5rem, 5vw, 5rem);
}

