:root {
  --bg: #05070b;
  --surface: #0a0d12;
  --surface-raised: #10141b;
  --text: #f2f1ec;
  --muted: #a8adb6;
  --gold: #d6b85a;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.27);
  --cyan: rgba(106, 218, 255, 0.42);
  --nav-height: 64px;
  --page-width: min(1180px, calc(100vw - 64px));
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 28px);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

.galaxy-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-height);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 11, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  width: var(--page-width);
  height: 100%;
  margin: 0 auto;
}

.site-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.site-nav a::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--gold);
  content: "";
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
}

.site-nav a.is-active::after {
  width: 42px;
}

.page {
  width: var(--page-width);
  margin: 0 auto;
  padding-top: calc(var(--nav-height) + 46px);
}

.hero,
.content-section,
.portfolio-section,
.work-photos-section {
  scroll-margin-top: calc(var(--nav-height) + 28px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: clamp(44px, 6vw, 86px);
  align-items: center;
  min-height: calc(100svh - var(--nav-height) - 92px);
  padding-bottom: clamp(72px, 9vw, 118px);
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 18px rgba(107, 214, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.28);
}

.hero-photo {
  width: 100%;
  aspect-ratio: 1.16 / 1;
  object-fit: cover;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-heading > p,
.project-index {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(70px, 7.8vw, 104px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
}

.contact {
  display: grid;
  gap: 2px;
  margin-top: 46px;
  color: var(--text);
  font-size: 17px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.55;
}

.contact a {
  width: fit-content;
  text-decoration: none;
}

.contact a:hover {
  color: var(--gold);
}

.content-section,
.portfolio-section,
.work-photos-section {
  padding: clamp(72px, 9vw, 116px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: baseline;
  margin-bottom: 38px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(38px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading--major {
  margin-bottom: 8px;
}

.lead {
  margin: 0 0 24px 178px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.6;
}

.prose {
  max-width: 1030px;
  margin-left: 178px;
  color: #dedee0;
}

.prose p {
  margin: 0 0 20px;
}

.statement {
  margin: 30px 0 0 178px;
  color: var(--gold);
  font-size: 18px;
  font-weight: 850;
}

.profile-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 1080px;
  margin: 0 0 0 178px;
  padding: 0;
  color: #dedee0;
  list-style: none;
}

.profile-list li {
  position: relative;
  padding-left: 22px;
}

.profile-list li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.profile-accent {
  color: var(--gold);
  font-weight: 850;
}

.film-project {
  padding: clamp(64px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--line);
}

.film-project:last-child {
  border-bottom: 0;
}

.film-header {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: end;
  margin-bottom: 28px;
}

.film-header h3 {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 38px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.film-meta {
  display: grid;
  gap: 7px;
  margin: 0;
}

.film-meta > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
}

.film-meta dt {
  color: var(--muted);
  font-weight: 700;
}

.film-meta dd {
  margin: 0;
  color: var(--text);
}

.still-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item,
.work-photo {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 12px rgba(106, 218, 255, 0.055);
  cursor: zoom-in;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gallery-item::after,
.work-photo::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  content: "";
  pointer-events: none;
}

.gallery-item:hover,
.work-photo:hover {
  border-color: rgba(214, 184, 90, 0.64);
  box-shadow:
    0 0 0 1px rgba(214, 184, 90, 0.1),
    0 0 16px rgba(214, 184, 90, 0.12);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-item:hover img {
  transform: scale(1.012);
}

.work-photo-grid {
  columns: 3;
  column-gap: 18px;
}

.work-photo {
  break-inside: avoid;
  margin-bottom: 18px;
}

.work-photo img {
  width: 100%;
  height: auto;
}

.gallery-more {
  display: block;
  min-height: 46px;
  margin: 26px auto 0;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.gallery-more:hover {
  border-color: var(--gold);
  color: var(--gold);
}

[hidden] {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: var(--page-width);
  margin: 0 auto;
  padding: 42px 0 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.site-footer > div {
  display: flex;
  gap: 22px;
  align-items: center;
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 28px;
  border: 0;
  background: rgba(3, 5, 8, 0.96);
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 24px;
  align-items: center;
}

.lightbox figure {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  place-items: center;
}

.lightbox figure img {
  max-width: 100%;
  max-height: calc(100dvh - 104px);
  object-fit: contain;
}

.lightbox figcaption {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(13, 16, 22, 0.84);
  color: var(--text);
  cursor: pointer;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2;
  width: 44px;
  height: 44px;
  font-size: 27px;
}

.lightbox-nav {
  width: 48px;
  height: 48px;
  font-size: 30px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.js .reveal-section {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.js .reveal-section.is-visible {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 3px solid rgba(106, 218, 255, 0.8);
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  :root {
    --page-width: calc(100vw - 40px);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    gap: 38px;
  }

  .hero h1 {
    font-size: clamp(62px, 9vw, 82px);
  }

  .section-heading {
    grid-template-columns: 122px minmax(0, 1fr);
  }

  .lead,
  .prose,
  .statement,
  .profile-list {
    margin-left: 150px;
  }

  .profile-list {
    grid-template-columns: 1fr;
  }

  .film-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .work-photo-grid {
    columns: 2;
  }
}

@media (max-width: 700px) {
  :root {
    --nav-height: 52px;
    --page-width: calc(100vw - 32px);
  }

  html {
    scroll-padding-top: 0;
    scroll-behavior: auto;
  }

  body {
    font-size: 16px;
    line-height: 1.8;
  }

  #profile,
  #portfolio,
  #work-photos {
    scroll-margin-top: calc(var(--nav-height) + 16px);
  }

  .site-nav a {
    font-size: 15px;
  }

  .site-nav a.is-active::after {
    width: 32px;
  }

  .page {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding-bottom: 58px;
  }

  .hero-photo {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .eyebrow,
  .section-heading > p,
  .project-index {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: clamp(48px, 14.5vw, 60px);
    line-height: 0.94;
  }

  .contact {
    margin-top: 24px;
    font-size: 16px;
  }

  .content-section,
  .portfolio-section,
  .work-photos-section {
    padding: 52px 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 26px;
  }

  .section-heading h2 {
    font-size: clamp(32px, 9vw, 36px);
  }

  .lead,
  .prose,
  .statement,
  .profile-list {
    margin-left: 0;
  }

  .lead {
    font-size: 17px;
    line-height: 1.76;
  }

  .statement {
    font-size: 16px;
  }

  .prose p {
    margin-bottom: 18px;
  }

  .profile-list {
    gap: 14px;
  }

  .film-project {
    padding: 48px 0;
  }

  .film-header h3 {
    font-size: 28px;
  }

  .film-meta > div {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .still-grid {
    gap: 10px;
  }

  .work-photo-grid {
    column-gap: 10px;
  }

  .work-photo {
    margin-bottom: 10px;
  }

  .site-footer {
    align-items: flex-start;
    padding: 34px 0 44px;
    font-size: 15px;
  }

  .site-footer > div {
    display: grid;
    gap: 2px;
  }

  .lightbox {
    width: 100vw;
    height: 100dvh;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(78px, calc(env(safe-area-inset-bottom) + 66px))
      max(12px, env(safe-area-inset-left));
  }

  .lightbox[open] {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .lightbox figure {
    align-content: center;
    min-height: 100%;
  }

  .lightbox figure img {
    max-height: calc(100dvh - 138px);
  }

  .lightbox-close {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 48px;
    height: 48px;
  }

  .lightbox-nav {
    position: fixed;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
  }

  .lightbox-prev {
    left: max(16px, env(safe-area-inset-left));
  }

  .lightbox-next {
    right: max(16px, env(safe-area-inset-right));
  }

  .lightbox figcaption {
    font-size: 15px;
  }

  .is-mobile-lightbox-open {
    overflow: hidden;
    touch-action: none;
  }

  .gallery-more {
    min-height: 48px;
  }

  @media (hover: none) and (pointer: coarse) {
    .gallery-item:hover,
    .work-photo:hover {
      transform: none;
    }

    .gallery-item:active,
    .work-photo:active {
      opacity: 0.9;
    }
  }
}

@media (max-width: 480px) {
  :root {
    --page-width: calc(100vw - 28px);
  }

  .site-nav a {
    font-size: 14px;
  }

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

  .still-grid {
    gap: 12px;
  }

  .work-photo-grid {
    column-gap: 12px;
  }

  .work-photo {
    margin-bottom: 12px;
  }

  .film-meta > div {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .site-footer {
    display: grid;
    gap: 22px;
  }
}

@media (max-width: 360px) {
  .still-grid,
  .work-photo-grid {
    display: grid;
    grid-template-columns: 1fr;
    columns: auto;
  }

  .work-photo-grid {
    gap: 12px;
  }

  .work-photo {
    margin-bottom: 0;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal-section {
    opacity: 1;
    transform: none;
  }
}
