:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --soft: #ffffff;
  --line: #000000;
  --line-strong: #000000;
  --tag-bg: #000000;
  --tag-ink: #ffffff;
  --shadow: rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #000000;
  --ink: #ffffff;
  --muted: #ffffff;
  --soft: #000000;
  --line: #ffffff;
  --line-strong: #ffffff;
  --tag-bg: #000000;
  --tag-ink: #ffffff;
  --shadow: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, system-ui,
    sans-serif;
  font-weight: 400;
  transition:
    background 620ms cubic-bezier(0.16, 1, 0.3, 1),
    color 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

button {
  font: inherit;
}

.theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 20;
  display: grid;
  grid-template-columns: 54px auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px 10px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 16px 42px var(--shadow);
  transition:
    background 620ms cubic-bezier(0.16, 1, 0.3, 1),
    color 620ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 620ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  outline: none;
  transform: translateY(-2px);
}

.theme-toggle span {
  position: relative;
  display: block;
  width: 54px;
  height: 28px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  overflow: hidden;
  background: var(--ink);
}

.theme-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--paper);
  transition:
    transform 620ms cubic-bezier(0.19, 1, 0.22, 1),
    background 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] .theme-toggle span::after {
  transform: translateX(26px);
}

.theme-toggle strong {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.ambient-cubes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - clamp(180px, 18vw, 340px)));
  margin: 0 auto;
  padding: clamp(24px, 3vw, 44px) 0 96px;
}

.hero {
  padding: clamp(28px, 5vw, 70px) 0 clamp(34px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.player-meta p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(58px, 8.2vw, 132px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 500;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(18px, 2.6vw, 36px);
  max-width: 980px;
  margin-top: clamp(26px, 4vw, 56px);
  color: var(--ink);
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.35;
}

.hero-contact span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.hero-backup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.9em;
  line-height: 1;
  white-space: nowrap;
  transition:
    background 520ms cubic-bezier(0.16, 1, 0.3, 1),
    color 520ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-backup-link:hover,
.hero-backup-link:focus-visible {
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transform: translateY(-2px);
}

.featured {
  border-bottom: 1px solid var(--line);
}

.portfolio {
  display: grid;
  gap: clamp(54px, 8vw, 116px);
}

.category {
  display: grid;
  grid-template-columns: minmax(300px, 0.34fr) minmax(0, 1fr);
  column-gap: clamp(88px, 9vw, 170px);
  row-gap: clamp(72px, 8vw, 132px);
  padding: clamp(44px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--line);
}

.featured .category {
  display: block;
  padding-top: clamp(28px, 4vw, 56px);
  border-bottom: 0;
}

.category-heading h2 {
  position: relative;
  top: auto;
  z-index: 21;
  display: inline-block;
  margin-bottom: 0;
  padding-bottom: 18px;
  background: var(--paper);
  font-size: clamp(32px, 4vw, 66px);
  line-height: 0.96;
  letter-spacing: 0;
  white-space: nowrap;
  font-weight: 400;
}

.category-heading {
  position: relative;
  z-index: 20;
  background: var(--paper);
}

.featured .category-heading {
  margin-bottom: clamp(64px, 7vw, 112px);
}

.featured .category-heading h2,
.featured .category-heading {
  position: static;
}

.category-heading small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.2;
}

.category-heading p {
  max-width: 320px;
  margin: 22px 0 0;
  color: var(--ink);
  font-size: clamp(18px, 1.42vw, 23px);
  line-height: 1.72;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1;
  transition:
    background 420ms cubic-bezier(0.16, 1, 0.3, 1),
    color 420ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.section-link::after {
  content: "↗";
  margin-left: 10px;
  font-size: 0.92em;
}

.section-link:hover,
.section-link:focus-visible {
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transform: translateY(-3px);
}

.category-body {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-top: clamp(28px, 3.5vw, 56px);
}

.work-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  align-items: start;
  overflow: visible;
}

.is-showreel .work-grid {
  grid-template-columns: minmax(320px, 980px);
}

.is-showreel .category-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.32fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: start;
}

.is-showreel .cover {
  aspect-ratio: 16 / 9;
}

.is-showreel .cover::before,
.is-showreel .cover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  pointer-events: none;
  transition:
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 420ms ease;
}

.is-showreel .cover::before {
  width: clamp(58px, 5.8vw, 86px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.86);
  transform: translate(-50%, -50%);
}

.is-showreel .cover::after {
  width: 0;
  height: 0;
  border-top: clamp(10px, 1vw, 14px) solid transparent;
  border-bottom: clamp(10px, 1vw, 14px) solid transparent;
  border-left: clamp(16px, 1.5vw, 23px) solid #ffffff;
  transform: translate(calc(-50% + 3px), -50%);
}

.is-showreel .work-card:hover .cover::before,
.is-showreel .work-card:focus-visible .cover::before {
  transform: translate(-50%, -50%) scale(1.08);
}

.is-showreel .work-card:hover .cover::after,
.is-showreel .work-card:focus-visible .cover::after {
  transform: translate(calc(-50% + 5px), -50%) scale(1.08);
}

.is-showreel .work-name {
  font-size: 16px;
}

.resume-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(12px, 1.4vw, 20px);
  min-height: 100%;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  text-align: center;
  transition:
    background 520ms cubic-bezier(0.16, 1, 0.3, 1),
    color 520ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-card:hover,
.resume-card:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
  transform: translateY(-6px);
}

.resume-kicker {
  justify-self: center;
  margin-bottom: 0;
  font-size: 15px;
}

.resume-graphic {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: repeat(4, 10px);
  gap: 12px 14px;
  align-items: center;
  width: min(100%, 260px);
  margin: 0 auto;
}

.resume-graphic i {
  grid-row: 1 / 5;
  display: block;
  width: 58px;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) 50% 62% / 26px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 42% / 18px 1px no-repeat;
}

.resume-graphic b {
  display: block;
  height: 1px;
  background: currentColor;
}

.resume-graphic b:nth-child(3) {
  width: 76%;
}

.resume-graphic b:nth-child(4) {
  width: 88%;
}

.resume-graphic b:nth-child(5) {
  width: 62%;
}

.resume-card strong {
  display: block;
  margin-bottom: 0;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1;
  font-weight: 400;
  text-align: center;
}

.resume-card p {
  margin: 0;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.work-card,
.stack-group {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 720ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay);
}

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

.work-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.work-card:hover,
.work-card:focus-visible {
  z-index: 60;
}

.cover,
.stack-cover {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.cover img,
.cover video,
.stack-cover img,
.stack-cover video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.02);
  transform: scale(1.01);
  transition:
    filter 520ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cover video,
.stack-cover video {
  pointer-events: none;
}

.card-tags {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 31px;
  pointer-events: none;
}

.card-tags.is-empty {
  visibility: hidden;
}

.card-tags span {
  padding: 8px 13px 7px;
  background: var(--tag-bg);
  border: 1px solid #ffffff;
  color: var(--tag-ink);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.lock-mark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 38px;
  border: 2px solid #ffffff;
  border-radius: 4px;
  transform: translate(-50%, -34%);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.lock-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  width: 26px;
  height: 25px;
  border: 2px solid #ffffff;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  transform: translateX(-50%);
}

.lock-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 12px;
  border-radius: 99px;
  background: #ffffff;
  transform: translate(-50%, -50%);
}

.card-note {
  position: absolute;
  z-index: 8;
  top: 42px;
  left: calc(100% + 12px);
  display: block;
  width: min(320px, 72vw);
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.68;
  opacity: 0;
  transform: translate3d(-10px, 8px, 0) scale(0.96);
  transition:
    opacity 280ms ease,
    transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.work-card:hover .card-note,
.work-card:focus-visible .card-note,
.work-card.is-locked-active .card-note {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.work-card:hover .cover img,
.work-card:hover .cover video,
.work-card:focus-visible .cover img,
.work-card:focus-visible .cover video,
.stack-opener:hover .stack-cover img,
.stack-opener:hover .stack-cover video,
.stack-opener:focus-visible .stack-cover img,
.stack-opener:focus-visible .stack-cover video {
  filter: saturate(1.08) contrast(1.06);
  transform: scale(1.045);
}

.work-card.is-locked .cover {
  background: #000000;
}

.work-card.is-locked .cover img,
.work-card.is-locked .cover video {
  filter: blur(10px) saturate(0.82) contrast(0.96);
  transform: scale(1.08);
}

.work-card.is-locked:hover .cover img,
.work-card.is-locked:hover .cover video,
.work-card.is-locked:focus-visible .cover img,
.work-card.is-locked:focus-visible .cover video {
  filter: blur(10px) saturate(0.82) contrast(0.96);
  transform: scale(1.1);
}

.work-card.is-locked-shaking .cover {
  animation: locked-shake 560ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes locked-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  18% {
    transform: translateX(-9px) rotate(-1.2deg);
  }
  34% {
    transform: translateX(8px) rotate(1deg);
  }
  50% {
    transform: translateX(-6px) rotate(-0.8deg);
  }
  66% {
    transform: translateX(4px) rotate(0.5deg);
  }
  82% {
    transform: translateX(-2px) rotate(-0.25deg);
  }
}

.work-card:hover,
.work-card:focus-visible,
.stack-opener:hover,
.stack-opener:focus-visible {
  outline: none;
}

.work-name {
  min-height: 2.6em;
  color: var(--ink);
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.32;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.work-card.is-compact .work-name {
  font-size: 15px;
  color: var(--muted);
}

.is-gif .cover::after {
  content: none;
}

.is-motion .work-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 230px));
  align-items: end;
}

.is-motion .work-card {
  gap: 9px;
}

.is-motion .card-tags span {
  border-color: var(--tag-bg);
  background: var(--tag-bg);
}

.is-motion .cover {
  aspect-ratio: auto;
  min-height: 118px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.is-motion .cover img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  filter: none;
  transform: none;
}

.is-motion .work-card:hover .cover img,
.is-motion .work-card:focus-visible .cover img {
  filter: none;
  transform: translateY(-4px);
}

.doc-thumb {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(20px, 4vw, 42px);
  letter-spacing: 0;
}

.video-thumb-fallback {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.18;
  text-align: center;
}

.locked-thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.1), transparent 38%),
    #000000;
}

.doc-link {
  display: inline-block;
  width: fit-content;
  margin-top: 22px;
  padding-bottom: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  font-size: 15px;
  cursor: pointer;
}

.doc-link:hover,
.doc-link:focus-visible {
  outline: none;
  color: var(--muted);
}

.stack-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  width: 100%;
  max-width: none;
}

.stack-opener {
  position: relative;
  display: grid;
  grid-template-columns: minmax(132px, 190px) 1fr;
  gap: 18px;
  width: min(100%, 560px);
  min-height: 190px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.stack-peek {
  position: absolute;
  width: min(190px, 38%);
  aspect-ratio: 1;
  left: 0;
  top: 0;
  z-index: -1;
  pointer-events: none;
}

.peek-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper);
  transform:
    translate(calc(var(--peek) * 12px), calc(var(--peek) * 10px))
    rotate(calc((var(--peek) - 2) * 4deg));
  transition:
    opacity 360ms ease,
    transform 920ms cubic-bezier(0.19, 1, 0.22, 1);
}

.peek-card img,
.peek-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-group.is-open .peek-card {
  opacity: 0;
  transform:
    translate(calc(var(--peek) * 34px), calc(var(--peek) * 42px))
    rotate(calc((var(--peek) - 2) * 8deg));
}

.stack-copy {
  align-self: end;
  display: grid;
  gap: 7px;
  padding-bottom: 4px;
}

.stack-copy strong {
  font-size: clamp(22px, 3.2vw, 40px);
  line-height: 1;
  font-weight: 400;
}

.stack-copy span {
  color: var(--muted);
  font-size: 13px;
}

.stack-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  transform: translateY(-112px) scale(0.92);
  transition:
    max-height 960ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 480ms ease,
    padding 720ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 360ms ease,
    transform 860ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stack-items .work-card.is-page-hidden {
  display: none;
}

.stack-group.is-open .stack-items {
  max-height: 7200px;
  overflow: visible;
  opacity: 1;
  padding: clamp(14px, 1.6vw, 24px);
  border-color: var(--line-strong);
  transform: translateY(14px) scale(1);
}

.stack-group.is-open {
  z-index: 30;
}

.stack-pages {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 34px;
}

.stack-group.is-open .stack-pages {
  display: flex;
}

.stack-pages button {
  min-width: 48px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  transition:
    background 360ms cubic-bezier(0.16, 1, 0.3, 1),
    color 360ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stack-pages button.is-active,
.stack-pages button:hover,
.stack-pages button:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
  transform: translateY(-2px);
}

.stack-pages span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-right: 6px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(17px, 1.35vw, 21px);
}

.stack-items .work-card {
  opacity: 0;
  transform: translateY(-76px) scale(0.86) rotate(-2deg);
  transition:
    opacity 620ms ease,
    transform 980ms cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: var(--stack-delay);
}

.stack-group.is-open .stack-items .work-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.is-story .category-body {
  min-width: 0;
  padding-top: 0;
}

.story-stage {
  position: relative;
  min-height: clamp(520px, 58vw, 820px);
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper);
}

.story-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: grayscale(0.15) contrast(1.04);
}

.story-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--paper), transparent 70%),
    linear-gradient(0deg, var(--paper), transparent 44%);
}

.story-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(220px, 0.36fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  min-height: inherit;
  padding: clamp(24px, 4.8vw, 68px);
}

.story-text {
  max-width: 760px;
}

.story-kicker {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.story-text h3 {
  margin: 0 0 20px;
  font-size: clamp(54px, 7vw, 116px);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: 0;
}

.story-logline {
  max-width: 620px;
  margin-bottom: 24px;
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.35;
}

.story-text p:last-of-type {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.78;
}

.story-poster {
  width: min(100%, 360px);
  justify-self: end;
  align-self: center;
  box-shadow: 0 28px 80px var(--shadow);
}

.story-poster-button {
  justify-self: end;
  align-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.story-poster-button:hover .story-poster,
.story-poster-button:focus-visible .story-poster {
  transform: translateY(-6px);
}

.player-dialog {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
}

.player-dialog[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.player-panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(840px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: clamp(16px, 2.5vw, 28px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 30px 100px var(--shadow);
  transform: translateY(18px) scale(0.98);
  transition:
    width 360ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.player-panel.is-portrait {
  width: min(500px, 100%);
}

.player-panel.is-script {
  width: min(860px, 100%);
}

.player-dialog[aria-hidden="false"] .player-panel {
  transform: translateY(0) scale(1);
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.player-meta {
  padding-right: 44px;
}

.player-meta h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 400;
}

.player-meta p {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

.player-meta p span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.player-meta p span:last-child {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  text-transform: none;
}

.player-mount {
  display: grid;
  place-items: center;
  justify-self: center;
  width: var(--player-width, 100%);
  height: var(--player-height, auto);
  max-width: 100%;
  max-height: min(72vh, 700px);
  aspect-ratio: auto;
  min-height: 0;
  overflow: hidden;
  background: #000000;
  border-radius: 4px;
}

.player-panel.is-portrait .player-mount {
  max-height: min(76vh, 720px);
}

.player-mount video,
.player-mount img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.is-script .player-mount {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  max-height: min(70vh, 680px);
  overflow: auto;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
}

.script-excerpt {
  width: 100%;
  padding: clamp(20px, 4vw, 48px);
  color: var(--ink);
}

.script-excerpt p {
  max-width: 660px;
  margin: 0 auto 18px;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.85;
}

.script-excerpt .script-scene {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: clamp(19px, 2.2vw, 26px);
}

.script-excerpt .script-character {
  margin-bottom: 4px;
  text-align: center;
  font-size: clamp(16px, 1.5vw, 19px);
}

.script-excerpt .script-character + p {
  max-width: 520px;
  text-align: center;
}

.script-excerpt .script-transition {
  text-align: right;
  font-size: clamp(16px, 1.5vw, 19px);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 760ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

.no-scroll {
  overflow: hidden;
}

@media (max-width: 980px) {
  .ambient-cubes {
    display: none;
  }

  .site-shell {
    width: min(100% - 32px, 760px);
  }

  .category,
  .featured .category {
    grid-template-columns: 1fr;
    row-gap: clamp(56px, 9vw, 96px);
  }

  .category-heading h2 {
    position: static;
    font-size: clamp(36px, 12vw, 76px);
  }

  .category-heading p {
    max-width: 620px;
  }

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

  .card-note {
    top: 40px;
    left: calc(100% + 10px);
    right: auto;
    width: min(280px, 58vw);
  }

  .work-grid .work-card:nth-child(even) .card-note,
  .stack-items .work-card:nth-child(even) .card-note {
    left: auto;
    right: calc(100% + 10px);
  }

  .is-showreel .work-grid {
    grid-template-columns: 1fr;
  }

  .is-showreel .category-body {
    grid-template-columns: 1fr;
  }

  .resume-card {
    min-height: clamp(260px, 54vw, 420px);
  }

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

  .story-poster {
    justify-self: start;
    width: min(72%, 310px);
  }

  .story-poster-button {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 24px, 440px);
    padding-bottom: 72px;
  }

  h1 {
    font-size: 42px;
    line-height: 1;
  }

  .hero-contact {
    display: grid;
    gap: 8px;
    font-size: 17px;
  }

  .hero-contact span {
    white-space: normal;
  }

  .resume-card p {
    font-size: 16px;
  }

  .hero {
    padding-top: 28px;
  }

  .category {
    padding: 38px 0;
    row-gap: 48px;
    column-gap: 0;
  }

  .category-heading h2 {
    font-size: clamp(34px, 13vw, 54px);
  }

  .work-grid,
  .stack-items {
    gap: 12px;
  }

  .stack-opener {
    grid-template-columns: 128px 1fr;
    gap: 13px;
    min-height: 152px;
  }

  .work-name {
    font-size: 13px;
  }

  .player-dialog {
    padding: 10px;
  }

  .player-panel,
  .player-panel.is-portrait {
    width: min(100%, 420px);
    max-height: calc(100vh - 20px);
  }

  .story-stage {
    min-height: 760px;
  }

  .story-content {
    padding: 22px;
  }

  .story-text h3 {
    font-size: 52px;
  }

  .story-poster {
    width: min(82%, 270px);
  }
}
