/* Generated by scripts/build.mjs. Edit src/styles/*.css. */
@charset "UTF-8";

:root {
  --ink: oklch(0.17 0.008 255);
  --ink-soft: oklch(0.26 0.012 255);
  --paper: oklch(0.955 0.012 82);
  --paper-dim: oklch(0.89 0.014 82);
  --dusk: oklch(0.285 0.022 48);
  --dusk-soft: oklch(0.38 0.026 48);
  --signal: oklch(0.63 0.19 34);
  --signal-blue: oklch(0.57 0.16 262);
  --muted: oklch(0.57 0.018 255);
  --line-dark: oklch(0.94 0.008 82 / 0.22);
  --line-light: oklch(0.28 0.01 255 / 0.22);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --page-x: max(clamp(1.25rem, 4vw, 4.5rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --max: 1600px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

section {
  scroll-margin-top: 78px;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Manrope, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
a {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

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

.scroll-progress {
  position: fixed;
  z-index: 500;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  min-height: calc(78px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: env(safe-area-inset-top) var(--page-x) 0;
  color: var(--paper);
  border-bottom: 1px solid var(--line-dark);
  transition: color 280ms var(--ease), background-color 280ms var(--ease), border-color 280ms var(--ease);
}

.site-header.is-solid {
  background: oklch(0.15 0.012 48 / 0.94);
  backdrop-filter: blur(14px);
}

.site-header.is-light {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-light);
}

.brand {
  width: max-content;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  text-decoration: none;
}

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

.brand small,
.site-header nav,
.header-status,
.section-label,
.case-index,
.media-caption,
footer {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand small {
  opacity: 0.56;
}

.site-header nav {
  display: flex;
  gap: clamp(1.2rem, 3vw, 3rem);
}

.site-header nav a,
.header-status {
  position: relative;
  text-decoration: none;
}

.site-header nav a::after,
.contact-links a::after,
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms var(--ease);
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after,
.contact-links a:hover::after,
.contact-links a:focus-visible::after,
.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-status span {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--signal);
  animation: status-pulse 2.2s var(--ease) infinite;
}

.hero {
  position: relative;
  min-height: max(920px, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: clamp(7.2rem, 10vh, 9rem) var(--page-x) 1.8rem;
  color: var(--paper);
  background: oklch(0.135 0.012 255);
  isolation: isolate;
}

.hero-monogram {
  position: absolute;
  z-index: -1;
  top: 4%;
  right: -0.08em;
  color: oklch(0.22 0.018 255);
  font-size: clamp(24rem, 44vw, 48rem);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.14em;
  user-select: none;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-inline: auto;
}

.hero-identity {
  width: 100%;
  padding-bottom: clamp(1.5rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line-dark);
}

.hero-kicker {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(100%, 64rem);
  margin: 0 0 1.1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-kicker span {
  opacity: 0.56;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1400px;
  margin-bottom: 0;
  font-weight: 600;
  line-height: 0.78;
  letter-spacing: -0.09em;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.hero-name {
  display: block;
  color: var(--paper);
  font-size: clamp(6.5rem, 13.8vw, 14rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.095em;
}

.hero-statement {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(24rem, 1.05fr) minmax(25rem, 0.95fr);
  align-items: end;
  gap: clamp(3rem, 8vw, 10rem);
  margin-top: auto;
  padding-top: clamp(3.5rem, 7vh, 6rem);
}

.hero-intro {
  max-width: 49rem;
}

.hero-principle {
  margin-bottom: 1.8rem;
  color: oklch(0.91 0.022 82);
  font-size: clamp(2.3rem, 4.2vw, 4.6rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-summary {
  max-width: 43rem;
  margin-bottom: 2rem;
  color: oklch(0.82 0.014 82);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem 2.5rem;
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link span {
  transition: transform 220ms var(--ease);
}

.text-link:hover span,
.text-link:focus-visible span {
  transform: translate(0.24rem, 0.24rem);
}

.hero-projects {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.hero-projects li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line-dark);
}

.hero-projects li > span,
.hero-projects small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

.hero-projects li > span {
  padding-top: 0.3rem;
  color: var(--signal);
}

.hero-projects div {
  display: grid;
  gap: 0.38rem;
}

.hero-projects strong {
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  font-weight: 600;
}

.hero-projects small {
  color: oklch(0.72 0.012 82);
  line-height: 1.55;
}

.hero-foot {
  width: min(100%, var(--max));
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 2rem;
  margin: clamp(2.5rem, 5vh, 4.5rem) auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line-dark);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.scroll-cue {
  justify-self: end;
  opacity: 0.56;
}

.has-js [data-intro] {
  opacity: 0;
  transform: translateY(105%);
}

.has-js.is-ready [data-intro] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 760ms var(--ease), transform 940ms var(--ease);
}

.has-js.is-ready .hero-identity {
  transition-delay: 120ms;
}

.has-js.is-ready .hero-statement {
  transition-delay: 360ms;
}

.has-js.is-ready .hero-foot {
  transition-delay: 500ms;
}

.position,
.work-heading,
.open-source,
.contact {
  padding-inline: max(var(--page-x), calc((100vw - var(--max)) / 2));
}

.position {
  position: relative;
  min-height: 100svh;
  padding-top: clamp(6rem, 8vw, 8.5rem);
  padding-bottom: clamp(7rem, 10vw, 10rem);
  color: var(--paper);
  background: var(--dusk);
}

.position-heading {
  display: grid;
  grid-template-columns: minmax(9rem, 0.35fr) 1fr;
  align-items: start;
  gap: 4vw;
}

.position .section-label {
  color: oklch(0.83 0.018 76 / 0.68);
}

.position-copy > p {
  color: oklch(0.88 0.018 76 / 0.84);
}

.profile-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(3rem, 5vw, 5rem) 0 1.2rem max(13rem, 19vw);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.profile-strip p {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 1.2rem 1.5rem;
  border-right: 1px solid var(--line-dark);
}

.profile-strip p:last-child {
  border-right: 0;
}

.profile-strip small {
  color: oklch(0.76 0.018 76 / 0.72);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.profile-strip strong {
  font-size: clamp(0.9rem, 1.25vw, 1.08rem);
  font-weight: 600;
}

.stability-system {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-left: max(13rem, 19vw);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.stability-system article {
  min-height: 19rem;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 2.6vw, 2.5rem);
  border-right: 1px solid var(--line-dark);
  transition: color 240ms var(--ease), background-color 240ms var(--ease), transform 360ms var(--ease);
}

.stability-system article:last-child {
  border-right: 0;
}

.stability-system article:hover {
  color: var(--ink);
  background: var(--paper-dim);
  transform: translateY(-0.65rem);
}

.stability-system article > p:first-child,
.stability-system small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stability-system article > p:first-child {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: auto;
  opacity: 0.62;
}

.stability-system h3 {
  margin-bottom: 1.2rem;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.stability-system article > p:nth-of-type(2) {
  margin-bottom: 1.7rem;
  font-size: 0.88rem;
  line-height: 1.75;
  opacity: 0.82;
}

.stability-system small {
  opacity: 0.52;
}

.scene-transition {
  height: clamp(9rem, 22vw, 21rem);
  background: linear-gradient(180deg, var(--dusk) 0%, oklch(0.59 0.02 65) 46%, var(--paper) 100%);
}

.section-label {
  align-self: start;
  margin: 0;
  padding-top: 0.55rem;
  color: var(--muted);
}

.position-copy h2,
.work-heading h2,
.open-source h2,
.contact h2 {
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
  font-size: clamp(3.2rem, 7.8vw, 8.4rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.position-copy h2 span {
  color: var(--signal);
}

.position-copy h2 {
  margin-bottom: clamp(1.8rem, 3vw, 3rem);
  font-size: clamp(3.2rem, 4.8vw, 5.2rem);
}

.position-copy > p {
  max-width: 42rem;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.8;
}

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

.work-heading {
  display: grid;
  grid-template-columns: minmax(9rem, 0.35fr) 1fr minmax(18rem, 0.45fr);
  align-items: end;
  gap: 4vw;
  padding-top: clamp(7rem, 10vw, 11rem);
  padding-bottom: clamp(5rem, 8vw, 8rem);
}

.work-heading h2 {
  margin-bottom: 0;
  font-size: clamp(3rem, 5vw, 5.6rem);
}

.work-heading > p:last-child {
  max-width: 34rem;
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.case {
  width: min(100%, var(--max));
  min-height: 112svh;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(21rem, 0.65fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  margin-inline: auto;
  padding: clamp(5rem, 8vw, 8rem) var(--page-x);
}

.case-reverse {
  grid-template-columns: minmax(21rem, 0.65fr) minmax(0, 1.55fr);
}

.case-reverse .case-media {
  grid-column: 2;
}

.case-reverse .case-copy {
  grid-column: 1;
  grid-row: 1;
}

.case-media {
  position: relative;
  min-height: clamp(500px, 67vw, 830px);
  overflow: hidden;
  transform: perspective(1200px) rotateX(calc(var(--my, 0) * -0.5deg)) rotateY(calc(var(--mx, 0) * 0.7deg));
  transform-style: preserve-3d;
  transition: transform 300ms var(--ease);
  isolation: isolate;
}

.case-copy {
  align-self: center;
}

.case-index {
  margin-bottom: clamp(2.4rem, 4vw, 4.5rem);
  color: var(--signal);
}

.case-copy h3 {
  margin-bottom: 2rem;
  font-size: clamp(3rem, 5vw, 6rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.case-lead {
  margin-bottom: 3rem;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.75;
}

.case-copy dl,
.case-copy dd {
  margin: 0;
}

.case-copy dl > div {
  display: grid;
  grid-template-columns: 4.3rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line-light);
}

.case-copy dl > div:last-child {
  border-bottom: 1px solid var(--line-light);
}

.case-copy dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.case-copy dd {
  font-size: 0.88rem;
  line-height: 1.65;
}

.media-caption {
  position: absolute;
  z-index: 8;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.media-runtime {
  color: var(--paper);
  background: oklch(0.16 0.018 258);
}

.media-runtime::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    linear-gradient(125deg, transparent 16%, oklch(0.55 0.17 264 / 0.44) 45%, transparent 70%),
    linear-gradient(28deg, oklch(0.61 0.18 34 / 0.26), transparent 48%);
  transform: translate3d(calc(var(--mx, 0) * 1.5%), calc(var(--my, 0) * 1.5%), 0);
  transition: transform 700ms var(--ease);
}

.runtime-word {
  position: absolute;
  top: 7%;
  left: -2%;
  font-size: clamp(5rem, 11vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  opacity: 0.09;
  transform: translateZ(-30px);
}

.runtime-stage {
  position: absolute;
  inset: 15% 7% 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  perspective: 1200px;
}

.runtime-layer {
  --lift: 0px;
  position: relative;
  margin: 0;
  min-height: clamp(7rem, 9vw, 8.6rem);
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.4rem;
  border: 0;
  color: var(--ink);
  background: oklch(0.91 0.015 82);
  box-shadow: 0 18px 50px oklch(0.05 0.01 255 / 0.24);
  text-align: left;
  cursor: default;
  transform: translate3d(calc(var(--mx, 0) * var(--depth)), calc(var(--my, 0) * var(--depth) + var(--lift)), calc(var(--z) * 1px)) rotateX(42deg);
  transform-origin: center bottom;
  transition: transform 520ms var(--ease), background-color 240ms var(--ease), opacity 240ms var(--ease);
}

.runtime-layer + .runtime-layer {
  margin-top: -2.35rem;
}

.runtime-layer:nth-child(1) { --z: 0; --depth: -0.12rem; }
.runtime-layer:nth-child(2) { --z: 25; --depth: -0.24rem; }
.runtime-layer:nth-child(3) { --z: 50; --depth: -0.36rem; }
.runtime-layer:nth-child(4) { --z: 75; --depth: -0.48rem; background: oklch(0.7 0.16 34); }

.runtime-layer:hover,
.runtime-layer:focus-visible {
  --lift: -1rem;
  z-index: 10;
  background: var(--paper);
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  transform: translate3d(0, var(--lift), 110px) rotateX(0deg) scale(1.025);
}

.runtime-layer > span:first-child,
.runtime-layer small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.runtime-layer b {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(0.9rem, 1.4vw, 1.2rem);
}

.runtime-layer small {
  display: block;
  opacity: 0.58;
}

.runtime-layer em {
  display: block;
  max-width: 43rem;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 240ms var(--ease), transform 320ms var(--ease);
}

.runtime-layer:hover em,
.runtime-layer:focus-visible em {
  opacity: 0.8;
  transform: translateY(0);
}

.runtime-layer > strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.media-evidence {
  color: var(--paper);
  background: oklch(0.52 0.17 34);
  container-type: inline-size;
}

.case-evidence .case-media {
  min-height: clamp(650px, 74vw, 930px);
}

.evidence-product-mark {
  position: absolute;
  top: clamp(1.5rem, 3vw, 3rem);
  left: clamp(1.5rem, 4vw, 4rem);
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.8rem, 1.2vw, 1.1rem);
  letter-spacing: 0.08em;
}

.evidence-pipeline {
  position: absolute;
  top: 22%;
  right: 5%;
  left: 5%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid oklch(0.95 0.02 82 / 0.45);
  border-bottom: 1px solid oklch(0.95 0.02 82 / 0.45);
}

.evidence-pipeline > div {
  position: relative;
  min-width: 0;
  min-height: clamp(13rem, 20vw, 18rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.2rem, 2vw, 2rem);
  border-right: 1px solid oklch(0.95 0.02 82 / 0.3);
  transition: color 240ms var(--ease), background-color 240ms var(--ease), transform 360ms var(--ease);
}

.evidence-pipeline > div:last-child {
  border-right: 0;
}

.evidence-pipeline > div:hover {
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-0.8rem);
}

.evidence-pipeline span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.evidence-pipeline strong {
  max-width: 100%;
  font-size: clamp(2.2rem, 3.4vw, 4rem);
  font-size: clamp(2.2rem, 6cqi, 4rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.evidence-pipeline p {
  max-width: 16rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  opacity: 0.78;
}

.evidence-result {
  position: absolute;
  right: 5%;
  bottom: 11%;
  left: 5%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
}

.evidence-result small,
.evidence-result span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evidence-result strong {
  grid-column: 1 / -1;
  font-size: clamp(2rem, 3.7vw, 4.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.evidence-result > span {
  grid-column: 2;
  grid-row: 1;
}

.media-cake {
  color: var(--ink);
  background: oklch(0.86 0.075 318);
}

.media-cake::before {
  content: "03 / 从灵感到可制作成品";
  position: absolute;
  z-index: 5;
  top: 1.5rem;
  left: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.cake-stage {
  position: absolute;
  inset: 9% 5% 13%;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.55fr);
  gap: clamp(1.2rem, 3vw, 3rem);
}

.cake-scene {
  position: relative;
  overflow: hidden;
  background: oklch(0.94 0.025 82);
}

.cake-brief,
.cake-structure-guide,
.cake-handoff {
  position: absolute;
  z-index: 5;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 360ms var(--ease), transform 520ms var(--ease);
}

.cake-brief {
  top: 8%;
  left: 7%;
  max-width: 70%;
  display: grid;
  gap: 0.55rem;
}

.cake-brief span,
.cake-structure-guide span,
.cake-handoff,
.cake-step-copy span,
.cake-step-copy small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cake-brief strong {
  font-size: clamp(1rem, 1.7vw, 1.45rem);
  line-height: 1.45;
}

.cake-structure-guide {
  inset: 8% 7%;
}

.cake-structure-guide i {
  display: block;
  height: 1px;
  margin-bottom: 23%;
  background: oklch(0.42 0.04 318 / 0.35);
}

.cake-structure-guide span {
  position: absolute;
  right: 0;
  bottom: 0;
}

.cake-canvas {
  position: absolute;
  inset: 13% 7% 10%;
  transform: translate3d(calc(var(--mx, 0) * 0.22rem), calc(var(--my, 0) * 0.22rem), 0) scale(0.86);
  transform-origin: center;
  transition: opacity 420ms var(--ease), transform 680ms var(--ease), filter 420ms var(--ease);
}

.cake-shadow,
.cake-layer {
  position: absolute;
  transition: transform 680ms var(--ease), background-color 460ms var(--ease), opacity 360ms var(--ease);
}

.cake-shadow {
  top: 75%;
  left: 8%;
  width: 84%;
  height: 12%;
  background: oklch(0.22 0.035 325 / 0.28);
  filter: blur(22px);
  transform: skewX(-17deg);
}

.cake-layer {
  overflow: hidden;
  background: oklch(0.91 0.06 72);
  box-shadow: inset 0 -1.2rem 1.8rem oklch(0.42 0.08 334 / 0.16), 0 1.4rem 3.4rem oklch(0.29 0.08 330 / 0.24);
}

.cake-layer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 28%;
  background: oklch(0.97 0.025 82);
  clip-path: polygon(0 0, 100% 0, 100% 44%, 92% 44%, 89% 88%, 82% 88%, 79% 44%, 64% 44%, 61% 72%, 55% 72%, 52% 44%, 36% 44%, 33% 82%, 26% 82%, 23% 44%, 0 44%);
}

.cake-layer-back {
  top: 16%;
  left: 34%;
  width: 32%;
  height: 21%;
  background: oklch(0.84 0.08 318);
}

.cake-layer-mid {
  top: 35%;
  left: 25%;
  width: 50%;
  height: 22%;
  background: oklch(0.65 0.16 344);
}

.cake-layer-front {
  top: 55%;
  left: 14%;
  width: 72%;
  height: 25%;
  background: oklch(0.91 0.06 72);
}

.cake-layer-front::after {
  content: "毕业季 / 04";
  position: absolute;
  inset: 46% 0 auto;
  color: oklch(0.39 0.08 335 / 0.64);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.46rem, 0.7vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: center;
}

.cake-mark {
  position: absolute;
  left: 7%;
  bottom: 6%;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.cake-handoff {
  top: 9%;
  right: 5%;
  bottom: 8%;
  width: 28%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: end;
  gap: 0.4rem;
}

.cake-handoff span {
  min-height: 4.3rem;
  display: grid;
  place-items: end center;
  padding-bottom: 0.45rem;
  border: 1px solid oklch(0.28 0.03 318 / 0.28);
}

.cake-handoff b {
  grid-column: 1 / -1;
  padding-top: 0.7rem;
  text-align: right;
}

.cake-step-copy {
  align-self: end;
  padding-bottom: 1.2rem;
}

.cake-step-copy p {
  margin: 0;
}

.cake-step-copy span,
.cake-step-copy strong,
.cake-step-copy small {
  display: block;
}

.cake-step-copy span {
  margin-bottom: 1.4rem;
  color: oklch(0.38 0.08 335);
}

.cake-step-copy strong {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 2.3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.cake-step-copy small {
  max-width: 28rem;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.68;
}

.cake-controls {
  position: absolute;
  z-index: 7;
  top: 14%;
  right: 5%;
  width: 30%;
  display: grid;
}

.cake-controls button {
  min-height: 3.4rem;
  padding: 0.8rem 0;
  border: 0;
  border-bottom: 1px solid oklch(0.27 0.02 325 / 0.28);
  color: oklch(0.3 0.025 325 / 0.58);
  background: transparent;
  font-size: clamp(0.68rem, 1vw, 0.86rem);
  text-align: left;
  cursor: pointer;
  transition: color 220ms var(--ease), transform 320ms var(--ease);
}

.cake-controls button:hover,
.cake-controls button:focus-visible,
.cake-controls button[aria-selected="true"] {
  color: oklch(0.47 0.17 344);
  transform: translateX(0.55rem);
}

.cake-stage[data-active-step="0"] .cake-brief,
.cake-stage[data-active-step="1"] .cake-structure-guide,
.cake-stage[data-active-step="3"] .cake-handoff {
  opacity: 1;
  transform: translateY(0);
}

.cake-stage[data-active-step="0"] .cake-canvas {
  opacity: 0.66;
  filter: saturate(0.42);
  transform: translate3d(0, 7%, 0) scale(0.82);
}

.cake-stage[data-active-step="1"] .cake-canvas {
  opacity: 0.78;
  filter: saturate(0.55);
  transform: translate3d(0, 3%, 0) scale(0.84);
}

.cake-stage[data-active-step="1"] .cake-layer-back {
  transform: translateY(-26%);
}

.cake-stage[data-active-step="1"] .cake-layer-mid {
  transform: translateY(2%);
}

.cake-stage[data-active-step="1"] .cake-layer-front {
  transform: translateY(22%);
}

.cake-stage[data-active-step="2"] .cake-canvas {
  opacity: 1;
  filter: saturate(1);
  transform: translate3d(0, 0, 0) scale(0.94);
}

.cake-stage[data-active-step="3"] .cake-canvas {
  opacity: 0.92;
  filter: saturate(0.82);
  transform: translate3d(-12%, 0, 0) scale(0.76);
}

.open-source {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8vw;
  padding-top: clamp(8rem, 12vw, 14rem);
  padding-bottom: clamp(8rem, 12vw, 14rem);
  color: var(--paper);
  background: var(--ink);
}

.open-source .section-label {
  margin-bottom: 3rem;
  color: oklch(0.77 0.01 82);
}

.open-source h2 {
  margin-bottom: 2rem;
  font-size: clamp(3rem, 5.7vw, 6.2rem);
}

.open-source-heading > p:last-child {
  max-width: 34rem;
  margin-bottom: 0;
  color: oklch(0.75 0.012 82);
  line-height: 1.75;
}

.project-index {
  align-self: end;
}

.project-index > :is(a, div) {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  min-height: 9.4rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line-dark);
  color: inherit;
  background: transparent;
  text-decoration: none;
  isolation: isolate;
  transition: color 240ms var(--ease), transform 360ms var(--ease);
}

.project-index > :last-child {
  border-bottom: 1px solid var(--line-dark);
}

.project-index > :is(a, div)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--signal);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 320ms var(--ease);
}

.project-index > :is(a, div):hover,
.project-index > :is(a, div):focus-visible {
  color: var(--paper);
  outline: 0;
  transform: translateX(0.8rem);
}

.project-index > :is(a, div):hover::before,
.project-index > :is(a, div):focus-visible::before {
  transform: scaleY(1);
}

.lab-number {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  opacity: 0.58;
}

.lab-copy {
  display: grid;
  gap: 0.7rem;
}

.lab-copy strong {
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  font-weight: 600;
}

.lab-copy small {
  max-width: 42rem;
  color: oklch(0.74 0.01 82);
  font-size: 0.8rem;
  line-height: 1.6;
}

.project-index b {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.contact {
  min-height: 82svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(7rem, 10vw, 11rem);
  color: var(--paper);
  background: oklch(0.12 0.01 255);
}

.contact .section-label {
  color: oklch(0.7 0.01 82);
}

.contact-copy {
  padding-block: clamp(4rem, 7vw, 7rem);
}

.contact h2 {
  max-width: 1100px;
  margin-bottom: clamp(3rem, 6vw, 6rem);
  font-size: clamp(2.8rem, 5.8vw, 6rem);
}

.contact-heading > p {
  margin-bottom: 1.4rem;
  color: oklch(0.7 0.02 82);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.contact-grid > div {
  min-height: 15rem;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  border-right: 1px solid var(--line-dark);
}

.contact-grid > div:last-child {
  border-right: 0;
}

.contact-grid small {
  display: block;
  margin-bottom: 3rem;
  color: oklch(0.68 0.015 82);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-grid strong {
  display: block;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.contact-grid p {
  max-width: 27rem;
  margin-bottom: 0;
  color: oklch(0.76 0.012 82);
  line-height: 1.7;
}

.contact-links {
  display: grid;
  gap: 1.3rem;
}

.contact-links a {
  position: relative;
  width: max-content;
  padding-bottom: 0.45rem;
  font-size: clamp(0.92rem, 1.3vw, 1.2rem);
  text-decoration: none;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.2rem 0 max(1.8rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-dark);
  color: oklch(0.68 0.01 82);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 5px;
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.74); }
  45% { opacity: 1; transform: scale(1); }
}

@media (pointer: coarse) {
  .brand,
  .site-header nav a,
  .header-status,
  .text-link,
  .runtime-layer,
  .cake-controls button,
  .project-index > :is(a, div),
  .contact-links a {
    min-height: 44px;
  }

  .runtime-layer em {
    opacity: 0.72;
    transform: none;
  }
}

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

  .site-header nav {
    display: none;
  }

  .position-heading,
  .work-heading,
  .open-source {
    grid-template-columns: 1fr;
  }

  .position {
    min-height: auto;
  }

  .hero-statement {
    grid-template-columns: 1fr;
    gap: 2.8rem;
  }

  .profile-strip,
  .stability-system {
    margin-left: 0;
  }

  .stability-system {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stability-system article:nth-child(2) {
    border-right: 0;
  }

  .stability-system article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-dark);
  }

  .work-heading > p:last-child {
    max-width: 42rem;
  }

  .case,
  .case-reverse {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding-top: 5rem;
    padding-bottom: 6rem;
  }

  .case-reverse .case-media,
  .case-reverse .case-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .case-copy {
    max-width: 48rem;
  }

  .open-source {
    gap: 5rem;
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-actions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-dark);
  }
}

@media (max-width: 640px) {
  :root {
    --page-x: max(1.15rem, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  .site-header {
    min-height: calc(66px + env(safe-area-inset-top));
  }

  .desktop-break {
    display: none;
  }

  .brand small {
    display: none;
  }

  .header-status {
    font-size: 0.58rem;
  }

  .hero {
    min-height: max(900px, 100svh);
    padding-top: 5.7rem;
    padding-bottom: 1.25rem;
  }

  .hero-monogram {
    top: 12%;
    right: -0.06em;
    font-size: 24rem;
  }

  .hero-kicker {
    display: block;
    margin-top: 0.7rem;
  }

  .hero-kicker span {
    display: none;
  }

  h1 {
    line-height: 0.92;
  }

  .hero-name {
    font-size: clamp(4.5rem, 20vw, 5.8rem);
    line-height: 0.82;
    letter-spacing: -0.105em;
  }

  .hero-statement {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 2.4rem;
    padding-top: 2.8rem;
  }

  .hero-principle {
    font-size: clamp(2rem, 9.2vw, 2.7rem);
  }

  .hero-summary {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .text-link {
    width: max-content;
  }

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

  .hero-foot > :nth-child(2) {
    display: none;
  }

  .position-copy h2,
  .work-heading h2,
  .open-source h2,
  .contact h2 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
    line-height: 1;
  }

  .position-copy h2 {
    font-size: clamp(2.6rem, 10.8vw, 3rem);
  }

  .work-heading h2,
  .contact h2 {
    font-size: clamp(2.3rem, 10vw, 2.8rem);
  }

  .position {
    padding-top: 6rem;
    padding-bottom: 5rem;
  }

  .position-heading {
    gap: 2rem;
  }

  .profile-strip {
    grid-template-columns: 1fr;
    margin-top: 3rem;
  }

  .profile-strip p,
  .profile-strip p:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .profile-strip p:last-child {
    border-bottom: 0;
  }

  .stability-system {
    grid-template-columns: 1fr;
    margin-top: 4rem;
  }

  .stability-system article,
  .stability-system article:nth-child(2) {
    min-height: auto;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .stability-system article:last-child {
    border-bottom: 0;
  }

  .stability-system article > p:first-child {
    margin-bottom: 3rem;
  }

  .work-heading {
    padding-bottom: 2rem;
  }

  .case,
  .case-reverse {
    gap: 2.6rem;
    padding-inline: var(--page-x);
  }

  .case-media {
    min-height: 68svh;
  }

  .media-runtime,
  .case-evidence .case-media,
  .media-cake {
    min-height: 840px;
  }

  .case-copy h3 {
    font-size: clamp(2.9rem, 15vw, 4.8rem);
  }

  .runtime-stage {
    inset: 11% 5% 8%;
  }

  .runtime-layer {
    min-height: 10.5rem;
    grid-template-columns: 1.8rem minmax(0, 1fr);
    padding: 0.9rem;
    transform: rotateX(18deg);
  }

  .runtime-layer + .runtime-layer {
    margin-top: -1.5rem;
  }

  .runtime-layer em {
    opacity: 0.72;
    transform: none;
  }

  .runtime-layer > strong {
    display: none;
  }

  .evidence-product-mark {
    top: 1.2rem;
    left: 1rem;
  }

  .evidence-pipeline {
    top: 10%;
    right: 4%;
    left: 4%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-pipeline > div {
    min-height: 12rem;
    padding: 1rem;
  }

  .evidence-pipeline > div:nth-child(2) {
    border-right: 0;
  }

  .evidence-pipeline > div:nth-child(-n + 2) {
    border-bottom: 1px solid oklch(0.95 0.02 82 / 0.3);
  }

  .evidence-result {
    right: 4%;
    bottom: 9%;
    left: 4%;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .evidence-result > span {
    grid-column: 1;
    grid-row: auto;
  }

  .evidence-result strong {
    font-size: clamp(1.4rem, 7vw, 2.4rem);
  }

  .cake-stage {
    inset: 8% 5% 18%;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.35fr) auto;
    gap: 1.2rem;
  }

  .cake-step-copy strong {
    font-size: 1.45rem;
  }

  .cake-controls {
    top: auto;
    right: 5%;
    bottom: 7%;
    width: 90%;
    grid-template-columns: repeat(4, 1fr);
  }

  .cake-controls button {
    padding: 0.65rem 0.25rem;
    text-align: center;
    font-size: 0.72rem;
  }

  .media-caption {
    left: 1rem;
    right: 1rem;
    font-size: 0.54rem;
  }

  .media-caption span:last-child {
    text-align: right;
  }

  .project-index > :is(a, div) {
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.8rem 1rem;
    min-height: 10rem;
    padding-inline: 0.6rem;
  }

  .project-index b {
    grid-column: 2;
  }

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

  .contact-grid > div,
  .contact-grid > div:last-child {
    min-height: auto;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .contact-grid > div:last-child {
    border-bottom: 0;
  }

  .contact-grid small {
    margin-bottom: 2rem;
  }

  .contact-actions {
    grid-column: auto;
    border-top: 0;
  }

  footer {
    flex-direction: column;
  }

  .scene-transition {
    height: 10rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-intro],
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

}


/* Scroll progress is the clock. Native View Timelines run off the compositor;
   scroll-scrub.js supplies the same continuous state where they are unavailable. */
[data-reveal],
[data-scroll-visual] {
  opacity: 1;
  translate: none;
  scale: none;
}

@keyframes scrub-content-reveal {
  from {
    opacity: 0.06;
    translate: 0 5.5rem;
    filter: blur(7px);
    clip-path: inset(0 0 22% 0);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes scrub-visual-reveal {
  from {
    opacity: 0.34;
    translate: 0 7rem;
    scale: 0.94;
    clip-path: inset(11% 0 14% 0);
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes scrub-hero-exit {
  from {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
  to {
    opacity: 0;
    translate: 0 -4.5rem;
    scale: 0.965;
  }
}

@supports (animation-timeline: view()) {
  .has-scroll-scrub .hero-copy,
  .has-scroll-scrub .hero-foot {
    animation: scrub-hero-exit linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 820px;
  }

  .has-scroll-scrub [data-reveal] {
    animation: scrub-content-reveal linear both;
    animation-timeline: view();
    animation-range: entry 4% cover 38%;
  }

  .has-scroll-scrub [data-scroll-visual] {
    animation: scrub-visual-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 43%;
  }

  .has-scroll-scrub .stability-system [data-reveal]:nth-child(2),
  .has-scroll-scrub .project-index [data-reveal]:nth-child(2) {
    animation-range: entry 7% cover 41%;
  }

  .has-scroll-scrub .stability-system [data-reveal]:nth-child(3),
  .has-scroll-scrub .project-index [data-reveal]:nth-child(3) {
    animation-range: entry 10% cover 44%;
  }

  .has-scroll-scrub .stability-system [data-reveal]:nth-child(4) {
    animation-range: entry 13% cover 47%;
  }
}

.scroll-scrub-fallback [data-reveal],
.scroll-scrub-fallback [data-scroll-visual] {
  opacity: var(--scrub-opacity, 1);
  translate: 0 var(--scrub-y, 0px);
  scale: var(--scrub-scale, 1);
  filter: blur(var(--scrub-blur, 0px));
  clip-path: inset(0 0 var(--scrub-clip, 0%) 0);
  will-change: opacity, translate, scale, clip-path;
}

.scroll-scrub-fallback [data-scroll-visual] {
  contain: layout paint;
}

.scroll-scrub-fallback .hero-copy,
.scroll-scrub-fallback .hero-foot {
  opacity: var(--hero-scroll-opacity, 1);
  translate: 0 var(--hero-scroll-y, 0px);
  scale: var(--hero-scroll-scale, 1);
  will-change: opacity, translate, scale;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-scroll-visual],
  .hero-copy,
  .hero-foot {
    animation: none !important;
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    filter: none !important;
    clip-path: none !important;
  }
}
