:root {
  --creator-bg: #0c0c0c;
  --creator-panel: #121416;
  --creator-panel-strong: #181b1e;
  --creator-ink: #d7e2ea;
  --creator-muted: #8d989f;
  --creator-line: rgba(215, 226, 234, 0.18);
  --creator-paper: #edf0f2;
  --creator-paper-ink: #0c0c0c;
  --bg: var(--creator-bg);
  --bg-deep: #080808;
  --surface: rgba(22, 25, 28, 0.82);
  --surface-solid: #131619;
  --surface-soft: #1a1f23;
  --text: #eef4f7;
  --muted: #9ba6ad;
  --muted-2: #717b82;
  --line: var(--creator-line);
  --line-strong: rgba(215, 226, 234, 0.32);
  --accent: #7fa6ff;
  --accent-2: #bbccd7;
  --glow: rgba(127, 166, 255, 0.2);
  --success: #9ce6a8;
  --radius: 8px;
  --font-sans: "Kanit", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

html,
body,
#main-content {
  background: var(--bg);
}

body {
  background: var(--bg);
  font-family: var(--font-sans);
}

body,
main {
  overflow-x: clip;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.site-header {
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0));
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(12, 12, 12, 0.82);
  box-shadow: none;
}

.brand-mark,
.brand-role,
.nav-menu a,
.hero-wordmark,
.showcase-heading h2,
.showcase-tile-copy,
.about .section-heading::before,
.stack .section-heading::before,
.work .section-heading h2,
.skill-index {
  font-family: "Kanit", var(--font-sans);
}

.nav-menu a {
  text-transform: uppercase;
}

.hero {
  display: block;
  min-height: max(760px, 100svh);
  padding: calc(98px + env(safe-area-inset-top)) 0 max(30px, env(safe-area-inset-bottom));
  overflow: clip;
  background:
    linear-gradient(rgba(215, 226, 234, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 226, 234, 0.026) 1px, transparent 1px),
    #0c0c0c;
  background-size: 76px 76px;
}

.hero::before {
  opacity: 0.55;
  background-image: linear-gradient(to bottom, rgba(12, 12, 12, 0.05), #0c0c0c 96%);
  background-size: auto;
  mask-image: none;
}

.hero-wordmark {
  position: absolute;
  z-index: 0;
  top: calc(clamp(118px, 14vh, 160px) + env(safe-area-inset-top));
  left: 50%;
  display: flex;
  width: min(100%, 1800px);
  justify-content: center;
  gap: 0.22em;
  transform: translateX(-50%);
  color: transparent;
  font-size: clamp(116px, 15.6vw, 276px);
  font-weight: 900;
  line-height: 0.78;
  white-space: nowrap;
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.92;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: block;
  min-height: calc(max(760px, 100svh) - 128px);
}

html.portrait-disabled .hero-grid,
.hero-grid:has(> .hero-visual[hidden]) {
  display: block;
}

.hero-copy {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: calc(38px + env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  grid-template-columns: minmax(250px, 390px) minmax(280px, 410px);
  align-items: end;
  justify-content: space-between;
  gap: clamp(40px, 10vw, 180px);
  pointer-events: none;
}

.hero-copy-left,
.hero-copy-right {
  position: relative;
  z-index: 2;
  min-width: 0;
  pointer-events: auto;
}

.hero-copy-right {
  display: flex;
  width: min(100%, 320px);
  margin-right: 0;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
}

.hero-kicker {
  margin-bottom: 16px;
}

.hero h1 {
  margin-bottom: 17px;
}

.hero-intro {
  margin-bottom: 8px;
  color: var(--creator-ink);
  font-size: 15px;
  font-weight: 500;
}

.hero-headline {
  font-size: clamp(35px, 3.4vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-headline em {
  background: linear-gradient(180deg, #7d858c 0%, #d7e2ea 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-role {
  margin-bottom: 13px;
}

.hero-summary {
  max-width: 390px;
  margin-bottom: 0;
  color: #a7b0b6;
  font-size: 13px;
  line-height: 1.72;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 23px;
}

.hero-actions .button {
  position: relative;
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 12.5px;
  white-space: nowrap;
}

/* 高光扫过：定位伪元素排在行内内容之后，所以会浮在文字上层，正好是想要的反光。 */
.hero-actions .button::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 46%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  content: "";
  opacity: 0;
  transform: translateX(-160%) skewX(-14deg);
  transition: opacity 0.28s ease, transform 0.74s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}

.hero-actions .button:hover::after,
.hero-actions .button:focus-visible::after {
  opacity: 1;
  transform: translateX(330%) skewX(-14deg);
}

/* 主 CTA 独占首行，四个按钮从此有明确的单一入口。
   炭黑单色系里最强的「实心」就是浅墨填充，比再加一种彩色更克制。 */
.hero-actions .button-primary {
  grid-column: 1 / -1;
  border-color: transparent;
  background: linear-gradient(180deg, #f4f7f9 0%, #ccd7de 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #0c0c0c;
}

.hero-actions .button-primary:hover {
  border-color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #d9e3ea 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #0c0c0c;
}

.hero-actions .button-primary::after {
  background: linear-gradient(100deg, transparent, rgba(12, 12, 12, 0.09), transparent);
}

/* 工作台入口独占一行：它是站内子应用，和上面两个按钮不是同一类动作。 */
.hero-actions .button-workspace {
  grid-column: 1 / -1;
}

/* 原来这里是一条四色渐变，在整站的炭黑单色系里过于喧闹，
   换成玻璃质感 —— 和「问 AI 助理」互为对等的次级动作。 */
.hero-actions .button-ghost[data-chat-open] {
  border: 1px solid rgba(215, 226, 234, 0.3);
  background: linear-gradient(180deg, rgba(215, 226, 234, 0.11), rgba(215, 226, 234, 0.035));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
  color: var(--text);
  outline: 0;
  outline-offset: 0;
}

.hero-actions .button-ghost[data-chat-open]:hover {
  border-color: rgba(215, 226, 234, 0.62);
  background: linear-gradient(180deg, rgba(215, 226, 234, 0.19), rgba(215, 226, 234, 0.07));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.17), 0 12px 30px rgba(0, 0, 0, 0.34);
}

.hero-actions .button-ghost[data-chat-open]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.17);
}

.hero-meta {
  justify-content: flex-end;
}

.hero-visual {
  position: absolute;
  z-index: 2;
  bottom: -30px;
  left: 50%;
  display: block;
  width: min(31vw, 460px);
  margin-left: max(-230px, -15.5vw);
}

.portrait-stage {
  width: 100%;
  will-change: auto;
}

html.is-hero-visible .portrait-stage,
.portrait-stage:hover,
.portrait-stage:focus-within {
  will-change: transform;
}

.portrait-frame {
  height: min(66vh, 620px);
  min-height: 500px;
  border-color: rgba(215, 226, 234, 0.28);
  border-radius: 220px 220px 8px 8px;
  /* 原来是一整块 #4777b8 纯色，人像后面显得像贴纸。
     顶部打光 + 纵向渐深 + 内圈高光，才有实体感。 */
  background:
    radial-gradient(122% 76% at 50% 3%, rgba(255, 255, 255, 0.24), transparent 58%),
    linear-gradient(168deg, #6d9bd8 0%, #4777b8 46%, #2c5183 100%);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.portrait-halo {
  inset: 8% -20% -6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(88, 129, 204, 0.52), rgba(174, 66, 157, 0.12) 48%, transparent 70%);
}

.floating-label {
  border-radius: 6px;
  background: rgba(12, 12, 12, 0.78);
}

.label-bottom {
  right: 0;
}

.availability-card {
  right: -10px;
  bottom: 18px;
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.88);
}

.hero-scroll {
  right: 26px;
  bottom: 23px;
  left: auto;
  transform: rotate(90deg) translateX(50%);
}

.tech-ribbon {
  z-index: 5;
  border-color: var(--creator-line);
  background: rgba(18, 20, 22, 0.94);
  transform: none;
}

.ribbon-track {
  height: 56px;
  animation-duration: 38s;
}

.showcase-marquee {
  position: relative;
  z-index: 2;
  padding: clamp(92px, 10vw, 148px) 0 70px;
  overflow: clip;
  background: #0c0c0c;
}

.showcase-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px 48px;
  margin-bottom: 42px;
}

.showcase-heading .section-index {
  grid-column: 1 / -1;
  margin: 0;
}

.showcase-heading h2 {
  margin: 0;
  color: var(--creator-ink);
  font-size: clamp(43px, 6.3vw, 92px);
  font-weight: 800;
  line-height: 0.96;
}

.showcase-heading > p:last-child {
  max-width: 330px;
  margin: 0 0 7px;
  color: var(--creator-muted);
  font-size: 14px;
  line-height: 1.7;
}

.showcase-viewport {
  display: grid;
  gap: 12px;
  width: 100%;
}

.showcase-track {
  display: flex;
  width: max-content;
  gap: 12px;
  transform: translate3d(var(--showcase-x, 0), 0, 0);
}

.showcase-marquee.is-in-view .showcase-track {
  will-change: transform;
}

.showcase-tile {
  position: relative;
  flex: 0 0 420px;
  width: 420px;
  height: 270px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(215, 226, 234, 0.2);
  border-radius: 8px;
  background: var(--creator-panel);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  isolation: isolate;
  transition: border-color 220ms ease, filter 220ms ease;
}

.showcase-tile::after {
  position: absolute;
  z-index: 3;
  inset: 35% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(5, 6, 7, 0.9));
  content: "";
  pointer-events: none;
}

.showcase-tile:hover,
.showcase-tile:focus-visible {
  border-color: rgba(215, 226, 234, 0.62);
  filter: brightness(1.06);
}

.showcase-tile .showcase-visual-shell {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
}

.showcase-tile .project-visual {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.showcase-tile .project-viz-shell,
.showcase-tile .saas-window {
  transform: scale(0.82);
}

.showcase-tile-copy {
  position: absolute;
  z-index: 4;
  right: 22px;
  bottom: 20px;
  left: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.showcase-tile-copy span {
  color: #aebac1;
  font-size: 10px;
}

.showcase-tile-copy strong {
  max-width: 280px;
  color: #f4f7f9;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
}

.showcase-marquee:not(.is-in-view) .project-visual,
.showcase-marquee:not(.is-in-view) .project-visual * {
  animation-play-state: paused !important;
}

.showcase-tile[aria-hidden="true"] .project-visual,
.showcase-tile[aria-hidden="true"] .project-visual * {
  animation-play-state: paused !important;
}

.section {
  padding: clamp(105px, 11vw, 170px) 0;
}

.section-heading h2 {
  letter-spacing: 0;
}

.about {
  display: grid;
  min-height: 100svh;
  align-items: center;
  padding-block: clamp(115px, 13vw, 190px);
  overflow: clip;
  background:
    radial-gradient(circle at 10% 24%, rgba(127, 166, 255, 0.1), transparent 24rem),
    radial-gradient(circle at 90% 78%, rgba(216, 106, 62, 0.08), transparent 23rem),
    #0c0c0c;
}

.about::before {
  top: 10%;
  right: -9rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(215, 226, 234, 0.09);
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 90px rgba(127, 166, 255, 0.04);
}

.about .section-heading {
  margin-bottom: clamp(54px, 7vw, 90px);
  text-align: center;
}

.about .section-heading::before {
  display: block;
  margin-bottom: 28px;
  color: transparent;
  font-size: clamp(72px, 12vw, 160px);
  font-weight: 900;
  line-height: 0.78;
  content: "ABOUT ME";
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about .section-heading .section-index {
  display: none;
}

.about .section-heading h2 {
  max-width: 900px;
  margin-inline: auto;
  color: var(--creator-ink);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 650;
  line-height: 1.12;
}

.about-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: center;
  gap: clamp(55px, 8vw, 118px);
  max-width: 1080px;
  margin-inline: auto;
}

.about-copy {
  font-size: 16px;
}

.about-copy .lead-copy {
  color: var(--creator-ink);
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 500;
  line-height: 1.65;
}

.about-copy .lead-copy.is-scrubbed [data-reveal-char] {
  opacity: 0.58;
}

.about-copy .lead-copy [data-reveal-char] {
  transition: opacity 100ms linear;
}

.education-note,
.metric-card,
.value-card,
.lab-console,
.now-panel,
.note-card,
.contact-form {
  border-radius: 8px;
}

.metric-grid {
  gap: 9px;
}

.metric-card {
  min-height: 166px;
  border-color: var(--creator-line);
  background: #141719;
}

.metric-featured {
  min-height: 341px;
  background:
    radial-gradient(circle at 72% 22%, rgba(127, 166, 255, 0.22), transparent 44%),
    #171a1d;
}

.metric-number {
  letter-spacing: 0;
}

.value-grid {
  max-width: 1080px;
  margin-inline: auto;
  border-color: var(--creator-line);
}

.value-card {
  border-color: var(--creator-line);
}

.value-card:hover {
  background: rgba(215, 226, 234, 0.045);
}

.stack {
  z-index: 3;
  overflow: hidden;
  border: 0;
  border-radius: 56px 56px 0 0;
  background: var(--creator-paper);
  color: var(--creator-paper-ink);
}

.stack .section-heading {
  margin-bottom: 58px;
  text-align: center;
}

.stack .section-heading::before {
  display: block;
  margin-bottom: 28px;
  color: #0c0c0c;
  font-size: clamp(60px, 10.5vw, 144px);
  font-weight: 900;
  line-height: 0.82;
  content: "CAPABILITIES";
}

.stack .section-heading .section-index {
  color: rgba(12, 12, 12, 0.56);
}

.stack .section-heading h2 {
  max-width: 820px;
  margin-inline: auto;
  color: #0c0c0c;
  font-size: clamp(28px, 3.2vw, 46px);
}

.stack .section-heading h2 span {
  color: #4c55a7;
}

.stack-layout {
  display: block;
}

.stack-intro {
  position: static;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.stack-intro p {
  max-width: 660px;
  margin: 0;
  color: rgba(12, 12, 12, 0.64);
  font-size: 18px;
  line-height: 1.65;
}

.stack-signal i {
  background: #0c0c0c;
  box-shadow: none;
}

.skill-list {
  border-color: rgba(12, 12, 12, 0.16);
}

.skill-row {
  grid-template-columns: minmax(110px, 0.3fr) minmax(180px, 0.7fr) minmax(0, 1.6fr);
  align-items: center;
  gap: clamp(22px, 4vw, 60px);
  min-height: 158px;
  padding: 30px 8px;
  border-color: rgba(12, 12, 12, 0.16);
  color: #0c0c0c;
}

.skill-row:hover {
  padding-inline: 20px;
  background: rgba(12, 12, 12, 0.045);
}

.skill-index {
  padding: 0;
  color: #0c0c0c;
  font-size: clamp(50px, 6vw, 86px);
  font-weight: 900;
  line-height: 0.8;
}

.skill-row h3 {
  color: #0c0c0c;
  font-size: clamp(21px, 2.2vw, 32px);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.skill-row p {
  color: rgba(12, 12, 12, 0.6);
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.7;
}

.work {
  z-index: 4;
  margin-top: -56px;
  padding-top: clamp(145px, 14vw, 205px);
  overflow: visible;
  border-radius: 56px 56px 0 0;
  background: #0c0c0c;
}

.work .section-heading {
  align-items: end;
}

.work .section-heading h2 {
  color: transparent;
  font-size: clamp(74px, 11vw, 156px);
  font-weight: 900;
  line-height: 0.82;
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-toolbar {
  margin-top: -38px;
  margin-bottom: 36px;
}

.project-filters button {
  border-radius: 999px;
}

.project-filters button[aria-pressed="true"] {
  border-color: #d7e2ea;
  background: #d7e2ea;
  box-shadow: none;
  color: #0c0c0c;
}

.project-card {
  border-color: rgba(215, 226, 234, 0.42);
  border-radius: 24px;
  background: #111315;
}

.project-card:hover {
  border-color: rgba(215, 226, 234, 0.72);
}

.project-card h3 {
  letter-spacing: 0;
}

.project-card .project-link {
  border-radius: 50%;
}

.project-detail-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(215, 226, 234, 0.45);
  border-radius: 999px;
}

.project-detail-button:hover {
  border-color: #d7e2ea;
  background: rgba(215, 226, 234, 0.08);
}

/* 站内子应用的主行动：填色胶囊，和旁边的"查看案例详情"分出主次。 */
.project-launch-button {
  border-color: rgba(126, 173, 255, 0.5);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.22), rgba(124, 110, 255, 0.16));
  color: #eaf2ff;
  text-decoration: none;
}

.project-launch-button:hover {
  border-color: rgba(150, 195, 255, 0.72);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.32), rgba(124, 110, 255, 0.24));
  color: #fff;
}

html[data-theme="light"] .project-launch-button {
  border-color: #3f74d8;
  background: #e6eeff;
  color: #133a80;
}

html[data-theme="light"] .project-launch-button:hover {
  border-color: #2a5cc0;
  background: #d8e5ff;
  color: #0d2c66;
}

.lab,
.experience,
.notes {
  background-color: #0c0c0c;
}

.note-card,
.now-panel,
.lab-console {
  border-color: var(--creator-line);
  background-color: var(--creator-panel);
}

.contact {
  background-color: #080808;
}

html[data-theme="light"] .showcase-marquee,
html[data-theme="light"] .about,
html[data-theme="light"] .work,
html[data-theme="light"] .lab,
html[data-theme="light"] .experience,
html[data-theme="light"] .notes {
  background-color: var(--bg);
}

html[data-theme="light"] .site-header {
  background: linear-gradient(to bottom, rgba(242, 246, 252, 0.94), rgba(242, 246, 252, 0));
}

html[data-theme="light"] .site-header.is-scrolled {
  background: rgba(242, 246, 252, 0.9);
}

html[data-theme="light"] .hero {
  background:
    linear-gradient(rgba(12, 12, 12, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 12, 12, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 76px 76px;
}

html[data-theme="light"] .hero::before {
  background-image: linear-gradient(to bottom, rgba(242, 246, 252, 0.04), var(--bg) 96%);
}

html[data-theme="light"] .hero-intro,
html[data-theme="light"] .about .section-heading h2,
html[data-theme="light"] .showcase-heading h2 {
  color: var(--text);
}

html[data-theme="light"] .hero-summary,
html[data-theme="light"] .showcase-heading > p:last-child {
  color: var(--muted);
}

html[data-theme="light"] .hero-actions .button-primary {
  border-color: #1f5fcf;
  background: #1f5fcf;
  box-shadow: 0 14px 32px rgba(31, 95, 207, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #fff;
}

html[data-theme="light"] .hero-actions .button-primary:hover {
  border-color: #164da9;
  background: #164da9;
  box-shadow: 0 18px 40px rgba(31, 95, 207, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #fff;
}

html[data-theme="light"] .tech-ribbon {
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .showcase-tile {
  border-color: rgba(28, 45, 65, 0.2);
}

html[data-theme="light"] .about {
  background:
    radial-gradient(circle at 10% 24%, rgba(62, 112, 205, 0.09), transparent 24rem),
    radial-gradient(circle at 90% 78%, rgba(216, 106, 62, 0.07), transparent 23rem),
    var(--bg);
}

html[data-theme="light"] .metric-card {
  background: #fff;
}

html[data-theme="light"] .work {
  background: #e9eef5;
}

html[data-theme="light"] .work .heading-note,
html[data-theme="light"] .work .filter-status {
  color: #566577;
}

@media (min-width: 1024px) and (min-height: 760px) and (hover: hover) and (pointer: fine) {
  html.creator-stack-ready .project-grid {
    display: block;
  }

  html.creator-stack-ready .project-grid > .project-card {
    position: sticky;
    top: calc(98px + env(safe-area-inset-top) + var(--stack-offset, 0px));
    z-index: calc(10 + var(--stack-index, 0));
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.97fr);
    width: 100%;
    min-height: min(72vh, 690px);
    margin-bottom: 20vh;
    padding: 0;
    overflow: hidden;
    transform-origin: 50% 12%;
  }

  html.creator-stack-ready .project-grid > .project-card.is-stack-last-visible {
    margin-bottom: 0;
  }

  html.creator-stack-ready .project-grid > .project-card.is-stack-covered {
    pointer-events: none;
  }

  html.creator-stack-ready .project-grid > .project-card:focus-within {
    z-index: calc(100 + var(--stack-index, 0));
  }

  html.creator-stack-ready .project-grid > .project-card > .project-visual {
    min-height: 100%;
    border-right: 1px solid var(--creator-line);
    border-bottom: 0;
  }

  html.creator-stack-ready .project-grid > .project-card > .project-content {
    min-width: 0;
    padding: clamp(38px, 4.2vw, 64px);
    justify-content: center;
  }

  html.creator-stack-ready .project-grid > .project-card.project-card-rich-visual:not(.project-main):not(.project-wide) {
    min-height: min(68vh, 640px);
  }

  html.creator-stack-ready.js .project-card.card-interactive.is-visible {
    transform:
      perspective(1200px)
      translate3d(0, var(--card-lift), 0)
      rotateX(var(--card-rotate-x))
      rotateY(var(--card-rotate-y))
      scale(var(--stack-scale, 1));
  }

  html.creator-stack-ready.js .project-card.card-interactive.is-visible.is-card-pressed {
    transform:
      perspective(1200px)
      translate3d(0, var(--card-lift), 0)
      rotateX(var(--card-rotate-x))
      rotateY(var(--card-rotate-y))
      scale(calc(var(--stack-scale, 1) * 0.994));
  }
}

@media (max-width: 1100px) {
  .hero-copy {
    grid-template-columns: minmax(240px, 330px) minmax(250px, 330px);
    gap: 330px;
  }

  .hero-summary {
    font-size: 12px;
  }

  /* flex 时代的遗留：按钮簇现在是栅格，靠 1fr 轨道自己撑满 300px 的右栏。
     留着 align-items: flex-end 只会让同一行里较矮的按钮贴底而不是等高。 */
  .hero-actions {
    align-items: stretch;
  }

  .hero-copy-right {
    width: min(100%, 300px);
    margin-right: 0;
  }
}

@media (max-width: 900px) {
  .availability-card {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: calc(88px + env(safe-area-inset-top)) 0 max(80px, env(safe-area-inset-bottom));
  }

  .hero-wordmark {
    top: calc(112px + env(safe-area-inset-top));
    width: calc(100% - 24px);
    gap: 0.18em;
    font-size: clamp(74px, 17vw, 136px);
  }

  .hero-grid {
    display: flex;
    min-height: auto;
    flex-direction: column;
    padding-top: clamp(136px, 24vw, 210px);
  }

  .hero-visual {
    position: relative;
    bottom: auto;
    left: auto;
    order: 1;
    width: min(68vw, 420px);
    margin: 0 auto;
  }

  .portrait-frame {
    height: auto;
    min-height: 0;
    aspect-ratio: 0.72;
  }

  .hero-copy {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    order: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 38px;
  }

  .hero-copy-left,
  .hero-copy-right {
    width: min(100%, 700px);
  }

  .hero-copy-right {
    width: min(100%, 700px);
    margin-right: 0;
    align-items: flex-start;
    justify-self: start;
  }

  .hero-summary {
    max-width: 620px;
    font-size: 14px;
  }

  .hero-actions,
  .hero-meta {
    justify-content: flex-start;
  }

  /* 这里原来是一行四个按钮的 flex，主 CTA 和次级动作宽度全凭文字长度，
     和桌面端的层级完全脱节。改回栅格，并把整簇按钮压到 460px 以内 ——
     不封上限的话，铺满 700px 宽的胶囊按钮反而显得廉价。 */
  .hero-actions {
    max-width: 460px;
  }

  .hero-scroll {
    display: none;
  }

  .showcase-heading {
    display: block;
  }

  .showcase-heading h2 {
    margin-top: 12px;
  }

  .showcase-heading > p:last-child {
    margin-top: 20px;
  }

  .showcase-viewport {
    width: 100vw;
    margin-left: calc((100vw - 100%) / -2);
    padding-right: max(19px, env(safe-area-inset-right));
    padding-left: max(19px, env(safe-area-inset-left));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline-start: max(19px, env(safe-area-inset-left));
    scroll-padding-inline-end: max(19px, env(safe-area-inset-right));
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .showcase-viewport::-webkit-scrollbar {
    display: none;
  }

  .showcase-track {
    transform: none !important;
  }

  .showcase-tile {
    flex-basis: min(78vw, 390px);
    width: min(78vw, 390px);
    height: auto;
    aspect-ratio: 14 / 9;
    scroll-snap-align: start;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .stack,
  .work {
    border-radius: 38px 38px 0 0;
  }

  .skill-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .skill-row p {
    grid-column: 2;
  }

  .project-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-grid > .project-card {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 0;
    padding: 0;
    transform: none;
  }

  .project-grid > .project-card > .project-visual {
    min-height: 430px;
    border-right: 0;
    border-bottom: 1px solid var(--creator-line);
  }
}

@media (max-width: 680px) {
  .hero {
    height: min(780px, calc(100svh - 8px));
    min-height: 680px;
    padding: calc(72px + env(safe-area-inset-top)) 0 0;
  }

  .hero-wordmark {
    top: calc(91px + env(safe-area-inset-top));
    font-size: 68px;
  }

  .hero-grid {
    height: 100%;
    min-height: 0;
    padding-top: 0;
  }

  .hero-visual {
    position: absolute;
    top: 96px;
    left: 50%;
    width: min(74vw, 290px);
    margin: 0 0 0 max(-145px, -37vw);
    transform: none;
  }

  .floating-label {
    max-width: 44vw;
    font-size: 7px;
  }

  .availability-card {
    right: 0;
    min-width: min(218px, 70vw);
  }

  .hero-copy {
    position: absolute;
    right: 0;
    bottom: calc(18px + env(safe-area-inset-bottom));
    left: 0;
    gap: 12px;
    margin: 0;
    padding-top: 138px;
    background: linear-gradient(to bottom, transparent, rgba(12, 12, 12, 0.96) 34%, #0c0c0c 58%);
  }

  html[data-theme="light"] .hero-copy {
    background: linear-gradient(to bottom, transparent, rgba(242, 246, 252, 0.96) 34%, var(--bg) 58%);
  }

  .hero-headline {
    font-size: 39px;
  }

  .hero-kicker,
  .hero-summary,
  .hero-meta {
    display: none !important;
  }

  .hero h1 {
    margin-bottom: 8px;
  }

  .hero-intro {
    margin-bottom: 6px;
    font-size: 13px;
  }

  .hero-role {
    margin-bottom: 0;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    margin-bottom: 0;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 44px;
    min-width: 0;
    padding-inline: 13px;
    font-size: 11px;
  }

  /* 原来这里让「和我聊聊」独占一行。现在 DOM 顺序变成
     主 CTA → 问 AI 助理 → 和我聊聊 → 工作台，独占一行会把
     「问 AI 助理」孤零零留在左半格，所以让这两个次级动作并排。 */

  html:is(.is-hero-visible, .is-contact-visible) .chat-launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.9);
  }

  .showcase-marquee {
    padding-top: 82px;
  }

  .showcase-heading h2 {
    font-size: clamp(38px, 12vw, 56px);
  }

  .showcase-track:last-child {
    display: none;
  }

  .showcase-tile {
    flex-basis: min(84vw, 340px);
    width: min(84vw, 340px);
  }

  .showcase-tile-copy {
    right: 16px;
    bottom: 14px;
    left: 16px;
  }

  .showcase-tile-copy strong {
    max-width: 220px;
    font-size: 15px;
  }

  .about .section-heading::before {
    font-size: clamp(58px, 18vw, 92px);
  }

  .about .section-heading h2 {
    font-size: clamp(28px, 8.5vw, 43px);
  }

  .about-copy .lead-copy {
    font-size: 19px;
  }

  .value-grid {
    margin-top: 75px;
  }

  .stack {
    padding-top: 96px;
  }

  .stack .section-heading::before {
    font-size: clamp(42px, 13vw, 70px);
  }

  .stack-intro {
    display: block;
  }

  .stack-intro p {
    font-size: 15px;
  }

  .stack-signal {
    margin-top: 26px;
  }

  .skill-row {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 132px;
    padding-block: 25px;
  }

  .skill-index {
    font-size: 43px;
  }

  .skill-row h3 {
    font-size: 20px;
  }

  .skill-row p {
    font-size: 13px;
  }

  .work {
    margin-top: -38px;
    padding-top: 120px;
  }

  .work .section-heading h2 {
    font-size: clamp(64px, 21vw, 100px);
  }

  .project-toolbar {
    margin-top: -14px;
  }

  .project-card {
    border-radius: 16px;
  }

  .project-grid > .project-card > .project-visual {
    min-height: 330px;
  }

  .project-content {
    padding: 30px 23px 34px;
  }
}

@media (min-width: 901px) {
  html:is(.portrait-disabled, .photo-disabled) .hero-grid,
  .hero-grid:has(> .hero-visual[hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-copy,
  .hero-grid:has(> .hero-visual[hidden]) > .hero-copy {
    position: relative;
    inset: auto;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    width: min(100%, 1080px);
    margin-inline: auto;
    gap: clamp(42px, 7vw, 104px);
    align-items: center;
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-copy-right,
  .hero-grid:has(> .hero-visual[hidden]) > .hero-copy .hero-copy-right {
    width: 100%;
    max-width: 360px;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .nav-menu {
    padding-top: calc(92px + env(safe-area-inset-top));
  }

  html:is(.portrait-disabled, .photo-disabled) .hero,
  .hero:has(.hero-visual[hidden]) {
    min-height: max(640px, 100svh);
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-grid,
  .hero-grid:has(> .hero-visual[hidden]) {
    display: grid;
    min-height: calc(max(640px, 100svh) - 168px - env(safe-area-inset-top));
    padding-top: clamp(104px, 18vw, 142px);
    place-items: center;
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-copy,
  .hero-grid:has(> .hero-visual[hidden]) > .hero-copy {
    position: relative;
    inset: auto;
    width: min(100%, 700px);
    margin: 0;
  }
}

@media (max-width: 680px) {
  html:is(.portrait-disabled, .photo-disabled) .hero,
  .hero:has(.hero-visual[hidden]) {
    height: auto;
    min-height: max(620px, 100svh);
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-grid,
  .hero-grid:has(> .hero-visual[hidden]) {
    height: auto;
    min-height: calc(max(620px, 100svh) - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding-top: clamp(92px, 24vw, 126px);
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-copy,
  .hero-grid:has(> .hero-visual[hidden]) > .hero-copy {
    bottom: auto;
    gap: 20px;
    padding-top: 0;
    background: none;
  }

  html:is(.portrait-disabled, .photo-disabled) .hero-summary,
  .hero-grid:has(> .hero-visual[hidden]) > .hero-copy .hero-summary {
    display: block !important;
    max-width: 58ch;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.65;
  }
}

@media (max-width: 380px) {
  .hero-wordmark {
    font-size: 59px;
  }

  .hero-headline {
    font-size: 35px;
  }

  .hero-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .button {
    grid-column: 1 / -1;
  }

  .hero-meta a {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-track {
    transform: none !important;
    will-change: auto !important;
  }

  .about-copy .lead-copy.is-scrubbed [data-reveal-char] {
    opacity: 1 !important;
    transition: none;
  }

  .project-grid > .project-card {
    --stack-scale: 1 !important;
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    margin-bottom: 0 !important;
    transform: none !important;
  }

  .project-grid {
    display: grid !important;
  }

  .project-grid > .project-card.is-stack-covered {
    pointer-events: auto !important;
  }
}

/* ============================================================ 质感与交互
   这一段整体压在文件末尾：它要覆盖前面所有同优先级的规则（尤其是 styles.css
   里各按钮自带的 :hover transform），靠的就是「同权重、后来者胜」。
   刻意不使用 mix-blend-mode —— 固定层一旦参与混合，滚动时整屏都要重绘。 */

/* 边缘压暗 + 胶片颗粒。两层都是 fixed，z-index 低于站点头部，
   所以导航栏保持干净，只有内容区蒙上这层薄雾。 */
body::before,
body::after {
  position: fixed;
  z-index: 3;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  background: radial-gradient(128% 106% at 50% 40%, transparent 46%, rgba(0, 0, 0, 0.36) 100%);
}

body::after {
  z-index: 4;
  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='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.05;
}

html[data-theme="light"] body::before {
  background: radial-gradient(128% 106% at 50% 40%, transparent 54%, rgba(20, 34, 54, 0.14) 100%);
}

html[data-theme="light"] body::after {
  opacity: 0.032;
}

/* 排版收口：CJK 长标题原来会掉出「代。」这样的孤字尾行。 */
.hero-headline,
.section-heading h2,
.showcase-heading h2,
.project-card h3,
.note-card h3,
.value-card h3,
.metric-card h3 {
  text-wrap: balance;
}

.hero-summary,
.section-heading > p,
.showcase-heading > p:last-child,
.about-copy .lead-copy,
.heading-note,
.value-card p,
.skill-row p {
  text-wrap: pretty;
}

/* Kanit 900 在超大字号下字距偏松，收一点才像刻上去的。 */
.hero-wordmark,
.work .section-heading h2 {
  letter-spacing: -0.018em;
}

/* 「查看完整简历」原来会在头部折成两行。 */
.nav-resume,
.nav-resume span {
  white-space: nowrap;
}

/* 指针光斑：--spot-x / --spot-y / --spot-on 由 creator-refresh.js 写入。
   ::after 用 z-index:-1 —— 按绘制顺序它压在元素自身背景之上、正文之下，
   所以光斑照的是卡片表面，而不是糊在文字上。 */
:is(.metric-card, .value-card, .skill-row, .timeline-item, .note-card, .showcase-tile) {
  position: relative;
  isolation: isolate;
}

:is(.metric-card, .value-card, .skill-row, .timeline-item, .note-card, .showcase-tile)::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(215, 226, 234, 0.1),
    rgba(215, 226, 234, 0.028) 34%,
    transparent 64%
  );
  content: "";
  opacity: var(--spot-on, 0);
  transition: opacity 0.36s ease;
  pointer-events: none;
}

html[data-theme="light"] :is(.metric-card, .value-card, .skill-row, .timeline-item, .note-card, .showcase-tile)::after {
  background: radial-gradient(
    240px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(31, 95, 207, 0.12),
    rgba(31, 95, 207, 0.035) 34%,
    transparent 64%
  );
}

/* 大字标题的遮罩擦除。挂在已有的 [data-reveal] 上，不新增观察器；
   .js 由 index.html 的内联脚本添加，脚本没跑起来就不会有卡住的半截标题。 */
.js .work .section-heading h2,
.js .showcase-heading h2,
.js .about .section-heading h2 {
  clip-path: inset(-30% -8% -30% 0);
  transition: clip-path 0.98s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .work .section-heading[data-reveal]:not(.is-visible) h2,
.js .showcase-heading[data-reveal]:not(.is-visible) h2,
.js .about .section-heading[data-reveal]:not(.is-visible) h2 {
  clip-path: inset(-30% 100% -30% 0);
}

/* 磁吸：位移和 hover 抬升合成同一个 transform，
   否则 styles.css 里各按钮的 :hover { transform: translateY(-3px) } 会互相顶掉。 */
.hero-actions .button {
  transform: translate3d(var(--magnet-x, 0px), calc(var(--magnet-y, 0px) + var(--magnet-lift, 0px)), 0);
  transition:
    transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.hero-actions .button:hover,
.hero-actions .button:focus-visible {
  --magnet-lift: -3px;
}

.hero-actions .button:active {
  --magnet-lift: -1px;
}

@media (prefers-reduced-motion: reduce) {
  .js .work .section-heading h2,
  .js .showcase-heading h2,
  .js .about .section-heading h2,
  .js .work .section-heading[data-reveal]:not(.is-visible) h2,
  .js .showcase-heading[data-reveal]:not(.is-visible) h2,
  .js .about .section-heading[data-reveal]:not(.is-visible) h2 {
    clip-path: none;
  }

  .hero-actions .button {
    --magnet-x: 0px;
    --magnet-y: 0px;
  }

  .hero-actions .button::after {
    display: none;
  }
}

html[data-theme="light"] .hero-actions .button::after {
  background: linear-gradient(100deg, transparent, rgba(12, 12, 12, 0.07), transparent);
}

html[data-theme="light"] .hero-actions .button-primary::after {
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

/* 玻璃质感在浅色主题下要反过来 —— 白底上加白只会糊掉。 */
html[data-theme="light"] .hero-actions .button-ghost[data-chat-open] {
  border-color: rgba(28, 45, 65, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(233, 238, 245, 0.9));
  box-shadow: inset 0 1px 0 #fff;
  color: #16324f;
}

html[data-theme="light"] .hero-actions .button-ghost[data-chat-open]:hover {
  border-color: rgba(31, 95, 207, 0.5);
  background: #fff;
  box-shadow: inset 0 1px 0 #fff, 0 12px 28px rgba(43, 72, 110, 0.14);
  color: #0d2c66;
}

@media print {
  body::before,
  body::after {
    display: none;
  }
}
