@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;

  --ink-50: oklch(97% 0.012 85);
  --ink-100: oklch(93% 0.012 250);
  --ink-300: oklch(76% 0.018 250);
  --ink-500: oklch(58% 0.018 250);
  --ink-800: oklch(25% 0.014 250);
  --ink-900: oklch(17% 0.012 250);
  --ink-950: oklch(10% 0.012 250);
  --blue-500: oklch(59% 0.25 263);

  --surface-canvas: #05070c;
  --surface-raised: #0b1019;
  --surface-overlay: #111824;
  --surface-hero: #080a0f;
  --text-primary: var(--ink-50);
  --text-secondary: color-mix(in oklch, var(--ink-50) 82%, transparent);
  --text-tertiary: color-mix(in oklch, var(--ink-50) 78%, transparent);
  --border-subtle: color-mix(in oklch, var(--ink-50) 10%, transparent);
  --border-default: color-mix(in oklch, var(--ink-50) 18%, transparent);
  --focus-ring: #f9f0d7;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius-control: 0.5rem;
  --radius-frame: 1.25rem;
  --radius-cursor: 999px;
  --shadow-frame:
    0 2.5rem 5rem color-mix(in oklch, var(--ink-950) 42%, transparent),
    0 0.5rem 1.25rem color-mix(in oklch, var(--ink-950) 28%, transparent);

  --motion-fast: 120ms;
  --motion-base: 200ms;
  --motion-medium: 280ms;
  --motion-slow: 400ms;
  --motion-story: 600ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);

  --header-height: 4.5rem;
  --z-base: 0;
  --z-raised: 1;
  --z-sticky: 20;
  --z-tooltip: 60;
}

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

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  background: var(--surface-canvas);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family:
    "Space Grotesk",
    "Microsoft YaHei UI",
    "PingFang SC",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
a {
  font: inherit;
}

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

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

::selection {
  color: #081126;
  background: #f9f0d7;
}

.lang-zh {
  display: none;
}

html[data-lang="en"] .lang-zh {
  display: none;
}

html[data-lang="zh"] .lang-en {
  display: none;
}

html[data-lang="zh"] .lang-zh {
  display: inline;
}

html[data-lang="zh"] h1,
html[data-lang="zh"] h2 {
  letter-spacing: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: calc(var(--z-tooltip) + 1);
  top: var(--space-4);
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  color: var(--surface-canvas);
  background: var(--text-primary);
  transform: translateY(-180%);
  transition: transform var(--motion-base) var(--ease-out);
}

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

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.site-header {
  position: fixed;
  z-index: var(--z-sticky);
  inset: 0 0 auto;
  height: var(--header-height);
  color: var(--text-primary);
  background: color-mix(in oklch, var(--surface-canvas) 0%, transparent);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--motion-base) var(--ease-out),
    border-color var(--motion-base) var(--ease-out);
}

.site-header.is-scrolled {
  background: color-mix(in oklch, var(--surface-canvas) 84%, transparent);
  border-color: var(--border-subtle);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header.is-scrolled {
    backdrop-filter: blur(8px);
  }
}

.header-inner,
.footer-layout {
  width: min(100% - clamp(2rem, 5vw, 6rem), 112rem);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
}

.brand-text {
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-4), 3vw, var(--space-8));
}

.main-nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color var(--motion-fast) var(--ease-out);
}

.language-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  background: color-mix(in oklch, var(--surface-canvas) 28%, transparent);
}

.language-control button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  color: var(--text-tertiary);
  background: transparent;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

.language-control button[aria-pressed="true"] {
  color: var(--text-primary);
  background: color-mix(in oklch, var(--text-primary) 12%, transparent);
}

.language-control button:active {
  transform: scale(0.97);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  --hero-accent: #2f6cf6;
  padding: calc(var(--header-height) + var(--space-4)) clamp(1rem, 2.5vw, 3rem) var(--space-4);
  overflow: hidden;
  color: #f9f3e5;
  background: var(--surface-hero);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0 46%, color-mix(in oklch, var(--hero-accent) 8%, transparent) 46% 68%, transparent 68%),
    linear-gradient(180deg, rgb(255 255 255 / 2%), transparent 28%);
  transition: background-color var(--motion-slow) var(--ease-emphasized);
}

.hero-grid {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgb(255 255 255 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 7%) 1px, transparent 1px);
  background-size: clamp(4rem, 7vw, 8rem) clamp(4rem, 7vw, 8rem);
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.hero-shell {
  width: min(100%, 112rem);
  min-width: 0;
  min-height: 38rem;
  height: calc(100svh - var(--header-height) - var(--space-8));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(19rem, 0.76fr) minmax(30rem, 1.36fr) minmax(11rem, 0.38fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(var(--space-6), 2.5vw, var(--space-12));
}

.hero-copy {
  z-index: 1;
  min-width: 0;
  max-width: 38rem;
  align-self: center;
  padding-block: var(--space-8);
}

.hero-kicker {
  width: fit-content;
  margin: 0 0 var(--space-6);
  padding-bottom: var(--space-2);
  color: color-mix(in oklch, #f9f3e5 58%, transparent);
  border-bottom: 1px solid var(--hero-accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color var(--motion-slow) var(--ease-emphasized);
}

.hero h1 {
  margin: 0;
  color: #f9f3e5;
  font-size: clamp(3.5rem, 4.6vw, 5.9rem);
  font-weight: 610;
  line-height: 0.93;
  letter-spacing: -0.06em;
  text-wrap: pretty;
}

.hero-copy-text {
  display: block;
  white-space: pre-line;
}

html[data-lang="zh"] .hero h1 {
  font-size: clamp(3.35rem, 4.45vw, 5.65rem);
  line-height: 1.04;
  font-weight: 620;
}

.hero-title-tail {
  display: block;
  margin-top: 0.18em;
  color: var(--hero-accent);
  transition: color var(--motion-slow) var(--ease-emphasized);
}

.hero-lead {
  max-width: 33rem;
  margin: var(--space-6) 0 0;
  color: color-mix(in oklch, #f9f3e5 66%, transparent);
  font-size: clamp(0.9375rem, 1vw, 1.0625rem);
  line-height: 1.62;
  text-wrap: pretty;
}

html[data-lang="zh"] .hero-lead {
  line-height: 1.72;
}

.hero-actions {
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
}

.hero-primary {
  min-height: 3.25rem;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding-inline: var(--space-6);
  border-radius: var(--radius-control);
  color: #090b10;
  background: #f9f3e5;
  box-shadow:
    0 0.75rem 1.5rem rgb(0 0 0 / 26%),
    inset 0 0 0 1px rgb(255 255 255 / 42%);
  font-size: 0.875rem;
  font-weight: 650;
  transition:
    background-color var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-base) var(--ease-out);
}

.hero-primary svg {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform var(--motion-base) var(--ease-out);
}

.hero-primary:active {
  transform: scale(0.98);
}

.hero-live {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: color-mix(in oklch, #f9f3e5 74%, transparent);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hero-live i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 0 0.25rem rgb(134 239 172 / 14%);
}

.hero-showcase {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-2);
  padding-block: var(--space-4);
}

.hero-showcase-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  color: color-mix(in oklch, #f9f3e5 76%, transparent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-showcase-heading p {
  margin: 0;
  color: #f9f3e5;
  font-size: 0.75rem;
  font-weight: 650;
}

.hero-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in oklch, #f9f3e5 14%, transparent);
  background: #0c1018;
  box-shadow: 0 2.5rem 6rem rgb(0 0 0 / 36%);
}

.hero-stage-accent {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  color: var(--hero-accent);
  background:
    radial-gradient(
      82% 74% at 78% 24%,
      color-mix(in oklch, var(--hero-accent) 24%, transparent),
      transparent 68%
    ),
    radial-gradient(
      68% 80% at 16% 92%,
      color-mix(in oklch, var(--hero-accent) 11%, transparent),
      transparent 72%
    ),
    linear-gradient(135deg, #0e151f 0%, #0a1018 58%, #080d14 100%);
  transition:
    color var(--motion-slow) var(--ease-emphasized),
    background-color var(--motion-slow) var(--ease-emphasized);
}

.hero-stage-stack {
  position: absolute;
  z-index: 2;
  inset: clamp(2.5rem, 7vh, 4.5rem) clamp(1.25rem, 3vw, 3rem) clamp(3.75rem, 8vh, 5.5rem);
}

.hero-stage-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(100% 0 0 0);
  transform: translate3d(0, 6%, 0) scale(0.975);
  transition:
    opacity var(--motion-base) var(--ease-out),
    clip-path var(--motion-slow) var(--ease-emphasized),
    transform var(--motion-slow) var(--ease-emphasized);
}

.hero-stage-slide.is-active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transform: translate3d(0, 0, 0) scale(1);
}

.hero-stage-screen {
  width: min(100%, 62rem);
  height: auto;
  aspect-ratio: 16 / 10;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 0.625rem;
  background: #e9edf5;
  box-shadow:
    0 2.5rem 5rem rgb(0 0 0 / 32%),
    0 0 0 0.5rem rgb(8 10 15 / 13%);
}

.hero-stage-slide .tilt-plane {
  display: grid;
  place-items: center;
}

.hero-stage-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0b1018;
}

.hero-stage-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: 1px solid rgb(0 0 0 / 10%);
  outline-offset: -1px;
}

.hero-stage-media.is-portrait {
  background:
    linear-gradient(90deg, rgb(8 10 15 / 78%), transparent 38% 62%, rgb(8 10 15 / 78%)),
    color-mix(in oklch, var(--slide-accent) 20%, #151a26);
}

.hero-stage-media.is-portrait img {
  inset-inline: 23%;
  width: 54%;
}

.hero-stage-meta {
  min-width: 0;
  min-height: 4.125rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-4);
  padding-inline: var(--space-4);
  color: var(--text-primary);
  background: #090c12;
}

.hero-stage-index {
  color: var(--slide-accent);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.hero-stage-name {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.hero-stage-name strong {
  font-size: 0.875rem;
  font-weight: 650;
}

.hero-stage-name small,
.hero-stage-state {
  overflow: hidden;
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-stage-state {
  color: color-mix(in oklch, var(--slide-accent) 72%, #ffffff);
}

.hero-stage-meta svg {
  width: 1rem;
  height: 1rem;
  color: var(--slide-accent);
}

.hero-stage-count {
  position: absolute;
  z-index: 3;
  top: var(--space-4);
  left: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: #080a0f;
}

.hero-stage-count strong {
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-stage-count i {
  width: clamp(2rem, 4vw, 4rem);
  height: 1px;
  background: currentColor;
  opacity: 0.42;
}

.hero-stage-count span {
  font-size: 0.5625rem;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.hero-directory {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-block: var(--space-4);
  border-left: 1px solid color-mix(in oklch, #f9f3e5 14%, transparent);
}

.hero-directory > p {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding-inline: var(--space-4);
  color: color-mix(in oklch, #f9f3e5 76%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-directory-list {
  min-width: 0;
  display: grid;
  grid-auto-rows: minmax(3.5rem, 1fr);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: color-mix(in oklch, #f9f3e5 22%, transparent) transparent;
  scrollbar-width: thin;
}

.hero-directory-item {
  position: relative;
  min-width: 0;
  min-height: 3.5rem;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  border-top: 1px solid color-mix(in oklch, #f9f3e5 10%, transparent);
  transition:
    color var(--motion-fast) var(--ease-out),
    background-color var(--motion-base) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out);
}

.hero-directory-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--item-accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--motion-base) var(--ease-out);
}

.hero-directory-number {
  color: color-mix(in oklch, #f9f3e5 64%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color var(--motion-fast) var(--ease-out);
}

.hero-directory-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.hero-directory-copy strong {
  overflow: hidden;
  color: color-mix(in oklch, #f9f3e5 72%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--motion-fast) var(--ease-out);
}

.hero-directory-copy small {
  overflow: hidden;
  color: color-mix(in oklch, #f9f3e5 34%, transparent);
  font-size: 0.625rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-directory-item.is-active {
  background: color-mix(in oklch, var(--item-accent) 11%, transparent);
}

.hero-directory-item.is-active::before {
  transform: scaleY(1);
}

.hero-directory-item.is-active .hero-directory-number {
  color: var(--item-accent);
}

.hero-directory-item.is-active .hero-directory-copy strong {
  color: #f9f3e5;
}

.tilt-plane {
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: perspective(75rem) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0);
}

.screen-frame {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 2.375rem minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-frame);
  background: var(--surface-raised);
  box-shadow: var(--shadow-frame);
  outline: 1px solid rgb(255 255 255 / 10%);
  outline-offset: -1px;
}

.screen-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding-inline: var(--space-4);
  color: var(--text-tertiary);
  background: var(--surface-overlay);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.screen-bar > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-bar svg {
  width: 1rem;
  height: 1rem;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
}

.window-dots i {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: color-mix(in oklch, var(--text-primary) 32%, transparent);
}

.screen-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #eef1f7;
  outline: 1px solid rgb(255 255 255 / 10%);
  outline-offset: -1px;
}

.text-link,
.scene-action,
.back-to-top {
  min-height: 2.75rem;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.text-link svg,
.scene-action svg {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform var(--motion-base) var(--ease-out);
}

.project-experience {
  position: relative;
  isolation: isolate;
  background: var(--surface-canvas);
}

.project-scene {
  position: sticky;
  z-index: var(--scene-order);
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  color: var(--text-primary);
  background-color: #080d14;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.project-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      72% 68% at 74% 22%,
      color-mix(in oklch, var(--project-accent) 18%, transparent),
      transparent 68%
    ),
    radial-gradient(
      58% 78% at 12% 92%,
      color-mix(in oklch, var(--project-accent) 8%, transparent),
      transparent 72%
    ),
    linear-gradient(135deg, #101722 0%, #080d14 66%, #070b11 100%);
}

.project-scene::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: clamp(5rem, 9vw, 10rem) clamp(5rem, 9vw, 10rem);
  mask-image: linear-gradient(90deg, black, transparent 72%);
  opacity: 0.12;
}

.scene-watermark {
  position: absolute;
  z-index: 0;
  right: -0.04em;
  bottom: -0.26em;
  color: rgb(255 255 255 / 3%);
  font-size: min(48vw, 46rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.1em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.scene-copy {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: clamp(1.5rem, 4.5vw, 5.5rem);
  width: min(33vw, 35rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateY(-45%);
}

.scene-meta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.scene-index {
  min-width: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.scene-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
}

.scene-state::before {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 50%;
  background: var(--project-accent);
  box-shadow: 0 0 0 0.25rem color-mix(in oklch, var(--project-accent) 18%, transparent);
}

.scene-copy h2 {
  max-width: 100%;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(4rem, 8vw, 9.5rem);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.075em;
  text-shadow: 0 0.04em 0.16em color-mix(in oklch, var(--surface-canvas) 68%, transparent);
  text-wrap: balance;
}

.scene-copy > p {
  margin: var(--space-6) 0 0;
  color: var(--text-secondary);
  font-size: clamp(0.875rem, 1.2vw, 1.125rem);
}

.scene-action {
  margin-top: var(--space-12);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid color-mix(in oklch, var(--text-primary) 42%, transparent);
  transition:
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out);
}

.scene-action.is-disabled {
  color: var(--text-tertiary);
  border-color: transparent;
}

.scene-media {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: clamp(1.5rem, 5vw, 6rem);
  width: min(68vw, 76rem);
  aspect-ratio: 16 / 10;
  transform: translateY(-50%) rotate(1.5deg);
  transform-origin: center;
}

.scene-align-right .scene-copy {
  right: clamp(1.5rem, 4.5vw, 5.5rem);
  left: auto;
  align-items: flex-end;
  text-align: right;
}

.scene-align-right .scene-meta {
  justify-content: flex-end;
}

.scene-align-right .scene-media {
  right: auto;
  left: clamp(1.5rem, 5vw, 6rem);
  transform: translateY(-50%) rotate(-1.5deg);
}

.project-scene.is-portrait .scene-media {
  right: clamp(4rem, 15vw, 18rem);
  width: min(31vw, 29rem);
  height: min(76svh, 52rem);
  aspect-ratio: 684 / 1252;
}

.project-scene.is-portrait.scene-align-right .scene-media {
  right: auto;
  left: clamp(4rem, 17vw, 20rem);
}

.project-scene.is-portrait .screen-frame > img {
  object-position: top center;
}

.scene-edge {
  position: absolute;
  z-index: 5;
  top: calc(var(--header-height) + var(--space-6));
  right: clamp(1rem, 2vw, 2.5rem);
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  color: var(--text-tertiary);
  font-size: 0.625rem;
  font-weight: 500;
  writing-mode: vertical-rl;
  font-variant-numeric: tabular-nums;
}

.scene-edge i {
  width: 1px;
  height: clamp(3rem, 12vh, 8rem);
  background: color-mix(in oklch, var(--text-primary) 26%, transparent);
}

.screen-number {
  font-variant-numeric: tabular-nums;
}

.has-js .project-scene .scene-copy {
  opacity: 0;
  transform: translateY(calc(-45% + 2rem));
  transition:
    opacity var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
}

.has-js .project-scene .scene-media {
  opacity: 0;
  clip-path: inset(8% 42% round var(--radius-frame));
  transition:
    opacity var(--motion-medium) var(--ease-out),
    clip-path var(--motion-story) var(--ease-emphasized),
    transform var(--motion-story) var(--ease-emphasized);
}

.has-js .project-scene.is-scene-visible .scene-copy {
  opacity: 1;
  transform: translateY(-45%);
}

.has-js .project-scene.is-scene-visible .scene-media {
  opacity: 1;
  clip-path: inset(0 round var(--radius-frame));
}

.has-js .project-scene.is-scene-visible.scene-align-left .scene-media {
  transform: translateY(-50%) rotate(1.5deg);
}

.has-js .project-scene.is-scene-visible.scene-align-right .scene-media {
  transform: translateY(-50%) rotate(-1.5deg);
}

.site-footer {
  position: relative;
  z-index: 10;
  min-height: 55svh;
  background: #f1ead9;
  color: #111522;
}

.footer-layout {
  min-height: 55svh;
  align-items: flex-end;
  padding-block: var(--space-24) var(--space-12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-brand strong {
  max-width: 8ch;
  font-size: clamp(3.5rem, 8vw, 9rem);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.075em;
}

.footer-brand > span {
  color: color-mix(in oklch, #111522 62%, transparent);
  font-size: 0.875rem;
}

.site-footer .language-control {
  border-color: rgb(17 21 34 / 14%);
  background: rgb(17 21 34 / 5%);
}

.site-footer .language-control button {
  color: rgb(17 21 34 / 54%);
}

.site-footer .language-control button[aria-pressed="true"] {
  color: #111522;
  background: rgb(17 21 34 / 10%);
}

.back-to-top {
  align-self: flex-end;
  border-bottom: 1px solid rgb(17 21 34 / 34%);
}

.stage-cursor {
  position: fixed;
  z-index: var(--z-tooltip);
  top: 0;
  left: 0;
  width: 4.75rem;
  height: 4.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-cursor);
  color: #081126;
  background: #f9f0d7;
  box-shadow:
    0 1rem 2rem rgb(0 0 0 / 18%),
    0 0.25rem 0.75rem rgb(0 0 0 / 12%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-8rem, -8rem, 0) scale(0.85);
  transition:
    opacity var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
  font-size: 0.6875rem;
  font-weight: 650;
  text-align: center;
}

.stage-cursor.is-visible {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover,
  .brand:hover {
    color: var(--text-primary);
  }

  .tilt-surface:not([aria-disabled="true"]) {
    cursor: none;
  }

  .tilt-surface.is-tilting .tilt-plane {
    will-change: transform;
  }

  .text-link:hover svg,
  .scene-action:hover svg,
  .hero-primary:hover svg {
    transform: translate(0.2rem, -0.2rem);
  }

  .hero-primary:hover {
    background: #ffffff;
    box-shadow:
      0 1rem 2rem rgb(0 0 0 / 30%),
      inset 0 0 0 1px rgb(255 255 255 / 54%);
  }

  .hero-directory-item:hover {
    background: color-mix(in oklch, var(--item-accent) 9%, transparent);
  }

  .hero-directory-item:hover::before {
    transform: scaleY(1);
  }

  .hero-directory-item:hover .hero-directory-copy strong {
    color: #f9f3e5;
  }

  .scene-action:hover {
    border-color: var(--text-primary);
  }

  .back-to-top:hover {
    border-color: #111522;
  }
}

@media (max-width: 68rem) {
  .scene-copy {
    width: min(36vw, 26rem);
  }

  .scene-media {
    width: 66vw;
  }

  .scene-copy h2 {
    font-size: clamp(3.5rem, 7.8vw, 6.5rem);
  }

  .project-scene.is-portrait .scene-media {
    right: 10vw;
    width: min(35vw, 25rem);
  }

  .project-scene.is-portrait.scene-align-right .scene-media {
    left: 11vw;
  }
}

@media (max-width: 56.25rem) {
  :root {
    --header-height: 4rem;
  }

  .header-inner,
  .footer-layout {
    width: min(100% - 2rem, 46rem);
  }

  .main-nav {
    display: none;
  }

  .brand-text {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-6)) 1rem var(--space-12);
    overflow: hidden;
  }

  .hero-shell {
    width: min(100%, 46rem);
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: var(--space-10, 2.5rem);
  }

  .hero-copy {
    max-width: 39rem;
    padding-block: var(--space-4) 0;
  }

  .hero-kicker {
    margin-bottom: var(--space-4);
  }

  .hero h1 {
    max-width: 44rem;
    font-size: clamp(3.25rem, 10.8vw, 5.5rem);
    line-height: 0.94;
  }

  html[data-lang="zh"] .hero h1 {
    font-size: clamp(3.2rem, 10.8vw, 5.4rem);
    line-height: 1.04;
  }

  .hero-lead {
    max-width: 36rem;
    margin-top: var(--space-4);
  }

  .hero-actions {
    margin-top: var(--space-6);
  }

  .hero-showcase {
    width: 100%;
    align-self: auto;
    height: clamp(25rem, 72vw, 34rem);
    padding-block: 0;
  }

  .hero-stage-stack {
    inset: clamp(2.75rem, 8vw, 4rem) clamp(1rem, 4vw, 2rem) clamp(3.75rem, 9vw, 5rem);
  }

  .hero-directory {
    grid-template-rows: auto auto;
    padding-block: 0;
    border-left: 0;
    border-top: 1px solid color-mix(in oklch, #f9f3e5 14%, transparent);
  }

  .hero-directory > p {
    min-height: 3rem;
    padding-inline: var(--space-2);
  }

  .hero-directory-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(4.5rem, auto);
  }

  .hero-directory-item {
    border-left: 1px solid color-mix(in oklch, #f9f3e5 10%, transparent);
  }

  .hero-directory-item:nth-child(3n + 1) {
    border-left: 0;
  }

  .project-scene {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: calc(var(--header-height) + var(--space-12)) 1rem var(--space-16);
  }

  .project-scene::before {
    background:
      radial-gradient(
        82% 62% at 78% 18%,
        color-mix(in oklch, var(--project-accent) 16%, transparent),
        transparent 66%
      ),
      radial-gradient(
        64% 74% at 14% 88%,
        color-mix(in oklch, var(--project-accent) 7%, transparent),
        transparent 72%
      ),
      linear-gradient(145deg, #101722 0%, #080d14 68%, #070b11 100%);
  }

  .project-scene::after {
    mask-image: linear-gradient(to bottom, black, transparent 70%);
  }

  .scene-watermark {
    top: 0.04em;
    right: -0.05em;
    bottom: auto;
    font-size: 62vw;
  }

  .scene-copy,
  .scene-align-right .scene-copy {
    position: relative;
    z-index: 4;
    inset: auto;
    width: 100%;
    align-items: flex-start;
    text-align: left;
    transform: none;
  }

  .scene-align-right .scene-meta {
    justify-content: flex-start;
  }

  .scene-meta {
    margin-bottom: var(--space-8);
  }

  .scene-copy h2 {
    font-size: clamp(4rem, 20vw, 8rem);
    line-height: 0.84;
  }

  .scene-copy > p {
    margin-top: var(--space-4);
  }

  .scene-action {
    margin-top: var(--space-8);
  }

  .scene-media,
  .scene-align-right .scene-media,
  .project-scene.is-portrait .scene-media,
  .project-scene.is-portrait.scene-align-right .scene-media {
    position: relative;
    z-index: 4;
    inset: auto;
    width: 100%;
    height: auto;
    margin-top: var(--space-12);
    transform: rotate(-1deg);
  }

  .project-scene.is-portrait .scene-media {
    width: min(82vw, 28rem);
    align-self: center;
    aspect-ratio: 684 / 1252;
  }

  .scene-align-right .scene-media {
    transform: rotate(1deg);
  }

  .scene-edge {
    top: calc(var(--header-height) + var(--space-4));
    right: 1rem;
    writing-mode: horizontal-tb;
  }

  .scene-edge i,
  .scene-edge span:last-child {
    display: none;
  }

  .has-js .project-scene .scene-copy {
    transform: translateY(2rem);
  }

  .has-js .project-scene.is-scene-visible .scene-copy {
    transform: translateY(0);
  }

  .has-js .project-scene.is-scene-visible.scene-align-left .scene-media {
    transform: rotate(-1deg);
  }

  .has-js .project-scene.is-scene-visible.scene-align-right .scene-media {
    transform: rotate(1deg);
  }

  .site-footer,
  .footer-layout {
    min-height: 70svh;
  }

  .footer-layout {
    flex-wrap: wrap;
    align-content: flex-end;
    align-items: flex-end;
    padding-block: var(--space-24) max(var(--space-8), env(safe-area-inset-bottom));
  }

  .footer-brand {
    width: 100%;
    margin-bottom: var(--space-12);
  }

  .footer-brand strong {
    max-width: 100%;
    font-size: clamp(3.25rem, 13.5vw, 6rem);
    overflow-wrap: anywhere;
  }

  .stage-cursor {
    display: none;
  }
}

@media (max-width: 31rem) {
  .brand-text {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .language-control button {
    min-width: 2.75rem;
  }

  .screen-frame {
    grid-template-rows: 2rem minmax(0, 1fr);
    border-radius: 0.875rem;
  }

  .screen-bar {
    padding-inline: var(--space-3);
  }

  .hero h1 {
    font-size: clamp(2.875rem, 14.5vw, 4.25rem);
  }

  html[data-lang="zh"] .hero h1 {
    font-size: clamp(2.875rem, 14.5vw, 4.25rem);
  }

  .hero-showcase-heading > span {
    display: none;
  }

  .hero-showcase {
    height: 21.5rem;
  }

  .hero-stage-stack {
    inset: 2.75rem var(--space-3) 3.5rem;
  }

  .hero-stage-screen {
    border-radius: 0.375rem;
  }

  .hero-stage-meta {
    min-height: 3.5rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--space-2);
    padding-inline: var(--space-3);
  }

  .hero-stage-name small,
  .hero-stage-state {
    display: none;
  }

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

  .hero-directory-item,
  .hero-directory-item:nth-child(3n + 1) {
    border-left: 1px solid color-mix(in oklch, #f9f3e5 10%, transparent);
  }

  .hero-directory-item:nth-child(2n + 1) {
    border-left: 0;
  }

  .scene-copy h2 {
    font-size: clamp(3.5rem, 20vw, 6rem);
  }

  .footer-layout {
    gap: var(--space-6);
  }
}

@media (min-width: 56.3125rem) and (max-height: 44rem) {
  .hero {
    padding-top: calc(var(--header-height) + var(--space-2));
  }

  .hero h1 {
    font-size: clamp(3.25rem, 4.6vw, 5rem);
  }

  html[data-lang="zh"] .hero h1 {
    font-size: clamp(3.25rem, 4.8vw, 5rem);
  }

  .hero-copy {
    padding-block: var(--space-4);
  }

  .hero-lead {
    margin-top: var(--space-4);
    font-size: 0.9375rem;
  }

  .hero-actions {
    margin-top: var(--space-4);
  }

  .hero-shell {
    min-height: 31rem;
    gap: var(--space-6);
  }

  .hero-showcase {
    padding-block: var(--space-2);
  }

  .hero-directory-item {
    min-height: 2.75rem;
    padding-block: var(--space-1);
  }

  .hero-directory-copy small {
    display: none;
  }

  .scene-media {
    width: min(62vw, 60rem);
  }

  .project-scene.is-portrait .scene-media {
    height: 70svh;
  }
}

@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;
  }

  .has-js .project-scene .scene-copy,
  .has-js .project-scene .scene-media,
  .has-js .project-scene.is-scene-visible .scene-copy,
  .has-js .project-scene.is-scene-visible .scene-media {
    opacity: 1;
    clip-path: none;
  }

  .has-js .project-scene .scene-copy,
  .has-js .project-scene.is-scene-visible .scene-copy {
    transform: translateY(-45%);
  }

  .has-js .project-scene.scene-align-left .scene-media,
  .has-js .project-scene.is-scene-visible.scene-align-left .scene-media {
    transform: translateY(-50%) rotate(1.5deg);
  }

  .has-js .project-scene.scene-align-right .scene-media,
  .has-js .project-scene.is-scene-visible.scene-align-right .scene-media {
    transform: translateY(-50%) rotate(-1.5deg);
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 56.25rem) {
  .has-js .project-scene .scene-copy,
  .has-js .project-scene.is-scene-visible .scene-copy {
    transform: none;
  }

  .has-js .project-scene.scene-align-left .scene-media,
  .has-js .project-scene.is-scene-visible.scene-align-left .scene-media {
    transform: rotate(-1deg);
  }

  .has-js .project-scene.scene-align-right .scene-media,
  .has-js .project-scene.is-scene-visible.scene-align-right .scene-media {
    transform: rotate(1deg);
  }
}

/* Portfolio gallery: show every project in one consistent, scannable grid. */
.project-experience {
  position: relative;
  isolation: isolate;
  padding: clamp(5rem, 9vw, 9rem) clamp(1rem, 4vw, 4rem) clamp(6rem, 10vw, 10rem);
  background: #070b11;
}

.collection-heading {
  width: min(100%, 112rem);
  margin: 0 auto clamp(2.5rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 7rem);
}

.collection-kicker {
  width: fit-content;
  margin: 0 0 var(--space-6);
  padding-bottom: var(--space-2);
  color: color-mix(in oklch, var(--text-primary) 82%, transparent);
  border-bottom: 1px solid #38bdf8;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.collection-heading h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(3rem, 5vw, 5.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.collection-intro {
  max-width: 28rem;
  margin: 0 0 0.35rem auto;
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.2vw, 1.125rem);
  line-height: 1.6;
}

.project-gallery {
  width: min(100%, 112rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.project-gallery .project-scene {
  position: relative;
  z-index: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in oklch, var(--text-primary) 12%, transparent);
  border-radius: 1rem;
  background: #0b121c;
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 20%);
  scroll-margin-top: calc(var(--header-height) + var(--space-6));
  transition:
    border-color var(--motion-base) var(--ease-out),
    transform var(--motion-base) var(--ease-out),
    box-shadow var(--motion-base) var(--ease-out);
}

.project-gallery .project-scene::before,
.project-gallery .project-scene::after,
.project-gallery .scene-watermark,
.project-gallery .scene-edge {
  display: none;
}

.project-gallery .scene-media,
.project-gallery .project-scene.is-portrait .scene-media,
.project-gallery .project-scene.is-portrait.scene-align-right .scene-media {
  position: relative;
  inset: auto;
  z-index: 1;
  order: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  min-height: 0;
  flex: 0 0 auto;
  margin: 0;
  transform: none !important;
  opacity: 1 !important;
  clip-path: none !important;
  background: #0a1018;
}

.project-gallery .tilt-plane,
.project-gallery .screen-frame {
  width: 100%;
  height: 100%;
}

.project-gallery .screen-frame {
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: color-mix(in oklch, var(--project-accent) 7%, #0a1018);
  box-shadow: none;
}

.project-gallery .screen-bar {
  display: none;
}

.project-gallery .screen-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: color-mix(in oklch, var(--project-accent) 7%, #0a1018);
}

.project-gallery .project-scene.is-portrait .screen-frame > img {
  object-fit: cover;
  object-position: top center;
}

.project-gallery .scene-copy,
.project-gallery .scene-align-right .scene-copy {
  position: relative;
  inset: auto;
  z-index: 2;
  order: 2;
  width: 100%;
  min-height: 11.5rem;
  display: flex;
  align-items: flex-start;
  text-align: left;
  transform: none !important;
  opacity: 1 !important;
  padding: 1.15rem 1.25rem 1.3rem;
  background: #0d151f;
}

.project-gallery .scene-align-right .scene-meta {
  justify-content: flex-start;
}

.project-gallery .scene-meta {
  margin-bottom: 0.8rem;
  font-size: 0.8125rem;
}

.project-gallery .scene-index {
  min-width: 2rem;
  color: var(--project-accent);
  font-size: 0.8rem;
}

.project-gallery .scene-copy h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1.45rem, 2.25vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.project-gallery .scene-category {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.project-gallery .scene-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.65rem 0 0;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-gallery .scene-action {
  margin-top: auto;
  padding-bottom: 0.2rem;
  font-size: 0.875rem;
}

/* Keep the compact index legible when Chinese is active. */
.hero-directory-copy strong {
  font-size: clamp(0.875rem, 0.78vw, 1rem);
}

.hero-directory-copy small {
  color: color-mix(in oklch, #f9f3e5 72%, transparent);
  font-size: clamp(0.78rem, 0.7vw, 0.875rem);
}

@media (hover: hover) and (pointer: fine) {
  .project-gallery .project-scene:hover {
    border-color: color-mix(in oklch, var(--project-accent) 48%, transparent);
    box-shadow: 0 2rem 4rem rgb(0 0 0 / 28%);
    transform: translateY(-0.35rem);
  }
}

@media (max-width: 62.5rem) {
  .collection-heading {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.8fr);
    gap: 2rem;
  }

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

@media (max-width: 46rem) {
  .project-experience {
    padding: 4.5rem 1rem 6rem;
  }

  .collection-heading {
    display: block;
    margin-bottom: 2.5rem;
  }

  .collection-heading h1 {
    max-width: 10ch;
    font-size: clamp(2.75rem, 12vw, 4.5rem);
    line-height: 1.04;
  }

  .collection-intro {
    max-width: 32rem;
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-gallery .scene-copy {
    min-height: 10.75rem;
  }

  .project-gallery .scene-copy h2 {
    font-size: 1.75rem;
  }

  .project-gallery .scene-description {
    font-size: 0.875rem;
  }
}

/* Collection first: the homepage opens on the full portfolio, then reveals the live stage below. */
.hero {
  min-height: auto;
  padding: calc(var(--header-height) + 0.75rem) clamp(1rem, 4vw, 4rem) 1.25rem;
  overflow: visible;
}

.hero::before {
  background:
    radial-gradient(62% 100% at 10% 0%, rgb(56 189 248 / 9%), transparent 68%),
    linear-gradient(180deg, rgb(255 255 255 / 2%), transparent 65%);
}

.hero-shell {
  width: min(100%, 112rem);
  min-height: 0;
  height: auto;
  display: block;
}

.hero-copy {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(17rem, 0.9fr) minmax(18rem, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: clamp(1.5rem, 5vw, 6rem);
  padding-block: 0.5rem 0;
}

.hero-kicker {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: 1rem;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 4.4vw, 5.2rem);
  line-height: 0.96;
}

html[data-lang="zh"] .hero h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 4.4vw, 5.2rem);
  line-height: 1.08;
}

.hero-lead {
  grid-column: 2;
  grid-row: 2;
  max-width: 38rem;
  margin: 0;
  font-size: clamp(0.95rem, 1.25vw, 1.125rem);
}

.hero-actions {
  grid-column: 3;
  grid-row: 2;
  margin: 0;
  align-self: end;
  justify-content: flex-end;
}

.hero-showcase,
.hero-directory {
  min-height: 0;
}

.project-experience {
  padding-top: calc(var(--header-height) + clamp(2.5rem, 5vw, 5rem));
}

.collection-heading {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.collection-heading h1 {
  font-size: clamp(3rem, 5vw, 5.75rem);
}

.motion-showcase {
  --hero-accent: #2f6cf6;
  position: relative;
  isolation: isolate;
  padding: clamp(4.5rem, 7vw, 7rem) clamp(1rem, 4vw, 4rem) clamp(6rem, 9vw, 9rem);
  background:
    radial-gradient(64% 70% at 84% 12%, rgb(47 108 246 / 10%), transparent 70%),
    #080c13;
  border-top: 1px solid color-mix(in oklch, var(--text-primary) 10%, transparent);
}

.motion-heading {
  width: min(100%, 112rem);
  margin: 0 auto clamp(3rem, 5vw, 5rem);
}

.motion-heading h2 {
  max-width: 12ch;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(3rem, 5vw, 5.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.motion-heading > p {
  max-width: 28rem;
  margin: 0 0 0.35rem auto;
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.2vw, 1.08rem);
  line-height: 1.6;
}

.motion-layout {
  width: min(100%, 112rem);
  min-height: 40rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.28fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.motion-showcase .hero-showcase {
  min-width: 0;
  min-height: 40rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-2);
  padding: 0;
}

.motion-showcase .hero-stage {
  min-height: 0;
  height: 100%;
}

.motion-showcase .hero-directory {
  min-height: 0;
  height: 100%;
  padding-block: 0;
  border-left: 1px solid color-mix(in oklch, #f9f3e5 14%, transparent);
}

.motion-showcase .hero-directory-list {
  min-height: 0;
}

@media (max-width: 62.5rem) {
  .motion-layout {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.34fr);
  }
}

@media (max-width: 46rem) {
  .hero {
    padding-top: calc(var(--header-height) + 1.5rem);
    padding-bottom: 2rem;
  }

  .hero-copy {
    display: block;
    padding-top: 1.5rem;
  }

  .hero-kicker {
    margin-bottom: 1rem;
  }

  .hero-lead {
    margin-top: var(--space-4);
  }

  .hero-actions {
    margin-top: var(--space-5);
    justify-content: flex-start;
  }

  .hero h1,
  html[data-lang="zh"] .hero h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 14vw, 5.5rem);
  }

  .motion-showcase {
    padding: 4.5rem 1rem 6rem;
  }

  .motion-heading {
    display: block;
    margin-bottom: 2.5rem;
  }

  .motion-heading h2 {
    max-width: 10ch;
    font-size: clamp(2.75rem, 12vw, 4.5rem);
    line-height: 1.04;
  }

  .motion-layout {
    min-height: 0;
    display: block;
  }

  .motion-showcase .hero-showcase {
    min-height: 27rem;
  }

  .motion-showcase .hero-stage {
    min-height: 25rem;
  }

  .motion-showcase .hero-directory {
    height: auto;
    margin-top: 1.5rem;
    border-top: 1px solid color-mix(in oklch, #f9f3e5 14%, transparent);
    border-left: 0;
  }

  .motion-showcase .hero-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(4.5rem, auto);
  }
}

/* Toolume registry surfaces */
.tool-finder {
  width: min(100%, 112rem);
  margin: 0 auto 2rem;
}

.tool-finder > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tool-search-field {
  height: 4.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 1rem;
  background: rgb(15 22 33 / 88%);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 22%);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tool-search-field:focus-within {
  border-color: #46b8ff;
  box-shadow: 0 0 0 4px rgb(70 184 255 / 10%), 0 1.5rem 4rem rgb(0 0 0 / 25%);
}

.tool-search-field svg {
  width: 1.25rem;
  fill: none;
  stroke: #b8c4d6;
  stroke-width: 1.8;
}

.tool-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8f4e8;
  font: inherit;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.tool-search-field input::placeholder { color: #778399; opacity: 1; }
.tool-search-field kbd { color: #8793a8; font: 500 0.75rem/1 var(--font-sans); }

.tool-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.tool-filters button {
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 999px;
  background: #0d141e;
  color: #aeb9ca;
  font: 600 0.78rem/1 var(--font-sans);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-filters button:hover,
.tool-filters button[aria-pressed="true"] {
  border-color: rgb(70 184 255 / 52%);
  background: rgb(70 184 255 / 12%);
  color: #edf7ff;
}

.project-gallery .collection-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 1rem;
  background: #0b121c;
  color: inherit;
  text-decoration: none;
  transition: transform 200ms var(--ease-out), border-color 200ms ease, box-shadow 200ms ease;
}

.collection-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: color-mix(in oklch, var(--project-accent) 8%, #0a1018);
}

.collection-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 500ms var(--ease-out);
}

.collection-card-body {
  min-height: 5.4rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: #0d151f;
}

.collection-card-index { color: var(--project-accent); font-size: 0.72rem; font-weight: 700; }
.collection-card-copy { min-width: 0; display: grid; gap: 0.28rem; }
.collection-card-copy strong { color: #f8f4e8; font-size: 1rem; line-height: 1.2; }
.collection-card-copy small { color: #8f9aae; font-size: 0.78rem; line-height: 1.3; }
.collection-card-body > svg { width: 1rem; fill: none; stroke: #aeb9ca; stroke-width: 1.6; }

.collection-card:hover {
  transform: translateY(-0.3rem);
  border-color: color-mix(in oklch, var(--project-accent) 55%, transparent);
  box-shadow: 0 1.75rem 3.5rem rgb(0 0 0 / 28%);
}
.collection-card:hover img { transform: scale(1.025); }

.tool-catalog {
  width: min(100%, 112rem);
  margin: clamp(4rem, 7vw, 7rem) auto 0;
}

.tool-catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tool-catalog-heading h2 { margin: 0; color: #f8f4e8; font-size: clamp(2rem, 3vw, 3.25rem); letter-spacing: -0.045em; }
.tool-catalog-heading p { margin: 0; color: #8f9aae; font-size: 0.84rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.tool-card {
  min-width: 0;
  min-height: 8.5rem;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-items: start;
  gap: 0.75rem 0.9rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.85rem;
  background: #0b121b;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tool-card[hidden] { display: none; }
.tool-card:hover { transform: translateY(-2px); border-color: rgb(70 184 255 / 42%); background: #101b29; }
.tool-card-icon { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 0.7rem; background: rgb(70 184 255 / 10%); color: #dff3ff; font-size: 1rem; }
.tool-card-copy { min-width: 0; display: grid; gap: 0.45rem; }
.tool-card-copy strong { color: #f4f1e8; font-size: 0.94rem; line-height: 1.25; }
.tool-card-copy small { display: -webkit-box; overflow: hidden; color: #929eb1; font-size: 0.78rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tool-card-site { grid-column: 2; align-self: end; color: #657187; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tool-card > svg { width: 0.95rem; fill: none; stroke: #77869d; stroke-width: 1.7; }
.tool-empty { padding: 4rem 1rem; text-align: center; color: #9ca8bb; }

@media (max-width: 62.5rem) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 46rem) {
  .tool-search-field { height: 3.75rem; padding-inline: 1rem; }
  .tool-search-field kbd { display: none; }
  .tool-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.35rem; scrollbar-width: none; }
  .tool-filters::-webkit-scrollbar { display: none; }
  .tool-filters button { flex: 0 0 auto; }
  .project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-card-body { min-height: 4.8rem; padding: 0.8rem; gap: 0.6rem; }
  .collection-card-copy strong { font-size: 0.9rem; }
  .collection-card-copy small { font-size: 0.72rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 7.75rem; }
}

@media (max-width: 25rem) {
  .project-gallery { grid-template-columns: 1fr; }
}

/* Cohesive Toolume navigation and finder states */
.site-header {
  background: rgb(5 7 12 / 92%);
  border-bottom-color: rgb(255 255 255 / 9%);
}

.site-header:not(.is-scrolled) {
  background: rgb(5 7 12 / 88%);
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.brand-copy small {
  color: #748197;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  padding-inline: 0.75rem;
  border-radius: 0.55rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #f8f4e8;
  background: rgb(255 255 255 / 6%);
}

.header-search-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.65rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.65rem;
  color: #9ca9bd;
  background: #0b111a;
  font-size: 0.75rem;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.header-search-link:hover {
  color: #f4f7fb;
  border-color: rgb(70 184 255 / 42%);
  background: #0e1824;
}

.header-search-link svg {
  width: 1rem;
}

.header-search-link kbd {
  min-width: 1.3rem;
  padding: 0.22rem 0.32rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.35rem;
  color: #718098;
  text-align: center;
  font: 600 0.65rem/1 var(--font-sans);
}

.finder-status {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  padding-inline: 0.15rem;
}

.finder-status p {
  margin: 0;
  color: #aeb9ca;
  font-size: 0.82rem;
}

.finder-status button,
.finder-empty button,
.tool-empty button {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgb(70 184 255 / 34%);
  border-radius: 0.6rem;
  color: #dff3ff;
  background: rgb(70 184 255 / 9%);
  font: 650 0.78rem/1 var(--font-sans);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.finder-status button:hover,
.finder-empty button:hover,
.tool-empty button:hover {
  border-color: rgb(70 184 255 / 62%);
  background: rgb(70 184 255 / 15%);
}

.collection-card[hidden],
.finder-empty[hidden],
.tool-empty[hidden],
.motion-showcase[hidden],
[data-clear-filters][hidden] {
  display: none !important;
}

.finder-empty {
  width: min(100%, 112rem);
  margin: 1rem auto 0;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 1rem;
  background: #0b111a;
  text-align: center;
}

.finder-empty strong {
  display: block;
  color: #f8f4e8;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.finder-empty p,
.tool-empty p {
  margin: 0.65rem 0 1.2rem;
  color: #9ca8bb;
  line-height: 1.6;
}

.tool-empty {
  padding: 3.25rem 1rem;
  border: 1px dashed rgb(255 255 255 / 12%);
  border-radius: 1rem;
  background: #090e16;
  text-align: center;
}

#tool-search,
#tool-catalog {
  scroll-margin-top: calc(var(--header-height) + 1.25rem);
}

@media (max-width: 54rem) {
  .brand-copy small,
  .header-search-link span,
  .header-search-link kbd,
  .main-nav a:first-child {
    display: none;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .main-nav a {
    padding-inline: 0.6rem;
  }

  .header-search-link {
    width: 2.75rem;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 31rem) {
  .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .main-nav {
    display: none;
  }

  .brand-text {
    display: inline;
    font-size: 0.8rem;
  }

  .language-control button {
    min-width: 2.6rem;
  }

  .finder-status {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-search-link,
  .finder-status button,
  .finder-empty button,
  .tool-empty button {
    transition: none;
  }
}
