:root {
  color-scheme: dark;
  --bg: #070706;
  --ink: #ece7dd;
  --muted: #8d877e;
  --dim: #5f5a54;
  --line: rgba(236, 231, 221, 0.13);
  --panel: #0d0c0b;
  --accent: #b89a69;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Helvetica Neue", Helvetica, Arial, var(--cjk);
  --sans: "Helvetica Neue", Helvetica, Arial, var(--cjk);
  --footer-height: calc(40px + env(safe-area-inset-bottom, 0px));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

button {
  color: inherit;
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px clamp(18px, 3vw, 42px);
  background: linear-gradient(rgba(7, 7, 6, 0.72), rgba(7, 7, 6, 0));
  transition: background 260ms ease, border-color 260ms ease;
}

.site-header.is-solid {
  background: rgba(7, 7, 6, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 4px;
  text-transform: uppercase;
}

.brand span {
  font-size: 12px;
  font-weight: 400;
}

.brand small,
.kicker {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(18px, 2.5vw, 32px);
  row-gap: 8px;
  max-width: min(760px, 68vw);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-transform: uppercase;
}

.main-nav a {
  transition: color 180ms ease;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.is-active {
  color: var(--ink);
}

.nav-toggle {
  display: none;
}

.view {
  position: fixed;
  inset: 0 0 var(--footer-height);
  display: none;
  overflow: auto;
  padding: 112px clamp(18px, 3vw, 42px) 42px;
}

.view.is-active {
  display: grid;
}

.site-footer {
  position: fixed;
  z-index: 60;
  inset: auto 0 0;
  height: var(--footer-height);
  padding: 0 18px env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
  line-height: 24px;
}

.site-footer a {
  padding: 8px 0;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.hero {
  position: relative;
  max-height: calc(100dvh - var(--footer-height));
  grid-template-columns: minmax(420px, 1.618fr) minmax(360px, 1fr);
  grid-template-rows: minmax(420px, 58vh) auto;
  align-content: center;
  align-items: stretch;
  gap: 24px clamp(28px, 4vw, 60px);
  overflow: hidden;
  overflow-y: auto;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 0;
  margin-inline: clamp(-42px, -3vw, -18px);
  box-sizing: border-box;
  background:
    radial-gradient(circle at 18% 28%, rgba(214, 178, 115, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(37, 33, 28, 0.72) 0%, rgba(11, 17, 18, 0.68) 48%, rgba(22, 16, 14, 0.68) 100%);
  border-top: 1px solid rgba(236, 231, 221, 0.16);
  border-bottom: 1px solid rgba(236, 231, 221, 0.13);
  opacity: 0.82;
  pointer-events: none;
}

.frame,
.modal-still,
.video-panel {
  background:
    radial-gradient(circle at 26% 20%, rgba(214, 178, 115, 0.28), transparent 26%),
    linear-gradient(135deg, #25211c 0%, #0b1112 48%, #16100e 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  align-content: center;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin-top: 0;
  padding: 28px 0;
  overflow: hidden;
}

.hero-slideshow {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  background: transparent;
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  margin: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.hero-slide img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: right center;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

.hero-copy .kicker {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.35;
}

.hero-copy .kicker-cjk {
  display: inline-block;
  font-size: 0.88em;
  line-height: 1;
  vertical-align: 0.03em;
}

.hero h1 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18em;
  max-width: none;
  margin: 18px 0 0;
  font-family: var(--display);
  font-size: 76px;
  line-height: 0.92;
  font-weight: 300;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.hero h1 span + span {
  font-family: var(--cjk);
  font-size: 0.86em;
  line-height: 1;
  text-transform: none;
}

.hero-note {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 0;
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
  width: min(760px, calc(100% - var(--hero-note-offset, 0px)));
  max-width: 760px;
  margin: 0 0 0 var(--hero-note-offset, 0px);
  padding: 28px 0;
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
  text-transform: uppercase;
}

.hero-note p {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid rgba(236, 231, 221, 0.1);
}

.hero-note p:first-child {
  border-top: 0;
}

.hero-note-line {
  display: block;
}

.hero-note-line:first-child {
  white-space: nowrap;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 3vw, 42px);
  bottom: 30px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.index-section {
  --index-layout-gap: clamp(20px, 4vw, 70px);
  grid-template-columns: 210px minmax(0, 1fr) minmax(260px, 34vw);
  gap: var(--index-layout-gap);
  align-items: start;
}

.index-intro {
  position: sticky;
  top: 92px;
}

.index-intro p:not(.kicker) {
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}

.frames-section .section-head {
  margin-bottom: 18px;
}

.section-head h2,
.about-copy h2,
.contact-section h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(21px, 2.7vw, 38px);
  line-height: 1.15;
  font-weight: 300;
}

.filter-row {
  display: grid;
  gap: 8px;
  max-width: 180px;
  margin-bottom: 22px;
}

.filter-row button {
  position: relative;
  min-height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 10px 14px;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  font-size: 10px;
  text-align: left;
}

.filter-row button.is-active {
  color: var(--ink);
  border-color: var(--muted);
}

.filter-row button.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 11px;
  bottom: 11px;
  width: 2px;
  background: var(--ink);
}

.filter-row button:hover,
.filter-row button:focus-visible {
  color: var(--ink);
  border-color: var(--muted);
}

.work-index {
  display: grid;
  border-top: 1px solid var(--line);
}

.index-section.is-commercial-direct {
  grid-template-columns: 210px minmax(0, 1fr);
}

.index-section.is-commercial-direct .work-index {
  border-top: 0;
}

.index-section.is-commercial-direct .featured-panel {
  display: none;
}

.commercial-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.project-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  align-items: baseline;
  gap: 20px;
  min-height: 86px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border: 0;
  background: transparent;
  padding: 20px 0;
  text-align: left;
  cursor: pointer;
}

.project-card:hover strong,
.project-card:focus-visible strong,
.project-card:hover .project-enter,
.project-card:focus-visible .project-enter {
  color: var(--accent);
}

/* Ionicons play-outline (MIT); license retained in app.js. */
.project-enter {
  width: 18px;
  height: 18px;
  align-self: center;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: color 200ms ease;
}

.project-number,
.project-year,
.project-type {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
}

.project-card strong {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 300;
  text-transform: uppercase;
  transition: color 200ms ease;
}

.project-card-copy {
  min-width: 0;
}

.project-title-en,
.project-title-zh {
  display: block;
  min-width: 0;
}

.project-title-en {
  font-size: clamp(12px, 1.45vw, 21px);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-title-en.has-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.project-index-label {
  flex: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.project-title-zh {
  grid-column: 2;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  font-size: clamp(14px, 2.1vw, 31px);
  line-height: 1.12;
  white-space: nowrap;
}

.project-status {
  grid-column: 2;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.project-type {
  display: block;
  margin-top: 6px;
}

.featured-panel {
  position: static;
  align-self: start;
  min-height: 0;
}

.featured-image {
  min-height: 58vh;
  border: 1px solid rgba(236, 231, 221, 0.08);
  background:
    radial-gradient(circle at 26% 20%, rgba(184, 154, 105, 0.28), transparent 26%),
    linear-gradient(135deg, #25211c 0%, #0b1112 48%, #16100e 100%);
}

.featured-image.has-image {
  display: grid;
  min-height: 0;
  height: min(70vh, 760px, calc(100dvh - 184px));
  margin: 0;
  place-items: start center;
  background: #050505;
}

.featured-image.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.featured-image.has-image.is-frame-cover {
  height: auto;
  min-height: 0;
}

.featured-image.has-image.is-frame-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.featured-caption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
}

.featured-panel.is-feature-cover-reduced .featured-image,
.featured-panel.is-feature-cover-reduced .featured-caption {
  width: 90%;
  margin-left: auto;
}

@media (min-width: 901px) {
  .featured-panel {
    width: 100%;
    max-width: 100%;
    justify-self: end;
  }

  .featured-image.has-image {
    height: min(56vh, 608px, calc(80dvh - 147px));
  }

  .featured-image.has-image.is-frame-cover {
    height: auto;
  }
}

@media (min-width: 901px) and (max-width: 1300px) {
  .index-section {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .featured-panel {
    grid-column: 1 / -1;
    width: calc(100% - 210px - var(--index-layout-gap));
    max-width: 100%;
    justify-self: end;
  }
}

.frame-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.frame {
  position: relative;
  margin: 0;
}

.frame.has-image {
  min-height: 0;
  aspect-ratio: auto;
  background: transparent;
}

.frame-image {
  display: grid;
  position: relative;
  place-items: center;
  background: #050505;
  overflow: hidden;
}

.frame.has-image img {
  display: block;
  width: 100%;
  height: auto;
}

.frame-project-heading {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  width: fit-content;
  max-width: min(360px, 100%);
  margin: 0;
  padding: 0 0 7px;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.18;
  text-transform: uppercase;
}

.frame-project-heading:not(:first-child) {
  margin-top: clamp(18px, 3vw, 42px);
}

.frame-project-heading::after {
  content: "";
  width: 56px;
  height: 1px;
  margin-top: 3px;
  background: rgba(236, 231, 221, 0.62);
}

.frame-project-heading span,
.frame-project-heading small {
  width: fit-content;
  max-width: 100%;
}

.frame-project-heading small {
  color: var(--muted);
  font-size: 10px;
}

.empty-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.frame::after,
.modal-still::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 7, 6, 0.28), transparent 58%);
}

.frame.has-image::after,
.modal-still.has-image::after {
  display: none;
}

.cv-section {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: clamp(54px, 7vw, 110px);
}

.cv-profile-head,
.cv-biography,
.cv-block {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: var(--index-layout-gap, clamp(20px, 4vw, 70px));
}

.cv-profile-head {
  align-items: end;
  padding-bottom: clamp(28px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
}

.cv-profile-head h1 {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18em;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 92px);
  line-height: 0.95;
  font-weight: 300;
  text-transform: uppercase;
}

.cv-profile-head h1 span[lang="zh-CN"] {
  font-family: var(--cjk);
  font-size: 0.375em;
  text-transform: none;
}

.cv-profile-head h1 > span:first-child {
  font-size: 0.375em;
}

.cv-profile-head h1 small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.17em;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.cv-biography {
  grid-template-columns: 210px minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
}

.cv-section-label h2 {
  margin: 5px 0 0;
  font-family: var(--cjk);
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.2;
  font-weight: 300;
}

.cv-biography-copy {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cv-biography-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.cv-biography-copy p:last-child {
  margin-bottom: 0;
}

.cv-copy-zh p {
  color: var(--ink);
  font-family: var(--cjk);
  font-size: 12px;
  line-height: 1.85;
}

.cv-records,
.cv-education-list {
  border-top: 1px solid var(--line);
}

.cv-category {
  display: flex;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
}

.cv-category span[lang="zh-CN"] {
  font-family: var(--cjk);
  text-transform: none;
}

.cv-category-series {
  margin-top: 32px;
}

.cv-record {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(170px, 0.3fr);
  gap: clamp(18px, 2.6vw, 42px);
  align-items: start;
  padding: clamp(18px, 2.5vw, 34px) 0;
  border-bottom: 1px solid var(--line);
}

.cv-record > time,
.cv-education-list time {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.cv-record-tag {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cv-record h3,
.cv-education-list h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(17px, 1.7vw, 25px);
  line-height: 1.12;
  font-weight: 300;
  text-transform: uppercase;
}

.cv-record h3 span {
  display: block;
}

.cv-record h3 span[lang="zh-CN"] {
  margin-top: 4px;
  font-family: var(--cjk);
  font-size: 0.84em;
  text-transform: none;
}

.cv-record-main p {
  display: grid;
  gap: 3px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.cv-record-main p + p {
  color: var(--ink);
}

.cv-record-main p span[lang="zh-CN"] {
  font-family: var(--cjk);
}

.cv-record-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cv-education-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 42px);
  padding: clamp(18px, 2.5vw, 30px) 0;
  border-bottom: 1px solid var(--line);
}

.cv-education-list h3 {
  font-size: clamp(15px, 1.45vw, 21px);
}

.cv-education-list p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.cv-education-list p[lang="zh-CN"] {
  color: var(--ink);
  font-family: var(--cjk);
}

.awards-section,
.contact-section {
  align-content: start;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
  border: 1px solid var(--line);
}

.award-card {
  min-height: 190px;
  background: var(--bg);
  padding: 20px;
}

.award-project {
  display: block;
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 300;
  text-transform: uppercase;
}

.award-project-en,
.award-project-zh,
.award-entry-en,
.award-entry-zh {
  display: block;
}

.award-project-zh {
  margin-top: 3px;
  font-family: var(--cjk);
  font-size: 0.9em;
  line-height: 1.4;
  text-transform: none;
}

.award-entries {
  display: grid;
  gap: 14px;
}

.award-entry {
  display: grid;
  gap: 3px;
}

.award-entry-en,
.award-entry-zh {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.award-entry-zh {
  color: var(--ink);
  font-family: var(--cjk);
  font-size: 11px;
}

.contact-links {
  display: grid;
  width: min(900px, 100%);
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.contact-links a {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(16px, 2vw, 27px);
  font-weight: 300;
}

.contact-links small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-links span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-section {
  place-content: center start;
}

.project-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  overflow: auto;
  background: rgba(7, 7, 6, 0.97);
  padding: 72px clamp(14px, 4vw, 60px);
}

.project-modal.is-open {
  display: block;
}

.modal-close {
  position: fixed;
  top: 24px;
  left: clamp(18px, 3vw, 42px);
  right: auto;
  z-index: 2;
}

.home-button,
.modal-close {
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.72);
  padding: 10px 14px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
}

.home-button {
  flex-shrink: 0;
  white-space: nowrap;
}

.modal-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.28fr) minmax(0, 0.72fr);
  gap: clamp(24px, 5vw, 72px);
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  order: 2;
  padding-bottom: 10px;
}

.modal-gallery-commercial {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.commercial-video-card {
  min-width: 0;
  margin: 0;
}

.commercial-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.commercial-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.commercial-video-cover {
  gap: 5px;
}

.commercial-cover-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.commercial-video-cover.has-poster::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
  content: "";
}

.commercial-video-cover.has-poster > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.commercial-video-cover.has-poster .commercial-cover-copy {
  align-self: stretch;
  justify-content: flex-end;
  height: 100%;
  padding: 12px;
}

.commercial-video-cover strong {
  font-size: clamp(10px, 1vw, 14px);
  white-space: normal;
}

.commercial-video-cover small,
.commercial-video-cover em {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  font-style: normal;
  letter-spacing: 0.08em;
}

.commercial-video-cover em {
  color: var(--ink);
  font-family: var(--cjk);
  font-size: 10px;
  letter-spacing: 0;
}

.commercial-video-card figcaption {
  display: grid;
  gap: 3px;
  min-height: 42px;
  padding: 8px 1px 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-transform: uppercase;
}

.commercial-video-card figcaption small {
  color: var(--ink);
  font-family: var(--cjk);
  font-size: 10px;
  text-transform: none;
}

.gallery-rain-outside,
.frames-rain-outside {
  --rain-side-crop: 3.2%;
}

.gallery-rain-outside {
  gap: 8px;
  justify-content: start;
}

.gallery-rain-outside .modal-still,
.frames-rain-outside .frame-image {
  overflow: hidden;
}

.gallery-rain-outside .modal-still.has-image img,
.frames-rain-outside .frame-image img {
  width: calc(100% + (var(--rain-side-crop) * 2));
  max-width: none;
  margin-left: calc(var(--rain-side-crop) * -1);
}

@media (min-width: 1400px) {
  .modal-gallery-the-one {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .modal-gallery-the-one .modal-still-wide {
    grid-column: span 2;
  }
}

.trailer-embed {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50%;
  min-width: 360px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  text-align: center;
}

.project-video {
  position: relative;
  grid-column: 1 / -1;
  width: 50%;
  min-width: 360px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.project-video-standard {
  justify-self: start;
  align-self: start;
  box-sizing: border-box;
  width: 50%;
  min-width: 360px;
  aspect-ratio: 16 / 9;
}

.video-cover {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: #000;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.video-cover[hidden] {
  display: none;
}

.video-cover .video-playback-status:not(:empty) {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--ink);
  letter-spacing: 0.03em;
}

.video-cover strong {
  max-width: 90%;
  font-family: var(--display);
  font-size: clamp(13px, 1.4vw, 20px);
  line-height: 1.2;
  font-weight: 300;
  text-transform: uppercase;
  white-space: nowrap;
}

.video-cover span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.project-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.trailer-play {
  display: grid;
  width: 52px;
  height: 52px;
  padding-left: 4px;
  place-items: center;
  border: 1px solid rgba(236, 231, 221, 0.72);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.trailer-copy {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
}

.trailer-copy [lang="zh-CN"] {
  color: var(--ink);
  font-family: var(--cjk);
  font-size: 12px;
  text-transform: none;
}

.video-panel {
  display: grid;
  min-height: min(62vh, 720px);
  max-height: 760px;
  place-items: center;
  aspect-ratio: 16 / 9;
}

.video-panel span {
  border: 1px solid var(--line);
  padding: 12px 16px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
}

.modal-still {
  min-height: min(62vh, 720px);
  position: relative;
}

.modal-still.has-image {
  display: grid;
  min-height: 0;
  margin: 0;
  place-items: center;
  background: #050505;
}

.modal-still.has-image img {
  display: block;
  width: 100%;
  height: auto;
}

.modal-info {
  position: sticky;
  top: 86px;
  align-self: start;
  order: 1;
}

.modal-info h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.08;
  font-weight: 300;
  text-transform: uppercase;
}

.modal-title-en,
.modal-title-zh {
  display: block;
  width: 100%;
  white-space: nowrap;
}

.modal-title-zh {
  margin-top: 5px;
  font-family: var(--cjk);
  font-size: 0.88em;
  line-height: 1.12;
  text-transform: none;
}

.modal-info p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
}

.modal-info .zh-copy {
  color: var(--ink);
  font-family: var(--cjk);
  line-height: 1.8;
}

.credit-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.credit-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.credit-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  text-align: right;
}

.credit-list .lens-token {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(360px, 1.5fr) minmax(330px, 1fr);
    grid-template-rows: minmax(380px, 52vh) auto;
    gap: 24px clamp(24px, 3vw, 42px);
  }

  .hero h1 {
    font-size: 62px;
  }

}

@media (max-width: 900px) {
  .site-header {
    align-items: center;
  }

  .view {
    padding-top: 96px;
  }

  .main-nav {
    position: fixed;
    inset: 70px 14px auto;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.95);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: grid;
    gap: 6px;
    width: 40px;
    height: 40px;
    place-content: center;
    border: 1px solid var(--line);
    background: transparent;
  }

  .nav-toggle span {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--ink);
  }

  .section-head,
  .cv-section,
  .modal-card,
  .awards-grid,
  .index-section {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 28px;
    align-content: start;
  }

  .hero::before {
    background: none;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    margin-top: 0;
  }

  .hero-slideshow {
    grid-column: 1;
    grid-row: 2;
    min-height: clamp(240px, 48vh, 480px);
  }

  /* Keep the complete photograph inside the narrow-screen image area.
     Desktop keeps its original height-led, natural-width composition. */
  .hero-slide img {
    width: 100%;
    max-width: 100%;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-note {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    padding: 16px 0 0;
    border-left: 0;
    border-bottom: 0;
  }

  .hero-note-line:first-child {
    white-space: normal;
  }

  .index-intro,
  .featured-panel {
    position: static;
  }

  .index-section {
    gap: 26px;
  }

  .cv-section {
    gap: 54px;
  }

  .cv-profile-head,
  .cv-biography,
  .cv-block {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cv-profile-head h1 {
    grid-column: 1;
  }

  .cv-record {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .cv-record-meta {
    grid-column: 2;
  }

  .project-card {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 12px;
  }

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

  .featured-image {
    min-height: 340px;
  }

  .featured-image.has-image {
    height: auto;
    min-height: 0;
  }

  .featured-image.has-image img {
    height: auto;
  }

  .modal-info {
    position: static;
    order: 2;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }

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

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

  .modal-gallery.modal-gallery-the-one {
    grid-template-columns: 1fr;
  }

  .modal-gallery-the-one .modal-still-wide {
    grid-column: auto;
  }

  .trailer-embed,
  .project-video,
  .project-video-standard {
    width: 100%;
    min-width: 0;
  }

  .video-panel,
  .modal-still {
    min-height: 58vw;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-bottom: 72px;
  }

  .hero::before {
    margin-inline: 0;
  }

  .hero-slideshow {
    min-height: clamp(210px, 42vh, 360px);
  }

  .hero h1 {
    font-size: 32px;
    line-height: 0.96;
  }

  .frame-strip {
    grid-template-columns: 1fr;
  }

  .contact-links a {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .cv-profile-head h1 {
    font-size: 38px;
  }

  .cv-record,
  .cv-education-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cv-record-meta {
    grid-column: 1;
    margin-top: 4px;
  }

  .modal-gallery.modal-gallery-commercial {
    grid-template-columns: 1fr;
  }

  .commercial-index-grid {
    grid-template-columns: 1fr;
  }
}
