:root {
  --paper: #f4f3ef;
  --surface: #fbfaf6;
  --surface-soft: rgba(251, 250, 246, 0.82);
  --ink: #232522;
  --muted: #72766f;
  --line: #d9d8d1;
  --sage: #758370;
  --deep: #394138;
  --copper: #9a6047;
  --copper-rgb: 154, 96, 71;
  --mist-blue: #667c84;
  --mist-blue-rgb: 102, 124, 132;
  --ochre: #a78757;
  --ochre-rgb: 167, 135, 87;
  --clay: #9b6559;
  --clay-rgb: 155, 101, 89;
  --glass-border: rgba(214, 213, 205, 0.72);
  --glass-bg: #fbfaf6;
  --paper-edge: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 46px rgba(35, 37, 34, 0.065), 0 1px 0 rgba(255, 255, 255, 0.62) inset, 0 0 0 1px rgba(214, 213, 205, 0.18);
  --shadow-lift: 0 24px 68px rgba(35, 37, 34, 0.095), 0 1px 0 rgba(255, 255, 255, 0.72) inset, 0 0 0 1px rgba(214, 213, 205, 0.22);
  --accent-rgb: 117, 131, 112;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --focus: #53634f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  touch-action: auto;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background:
    conic-gradient(from 42deg at 24% 28%, rgba(255, 255, 255, 0.78), rgba(102, 124, 132, 0.055), rgba(117, 131, 112, 0.105), rgba(154, 96, 71, 0.045), rgba(255, 255, 255, 0.74)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.74), rgba(239, 239, 239, 0.14) 46%, rgba(255, 255, 255, 0.66)),
    repeating-linear-gradient(112deg, rgba(35, 37, 34, 0.024) 0 1px, transparent 1px 15px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, "Noto Sans HK", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  touch-action: auto;
  min-height: 100%;
}

::selection {
  color: #f8f8f4;
  background: #53634f;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: #f8f8f4;
  background: #293029;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease-out-expo);
}

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

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

:focus:not(:focus-visible) {
  outline: none;
}

body.home-page {
  position: relative;
  --mx: 50%;
  --my: 48%;
  --push-x: 0px;
  --push-y: 0px;
}

.home-page::before {
  content: "";
  position: fixed;
  inset: -6vh -6vw;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(239, 239, 239, 0.72), rgba(239, 239, 239, 0.86)),
    url("assets/portfolio/A7D0610B-3A5A-4EAF-8AAB-EC7EC680D0E7.jpg") center / cover no-repeat;
  filter: blur(12px);
  opacity: 0.08;
  transform: scale(1.04);
}

@media (max-width: 760px) and (orientation: portrait) {
  .home-page::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    height: 74px;
    pointer-events: none;
    background:
      linear-gradient(
        180deg,
        rgba(246, 245, 240, 0.9) 0%,
        rgba(246, 245, 240, 0.56) 34%,
        rgba(246, 245, 240, 0.12) 72%,
        rgba(246, 245, 240, 0) 100%
      );
  }
}

.site-header,
main,
.footer {
  position: relative;
  z-index: 1;
}

.home-page .page-ambient,
.home-page .site-header,
.home-page .hero-media,
.home-page .hero-copy > :not(.flip-title),
.home-page main > section:not(.hero),
.home-page .footer {
  opacity: 0;
  animation: contentAfterNameFlip 480ms ease 180ms forwards;
}

@keyframes contentAfterNameFlip {
  to {
    opacity: 1;
  }
}

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

.protected-image {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.hero-media,
.project-cover-media,
.project-rail,
.plate figure,
.profile-photo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

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

a,
button {
  touch-action: manipulation;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 8px 8px 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(214, 213, 205, 0.62);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(46, 53, 45, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(102, 124, 132, 0.075), transparent 24%, rgba(154, 96, 71, 0.075) 78%, transparent),
    rgba(255, 255, 255, 0.28);
  opacity: 0.72;
  pointer-events: none;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.2vw, 32px);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(8px, 1.4vw, 18px);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 8px 13px;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(244, 243, 239, 0.86);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100dvh - 92px);
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(38px, 5.2vw, 88px);
  padding: clamp(42px, 5vw, 78px) clamp(18px, 5vw, 72px) clamp(48px, 5.6vw, 84px);
  max-width: 100vw;
}

.page-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint style;
  background:
    linear-gradient(180deg, rgba(251, 250, 246, 0.88), rgba(244, 243, 239, 0.96));
}

.page-ambient::before,
.page-ambient::after {
  content: "";
  position: absolute;
  inset: -22%;
  filter: blur(4px);
  transform: translate3d(var(--push-x), var(--push-y), 0);
}

.page-ambient::before {
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.96), transparent 18%),
    radial-gradient(circle at 67% 34%, rgba(255, 255, 255, 0.58), transparent 18%),
    radial-gradient(circle at 76% 18%, rgba(242, 238, 233, 0.92), transparent 24%),
    linear-gradient(132deg, rgba(255, 255, 255, 0.94), rgba(242, 238, 233, 0.64) 42%, rgba(217, 216, 209, 0.28) 68%, rgba(255, 255, 255, 0.82));
  opacity: 0.64;
  animation: homeShaderBreath 18s ease-in-out infinite alternate, homeShaderSpin 132s linear infinite;
}

.page-ambient::after {
  opacity: 0.2;
  background:
    radial-gradient(circle at 36% 60%, rgba(57, 65, 56, 0.1), transparent 18%),
    radial-gradient(circle at 63% 38%, rgba(117, 131, 112, 0.19), transparent 24%),
    radial-gradient(circle at 78% 60%, rgba(255, 255, 255, 0.66), transparent 26%);
  animation: homeShaderFloat 24s ease-in-out infinite alternate;
}

.page-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, rgba(80, 64, 52, 0.7) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(80deg, rgba(80, 64, 52, 0.55) 0 1px, transparent 1px 6px);
}

.page-ink-trails {
  display: none;
}

.page-ripple {
  display: none;
}

@keyframes pageRipple {
  0% {
    opacity: 0.46;
    transform: translate3d(-50%, -50%, 0) scale(0.08);
  }

  45% {
    opacity: 0.23;
  }

  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(2);
  }
}

@keyframes homeShaderSpin {
  from { transform: translate(var(--push-x), var(--push-y)) rotate(0deg); }
  to { transform: translate(var(--push-x), var(--push-y)) rotate(360deg); }
}

@keyframes homeShaderBreath {
  from { opacity: 0.5; }
  48% { opacity: 0.72; }
  to { opacity: 0.58; }
}

@keyframes homeShaderFloat {
  from { transform: translate(calc(var(--push-x) - 4%), calc(var(--push-y) + 2%)) scale(1); }
  52% { opacity: 0.28; }
  to { transform: translate(calc(var(--push-x) + 4%), calc(var(--push-y) - 2%)) scale(1.08); }
}

.hero-media {
  position: relative;
  z-index: 1;
  order: 2;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: #d9ddd9;
  border: 1px solid rgba(214, 213, 205, 0.72);
  border-radius: clamp(22px, 3.4vw, 44px);
  box-shadow: 0 26px 68px rgba(46, 53, 45, 0.1), 0 0 0 1px rgba(214, 213, 205, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  touch-action: pan-y;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: calc(clamp(22px, 3.4vw, 44px) - 10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(35, 37, 34, 0.08);
  pointer-events: none;
}

.hero-media::after,
.project-story::after,
.contact-panel::after,
.resume-list::after,
.plate figure::after,
.project-meta::after {
  display: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(0.94) brightness(1.04);
  transform: scale(1);
  transition: transform 900ms cubic-bezier(0.16, 0.72, 0.18, 1), filter 900ms ease;
}

.hero-media:hover img {
  filter: saturate(0.78) contrast(0.98) brightness(1.03);
  transform: scale(1.018);
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: #d9ddd9;
  filter: saturate(0.78) contrast(0.96) brightness(1.02);
  transform: translateZ(0);
  transition: opacity 880ms ease;
  backface-visibility: hidden;
}

.hero-media.is-hero-video-active .hero-video {
  opacity: 1;
  will-change: opacity;
}

.hero-video-replay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(214, 213, 205, 0.86);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(35, 37, 34, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
  opacity: 1;
  transform: translateZ(0);
  transition: opacity 260ms ease, transform 260ms ease, background 260ms ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-video-replay:hover {
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.hero-video-replay svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-media.is-hero-video-active .hero-video-replay {
  opacity: 0.9;
  pointer-events: auto;
}

.bird-flight {
  position: absolute;
  left: -18%;
  width: 16%;
  height: 9%;
  pointer-events: none;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform;
}

.bird-flight-one {
  top: 14%;
  opacity: 0.82;
  animation-name: flockPathOne;
  animation-duration: 72s;
}

.bird-flight-two {
  top: 24%;
  opacity: 0.68;
  animation-name: flockPathTwo;
  animation-duration: 86s;
  animation-delay: -33s;
}

.bird {
  position: absolute;
  width: 15px;
  height: 10px;
  animation: flockJitter 7s ease-in-out infinite alternate;
}

.bird::before,
.bird::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 9px;
  height: 4px;
  border-top: 2px solid rgba(18, 18, 16, 0.86);
  animation: wingFlap 0.82s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

.bird::before {
  left: 0;
  border-radius: 80% 0 0 0;
}

.bird::after {
  right: 0;
  border-radius: 0 80% 0 0;
}

.bird:nth-child(1) { left: 10%; top: 34%; transform: scale(0.36); }
.bird:nth-child(2) { left: 34%; top: 18%; transform: scale(0.31); animation-delay: -1.4s; }
.bird:nth-child(3) { left: 54%; top: 42%; transform: scale(0.28); animation-delay: -3.2s; }
.bird:nth-child(4) { left: 72%; top: 24%; transform: scale(0.24); animation-delay: -4.5s; }

@keyframes wingFlap {
  from { transform: rotate(24deg) translateY(0); }
  to { transform: rotate(-10deg) translateY(1px); }
}

@keyframes flockJitter {
  from { margin-top: 0; margin-left: 0; }
  to { margin-top: 3px; margin-left: 4px; }
}

@keyframes flockPathOne {
  0% { transform: translate3d(-8vw, 2vh, 0) rotate(-1deg); }
  32% { transform: translate3d(34vw, -1vh, 0) rotate(2deg); }
  68% { transform: translate3d(73vw, 3vh, 0) rotate(-2deg); }
  100% { transform: translate3d(124vw, 0, 0) rotate(1deg); }
}

@keyframes flockPathTwo {
  0% { transform: translate3d(-10vw, 4vh, 0) rotate(2deg); }
  41% { transform: translate3d(45vw, 1vh, 0) rotate(-2deg); }
  100% { transform: translate3d(126vw, 5vh, 0) rotate(2deg); }
}

.hero-copy {
  position: relative;
  z-index: 1;
  order: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  padding-bottom: 0;
  min-width: 0;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sage);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.05;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 100%;
  font-size: clamp(54px, 6.5vw, 108px);
}

.flip-title {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.01em;
  width: max-content;
  max-width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  perspective: 900px;
  isolation: isolate;
  animation: titleCalibrationSettle 900ms cubic-bezier(0.16, 0.84, 0.18, 1) 1.02s both;
}

.flip-title::before,
.flip-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(117, 131, 112, 0.28);
  text-shadow: 0 18px 42px rgba(35, 37, 34, 0.08);
  opacity: 0;
  pointer-events: none;
}

.flip-title::before {
  clip-path: inset(0 0 52% 0);
  transform: translate3d(-0.035em, -0.025em, 0);
  animation: titleSliceDrift 1.38s cubic-bezier(0.18, 0.82, 0.16, 1) 0.16s forwards;
}

.flip-title::after {
  clip-path: inset(48% 0 0 0);
  transform: translate3d(0.04em, 0.035em, 0);
  animation: titleSliceDrift 1.38s cubic-bezier(0.18, 0.82, 0.16, 1) 0.2s forwards;
}

.flip-title span {
  position: relative;
  display: inline-block;
  color: #20211e;
  text-shadow: 0 18px 42px rgba(35, 37, 34, 0);
  transform: rotateX(88deg) translateY(0.18em) scaleY(0.92);
  transform-origin: 50% 68%;
  opacity: 0;
  animation: titleCardFlip 1.04s cubic-bezier(0.16, 0.84, 0.18, 1) forwards;
  animation-delay: calc(80ms + var(--i) * 74ms);
  backface-visibility: hidden;
}

.flip-title span::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  top: 5%;
  bottom: 0;
  background: linear-gradient(105deg, transparent 8%, rgba(255, 255, 255, 0.82) 42%, transparent 68%);
  opacity: 0;
  mix-blend-mode: screen;
  transform: translateX(-130%) skewX(-12deg);
  animation: titleLetterFlash 1.12s cubic-bezier(0.18, 0.72, 0.18, 1) forwards;
  animation-delay: calc(220ms + var(--i) * 74ms);
  pointer-events: none;
}

@keyframes titleCardFlip {
  0% {
    transform: rotateX(88deg) translateY(0.18em) scaleY(0.92);
    opacity: 0;
  }
  42% {
    transform: rotateX(-18deg) translateY(-0.035em) scaleY(1.025);
    opacity: 1;
  }
  64% {
    transform: rotateX(8deg) translateY(0.008em) scaleY(0.992);
    text-shadow: 0 18px 42px rgba(35, 37, 34, 0.12);
  }
  100% {
    transform: rotateX(0deg) translateY(0) scaleY(1);
    text-shadow: 0 10px 26px rgba(35, 37, 34, 0.02);
    opacity: 1;
  }
}

@keyframes titleSliceDrift {
  0% {
    opacity: 0;
    filter: blur(2px);
  }
  26% {
    opacity: 1;
  }
  76% {
    opacity: 0.38;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes titleLetterFlash {
  0%, 28% {
    opacity: 0;
    transform: translateX(-130%) skewX(-12deg);
  }
  44% {
    opacity: 0.48;
  }
  72%, 100% {
    opacity: 0;
    transform: translateX(120%) skewX(-12deg);
  }
}

@keyframes titleCalibrationSettle {
  0% {
    transform: translate3d(-0.018em, 0.012em, 0) skewX(-0.45deg);
    filter: blur(0.18px);
  }
  46% {
    transform: translate3d(0.008em, -0.004em, 0) skewX(0.18deg);
    filter: blur(0);
  }
  100% {
    transform: translate3d(0, 0, 0) skewX(0);
    filter: none;
  }
}

h2 {
  font-size: clamp(38px, 6vw, 76px);
}

h3 {
  font-size: clamp(21px, 2.2vw, 30px);
}

.lead-copy {
  max-width: 520px;
  margin-top: clamp(24px, 2.7vw, 38px);
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 22px);
  text-wrap: pretty;
}

.mobile-lead {
  display: none;
}

.hero-positioning {
  max-width: 620px;
  margin: clamp(18px, 2vw, 28px) 0 0;
  padding-left: 18px;
  color: var(--deep);
  border-left: 1px solid rgba(117, 131, 112, 0.32);
  font-size: clamp(13px, 1.08vw, 16px);
  line-height: 1.72;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 88%);
}

.hero-positioning .zh {
  margin-top: 4px;
  font-size: 0.92em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 3.2vw, 46px);
}

.hero-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 13px 10px 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  overflow: hidden;
  transition: transform 260ms ease, box-shadow 260ms ease, background 260ms ease, border-color 260ms ease;
}

.hero-button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 48px;
  width: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: translate3d(0, -50%, 0);
  transition: width 280ms ease, opacity 280ms ease, transform 280ms ease;
  pointer-events: none;
}

.hero-button:hover::after {
  width: 18px;
  opacity: 0.24;
  transform: translate3d(8px, -50%, 0);
}

.hero-button:active {
  transform: translateY(1px) scale(0.992);
}

.hero-button-primary {
  color: #ffffff;
  background: #242522;
  box-shadow: 0 12px 24px rgba(35, 37, 34, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-button-ghost {
  color: #2b2c28;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(214, 213, 205, 0.54);
  box-shadow: 0 10px 22px rgba(35, 37, 34, 0.052), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.hero-audio-button {
  min-width: 0;
  color: #2b2c28;
  border: 1px solid rgba(214, 213, 205, 0.54);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 22px rgba(35, 37, 34, 0.052), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.hero-audio-button.is-playing {
  color: #ffffff;
  background: #242522;
  border-color: rgba(36, 37, 34, 0.82);
  box-shadow: 0 12px 24px rgba(35, 37, 34, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.audio-wave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(35, 37, 34, 0.08);
}

.hero-audio-button.is-playing .audio-wave {
  background: rgba(255, 255, 255, 0.18);
}

.audio-wave span {
  display: block;
  width: 2px;
  height: calc(6px + var(--level, 0) * 15px);
  min-height: 5px;
  max-height: 21px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.78;
  transform-origin: center;
  transition: height 90ms linear, opacity 180ms ease;
}

.hero-audio-button:not(.is-playing) .audio-wave span {
  animation: audioIdle 1.8s ease-in-out infinite;
  animation-delay: calc(var(--bar) * 120ms);
}

.hero-audio-button.is-playing .audio-wave span {
  opacity: 0.95;
}

@keyframes audioIdle {
  0%,
  100% { height: 6px; opacity: 0.58; }
  50% { height: 13px; opacity: 0.82; }
}

.button-arrow {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 260ms ease;
}

.button-arrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translate(-1px, 1px);
}

.button-arrow::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg) translate(-1px, 0);
}

.hero-button-ghost .button-arrow {
  background: rgba(35, 37, 34, 0.08);
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(35, 37, 34, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-button:hover .button-arrow {
  transform: rotate(-45deg);
}

.en,
.zh {
  display: block;
}

.zh {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.85;
}

.inline-zh {
  display: inline;
  margin-top: 0;
  margin-left: 8px;
}

.heading-zh {
  display: block;
  margin-top: 8px;
  color: var(--sage);
  font-family: Inter, "Helvetica Neue", Arial, "Noto Sans HK", "Microsoft JhengHei", sans-serif;
  font-size: 0.34em;
  line-height: 1.35;
}

h3 .heading-zh {
  display: inline-block;
  margin-top: 0;
  margin-left: 8px;
  font-size: 0.62em;
  vertical-align: baseline;
}

.intro-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px) clamp(20px, 12vw, 180px);
  border-top: 1px solid rgba(214, 213, 205, 0.62);
  border-bottom: 1px solid rgba(214, 213, 205, 0.62);
  background: rgba(255, 255, 255, 0.28);
  color: var(--deep);
}

.compact-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("assets/portfolio/cmf-scroll-strip.png");
  background-position: 0 50%;
  background-repeat: repeat-x;
  background-size: auto 100%;
  opacity: 0.16;
  animation: cmfStripScroll 174s linear infinite;
}

@keyframes cmfStripScroll {
  from { background-position: 0 50%; }
  to { background-position: 1920px 50%; }
}

.compact-intro {
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.85;
}

.compact-intro div {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  columns: 2 320px;
  column-gap: clamp(28px, 5vw, 72px);
}

.compact-intro p {
  margin: 0 0 18px;
  color: var(--deep);
}

.section {
  position: relative;
  padding: clamp(54px, 8vw, 120px) clamp(18px, 4vw, 56px);
}

.scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 760ms var(--ease-out-expo) var(--reveal-delay, 0ms),
    transform 760ms var(--ease-out-expo) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.project-story.scroll-reveal {
  transform: translate3d(0, 34px, 0) scale(0.992);
}

.project-story.scroll-reveal.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
}

.section-heading {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1440px);
  margin: 0 auto clamp(28px, 5vw, 64px);
  border-bottom: 1px solid rgba(214, 213, 205, 0.56);
  padding-bottom: clamp(18px, 2vw, 26px);
}

.section-heading::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(22vw, 320px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(117, 131, 112, 0.58));
}

.section-heading h2 {
  text-align: right;
}

.project-scroll-list {
  display: grid;
  gap: clamp(32px, 5.8vw, 82px);
  width: min(100%, 1440px);
  margin: 0 auto;
}

.project-story,
.contact-panel,
.resume-list,
.project-meta,
.plate figure {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 38%),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.project-story {
  --project-accent-rgb: var(--accent-rgb);
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: clamp(22px, 3.4vw, 44px);
  padding: clamp(16px, 2.2vw, 28px);
  align-items: stretch;
  contain: layout paint;
  transition: box-shadow 300ms var(--ease-out-quart), transform 300ms var(--ease-out-quart), border-color 300ms var(--ease-out-quart);
  box-shadow: var(--shadow);
  touch-action: pan-y;
  isolation: isolate;
}

.project-story:nth-child(1) {
  --project-accent-rgb: var(--copper-rgb);
}

.project-story:nth-child(2) {
  --project-accent-rgb: 117, 131, 112;
}

.project-story:nth-child(3) {
  --project-accent-rgb: var(--mist-blue-rgb);
}

.project-story:nth-child(4) {
  --project-accent-rgb: var(--clay-rgb);
}

.project-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(var(--project-accent-rgb), 0.082), transparent 30%),
    radial-gradient(circle at 8% 16%, rgba(var(--project-accent-rgb), 0.12), transparent 19%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 56%);
  opacity: 0.82;
  pointer-events: none;
}

.project-story:hover {
  border-color: rgba(var(--project-accent-rgb), 0.24);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.project-story-info,
.project-rail {
  position: relative;
  z-index: 1;
}

.project-story.is-opening {
  animation: projectFrameFadeIn 1.2s ease both;
}

.project-story.is-open {
  grid-template-columns: minmax(180px, 0.22fr) minmax(0, 1fr);
  padding: clamp(14px, 1.6vw, 22px);
  transform: none;
}

.project-collapse {
  position: absolute;
  top: clamp(18px, 2vw, 28px);
  left: clamp(18px, 2.1vw, 32px);
  z-index: 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(117, 131, 112, 0.22);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 18px rgba(35, 37, 34, 0.08);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease, background 240ms ease;
}

.project-collapse span {
  position: relative;
  width: 14px;
  height: 14px;
}

.project-collapse span::before,
.project-collapse span::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.project-collapse span::before {
  transform: rotate(45deg);
}

.project-collapse span::after {
  transform: rotate(-45deg);
}

.project-story.is-open .project-collapse {
  opacity: 1;
  pointer-events: auto;
}

.project-collapse:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
}

.project-story-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 350px;
  padding: clamp(10px, 1.5vw, 20px);
}

.project-index {
  color: rgb(var(--project-accent-rgb));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.6vw, 54px);
  line-height: 0.9;
  opacity: 0.92;
  text-shadow: 0 10px 24px rgba(var(--project-accent-rgb), 0.1);
}

.project-story h3 {
  position: relative;
  margin-top: clamp(18px, 2.8vw, 32px);
  font-size: clamp(27px, 3.05vw, 50px);
  line-height: 0.99;
  letter-spacing: -0.012em;
  overflow-wrap: normal;
  text-wrap: balance;
}

.project-story h3::before {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 0 0 clamp(14px, 1.8vw, 22px);
  background: rgba(var(--project-accent-rgb), 0.46);
}

.project-story p {
  margin: clamp(14px, 2vw, 22px) 0 0;
  color: var(--muted);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 500;
  letter-spacing: 0;
}

.project-story h3 .heading-zh {
  display: block;
  max-width: 16em;
  margin: clamp(8px, 0.9vw, 12px) 0 0;
  color: rgb(var(--project-accent-rgb));
  font-size: 0.44em;
  line-height: 1.2;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: clamp(18px, 2vw, 26px);
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  color: rgba(57, 65, 56, 0.78);
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(var(--project-accent-rgb), 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 16px;
  margin-top: 16px;
}

.project-actions a,
.project-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--deep);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(var(--project-accent-rgb), 0.45);
  text-underline-offset: 5px;
  cursor: pointer;
}

.project-actions a:hover,
.project-toggle:hover {
  text-decoration-color: currentColor;
}

.project-rail {
  display: flex;
  gap: clamp(12px, 1.7vw, 22px);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 131, 112, 0.42) transparent;
  padding: 4px 4px 16px;
  cursor: pointer;
}

.project-story.is-open .project-rail {
  cursor: grab;
  touch-action: auto;
}

.project-story.is-open {
  touch-action: auto;
}

.project-story.is-open .project-cover-media,
.project-story.is-open .project-plate-video-wrap {
  touch-action: auto;
}

.project-story.is-open .project-collapse {
  visibility: visible;
}

.project-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.project-rail::-webkit-scrollbar {
  height: 7px;
}

.project-rail::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.project-rail::-webkit-scrollbar-thumb {
  background: rgba(117, 131, 112, 0.36);
  border-radius: 999px;
}

.project-cover-media,
.project-rail > img,
.project-plate-video-wrap {
  flex: 0 0 min(76vw, 760px);
  width: min(76vw, 760px);
  aspect-ratio: 16 / 10;
  scroll-snap-align: none;
  background:
    linear-gradient(135deg, rgba(var(--project-accent-rgb), 0.045), rgba(255, 255, 255, 0.92) 32%, #ffffff),
    #ffffff;
  border: 1px solid rgba(214, 213, 205, 0.62);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(35, 37, 34, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  overflow: hidden;
  pointer-events: none;
  touch-action: pan-y;
  transition: box-shadow 280ms ease, border-color 280ms ease, transform 280ms ease;
}

.project-rail > img {
  object-fit: contain;
}

.project-plate-video-wrap {
  position: relative;
  contain: paint;
  pointer-events: auto;
  touch-action: pan-y;
}

.project-plate-video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

.project-plate-video-wrap > .project-animated-plate-image,
.project-plate-video-wrap > .project-plate-video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.project-plate-video-wrap > .project-animated-plate-image {
  position: relative;
  z-index: 1;
  object-fit: contain;
  transition: opacity 780ms ease;
}

.project-plate-video-wrap > .project-plate-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 780ms ease;
}

.project-plate-video-wrap.is-video-active > .project-plate-video {
  opacity: 1;
}

.project-plate-video-wrap.is-video-active > .project-animated-plate-image {
  opacity: 0;
}

.project-plate-video-wrap > .video-replay {
  z-index: 3;
}

.video-replay {
  position: absolute;
  top: clamp(12px, 1.4vw, 20px);
  right: clamp(12px, 1.4vw, 20px);
  z-index: 5;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(117, 131, 112, 0.24);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(35, 37, 34, 0.12);
  cursor: pointer;
  opacity: 0.82;
  pointer-events: auto;
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.video-replay:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.94);
}

.video-replay svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-cover-media {
  position: relative;
  contain: paint;
  pointer-events: auto;
  touch-action: pan-y;
}

.project-cover-media img,
.project-cover-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.project-cover-image {
  object-fit: contain;
  opacity: 1;
  transition: opacity 1.16s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.project-cover-video {
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.08s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.project-story.is-video-active .project-cover-video {
  opacity: 1;
  will-change: opacity;
}

.project-story.is-video-active .project-cover-image {
  opacity: 0;
}

.project-story.is-video-finished .project-cover-image {
  opacity: 1;
}

.project-story:not(.is-open) .project-rail {
  overflow: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;
  touch-action: pan-y;
}

.project-story:not(.is-open) .project-rail::-webkit-scrollbar {
  display: none;
}

.project-story:not(.is-open) .project-rail > img:nth-of-type(n+2) {
  display: none;
}

.project-story:not(.is-open) .project-plate-video {
  display: none;
}

.project-story:not(.is-open) .project-plate-video-wrap {
  display: none;
}

.project-story:not(.is-open) .project-cover-media {
  flex-basis: min(48vw, 640px);
  width: min(48vw, 640px);
}

.project-story:not(.is-open) .project-cover-image {
  object-fit: cover;
}

.project-story:not(.is-open) .project-rail > img:nth-of-type(1) {
  display: block;
  flex-basis: min(30vw, 420px);
  width: min(30vw, 420px);
  object-fit: cover;
}

.project-story:not(.is-open) .project-cover-media,
.project-story:not(.is-open) .project-rail > img:nth-of-type(1) {
  transition: transform 320ms ease, filter 320ms ease;
}

.project-story:not(.is-open):hover .project-cover-media,
.project-story:not(.is-open):hover .project-rail > img:nth-of-type(1) {
  transform: scale(1.012);
  filter: saturate(0.94) contrast(0.98);
  border-color: rgba(var(--project-accent-rgb), 0.32);
  box-shadow: 0 16px 38px rgba(var(--project-accent-rgb), 0.12), 0 10px 24px rgba(35, 37, 34, 0.065);
}

.project-story.is-open .project-cover-media,
.project-story.is-open .project-rail > img,
.project-story.is-open .project-plate-video-wrap {
  flex-basis: min(86vw, 1040px);
  width: min(86vw, 1040px);
  aspect-ratio: 16 / 9;
  animation: projectPlateFadeIn 1.2s ease both;
}

.project-story.is-open .project-cover-image {
  object-fit: contain;
}

.project-story.is-open .project-rail > *:nth-child(2) { animation-delay: 45ms; }
.project-story.is-open .project-rail > *:nth-child(3) { animation-delay: 90ms; }
.project-story.is-open .project-rail > *:nth-child(4) { animation-delay: 135ms; }
.project-story.is-open .project-rail > *:nth-child(5) { animation-delay: 180ms; }
.project-story.is-open .project-rail > *:nth-child(6) { animation-delay: 225ms; }

@keyframes projectPlateFadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes projectFrameFadeIn {
  from {
    border-color: rgba(255, 255, 255, 0);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 rgba(35, 37, 34, 0);
  }

  to {
    border-color: var(--glass-border);
    background: var(--glass-bg);
    box-shadow: 0 12px 30px rgba(35, 37, 34, 0.08);
  }
}


.profile {
  background: rgba(251, 250, 246, 0.24);
  border-top: 1px solid rgba(214, 213, 205, 0.52);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 6vw, 80px);
  width: min(100%, 1440px);
  margin: 0 auto;
}

.contact-panel {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 28px;
  border-left: 2px solid rgba(117, 131, 112, 0.2);
}

.contact-panel::before,
.resume-list::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(117, 131, 112, 0.052), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(164, 141, 118, 0.1), transparent 18%);
  pointer-events: none;
}

.contact-panel > *,
.resume-list > * {
  position: relative;
  z-index: 1;
}

.profile-photo {
  width: min(100%, 240px);
  aspect-ratio: 1 / 1;
  margin-bottom: 24px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(214, 213, 205, 0.72);
  box-shadow: 0 18px 44px rgba(35, 37, 34, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.contact-panel h3 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
}

.contact-panel p,
.resume-list p {
  color: var(--muted);
  line-height: 1.72;
}

.contact-panel p {
  margin: 0 0 16px;
}

.contact-panel a {
  display: block;
  margin-top: 12px;
  color: var(--deep);
  border-bottom: 1px solid rgba(117, 131, 112, 0.22);
  overflow-wrap: anywhere;
  transition: color 180ms ease, border-color 180ms ease;
}

.contact-panel a:hover {
  color: var(--ink);
  border-color: rgba(117, 131, 112, 0.48);
}

.availability-note {
  display: grid;
  gap: 6px;
  margin-top: 24px;
  padding: 18px;
  color: var(--deep);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(251, 250, 246, 0.18)),
    rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(214, 213, 205, 0.42);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 12px 28px rgba(35, 37, 34, 0.035);
  font-size: 13px;
  line-height: 1.55;
}

.availability-note strong {
  font-family: Georgia, "Times New Roman", serif;
  color: rgba(35, 37, 34, 0.84);
  font-size: 18px;
  font-weight: 400;
}

.availability-note .zh {
  margin-top: 2px;
  font-size: 0.95em;
}

.resume-list {
  display: grid;
  gap: 30px;
  padding: clamp(22px, 3.2vw, 34px);
  border-left: 2px solid rgba(117, 131, 112, 0.16);
}

.resume-list section {
  display: grid;
  gap: 14px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(214, 213, 205, 0.58);
}

.resume-list section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resume-list h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--deep);
  letter-spacing: -0.01em;
}

.resume-list h3::before {
  content: "";
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: rgba(117, 131, 112, 0.38);
}

.resume-list h3 .heading-zh {
  margin-left: 0;
}

.resume-list p {
  max-width: 82ch;
  margin: 0;
  text-wrap: pretty;
}

.contact-cta {
  padding-top: clamp(22px, 4vw, 48px);
}

.contact-cta-inner {
  position: relative;
  overflow: hidden;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0;
}

.contact-cta-inner::before {
  display: none;
}

.contact-cta-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid rgba(214, 213, 205, 0.52);
  background: rgba(255, 255, 255, 0.22);
}

.footer-filing {
  flex-basis: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 0;
  text-align: center;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  padding: clamp(36px, 5vw, 72px) clamp(18px, 4vw, 56px) clamp(28px, 4vw, 56px);
  width: min(100%, 1440px);
  margin: 0 auto;
}

.project-hero img {
  display: none;
}

.project-meta {
  min-width: 0;
  max-width: 100%;
  padding: clamp(30px, 5vw, 64px);
  color: var(--muted);
}

.project-meta h1,
.project-meta p,
.project-meta dd {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: none;
}

.project-meta h1 {
  max-width: 10.5em;
  margin-bottom: clamp(22px, 3vw, 36px);
  font-size: clamp(42px, 6.2vw, 92px);
  line-height: 1.02;
  text-wrap: balance;
  overflow-wrap: normal;
}

.project-meta p {
  max-width: 780px;
  margin: 0;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.75;
}

.project-meta .heading-zh {
  overflow-wrap: normal;
  word-break: keep-all;
}

.project-meta dl {
  width: min(100%, 620px);
  margin: clamp(28px, 4vw, 42px) 0 0;
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 10px 28px;
  font-size: 15px;
}

.project-meta dt {
  color: var(--sage);
  text-transform: uppercase;
}

.project-meta dd {
  margin: 0;
}

.guide-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-top: 1px solid rgba(214, 213, 205, 0.62);
  border-bottom: 1px solid rgba(214, 213, 205, 0.62);
  background: rgba(255, 255, 255, 0.26);
}

.guide-nav a {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--deep);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(35, 37, 34, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.plates {
  display: grid;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(34px, 6vw, 92px) clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.18);
}

.plate {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  width: min(100%, 1440px);
  margin: 0 auto;
}

.plate-number {
  position: sticky;
  top: 112px;
  color: var(--sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 68px);
}

.plate figure {
  margin: 0;
  padding: clamp(8px, 1.5vw, 18px);
}

.plate img {
  width: 100%;
  object-fit: contain;
  background: #fdfcf8;
}

.plate figcaption {
  max-width: 980px;
  margin: 16px auto 2px 0;
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.8;
}

.project-pagination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(28px, 5vw, 64px) max(clamp(18px, 4vw, 56px), calc((100vw - 1440px) / 2 + 56px));
  border-top: 1px solid rgba(214, 213, 205, 0.68);
  background: rgba(255, 255, 255, 0.24);
}

.project-pagination a {
  color: var(--deep);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 24px rgba(35, 37, 34, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

@media (prefers-reduced-motion: reduce) {
  .bird-flight,
  .bird,
  .flip-title,
  .flip-title span,
  .compact-intro::before,
  .page-ambient::before,
  .page-ambient::after,
  .page-ripple,
  .scroll-reveal,
  .project-story.is-open .project-cover-media,
  .project-story.is-open .project-rail > img,
  .home-page .page-ambient,
  .home-page .site-header,
  .home-page .hero-media,
  .home-page .hero-copy > :not(.flip-title),
  .home-page main > section:not(.hero),
  .home-page .footer {
    animation: none;
  }

  .flip-title::before,
  .flip-title::after,
  .flip-title span::after {
    animation: none;
    opacity: 0;
  }

  .scroll-reveal,
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-page .page-ambient,
  .home-page .site-header,
  .home-page .hero-media,
  .home-page .hero-copy > :not(.flip-title),
  .home-page main > section:not(.hero),
  .home-page .footer {
    opacity: 1;
  }
}

/* Editorial material study, 2026-07-13. Kept as one reversible cascade layer. */
:root {
  --paper: #f0f1ee;
  --surface: #f7f7f3;
  --surface-soft: rgba(247, 247, 243, 0.88);
  --ink: #222521;
  --muted: #686f68;
  --line: #cdd0c9;
  --glass-border: rgba(197, 201, 194, 0.72);
  --glass-bg: #f7f7f3;
  --shadow: 0 10px 30px rgba(43, 49, 44, 0.045);
  --shadow-lift: 0 18px 42px rgba(43, 49, 44, 0.075);
}

body {
  background:
    linear-gradient(118deg, rgba(var(--mist-blue-rgb), 0.07), transparent 28%),
    linear-gradient(298deg, rgba(var(--copper-rgb), 0.045), transparent 24%),
    repeating-linear-gradient(112deg, rgba(35, 37, 34, 0.018) 0 1px, transparent 1px 18px),
    var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans HK", "Microsoft JhengHei", sans-serif;
}

.page-ambient {
  background:
    linear-gradient(180deg, rgba(247, 248, 245, 0.9), rgba(240, 241, 238, 0.96));
}

.page-ambient::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.9), transparent 20%),
    radial-gradient(circle at 78% 18%, rgba(var(--mist-blue-rgb), 0.11), transparent 25%),
    radial-gradient(circle at 68% 78%, rgba(var(--copper-rgb), 0.065), transparent 23%),
    linear-gradient(132deg, rgba(248, 249, 246, 0.92), rgba(229, 233, 229, 0.56) 48%, rgba(248, 248, 244, 0.78));
  opacity: 0.52;
}

.page-ambient::after {
  opacity: 0.15;
}

.site-header {
  top: 16px;
  width: min(1480px, calc(100% - 40px));
  padding: 9px 12px 9px 20px;
  background: rgba(247, 248, 245, 0.82);
  border-color: rgba(197, 201, 194, 0.66);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(43, 49, 44, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
}

.site-header::before {
  display: none;
}

.brand {
  color: var(--ink);
}

.nav a {
  border-radius: 8px;
}

.hero {
  width: min(1560px, 100%);
  margin-inline: auto;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(48px, 6.4vw, 108px);
}

.hero-copy {
  max-width: 660px;
}

.flip-title,
.project-story h3 {
  letter-spacing: 0;
}

.hero-positioning {
  border-left-color: rgba(var(--mist-blue-rgb), 0.44);
}

.hero-media {
  border-color: rgba(176, 184, 179, 0.72);
  border-radius: 10px;
  box-shadow: 0 18px 52px rgba(49, 57, 51, 0.085);
}

.hero-media::before {
  inset: 8px;
  border-color: rgba(255, 255, 255, 0.38);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(39, 47, 42, 0.08);
}

.hero-media img {
  filter: saturate(0.78) contrast(0.97) brightness(1.02);
}

.hero-button {
  box-shadow: none;
}

.hero-button-primary {
  background: #272b27;
  box-shadow: none;
}

.hero-button-ghost,
.hero-audio-button {
  background: rgba(247, 248, 245, 0.72);
  border-color: rgba(197, 201, 194, 0.72);
  box-shadow: none;
}

.intro-band {
  border-block: 1px solid rgba(197, 201, 194, 0.58);
  background:
    linear-gradient(90deg, rgba(var(--mist-blue-rgb), 0.055), transparent 38%, rgba(var(--copper-rgb), 0.04)),
    rgba(247, 248, 245, 0.54);
}

.compact-intro div {
  max-width: 1180px;
}

.section-heading {
  width: min(100%, 1440px);
  margin-inline: auto;
  border-bottom-color: rgba(181, 187, 180, 0.72);
}

.section-heading::after {
  width: clamp(90px, 12vw, 170px);
}

.project-scroll-list {
  gap: clamp(28px, 4.4vw, 62px);
}

.project-story,
.contact-panel,
.resume-list {
  border-color: rgba(187, 192, 185, 0.7);
  border-radius: 5px;
}

.project-story {
  background:
    linear-gradient(105deg, rgba(var(--project-accent-rgb), 0.105), rgba(var(--project-accent-rgb), 0.025) 24%, transparent 54%),
    rgba(248, 248, 244, 0.93);
  box-shadow: none;
}

.project-story::before {
  background: linear-gradient(90deg, rgba(var(--project-accent-rgb), 0.07), transparent 36%);
  opacity: 1;
}

.project-story::after {
  left: clamp(26px, 3vw, 48px);
  width: clamp(58px, 7vw, 100px);
  height: 2px;
  opacity: 0.74;
}

.project-story:hover {
  box-shadow: var(--shadow-lift);
}

.project-story-info {
  min-height: 390px;
}

.project-index {
  text-shadow: none;
}

.project-story h3::before {
  width: 58px;
}

.project-tags span {
  background: rgba(247, 248, 245, 0.58);
  border-color: rgba(var(--project-accent-rgb), 0.28);
  box-shadow: none;
}

.project-cover-media,
.project-rail > img,
.project-plate-video-wrap {
  border-color: rgba(var(--project-accent-rgb), 0.24);
  border-radius: 3px;
  box-shadow: 0 8px 22px rgba(43, 49, 44, 0.045);
}

.profile {
  background:
    linear-gradient(112deg, rgba(var(--mist-blue-rgb), 0.065), transparent 34%),
    linear-gradient(292deg, rgba(var(--copper-rgb), 0.04), transparent 30%),
    rgba(245, 246, 242, 0.58);
}

.contact-panel,
.resume-list {
  overflow: visible;
  background: transparent;
  border-top: 1px solid rgba(181, 187, 180, 0.74);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  box-shadow: none;
}

.contact-panel::before,
.resume-list::before {
  display: none;
}

.contact-panel {
  padding: 30px 0 0;
}

.profile-photo {
  border-radius: 2px;
  box-shadow: none;
}

.resume-list {
  padding: 30px 0 0 clamp(28px, 4vw, 58px);
  border-left: 1px solid rgba(181, 187, 180, 0.64);
}

.resume-list section {
  border-bottom-color: rgba(181, 187, 180, 0.62);
}

.availability-note {
  background: rgba(247, 248, 245, 0.54);
  border-color: rgba(var(--copper-rgb), 0.2);
  border-radius: 4px;
  box-shadow: none;
}

@media (min-width: 901px) {
  .project-story:not(.is-open):nth-child(even) {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
    background:
      linear-gradient(255deg, rgba(var(--project-accent-rgb), 0.105), rgba(var(--project-accent-rgb), 0.025) 24%, transparent 54%),
      rgba(248, 248, 244, 0.93);
  }

  .project-story:not(.is-open):nth-child(even) .project-story-info {
    order: 2;
  }

  .project-story:not(.is-open):nth-child(even) .project-rail {
    order: 1;
  }

  .project-story:not(.is-open):nth-child(even)::after {
    right: clamp(26px, 3vw, 48px);
    left: auto;
  }
}

@media (max-width: 900px) {
  .hero {
    width: 100%;
  }

  .project-story-info {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(132deg, rgba(var(--mist-blue-rgb), 0.06), transparent 32%),
      linear-gradient(306deg, rgba(var(--copper-rgb), 0.035), transparent 24%),
      var(--paper);
  }

  .home-page .hero-media {
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(43, 49, 44, 0.075);
  }

  .home-page .hero-media::before {
    border-radius: 8px;
  }

  .project-story,
  .contact-panel,
  .resume-list {
    border-radius: 10px;
  }

  .project-story {
    background:
      linear-gradient(150deg, rgba(var(--project-accent-rgb), 0.095), transparent 32%),
      rgba(248, 248, 244, 0.94);
    box-shadow: 0 12px 30px rgba(43, 49, 44, 0.045);
  }

  .project-story::after {
    left: 20px;
    width: 50px;
  }

  .project-cover-media,
  .project-rail > img,
  .project-plate-video-wrap {
    border-radius: 5px;
  }

  .contact-panel,
  .resume-list {
    overflow: hidden;
    padding: 20px;
    background: rgba(248, 248, 244, 0.78);
    border: 1px solid rgba(187, 192, 185, 0.68);
    box-shadow: 0 10px 28px rgba(43, 49, 44, 0.045);
  }

  .availability-note {
    border-radius: 6px;
  }
}

@media (max-width: 1180px) {
  .hero,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .hero-media {
    height: auto;
    aspect-ratio: 16 / 10;
  }

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

  .project-story.is-open {
    grid-template-columns: 1fr;
  }

  .project-story-info {
    min-height: auto;
  }

  .project-cover-media,
  .project-rail > img,
  .project-plate-video-wrap {
    flex-basis: min(86vw, 680px);
    width: min(86vw, 680px);
  }

  .contact-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .home-page .page-ambient,
  .home-page .site-header,
  .home-page .hero-media,
  .home-page .hero-copy > :not(.flip-title),
  .home-page main > section:not(.hero),
  .home-page .footer {
    animation-delay: 980ms;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    touch-action: auto;
    overscroll-behavior-y: auto;
  }

  body {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  main,
  .section,
  .project-scroll-list,
  .project-story,
  .project-rail,
  .profile-layout,
  .resume-list,
  .contact-panel {
    min-width: 0;
  }

  .section,
  .project-story {
    contain: layout paint;
  }

  .page-ambient::before,
  .page-ambient::after {
    filter: blur(4px);
  }

  .page-ambient::before {
    animation: none;
  }

  .page-ambient::after {
    animation: none;
  }

  .compact-intro::before {
    animation-duration: 260s;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .project-story.scroll-reveal,
  .project-story.scroll-reveal.is-visible,
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .page-ink-trails {
    display: none;
  }

  .site-header {
    position: static;
    width: min(100% - 28px, 560px);
    margin: 10px auto 0;
    padding: 14px 14px 12px;
    border-radius: 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    font-size: 26px;
    line-height: 1.05;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    font-size: 11px;
  }

  .nav a {
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
  }

  .hero {
    min-height: auto;
    gap: 18px;
    grid-template-columns: 1fr;
    padding: 28px 16px 42px;
  }

  .hero-media {
    order: 2;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-width: 1px;
    border-radius: 22px;
  }

  .hero-video,
  .hero-media img {
    object-fit: contain;
  }

  .hero-video-replay {
    display: grid;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
  }

  .bird-flight {
    animation: none;
    opacity: 0.58;
  }

  .hero-copy {
    order: 1;
    padding-bottom: 0;
  }

  .flip-title {
    width: 100%;
    justify-content: flex-start;
    font-size: clamp(44px, 14vw, 76px);
    line-height: 0.98;
  }

  .lead-copy {
    max-width: 100%;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.58;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 18px;
  }

  .hero-button {
    width: 100%;
    justify-content: space-between;
    min-height: 56px;
    padding: 10px 12px 10px 18px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .intro-band {
    padding: 34px 18px;
  }

  .compact-intro div {
    columns: 1;
  }

  .section {
    padding: 44px 14px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
  }

  .section-heading h2 {
    text-align: left;
    max-width: 100%;
    overflow-wrap: normal;
  }

  .project-scroll-list {
    gap: 26px;
  }

  .project-story {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
    width: min(100%, 560px);
    margin-inline: auto;
    max-width: 100%;
    overflow: hidden;
    contain: layout paint;
  }

  .project-collapse {
    top: 14px;
    left: 14px;
    width: 40px;
    height: 40px;
  }

  .project-story-info {
    min-height: 0;
    padding: 22px 8px 4px;
    justify-content: flex-start;
  }

  .project-story.is-open .project-story-info {
    padding-top: 52px;
  }

  .project-index {
    font-size: clamp(30px, 8.4vw, 42px);
  }

  .project-story h3 {
    max-width: 100%;
    margin-top: 12px;
    font-size: clamp(27px, 8.4vw, 38px);
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }

  .project-story h3 .heading-zh {
    display: block;
    margin-top: 6px;
    font-size: 0.48em;
    line-height: 1.18;
    color: var(--sage);
  }

  .project-story p {
    margin-top: 12px;
    font-size: 14px;
  }

  .project-rail {
    width: 100%;
    max-width: 100%;
    gap: 10px;
    padding: 2px 2px 12px;
    overscroll-behavior-x: auto;
  }

  .project-story:not(.is-open) .project-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding-bottom: 0;
    cursor: pointer;
  }

  .project-story:not(.is-open) .project-rail::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0;
    z-index: 3;
    height: clamp(34px, 9vw, 48px);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0.82) 64%, rgba(251, 250, 246, 0.98));
    pointer-events: none;
  }

  .project-story.is-open .project-rail {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    gap: 12px;
    padding: 0;
    cursor: default;
    touch-action: pan-y;
    scroll-snap-type: none;
  }

  .project-rail.is-dragging {
    cursor: default;
  }

  .project-story.is-open .video-replay {
    width: 42px;
    height: 42px;
  }

  .project-cover-media,
  .project-rail > img,
  .project-plate-video-wrap {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(251, 250, 246, 0.92), rgba(233, 233, 226, 0.72)),
      #f7f6f1;
  }

  .project-story.is-open .project-cover-media,
  .project-story.is-open .project-rail > img,
  .project-story.is-open .project-plate-video-wrap {
    flex: none;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    scroll-snap-align: none;
  }

  .project-story:not(.is-open) .project-cover-media {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }

  .project-story:not(.is-open) .project-rail > img:nth-of-type(1) {
    display: block;
    flex: none;
    width: 100%;
    max-width: 100%;
    height: clamp(108px, 30vw, 152px);
    aspect-ratio: auto;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    object-fit: cover;
    object-position: top center;
  }

  .project-cover-video,
  .project-plate-video {
    object-fit: cover;
    pointer-events: none;
    touch-action: pan-y;
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(100%, 560px);
    margin-inline: auto;
  }

  .contact-panel,
  .resume-list {
    padding: 18px;
    width: 100%;
  }

  .resume-list {
    gap: 24px;
  }

  .resume-list h3 {
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: baseline;
    font-size: 24px;
  }

  .resume-list p,
  .contact-panel p,
  .contact-panel a {
    overflow-wrap: anywhere;
  }

  .profile-photo {
    width: min(58vw, 210px);
    border-width: 1px;
  }

  .project-hero {
    padding: 28px 14px 36px;
  }

  .project-meta {
    padding: 22px;
  }

  .project-meta h1 {
    max-width: 100%;
    font-size: clamp(34px, 10vw, 54px);
  }

  .project-meta dl {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 20px;
  }

  .guide-nav {
    gap: 8px;
    padding: 12px 14px;
  }

  .guide-nav a {
    padding: 7px 9px;
    font-size: 12px;
  }

  .plates {
    gap: 30px;
    padding: 32px 14px;
  }

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

  .plate-number {
    position: static;
    font-size: 28px;
  }

  .plate figure {
    padding: 8px;
  }

  .plate figcaption {
    font-size: 12px;
  }

  .project-pagination {
    padding: 24px 14px;
    font-size: 14px;
  }
}

@media (max-width: 430px) {
  .site-header {
    width: calc(100% - 24px);
  }

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

  h1 {
    font-size: clamp(38px, 14vw, 54px);
  }

  h2 {
    font-size: clamp(32px, 12vw, 48px);
  }

  h3 {
    font-size: 20px;
  }

  .hero {
    padding-inline: 12px;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
  }

  .lead-copy,
  .hero-positioning,
  .compact-intro,
  .resume-list p,
  .contact-panel p {
    font-size: 14px;
  }

  .project-index {
    font-size: 30px;
  }

  .project-story {
    width: 100%;
    padding: 10px;
    border-radius: 16px;
  }

  .project-story-info {
    padding: 20px 8px 4px;
  }

  .project-story h3 {
    font-size: clamp(26px, 8.8vw, 36px);
  }

  .project-story p {
    font-size: 14px;
  }

  .project-tags {
    gap: 6px;
    margin-top: 14px;
  }

  .project-tags span {
    min-height: 26px;
    padding: 6px 9px;
    font-size: 10.5px;
  }

  .project-cover-media,
  .project-rail > img,
  .project-plate-video-wrap,
  .project-story.is-open .project-cover-media,
  .project-story.is-open .project-rail > img,
  .project-story.is-open .project-plate-video-wrap,
  .project-story:not(.is-open) .project-cover-media {
    width: 100%;
    max-width: 100%;
  }

  .project-meta h1 {
    font-size: clamp(30px, 11vw, 44px);
  }

  .heading-zh {
    font-size: 0.42em;
  }

  h3 .heading-zh {
    font-size: 0.48em;
  }

  .resume-list h3 {
    font-size: 22px;
  }

  .project-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .site-header,
  .project-story,
  .profile-layout {
    width: calc(100% - 16px);
  }

  .section {
    padding-inline: 8px;
  }

  .hero {
    padding-inline: 10px;
  }

  .flip-title {
    font-size: clamp(40px, 13.4vw, 54px);
  }

  .project-story h3 {
    font-size: clamp(25px, 8.6vw, 34px);
  }

  .project-story h3 .heading-zh {
    font-size: 0.48em;
  }

  .project-story-info {
    padding: 18px 6px 4px;
  }

  .project-story.is-open .project-story-info {
    padding-top: 50px;
  }

  .contact-panel,
  .resume-list {
    padding: 16px;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
  }

  .hero-media {
    order: 1;
    aspect-ratio: 16 / 9;
  }

  .hero-copy {
    order: 2;
  }

  .project-story {
    width: min(100%, 680px);
  }

  .project-story h3 {
    font-size: clamp(28px, 6vw, 42px);
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .home-page .site-header {
    display: none;
  }

  .home-page .hero {
    grid-template-columns: 1fr;
    gap: clamp(12px, 2.7vh, 22px);
    min-height: 100vh;
    min-height: 100svh;
    align-content: center;
    padding: clamp(88px, 13vh, 132px) 16px clamp(36px, 7vh, 64px);
  }

  .home-page .hero-copy {
    display: contents;
  }

  .home-page .hero-copy .eyebrow {
    order: 1;
    margin: 0;
    font-size: 10.5px;
    line-height: 1.3;
    color: rgba(117, 131, 112, 0.92);
  }

  .home-page .flip-title {
    order: 2;
    font-size: clamp(52px, 17.2vw, 78px);
    line-height: 0.92;
    letter-spacing: 0;
  }

  .home-page .flip-title::before,
  .home-page .flip-title::after {
    -webkit-text-stroke-width: 0.7px;
    text-shadow: 0 10px 24px rgba(35, 37, 34, 0.06);
  }

  .home-page .flip-title span::after {
    background: linear-gradient(105deg, transparent 12%, rgba(255, 255, 255, 0.62) 44%, transparent 68%);
  }

  .home-page .lead-copy {
    order: 3;
    margin-top: 0;
    max-width: 31em;
    font-size: 13.5px;
    line-height: 1.46;
  }

  .home-page .hero-positioning {
    display: none;
  }

  .home-page .lead-copy > .en,
  .home-page .lead-copy > .zh {
    display: none;
  }

  .home-page .lead-copy .mobile-lead {
    display: block;
  }

  .home-page .lead-copy .mobile-lead .zh {
    display: block;
    margin-top: 4px;
    line-height: 1.44;
  }

  .home-page .hero-actions {
    order: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
    gap: 9px;
    margin-top: 0;
    align-items: center;
  }

  .home-page .hero-button {
    width: 100%;
    min-height: 50px;
    padding: 9px 10px 9px 14px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(35, 37, 34, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  }

  .home-page .hero-button .button-arrow {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .home-page .hero-audio-button {
    grid-column: auto;
    width: 48px;
    min-width: 48px;
    flex: 0 0 48px;
    justify-content: center;
    gap: 0;
    min-height: 48px;
    padding: 0;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(35, 37, 34, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .home-page .audio-wave {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .home-page .hero-audio-button .audio-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .home-page .hero-media {
    order: 4;
    aspect-ratio: 16 / 10;
    margin-top: 2px;
    background: #5d686d;
    border-color: rgba(214, 213, 205, 0.5);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(35, 37, 34, 0.105), 0 0 0 1px rgba(214, 213, 205, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .home-page .hero-media::before {
    inset: 7px;
    border-color: rgba(255, 255, 255, 0.34);
    border-radius: 15px;
  }

  .home-page .hero-media img {
    object-fit: cover;
  }

  .home-page .hero-video {
    object-fit: cover;
    background: #5d686d;
    transform: translateZ(0) scale(1.006);
  }

  .home-page .hero-video-replay {
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
  }

  .home-page .intro-band {
    margin-top: 0;
  }

  .contact-cta {
    padding-top: 26px;
  }

  .contact-cta-inner {
    width: 100%;
    padding: 0;
    border-radius: 0;
  }

  .contact-cta-inner::before {
    display: none;
  }

  .contact-cta-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  .home-page .hero {
    gap: clamp(10px, 2.2vh, 18px);
    padding: clamp(82px, 12vh, 118px) 14px clamp(32px, 6vh, 52px);
  }

  .home-page .flip-title {
    font-size: clamp(48px, 16.2vw, 68px);
  }

  .home-page .lead-copy {
    font-size: 13px;
  }

  .home-page .hero-positioning {
    display: none;
  }

  .home-page .hero-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px;
    gap: 8px;
  }

  .home-page .hero-button {
    min-height: 48px;
    padding-left: 12px;
    font-size: 12px;
  }

  .home-page .hero-audio-button {
    grid-column: auto;
    width: 46px;
    min-width: 46px;
    padding: 0;
  }

  .home-page .hero-media {
    aspect-ratio: 16 / 10;
  }
}

/* Material color system: restrained accents borrowed from copper, stone, foliage, and brick. */
.intro-band {
  background:
    linear-gradient(90deg, rgba(var(--mist-blue-rgb), 0.045), transparent 36%, rgba(var(--ochre-rgb), 0.04)),
    rgba(255, 255, 255, 0.25);
}

.compact-intro p:first-child {
  border-left-color: rgba(var(--mist-blue-rgb), 0.42);
}

.compact-intro p:last-child {
  border-left-color: rgba(var(--copper-rgb), 0.36);
}

#projects {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 8% 12%, rgba(var(--copper-rgb), 0.045), transparent 22%),
    radial-gradient(circle at 94% 78%, rgba(var(--mist-blue-rgb), 0.05), transparent 24%);
}

#projects .section-heading::after {
  background: linear-gradient(90deg, transparent, rgba(var(--copper-rgb), 0.5), rgba(var(--mist-blue-rgb), 0.46));
}

.project-story::after {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(18px, 2vw, 30px);
  z-index: 2;
  width: clamp(42px, 5vw, 72px);
  height: 3px;
  background: rgb(var(--project-accent-rgb));
  opacity: 0.78;
  pointer-events: none;
}

.project-tags span:nth-child(2) {
  background: rgba(var(--project-accent-rgb), 0.075);
}

.project-cover-media,
.project-rail > img,
.project-plate-video-wrap {
  border-color: rgba(var(--project-accent-rgb), 0.2);
}

.profile {
  background:
    linear-gradient(112deg, rgba(var(--mist-blue-rgb), 0.052), transparent 34%),
    linear-gradient(292deg, rgba(var(--ochre-rgb), 0.055), transparent 28%),
    rgba(251, 250, 246, 0.3);
}

.profile .section-heading::after {
  background: linear-gradient(90deg, transparent, rgba(var(--mist-blue-rgb), 0.55));
}

.contact-panel {
  border-left-color: rgba(var(--copper-rgb), 0.44);
}

.contact-panel::before,
.resume-list::before {
  background:
    linear-gradient(135deg, rgba(var(--mist-blue-rgb), 0.055), transparent 36%),
    radial-gradient(circle at 92% 8%, rgba(var(--ochre-rgb), 0.11), transparent 20%);
}

.availability-note {
  border-color: rgba(var(--copper-rgb), 0.22);
  background:
    linear-gradient(125deg, rgba(var(--copper-rgb), 0.07), transparent 45%),
    rgba(255, 255, 255, 0.32);
}

.resume-list h3::before {
  background: linear-gradient(90deg, rgba(var(--mist-blue-rgb), 0.72), rgba(var(--copper-rgb), 0.5));
}

.resume-list section:nth-child(even) h3 {
  color: var(--mist-blue);
}

.footer {
  background:
    linear-gradient(90deg, rgba(var(--mist-blue-rgb), 0.04), transparent 38%, rgba(var(--copper-rgb), 0.04)),
    rgba(255, 255, 255, 0.25);
}

@media (max-width: 760px) {
  .home-page .page-ambient,
  .home-page .site-header,
  .home-page .hero-media,
  .home-page .hero-copy > :not(.flip-title),
  .home-page main > section:not(.hero),
  .home-page .footer {
    opacity: 0;
    animation: contentAfterNameFlip 480ms ease 180ms forwards;
  }

  .home-page .flip-title {
    animation: titleCalibrationSettle 780ms cubic-bezier(0.16, 0.84, 0.18, 1) 820ms both;
  }

  .home-page .flip-title span {
    opacity: 0;
    transform: rotateX(88deg) translateY(0.18em) scaleY(0.92);
    animation: titleCardFlip 820ms cubic-bezier(0.16, 0.84, 0.18, 1) forwards;
    animation-delay: calc(70ms + var(--i) * 52ms);
  }

  .project-story::after {
    left: 20px;
    width: 44px;
    height: 2px;
  }

  #projects,
  .profile {
    background-size: 100% 100%;
  }

  .project-story::before {
    opacity: 0.64;
  }
}

/* Quality, accessibility, and low-cost rendering layer. */
.home-page .site-header {
  opacity: 1;
  animation: none;
}

.video-replay,
.hero-video-replay,
.home-page .hero-video-replay,
.project-story.is-open .video-replay,
.project-collapse {
  width: 44px;
  height: 44px;
}

.resume-list p {
  line-height: 1.75;
}

.footer {
  flex-wrap: wrap;
}

@media (hover: hover) and (pointer: fine) {
  .project-story:not(.is-open):hover {
    transform: translateY(-3px);
  }
}

@supports (content-visibility: auto) {
  .project-story:not(.is-open),
  .resume-list section {
    content-visibility: auto;
    contain-intrinsic-size: auto 720px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #565b54;
    --line: #bfc1b9;
  }

  .hero-button-ghost,
  .hero-audio-button,
  .project-tags span {
    border-color: #9ca198;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 18px;
  }

  .home-page::before {
    display: none;
  }

  .home-page .page-ambient {
    position: absolute;
    height: 100dvh;
  }

  .compact-intro::before {
    animation: none;
    background-position: 50% 50%;
  }

  .project-story,
  .contact-panel,
  .resume-list {
    box-shadow: 0 12px 32px rgba(46, 53, 45, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  }

  .hero-button,
  .video-replay,
  .project-collapse {
    -webkit-tap-highlight-color: transparent;
  }

  .hero-button:active,
  .video-replay:active,
  .project-collapse:active {
    transform: scale(0.975);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .home-page .page-ambient,
  .home-page .site-header,
  .home-page .hero-media,
  .home-page .hero-copy > :not(.flip-title),
  .home-page main > section:not(.hero),
  .home-page .footer,
  .home-page .flip-title,
  .home-page .flip-title span {
    opacity: 1;
    transform: none;
  }

  .hero-media img,
  .hero-video,
  .project-cover-image,
  .project-cover-video,
  .project-plate-video,
  .project-animated-plate-image {
    transition-duration: 120ms;
  }
}
