:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #d8d8d8;
  --soft: #ececec;
  --inverse: #f7f7f7;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  text-rendering: geometricPrecision;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(244, 244, 244, 0.94);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(18px);
  transition: background 240ms ease, border-color 240ms ease;
}

.site-header.is-solid {
  background: rgba(244, 244, 244, 0.98);
  border-bottom-color: #cfcfcf;
}

.brand {
  width: 46px;
  height: 46px;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  justify-self: center;
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  font-size: 14px;
}

.nav-links a,
.resume-link {
  position: relative;
  padding: 10px 0;
  color: currentColor;
  line-height: 1;
}

.nav-links a::after,
.resume-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.nav-links a:hover::after,
.resume-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.resume-link {
  justify-self: end;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--inverse);
  font-size: 14px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.resume-link:hover {
  background: #3b3b3b;
  color: #ffffff;
  transform: translateY(-1px);
}

.resume-link::after {
  display: none;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  margin-top: var(--header-height);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 3vw, 48px) clamp(18px, 5vw, 76px) clamp(34px, 5vw, 68px);
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    #f1f1f1;
  background-size: 46px 46px;
  color: var(--ink);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 66% 42%, rgba(255, 255, 255, 0.9), transparent 34%);
}

.hero-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 1180px;
  font-size: clamp(13px, 1.6vw, 22px);
  font-weight: 800;
}

.hero-keyword {
  width: fit-content;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px);
  animation: heroTextIn 720ms ease forwards;
  transition: color 180ms ease, transform 180ms ease;
}

.hero-keyword:hover,
.hero-keyword:focus-visible {
  color: #000000;
  transform: translateY(-1px);
}

.hero-keyword:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.hero-keyword:nth-child(2) {
  animation-delay: 80ms;
}

.hero-keyword:nth-child(3) {
  animation-delay: 160ms;
}

.hero-keyword:nth-child(4) {
  animation-delay: 240ms;
}

.hero-keyword:nth-child(5) {
  animation-delay: 320ms;
}

.hero-keyword:nth-child(6) {
  animation-delay: 400ms;
}

.hero-motion {
  position: absolute;
  inset: clamp(96px, 16vw, 190px) -8vw auto;
  z-index: 0;
  display: grid;
  gap: clamp(8px, 1.2vw, 16px);
  pointer-events: none;
  user-select: none;
}

.motion-track {
  display: flex;
  width: max-content;
  color: rgba(17, 17, 17, 0.08);
  font-size: clamp(46px, 9vw, 148px);
  font-weight: 900;
  line-height: 0.92;
  white-space: nowrap;
  will-change: transform;
}

.motion-track span {
  padding-right: 0.35em;
}

.motion-track-primary {
  animation: motionTrackLeft 28s linear infinite;
}

.motion-track-secondary {
  color: rgba(17, 17, 17, 0.055);
  font-size: clamp(30px, 5.8vw, 96px);
  animation: motionTrackRight 34s linear infinite;
}

.hero-year {
  position: absolute;
  right: clamp(18px, 5vw, 76px);
  top: clamp(112px, 18vw, 220px);
  display: grid;
  justify-items: end;
  gap: 2px;
  font-size: clamp(15px, 2.2vw, 30px);
  line-height: 1.05;
  font-weight: 500;
  animation: heroTextIn 860ms ease 560ms both;
  z-index: 1;
}

.hero-year span:last-child {
  font-size: clamp(12px, 1.5vw, 21px);
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  gap: clamp(10px, 1.8vw, 22px);
  padding-top: clamp(96px, 18vw, 220px);
}

.hero-season {
  margin: 0 0 -8px;
  justify-self: center;
  font-size: clamp(18px, 2.4vw, 38px);
  font-weight: 500;
  animation: heroTextIn 760ms ease 700ms both;
}

.hero h1 {
  margin: 0;
  display: grid;
  gap: clamp(8px, 1vw, 16px);
  font-size: clamp(54px, 12vw, 166px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 900;
}

.hero h1 > span {
  display: flex;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
  overflow: hidden;
}

.hero h1 .char {
  display: inline-block;
  min-width: 0.08em;
  opacity: 0;
  transform: translateY(108%) rotate(4deg);
  animation: heroCharIn 840ms cubic-bezier(0.17, 0.84, 0.44, 1) forwards;
  animation-delay: var(--char-delay, 140ms);
}

.hero h1 > span:nth-child(2) {
  --line-delay: 180ms;
}

.hero-role {
  margin: 0;
  font-size: clamp(15px, 2vw, 28px);
  font-weight: 800;
  animation: heroTextIn 760ms ease 980ms both;
}

.hero-focus {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: -4px 0 0;
  color: #2c2c2c;
  font-size: clamp(16px, 1.65vw, 23px);
  font-weight: 800;
  animation: heroTextIn 760ms ease 1040ms both;
}

.focus-window {
  position: relative;
  display: inline-block;
  height: 1.45em;
  min-width: 5.1em;
  overflow: hidden;
  color: var(--ink);
  vertical-align: bottom;
}

.focus-track {
  display: grid;
  animation: focusWords 8s cubic-bezier(0.72, 0, 0.2, 1) infinite;
}

.focus-track span {
  height: 1.45em;
  display: flex;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: heroTextIn 760ms ease 1120ms both;
}

.hero-work-link {
  width: fit-content;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--inverse);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease;
}

.hero-work-link::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  box-shadow: 6px 0 0 currentColor;
  transform: translateX(0);
  transition: transform 180ms ease;
}

.hero-work-link:hover {
  background: #3b3b3b;
  transform: translateY(-1px);
}

.hero-work-link:hover::after {
  transform: translateX(4px);
}

.hero-text-link {
  width: fit-content;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid rgba(17, 17, 17, 0.24);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hero-text-link:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  transform: translateY(-1px);
}

.hero-stats {
  position: absolute;
  right: clamp(18px, 5vw, 76px);
  bottom: clamp(34px, 5vw, 68px);
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: clamp(14px, 2vw, 24px);
  width: min(480px, 40vw);
  margin: 0;
  animation: heroTextIn 760ms ease 1240ms both;
}

.hero-stats div {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.28);
}

.hero-stats dt {
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.scroll-cue {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: 28px;
  z-index: 1;
  color: rgba(17, 17, 17, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 42px;
  margin: 10px auto 0;
  background: currentColor;
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}

.section {
  padding: clamp(72px, 12vw, 140px) clamp(18px, 6vw, 92px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: baseline;
  margin-bottom: clamp(36px, 6vw, 68px);
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.profile-copy h3,
.contact-panel h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.15;
  letter-spacing: 0;
}

.contact-panel h3 {
  font-size: clamp(46px, 6vw, 88px);
  line-height: 1;
}

.section-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-copy p:not(.section-kicker) {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
}

.profile-points {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.profile-points li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  color: #2d2d2d;
  font-size: 16px;
}

.profile-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 10px;
  background: var(--ink);
}

.profile-facts {
  display: grid;
  gap: clamp(28px, 4.5vw, 44px);
}

.profile-facts article {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-facts article > span {
  display: block;
  margin-bottom: 20px;
  color: #2d2d2d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.8vw, 30px) clamp(18px, 3.2vw, 34px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-info-grid p {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.profile-info-grid p:nth-child(4) {
  grid-column: 1 / -1;
}

.profile-info-grid small,
.software-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-info-grid strong {
  min-width: 0;
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.12;
  word-break: break-word;
}

.software-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.software-list li {
  min-height: 168px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 6px;
  background: #e9e9e9;
  text-align: center;
}

.software-list strong {
  color: var(--ink);
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.12;
}

.software-icon {
  width: clamp(62px, 6vw, 82px);
  height: clamp(62px, 6vw, 82px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.works-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(30px, 5vw, 58px);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filter-tab:hover,
.filter-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--inverse);
}

.works-count {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.work-groups {
  display: grid;
  gap: clamp(42px, 7vw, 92px);
}

.work-group {
  display: grid;
  grid-template-columns: minmax(180px, 0.24fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: start;
  padding-top: clamp(26px, 4vw, 42px);
  border-top: 1px solid var(--ink);
}

.work-group-heading {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
}

.work-group-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.work-group-heading h3 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.08;
}

.work-group-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.work-rail {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
}

.work-group-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.work-group-toggle {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.work-group-toggle:hover,
.work-group-toggle:focus-visible {
  background: var(--ink);
  color: var(--inverse);
  transform: translateY(-1px);
}

.work-card {
  grid-column: span 4;
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  isolation: isolate;
}

.work-card.is-feature {
  grid-column: span 7;
}

.work-card.is-compare {
  grid-column: span 6;
}

.work-card.is-compare-square {
  grid-column: span 6;
}

.work-card.is-compare-color {
  grid-column: span 6;
}

.work-card.is-compare-color-small {
  grid-column: span 4;
}

.work-card.is-compare-tall {
  grid-column: span 6;
}

.work-card.is-wide {
  grid-column: span 6;
}

.work-card.is-tall {
  grid-column: span 3;
}

.work-card.is-long {
  grid-column: span 4;
}

.work-card.is-store-home {
  grid-column: span 4;
}

.work-card.is-group-store {
  align-self: start;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.work-card.is-group-poster,
.work-card.is-group-peripheral {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.work-card.is-zoomable {
  cursor: zoom-in;
}

.work-card.is-zoomable:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.work-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8e8e8;
}

.work-card.is-feature .work-media {
  aspect-ratio: 16 / 10;
}

.work-card.is-tall .work-media {
  aspect-ratio: 3 / 4;
}

.work-card.is-long .work-media {
  aspect-ratio: 1125 / 3003;
}

.work-card.is-store-home .work-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ededed;
}

.work-store-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.work-card.is-wide .work-media {
  aspect-ratio: 16 / 9;
}

.work-card.is-tall .work-media,
.work-card.is-long .work-media,
.work-card.is-wide .work-media {
  background: #f7f7f7;
}

.work-card.is-group-poster .work-media,
.work-card.is-group-peripheral .work-media {
  background: transparent;
}

.work-media img,
.work-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
  transform: scale(1.01);
  animation: workAutoZoom 8s ease-in-out infinite alternate;
  transition: filter 240ms ease, transform 420ms ease;
}

.work-card.is-tall .work-media img,
.work-card.is-long .work-media img,
.work-card.is-wide .work-media img {
  object-fit: contain;
  animation: none;
  transform: none;
}

.work-card.is-store-home .work-media img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: none;
  transform: none;
}

@media (min-width: 681px) {
  .work-card.is-store-home .work-media {
    aspect-ratio: auto;
    overflow: visible;
    background: transparent;
  }

  .work-store-preview,
  .work-card.is-store-home .work-media img {
    height: auto;
    object-fit: contain;
    object-position: center top;
  }
}

.work-card:hover .work-media img,
.work-card:hover .work-media video,
.work-card:focus-visible .work-media img,
.work-card:focus-visible .work-media video {
  animation: none;
  filter: saturate(1.05) contrast(1);
  transform: scale(1.07);
}

.work-card.is-tall:hover .work-media img,
.work-card.is-long:hover .work-media img,
.work-card.is-wide:hover .work-media img,
.work-card.is-store-home:hover .work-media img,
.work-card.is-tall:focus-visible .work-media img,
.work-card.is-long:focus-visible .work-media img,
.work-card.is-wide:focus-visible .work-media img,
.work-card.is-store-home:focus-visible .work-media img {
  filter: saturate(1) contrast(1);
  transform: none;
}

.work-compare {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f7f7f7;
  contain: paint;
  touch-action: pan-y;
}

.work-card.is-compare-color .work-compare {
  aspect-ratio: 50 / 39;
}

.work-card.is-compare-color-small .work-compare {
  aspect-ratio: 50 / 39;
}

.work-card.is-compare-tall .work-compare {
  aspect-ratio: 3 / 4;
  background: #ffffff;
}

.work-card.is-compare-square .work-compare {
  aspect-ratio: 1 / 1;
  background: #ffffff;
}

.compare-image,
.compare-after-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.compare-image {
  object-fit: cover;
  filter: saturate(0.98) contrast(1.01);
}

.work-card.is-compare-tall .compare-image {
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
}

.work-card.is-compare-square .compare-image {
  object-fit: contain;
  object-position: center;
}

.compare-before {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--position)) 0 0);
  will-change: clip-path;
}

.compare-after-wrap {
  z-index: 1;
}

.compare-badge {
  position: absolute;
  top: 10px;
  z-index: 4;
  padding: 5px 8px;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.compare-badge-before {
  left: 10px;
}

.compare-badge-after {
  right: 10px;
}

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--position);
  z-index: 3;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.24);
  transform: translateX(-50%);
  will-change: left;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: var(--position);
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(17, 17, 17, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  transform: translate(-50%, -50%);
  will-change: left;
}

.compare-handle::before,
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}

.compare-handle::before {
  left: 8px;
  transform: translateY(-50%) rotate(-45deg);
}

.compare-handle::after {
  right: 8px;
  transform: translateY(-50%) rotate(135deg);
}

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.work-meta {
  display: grid;
  gap: 4px;
  padding: 15px;
  min-height: 88px;
}

.work-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.work-meta strong {
  font-size: 17px;
  line-height: 1.35;
}

.work-meta-hint {
  display: none;
  margin-top: 5px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.work-card.is-group-poster .work-meta,
.work-card.is-group-store .work-meta,
.work-card.is-group-peripheral .work-meta {
  padding-inline: 0;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px dashed #bdbdbd;
  padding: clamp(28px, 6vw, 72px);
  background: rgba(255, 255, 255, 0.42);
}

.empty-state h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
}

.empty-state p {
  width: min(560px, 100%);
  margin: 0;
  color: var(--muted);
}

.work-lightbox[hidden] {
  display: none;
}

.work-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 52px);
  background: rgba(12, 12, 12, 0.86);
}

.work-lightbox-frame {
  width: min(1180px, 100%);
  max-height: calc(100svh - 72px);
  margin: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.work-lightbox-media {
  position: relative;
  display: inline-grid;
  max-width: 100%;
  justify-items: center;
}

.work-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100svh - 124px);
  object-fit: contain;
}

.work-lightbox-caption {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
}

.work-lightbox-close {
  position: absolute;
  --lightbox-close-size: clamp(42px, 4.2vw, 56px);
  top: 0;
  right: calc(-1 * (var(--lightbox-close-size) + clamp(14px, 1.6vw, 22px)));
  z-index: 2;
  width: var(--lightbox-close-size);
  height: var(--lightbox-close-size);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 0;
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.work-lightbox-close::before,
.work-lightbox-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42%;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.work-lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.work-lightbox-close:hover,
.work-lightbox-close:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
}

.work-lightbox-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

body.is-lightbox-open {
  overflow: hidden;
}

.work-lightbox.is-long-image {
  place-items: start center;
  overflow-y: auto;
}

.work-lightbox.is-long-image .work-lightbox-frame {
  width: min(750px, 100%);
  max-height: none;
}

.work-lightbox.is-long-image .work-lightbox-media {
  width: 100%;
}

.work-lightbox.is-long-image .work-lightbox-image {
  width: 100%;
  max-width: 750px;
  max-height: none;
  height: auto;
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  margin-bottom: 0;
}

.skills-intro {
  border-top: 1px solid var(--ink);
  padding-top: 24px;
}

.skills-intro h3 {
  margin: 0;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.3;
  letter-spacing: 0;
}

.skills-intro-copy {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 30em;
}

.skills-intro-copy + .skills-intro-copy {
  margin-top: 14px;
}

.skills-intro-directions {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.4vw, 20px);
}

.capability-grid article {
  position: relative;
  min-height: 220px;
  padding: clamp(18px, 1.7vw, 24px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.44);
  overflow: hidden;
}

.capability-grid article::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 760ms cubic-bezier(0.17, 0.84, 0.44, 1);
}

.capability-grid.is-visible article::before {
  transform: scaleX(1);
}

.capability-grid article:nth-child(2)::before {
  transition-delay: 90ms;
}

.capability-grid article:nth-child(3)::before {
  transition-delay: 180ms;
}

.capability-grid article:nth-child(4)::before {
  transition-delay: 270ms;
}

.capability-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.capability-grid h4 {
  margin: 18px 0 10px;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.3;
}

.capability-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.timeline {
  display: grid;
  border-top: 1px solid var(--ink);
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) 1fr;
  gap: clamp(22px, 5vw, 72px);
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.timeline-item h3 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
}

.timeline-item p {
  margin: 10px 0 0;
  color: var(--muted);
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 0.38fr) minmax(0, 1fr) minmax(280px, 340px);
  grid-template-areas:
    "thanks thanks ."
    "side main qr";
  gap: clamp(22px, 4vw, 56px);
  align-items: end;
  min-height: clamp(430px, 54vw, 660px);
  padding: clamp(24px, 4.8vw, 62px);
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.contact-thanks {
  grid-area: thanks;
  align-self: start;
  color: rgba(17, 17, 17, 0.055);
  font-size: clamp(76px, 15vw, 208px);
  font-weight: 1000;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact-side {
  grid-area: side;
  display: grid;
  gap: 14px;
  align-self: end;
}

.contact-side .section-kicker,
.contact-main .section-kicker {
  color: rgba(17, 17, 17, 0.48);
}

.contact-main {
  grid-area: main;
  align-self: end;
}

.contact-panel h3 {
  color: var(--ink);
  text-shadow: none;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 34px);
  color: var(--muted);
  font-style: normal;
}

.contact-item {
  width: fit-content;
  display: grid;
  grid-template-columns: clamp(32px, 3.5vw, 48px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1.4vw, 16px);
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 900;
  line-height: 1.08;
  word-break: break-word;
}

.contact-email {
  font-size: clamp(17px, 2vw, 26px);
}

.contact-item span {
  min-width: 0;
}

.contact-item img {
  width: clamp(30px, 3.2vw, 44px);
  height: clamp(30px, 3.2vw, 44px);
  object-fit: contain;
  filter: none;
  opacity: 0.78;
}

.contact-list a {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.contact-list > span {
  color: var(--muted);
}

.wechat-card {
  grid-area: qr;
  margin: 0;
  transform: translateY(48px);
  margin-left: calc(-1 * clamp(22px, 4vw, 56px));
  display: grid;
  gap: 12px;
  width: min(100%, 240px);
  justify-self: start;
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: transparent;
}

.wechat-card img {
  width: 100%;
  height: auto;
}

.wechat-card figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

[data-reveal],
.work-card,
.work-group {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible,
.work-card.is-visible,
.work-group.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroTextIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroCharIn {
  from {
    opacity: 0;
    transform: translateY(108%) rotate(4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes motionTrackLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes motionTrackRight {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes focusWords {
  0%,
  16% {
    transform: translateY(0);
  }
  21%,
  37% {
    transform: translateY(-20%);
  }
  42%,
  58% {
    transform: translateY(-40%);
  }
  63%,
  79% {
    transform: translateY(-60%);
  }
  84%,
  100% {
    transform: translateY(-80%);
  }
}

@keyframes heroTitleIn {
  from {
    opacity: 0;
    transform: translateY(54px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cue {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes workAutoZoom {
  from {
    transform: scale(1.01);
  }
  to {
    transform: scale(1.055);
  }
}

@media (max-width: 1100px) {
  .work-group {
    grid-template-columns: 1fr;
  }

  .work-group-heading {
    position: static;
  }

  .work-group-actions {
    grid-column: 1 / -1;
  }

  .work-card,
  .work-card.is-feature {
    grid-column: span 6;
  }

  .work-card.is-compare,
  .work-card.is-compare-square,
  .work-card.is-compare-color,
  .work-card.is-compare-tall,
  .work-card.is-store-home,
  .work-card.is-wide {
    grid-column: 1 / -1;
  }

  .work-card.is-tall,
  .work-card.is-long {
    grid-column: span 4;
  }
}

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

  .nav-links {
    justify-self: end;
    gap: 18px;
  }

  .resume-link {
    display: none;
  }

  .profile-layout,
  .skills-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    grid-template-areas:
      "thanks"
      "main"
      "side"
      "qr";
    align-items: start;
  }

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

  .section {
    padding-block: clamp(64px, 10vw, 96px);
  }

  .profile-layout,
  .skills-layout {
    gap: clamp(30px, 6vw, 48px);
  }

  .hero-stats {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 540px);
    margin-top: 18px;
  }

  .contact-panel {
    min-height: auto;
    padding: clamp(28px, 7vw, 48px);
  }

  .wechat-card {
    width: min(270px, 100%);
    justify-self: start;
    margin-left: 0;
    margin-top: 0;
    transform: none;
  }

  .work-card.is-compare-color-small {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 64px;
  }

  html,
  body {
    overflow-x: clip;
  }

  .site-header {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding-inline: 14px;
  }

  .brand {
    width: 42px;
    height: 42px;
  }

  .nav-links {
    min-width: 0;
    justify-content: flex-end;
    gap: clamp(7px, 2.4vw, 10px);
    font-size: clamp(11px, 3vw, 12px);
  }

  .nav-links a {
    white-space: nowrap;
  }

  .hero {
    min-height: calc(100svh - var(--header-height));
    padding: 16px 16px 34px;
  }

  .hero-motion {
    inset: 106px -22vw auto;
  }

  .motion-track {
    font-size: clamp(38px, 14vw, 76px);
  }

  .motion-track-secondary {
    font-size: clamp(24px, 9vw, 52px);
  }

  .hero-keywords {
    gap: 6px 9px;
    font-size: 11px;
    line-height: 1.25;
  }

  .hero-keyword {
    white-space: nowrap;
  }

  .hero-year {
    position: static;
    justify-items: start;
    margin-top: 26px;
    font-size: 14px;
  }

  .hero-year span:last-child {
    font-size: 11px;
  }

  .hero-content {
    gap: 12px;
    padding-top: 34px;
  }

  .hero-season {
    justify-self: start;
    margin-bottom: -4px;
    font-size: 16px;
  }

  .hero h1 {
    gap: 6px;
    font-size: clamp(44px, 16.5vw, 68px);
  }

  .hero-role {
    font-size: 13px;
    line-height: 1.35;
  }

  .hero-focus {
    gap: 6px;
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-work-link {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }

  .hero-text-link {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-stats div {
    min-width: 0;
  }

  .hero-stats dt {
    font-size: 24px;
  }

  .hero-stats dd {
    font-size: 11px;
  }

  .scroll-cue {
    display: none;
  }

  .section {
    padding: 56px 16px;
  }

  .section-heading {
    grid-template-columns: 38px minmax(0, 1fr);
    margin-bottom: 30px;
  }

  .section-heading h2 {
    font-size: clamp(30px, 10vw, 40px);
  }

  .profile-copy h3,
  .skills-intro h3 {
    font-size: clamp(24px, 7vw, 32px);
  }

  .profile-copy p:not(.section-kicker) {
    font-size: 15px;
  }

  .profile-points {
    gap: 10px;
    margin-top: 24px;
  }

  .profile-points li {
    font-size: 14px;
  }

  .works-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
  }

  .filter-tabs {
    --filter-fade-left: 0px;
    --filter-fade-right: 0px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-inline: -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tabs.has-overflow {
    --filter-fade-right: 42px;
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 var(--filter-fade-left),
      #000 calc(100% - var(--filter-fade-right)),
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 var(--filter-fade-left),
      #000 calc(100% - var(--filter-fade-right)),
      transparent 100%
    );
  }

  .filter-tabs.has-overflow:not(.is-scroll-start) {
    --filter-fade-left: 26px;
  }

  .filter-tabs.has-overflow.is-scroll-end {
    --filter-fade-right: 0px;
  }

  .filter-tab {
    flex: 0 0 auto;
    min-width: 74px;
    width: auto;
    padding: 0 14px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .works-count {
    white-space: normal;
  }

  .work-groups {
    gap: 52px;
  }

  .work-group {
    gap: 18px;
    padding-top: 24px;
  }

  .work-group-heading {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
  }

  .work-group-heading h3 {
    font-size: 25px;
  }

  .work-group-heading p {
    margin-top: 8px;
    font-size: 13px;
  }

  .work-rail {
    gap: 16px;
  }

  .work-card,
  .work-card.is-feature,
  .work-card.is-compare,
  .work-card.is-compare-square,
  .work-card.is-compare-color,
  .work-card.is-compare-color-small,
  .work-card.is-compare-tall,
  .work-card.is-wide,
  .work-card.is-store-home,
  .work-card.is-tall,
  .work-card.is-long {
    grid-column: 1 / -1;
  }

  .work-card.is-store-home .work-media img,
  .work-store-preview {
    object-position: top center;
  }

  .work-meta-hint {
    display: inline;
  }

  .work-meta {
    min-height: 74px;
    padding: 12px;
  }

  .work-meta strong {
    font-size: 15px;
  }

  .compare-badge {
    top: 8px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .compare-badge-before {
    left: 8px;
  }

  .compare-badge-after {
    right: 8px;
  }

  .compare-handle {
    width: 34px;
    height: 34px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
  }

  .profile-facts article {
    padding: 0;
  }

  .profile-info-grid,
  .software-list,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .capability-grid article {
    min-height: auto;
  }

  .software-list li {
    min-height: 126px;
    padding: 18px;
  }

  .software-icon {
    width: 58px;
    height: 58px;
  }

  .contact-panel {
    gap: 20px;
    padding: 0;
  }

  .contact-item {
    width: 100%;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    font-size: clamp(18px, 5.4vw, 24px);
  }

  .contact-email {
    font-size: clamp(16px, 4.4vw, 20px);
  }

  .contact-email span {
    overflow-wrap: anywhere;
  }

  .contact-panel h3 {
    font-size: clamp(34px, 9vw, 44px);
  }

  .contact-thanks {
    font-size: clamp(58px, 17vw, 104px);
  }

  .contact-item img {
    width: 28px;
    height: 28px;
  }

  .wechat-card {
    width: min(220px, 100%);
    justify-self: center;
    margin-left: 0;
    margin-top: 0;
    transform: none;
  }

  .work-lightbox {
    padding: 14px;
  }

  .work-lightbox-media {
    padding-top: 0;
  }

  .work-lightbox-close {
    display: none;
  }

  .work-lightbox-image {
    max-height: calc(100svh - 110px);
  }
}

@media (max-width: 380px) {
  .site-header {
    grid-template-columns: 42px minmax(0, 1fr);
    padding-inline: 10px;
  }

  .brand {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .nav-links {
    gap: 7px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(40px, 15.5vw, 58px);
  }

  .hero-stats {
    gap: 8px;
  }

  .filter-tab {
    min-width: 68px;
    padding: 0 12px;
  }
}

@media (hover: none) {
  .work-media img,
  .work-media video {
    animation: none;
    transform: none;
  }

  .work-card:hover .work-media img,
  .work-card:hover .work-media video,
  .work-card:focus-visible .work-media img,
  .work-card:focus-visible .work-media video {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal],
  .work-card,
  .work-group,
  .hero h1 .char,
  .motion-track,
  .focus-track,
  .hero-keyword,
  .hero-year,
  .hero-season,
  .hero h1 span,
  .hero-role {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .hero-work-link {
    animation: none !important;
  }
}

/* AIGC edition: same visual language, native media and visible workflow screenshots. */
.aigc-subfilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.aigc-subfilters button { padding: 8px 14px; color: var(--ink); background: transparent; border: 1px solid var(--line); font: inherit; font-size: 13px; cursor: pointer; }
.aigc-subfilters button.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.aigc-subfilters button:focus-visible, .aigc-text-link:focus-visible, .aigc-original:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.aigc-status { font-size: 12px; color: var(--muted); margin: 0 0 24px; }
.aigc-case-list { display: grid; gap: 36px; }
.aigc-case { min-width: 0; padding: 24px; background: var(--paper); border: 1px solid var(--line); }
.aigc-case-heading { margin-bottom: 18px; }
.aigc-label { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.aigc-case-heading h4 { font-size: 22px; font-weight: 500; margin: 0; line-height: 1.4; }
.aigc-case-lead { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; }
.aigc-case-lead.has-workflow { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
.aigc-context { min-width: 0; }
.aigc-description { margin: 0 0 18px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.aigc-media { min-width: 0; margin: 0; }
.aigc-original { display: block; }
.aigc-media img, .aigc-media video { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; object-position: left top; animation: none; transform: none; }
.aigc-media figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.aigc-series { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; align-items: start; }
.aigc-series img, .aigc-series video { max-height: 300px; }
.aigc-workflow { margin-top: 20px; }
.aigc-workflow h5 { font-size: 14px; margin: 0 0 10px; font-weight: 500; }
.aigc-workflow img { max-height: none; width: 100%; height: auto; }
.aigc-reference { width: min(100%, 460px); margin-top: 20px; }
.aigc-text-link { display: inline-block; margin-top: 12px; font-size: 13px; border-bottom: 1px solid var(--ink); text-decoration: none; }
@media (max-width: 900px) {
  .aigc-case-lead, .aigc-case-lead.has-workflow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
  .aigc-series { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .aigc-case { padding: 16px; }
  .aigc-case-heading h4 { font-size: 19px; }
  .aigc-case-lead, .aigc-case-lead.has-workflow { grid-template-columns: 1fr; gap: 18px; }
  .aigc-media img, .aigc-media video { max-height: 380px; }
  .aigc-workflow img { max-height: none; }
  .aigc-series { gap: 16px; }
  .aigc-series img, .aigc-series video { max-height: 260px; }
}

/* Match the player itself to the video ratio, including height-constrained portraits. */
.aigc-media video {
  --aigc-video-height: 420px;
  width: min(100%, calc(var(--aigc-video-height) * var(--media-ratio, 1.777778)));
  height: auto;
  max-height: none;
  aspect-ratio: var(--media-ratio, 1.777778);
}
.aigc-series video { --aigc-video-height: 300px; }
@media (max-width: 680px) {
  .aigc-media video { --aigc-video-height: 380px; }
  .aigc-series video { --aigc-video-height: 260px; }
}

/* Keep the heading and content as the two stable children of the outer group grid. */
.is-aigc-group > .aigc-group-content { min-width: 0; width: 100%; }
.aigc-group-content > .aigc-case-list { min-width: 0; }
.aigc-case.is-tutorial .aigc-case-lead { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.aigc-case.is-tutorial .aigc-description { overflow-wrap: break-word; }
@media (max-width: 680px) {
  .aigc-case.is-tutorial .aigc-case-lead { grid-template-columns: 1fr; }
}

/* Video content stays centered in the browser's native fullscreen player. */
.aigc-media video { object-position: center center; }
.aigc-media video:fullscreen {
  width: 100%; height: 100%; max-width: none; max-height: none;
  aspect-ratio: auto; object-fit: contain; object-position: center center; background: #000;
}
.aigc-media video:-webkit-full-screen {
  width: 100%; height: 100%; max-width: none; max-height: none;
  aspect-ratio: auto; object-fit: contain; object-position: center center; background: #000;
}
/* Image and workflow previews remain in the current page. */
button.aigc-original { width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; text-align: left; }
button.aigc-text-link { padding: 0 0 3px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-family: inherit; cursor: pointer; }
body.aigc-viewer-open { overflow: hidden; }
.aigc-image-viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0;
  padding: 0; border: 0; background: #111; color: #fff;
}
.aigc-image-viewer[open] { display: flex; flex-direction: column; }
.aigc-image-viewer::backdrop { background: #111; }
.aigc-viewer-toolbar { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; }
.aigc-viewer-caption { margin: 0; font-size: 14px; line-height: 1.5; }
.aigc-viewer-controls { display: flex; gap: 10px; flex-shrink: 0; }
.aigc-viewer-controls button { min-width: 44px; min-height: 44px; padding: 8px 14px; background: transparent; border: 1px solid #666; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.aigc-viewer-controls button:disabled { opacity: .3; cursor: default; }
.aigc-viewer-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.aigc-viewer-viewport { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 12px 24px 24px; }
.aigc-viewer-viewport img { width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; object-position: center; }
.aigc-viewer-viewport.is-original-size { display: block; }
.aigc-viewer-viewport.is-original-size img { width: auto; height: auto; max-width: none; max-height: none; margin: auto; }
@media (max-width: 680px) {
  .aigc-viewer-toolbar { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .aigc-viewer-controls { margin-left: auto; gap: 6px; }
  .aigc-viewer-viewport { padding: 8px 12px 16px; }
}

/* Paired cuts share the first row; the image series follows below. */
.aigc-case-lead.has-paired-videos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.aigc-video-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; min-width: 0; }
@media (max-width: 900px) {
  .aigc-case-lead.has-paired-videos { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .aigc-video-pair { gap: 12px; }
}

/* Selected finished films form one gallery, with metadata beneath each player. */
.aigc-gallery-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.aigc-gallery-heading h4 { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.4; }
.aigc-gallery-heading > p { margin: 0; color: var(--muted); font-size: 12px; }
.aigc-film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 20px; }
.aigc-film { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.aigc-film-player video { width: 100%; height: auto; max-height: none; aspect-ratio: 9 / 16; object-fit: contain; background: #111; }
.is-tutorial-gallery .aigc-film-player video { aspect-ratio: 3 / 4; }
.aigc-film-meta { padding: 16px 18px 18px; }
.aigc-film-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.aigc-film-label .aigc-label { margin: 0; }
.aigc-film-duration { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.aigc-film-meta h5 { margin: 0 0 9px; font-size: 20px; font-weight: 500; line-height: 1.4; }
.aigc-film-meta .aigc-description { margin: 0; font-size: 13px; line-height: 1.7; }
@media (max-width: 680px) {
  .aigc-film-grid { gap: 22px 14px; }
  .aigc-film-meta { padding: 12px; }
  .aigc-film-meta h5 { font-size: 18px; }
  .aigc-gallery-heading h4 { font-size: 21px; }
}
@media (max-width: 480px) {
  .aigc-film-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Responsive edition: size each preview from its card, preserving its media ratio. */
@media (min-width: 681px) {
  .section {
    padding-inline: max(clamp(18px, 6vw, 92px), calc((100% - 1920px) / 2));
  }
}
@media (min-width: 1101px) {
  .work-group {
    grid-template-columns: clamp(200px, 16vw, 260px) minmax(0, 1fr);
    gap: clamp(28px, 3vw, 48px);
  }
  .work-group-heading h3 { font-size: clamp(28px, 2.4vw, 38px); }
}

.profile-layout > *, .skills-layout > *, .contact-panel > * { min-width: 0; }
.profile-copy p:not(.section-kicker) { max-width: 64ch; }
.works-toolbar { flex-wrap: wrap; }
.filter-tabs { min-width: 0; }
.works-count { flex-shrink: 0; }
.is-aigc-group > .aigc-group-content { container: aigc-group / inline-size; }
.aigc-case { container: aigc-card / inline-size; }
.aigc-case-lead {
  --aigc-lead-height: clamp(360px, 36cqw, 560px);
  gap: clamp(20px, 3cqw, 40px);
}
.aigc-case:not(.is-tutorial) .aigc-case-lead:not(.has-paired-videos) {
  grid-template-columns: minmax(0, min(38%, calc(var(--aigc-lead-height) * var(--lead-media-ratio, .666667)))) minmax(0, 1fr);
}
.aigc-case-lead > .aigc-media video,
.aigc-video-pair video { --aigc-video-height: var(--aigc-lead-height); }
.aigc-case-lead > .aigc-media img { max-height: var(--aigc-lead-height); }
.aigc-workflow .aigc-media {
  width: 100%;
}
/* Workflow previews share the finished media's baseline instead of growing with column width. */
.aigc-case-lead.has-workflow:not(.has-paired-videos) {
  --aligned-media-height: min(var(--aigc-lead-height), calc(38cqw / var(--lead-media-ratio, .666667)));
  --aligned-caption-height: 27.2px;
  padding-bottom: 36px;
}
.aigc-case-lead.has-workflow:not(.has-paired-videos) > .aigc-context {
  height: calc(var(--aligned-media-height) + var(--aligned-caption-height));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.aigc-case-lead.has-workflow .aigc-workflow {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}
.aigc-case-lead.has-workflow .aigc-workflow .aigc-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}
.aigc-case-lead.has-workflow .aigc-workflow .aigc-original {
  position: relative;
  min-height: 0;
  height: 100%;
}
.aigc-case-lead.has-workflow .aigc-workflow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: left bottom;
}
.aigc-case-lead.has-workflow .aigc-workflow .aigc-text-link {
  position: absolute;
  top: 100%;
  left: 0;
}
.aigc-description { overflow-wrap: anywhere; }
.work-rail.is-retouch-rail {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 320px));
  align-items: start;
  gap: 22px;
}
.is-retouch-rail > .work-card {
  grid-column: auto;
  min-height: 0;
}
.aigc-film-meta h5 { overflow-wrap: anywhere; }
.aigc-series img { height: auto; max-height: none; }

/* Supporting series thumbnails stay compact even on wide screens. */
:is(#aigc-case-holiday, #aigc-case-interior, #aigc-case-floral) .aigc-series {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 200px));
  gap: 20px 16px;
}
:is(#aigc-case-holiday, #aigc-case-interior, #aigc-case-floral) .aigc-series img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 280px;
}
:is(#aigc-case-holiday, #aigc-case-interior, #aigc-case-floral) .aigc-series .aigc-original {
  width: fit-content;
  max-width: 100%;
}

/* The landscape model sheet shares the scene thumbnails' height, not their width. */
#aigc-case-interior .aigc-series {
  display: grid;
  width: min(100%, 1020px);
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 3.210069fr);
  gap: 20px 16px;
}
#aigc-case-interior .aigc-series > .aigc-media {
  width: 100%;
}
#aigc-case-interior .aigc-series .aigc-original,
#aigc-case-interior .aigc-series img { width: 100%; }
#aigc-case-interior .aigc-series img {
  height: auto;
  max-height: none;
}

@container aigc-card (max-width: 620px) {
  .aigc-case-lead.has-workflow:not(.has-paired-videos) { padding-bottom: 0; }
  .aigc-case-lead.has-workflow:not(.has-paired-videos) > .aigc-context {
    height: auto;
    display: block;
  }
  .aigc-case-lead.has-workflow .aigc-workflow,
  .aigc-case-lead.has-workflow .aigc-workflow .aigc-media { display: block; }
  .aigc-case-lead.has-workflow .aigc-workflow .aigc-original { height: auto; }
  .aigc-case-lead.has-workflow .aigc-workflow img {
    position: static;
    height: auto;
    max-height: none;
  }
  .aigc-case-lead.has-workflow .aigc-workflow .aigc-text-link { position: static; }
  .aigc-case-lead,
  .aigc-case:not(.is-tutorial) .aigc-case-lead:not(.has-paired-videos),
  .aigc-case-lead.has-paired-videos,
  .aigc-case.is-tutorial .aigc-case-lead {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .aigc-case-lead { --aigc-lead-height: clamp(360px, 90cqw, 480px); }
  .aigc-case-lead > .aigc-media { width: fit-content; max-width: 100%; }
  .aigc-case-lead > .aigc-media img { width: auto; max-width: 100%; }
  .aigc-description { margin-bottom: 0; }
  .aigc-workflow { margin-top: 18px; }
  .aigc-workflow .aigc-media { width: 100%; }
  .aigc-series { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#aigc-case-holiday, #aigc-case-interior, #aigc-case-floral) .aigc-series {
    grid-template-columns: repeat(2, minmax(0, 180px));
    gap: 18px 12px;
  }
  :is(#aigc-case-holiday, #aigc-case-interior, #aigc-case-floral) .aigc-series img { max-height: 240px; }
  #aigc-case-interior .aigc-series {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #aigc-case-interior .aigc-series > .aigc-media:last-child { grid-column: 1 / -1; }
  #aigc-case-interior .aigc-series img { max-height: none; }
}
@container aigc-group (max-width: 440px) {
  .aigc-film-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 981px) and (max-width: 1440px) {
  .hero-stats {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 540px);
    margin-top: 32px;
  }
  .contact-panel {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    grid-template-areas: "thanks thanks" "main qr" "side qr";
    padding: 24px;
  }
  .contact-panel h3 { font-size: clamp(40px, 4.8vw, 62px); }
  .contact-item { font-size: clamp(18px, 2.2vw, 26px); }
  .contact-email span { overflow-wrap: anywhere; }
}
@media (min-width: 981px) and (max-width: 1280px) {
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .software-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .software-list li { padding: 16px; }
  .software-list strong { font-size: 16px; overflow-wrap: anywhere; }
  .aigc-video-pair video { --aigc-video-height: 380px; }
}

/* Contact layout follows available section space; the QR card has no negative offset. */
.contact-section { container: contact / inline-size; }
.contact-panel {
  grid-template-columns: minmax(0, 1fr) clamp(220px, 20cqw, 280px);
  grid-template-areas: "thanks thanks" "main qr" "side side";
  column-gap: clamp(48px, 7cqw, 112px);
  row-gap: clamp(32px, 4cqw, 64px);
  min-height: auto;
  align-items: center;
  padding: clamp(0px, 2cqw, 32px);
}
.contact-main { align-self: center; }
.contact-panel h3 { font-size: clamp(32px, 5cqw, 64px); line-height: 1.2; }
.contact-thanks { font-size: clamp(58px, 14cqw, 208px); line-height: 1; }
.contact-side { align-self: start; }
.contact-side .section-kicker { margin: 0; }
.contact-list { gap: 20px; }
.contact-email span { overflow-wrap: anywhere; }
.contact-panel .wechat-card {
  width: 100%;
  max-width: 280px;
  justify-self: end;
  align-self: center;
  margin: 0;
  transform: none;
}
@container contact (max-width: 800px) {
  .contact-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "thanks" "main" "qr" "side";
    gap: 40px;
    padding: 0;
  }
  .contact-panel h3 { font-size: clamp(32px, 7cqw, 52px); }
  .contact-panel .wechat-card { width: min(100%, 240px); justify-self: start; }
}

/* Product retouch case: source and workflow above six consistently sized outputs. */
@media (min-width: 681px) {
  .section { padding-block: 64px 80px; }
  .section-heading { margin-bottom: 32px; }
  .section-heading.navigation-target { transform: none; transition: none; opacity: 1; }
  .section-heading h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1.1; }
  .contact-section { min-height: calc(100svh - var(--header-height) + 64px); }
  .contact-panel {
    width: min(100%, clamp(860px, 80cqw, 1200px));
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 19cqw, 280px);
    column-gap: clamp(48px, 5cqw, 88px);
    row-gap: clamp(28px, 2.5cqw, 40px);
    padding: 0 clamp(16px, 2cqw, 32px);
  }
  .contact-thanks {
    width: 100%;
    font-size: clamp(80px, 8cqw, 144px);
    letter-spacing: .08em;
    line-height: 1;
    color: rgba(17, 17, 17, .07);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }
  .contact-side { width: 100%; padding-top: 20px; border-top: 1px solid var(--line); }
  .contact-side .section-kicker { letter-spacing: .14em; font-size: 12px; }
  .contact-main .section-kicker {
    font-size: clamp(11px, .85cqw, 14px);
    letter-spacing: .08em;
    margin-bottom: 20px;
  }
  .contact-panel h3 { font-size: clamp(40px, 4cqw, 64px); line-height: 1.25; }
  .contact-list { margin-top: clamp(28px, 3cqw, 44px); gap: 22px; }
  .contact-panel .contact-item {
    grid-template-columns: clamp(28px, 2.4cqw, 36px) minmax(0, 1fr);
    gap: 16px;
    font-size: clamp(24px, 2.2cqw, 34px);
    line-height: 1.3;
  }
  .contact-panel .contact-email { font-size: clamp(22px, 1.9cqw, 30px); }
  .contact-panel .contact-item img { width: 100%; height: auto; }
  .contact-panel .contact-list > span { font-size: clamp(20px, 1.6cqw, 24px); font-weight: 500; }
  .contact-panel .wechat-card { max-width: 280px; padding: 18px; gap: 16px; }
  @container contact (max-width: 800px) {
    .contact-panel {
      width: min(100%, 600px);
      grid-template-columns: minmax(0, 1fr);
      padding-inline: 16px;
      gap: 28px;
    }
  }
}

.aigc-retouch-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}
.is-retouch-series h5 { margin: 0 0 12px; font-size: 15px; font-weight: 500; }
.aigc-retouch-original .aigc-original { width: min(100%, 210px); }
.aigc-retouch-original img { max-height: none; }
.aigc-retouch-workflow .aigc-original { height: 280px; }
.aigc-retouch-workflow img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
  object-position: left bottom;
}
.aigc-retouch-results { margin-top: 28px; }
.aigc-retouch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 200px));
  gap: 24px 16px;
  align-items: start;
}
.aigc-retouch-grid img {
  width: 100%;
  height: auto;
  max-height: 267px;
  object-fit: contain;
}
@container aigc-card (max-width: 620px) {
  .aigc-retouch-source-row { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .aigc-retouch-original .aigc-original { width: min(100%, 180px); }
  .aigc-retouch-workflow .aigc-original { height: auto; }
  .aigc-retouch-workflow img { height: auto; max-height: none; }
  .aigc-retouch-grid { grid-template-columns: repeat(2, minmax(0, 180px)); gap: 20px 12px; }
  .aigc-retouch-grid img { max-height: 240px; }
}

/* Three-column product replacement comparison. */
.aigc-replacement-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.aigc-replacement-column { min-width: 0; }
.aigc-replacement-column h5 { margin: 0 0 12px; font-size: 14px; font-weight: 500; }
.is-replacement-case .aigc-media video,
.is-replacement-case .aigc-media img { width: 100%; height: auto; max-height: none; aspect-ratio: 9 / 16; object-fit: contain; object-position: center; background: #fff; }
.is-replacement-case .aigc-original { width: 100%; }
.aigc-sync-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.aigc-sync-controls button { padding: 10px 20px; border: 1px solid var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.aigc-sync-toggle { color: var(--paper); background: var(--ink); }
.aigc-sync-sound, .aigc-sync-replay { color: var(--ink); background: transparent; }
.aigc-sync-controls button:disabled { opacity: .5; cursor: wait; }
.aigc-sync-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.aigc-sync-status { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 680px) {
  .aigc-replacement-columns { gap: 8px; }
  .aigc-replacement-column h5 { font-size: 12px; margin-bottom: 8px; text-align: center; }
  .aigc-sync-controls { justify-content: center; gap: 10px; margin-top: 18px; }
  .aigc-sync-status { width: 100%; text-align: center; }
}

/* Keep navigation headings stable while measuring the scroll destination. */
.section-heading.navigation-target { transform: none; transition: none; opacity: 1; }

/* Keep multiple product references inside the comparison column's shared height. */
.aigc-replacement-stack { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 12px; aspect-ratio: 9 / 16; }
.aigc-replacement-stack .aigc-media,
.aigc-replacement-stack .aigc-original { min-height: 0; height: 100%; }
.is-replacement-case .aigc-replacement-stack img { height: 100%; aspect-ratio: auto; }
