:root {
  color-scheme: light;
  --paper: #f8f7f4;
  --paper-2: #eeebe5;
  --ink: #11110f;
  --muted: rgba(17, 17, 15, 0.54);
  --line: rgba(17, 17, 15, 0.12);
  --dark: #10100e;
  --dark-ink: #f7f2ea;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.35;
  letter-spacing: 0;
}

body::selection {
  background: var(--ink);
  color: var(--paper);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 64px);
  color: rgba(248, 247, 244, 0.86);
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header a {
  pointer-events: auto;
}

.brand {
  font-size: 13px;
  font-weight: 700;
}

nav {
  display: flex;
  gap: clamp(18px, 3vw, 34px);
  font-size: 12px;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--dark);
}

.hero-image {
  position: absolute;
  inset: 0;
  margin: 0;
}

.hero-image img {
  transform: scale(1.04);
  filter: saturate(0.94) contrast(1.03);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 16, 14, 0.68), transparent 46%),
    linear-gradient(0deg, rgba(16, 16, 14, 0.4), transparent 44%);
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-height: 100svh;
  max-width: 520px;
  padding: 0 clamp(20px, 5vw, 72px) clamp(48px, 8vw, 112px);
  color: var(--dark-ink);
}

.hero-meta p,
.section-kicker,
figcaption,
.site-mark {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(54px, 8vw, 116px);
  line-height: 0.95;
  font-weight: 650;
  letter-spacing: 0;
}

.series,
.sequence,
.index {
  padding: clamp(74px, 11vw, 156px) clamp(20px, 5vw, 72px);
}

.section-kicker {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(42px, 8vw, 118px);
  color: var(--muted);
}

.broken-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(52px, auto);
  gap: clamp(14px, 2vw, 28px);
  min-height: 122vh;
}

.work {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
}

.work img {
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.work:hover img {
  transform: scale(1.035);
  filter: saturate(0.92) contrast(1.06);
}

.work figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px;
  color: var(--muted);
}

.work-a {
  grid-column: 1 / span 7;
  grid-row: 1 / span 8;
  aspect-ratio: 0.78;
}

.work-b {
  grid-column: 8 / span 4;
  grid-row: 2 / span 5;
  aspect-ratio: 0.82;
}

.work-c {
  grid-column: 7 / span 5;
  grid-row: 9 / span 6;
  aspect-ratio: 0.76;
}

.work-d {
  grid-column: 2 / span 4;
  grid-row: 11 / span 5;
  aspect-ratio: 0.74;
}

.sequence {
  overflow: hidden;
  background: var(--dark);
  color: var(--dark-ink);
}

.sequence .section-kicker {
  color: rgba(247, 242, 234, 0.56);
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px, 31vw, 460px);
  gap: clamp(14px, 1.8vw, 24px);
  overflow-x: auto;
  padding: 0 clamp(20px, 5vw, 72px) 30px 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.rail figure {
  margin: 0;
  scroll-snap-align: center;
}

.rail img {
  height: min(62vh, 650px);
  min-height: 410px;
  filter: saturate(0.9);
}

.rail figcaption {
  padding-top: 14px;
  color: rgba(247, 242, 234, 0.56);
}

.index {
  min-height: 100vh;
  background: var(--paper);
}

.index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34vw);
  gap: clamp(28px, 7vw, 100px);
  align-items: start;
}

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

.index-list button {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 120px;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: color 220ms ease, padding-left 220ms ease;
}

.index-list button:hover,
.index-list button:focus-visible,
.index-list button.is-active {
  color: var(--ink);
  padding-left: 18px;
  outline: 0;
}

.index-preview {
  position: sticky;
  top: 94px;
  margin: 0;
  aspect-ratio: 0.78;
  overflow: hidden;
  background: var(--paper-2);
}

.index-preview img {
  opacity: 0.96;
  transition: opacity 220ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.index-preview.is-changing img {
  opacity: 0;
  transform: scale(1.025);
}

.site-mark {
  padding: 22px clamp(20px, 5vw, 72px) 28px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 56px);
  background: rgba(8, 8, 7, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  width: auto;
  max-width: 94vw;
  height: auto;
  max-height: 90vh;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  background: transparent;
  color: rgba(247, 242, 234, 0.82);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: fade-lift 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes fade-lift {
  from {
    opacity: 0.001;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 18px 20px;
  }

  nav {
    gap: 16px;
  }

  .hero {
    min-height: 92svh;
  }

  .hero::after {
    background:
      linear-gradient(0deg, rgba(16, 16, 14, 0.68), transparent 58%),
      linear-gradient(90deg, rgba(16, 16, 14, 0.28), transparent 70%);
  }

  .hero-meta {
    min-height: 92svh;
  }

  .broken-grid {
    display: block;
    min-height: 0;
  }

  .work {
    margin-bottom: 42px;
    aspect-ratio: 0.78;
  }

  .work:nth-child(even) {
    width: 78%;
    margin-left: auto;
  }

  .work:nth-child(odd) {
    width: 92%;
  }

  .rail {
    grid-auto-columns: minmax(240px, 76vw);
  }

  .rail img {
    height: 58vh;
    min-height: 390px;
  }

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

  .index-preview {
    display: none;
  }

  .index-list button {
    grid-template-columns: 44px minmax(0, 1fr) 82px;
    padding: 18px 0;
  }
}

@media (max-width: 520px) {
  nav a:first-child {
    display: none;
  }

  h1 {
    font-size: 58px;
  }

  .series,
  .sequence,
  .index {
    padding-left: 18px;
    padding-right: 18px;
  }

  .work:nth-child(even),
  .work:nth-child(odd) {
    width: 100%;
  }
}
