:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #171310;
  color: #f6e7c7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #171310;
}

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

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 3rem);
  border-bottom: 1px solid rgb(246 231 199 / 20%);
}

.wordmark {
  color: #f4b615;
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: .85;
  text-transform: uppercase;
}

.back-link {
  color: #fff4da;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.back-link:hover { color: #e87137; }

.heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .9rem 2rem;
  align-items: end;
  padding: clamp(2.5rem, 7vw, 7rem) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem);
}

.heading p,
.heading span {
  margin: 0;
  color: #e87137;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.heading h1 {
  grid-column: 1 / -1;
  margin: 0;
  color: #f4b615;
  font-size: clamp(3.8rem, 12vw, 12rem);
  font-weight: 700;
  letter-spacing: -.1em;
  line-height: .75;
  text-transform: uppercase;
}

.heading span { text-align: right; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgb(246 231 199 / 21%);
  border-top: 1px solid rgb(246 231 199 / 21%);
}

.work-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #241d18;
  cursor: zoom-in;
}

.work-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: transparent;
}

.work-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.07);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), filter .55s ease;
}

.work-tile:active img,
.work-tile:focus-visible img {
  transform: scale(1.09);
  filter: invert(1) contrast(1.25);
}

.work-tile:focus-visible {
  z-index: 1;
  outline: 3px solid #f4b615;
  outline-offset: -3px;
}

.lightbox {
  width: min(96vw, 110rem);
  max-width: none;
  max-height: 94svh;
  padding: 0;
  border: 1px solid rgb(246 231 199 / 35%);
  background: #171310;
  color: #f6e7c7;
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 88%);
  backdrop-filter: blur(5px);
}

.lightbox__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
  min-height: min(46rem, 94svh);
}

.lightbox__image {
  display: block;
  width: 100%;
  max-height: 94svh;
  object-fit: contain;
  background: #0f0d0b;
}

.lightbox__caption {
  align-self: end;
  padding: clamp(1.5rem, 3vw, 3rem);
}

.lightbox__number {
  margin: 0 0 1rem;
  color: #e87137;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.lightbox h2 {
  margin: 0 0 1.1rem;
  color: #f4b615;
  font-size: clamp(1.7rem, 2.5vw, 2.7rem);
  letter-spacing: -.065em;
  line-height: .9;
  text-transform: uppercase;
}

.lightbox__caption > p:last-child {
  margin: 0;
  color: rgb(246 231 199 / 78%);
  font-size: .95rem;
  line-height: 1.5;
}

.lightbox__close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(246 231 199 / 35%);
  border-radius: 50%;
  background: #171310;
  color: #fff4da;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 200;
  line-height: 1;
}

.lightbox__close:hover { color: #f4b615; border-color: #f4b615; }

@media (prefers-reduced-motion: reduce) {
  .work-tile img { transition: none; }
}

.heading { grid-template-columns: 1fr; gap: 1rem; padding: 2.5rem 1.25rem; }
.heading h1 { font-size: clamp(2rem, 10.5vw, 7rem); line-height: 1; letter-spacing: -.07em; overflow-wrap: anywhere; }
.heading span { text-align: left; }
.wordmark { line-height: 1; }
.back-link { display: flex; align-items: center; min-height: 44px; font-size: .875rem; letter-spacing: .06em; }
.lightbox { width: 100%; max-height: 100svh; max-height: 100dvh; border: 0; margin: auto; overscroll-behavior: contain; }
.lightbox__content { grid-template-columns: 1fr; min-height: 0; padding-top: 3.75rem; }
.lightbox__image { height: 60svh; max-height: 60svh; }
.lightbox__caption { padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom)); }
.lightbox h2 { line-height: 1.1; }
body:has(.lightbox[open]) { overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .work-tile:hover img { transform: scale(1.09); filter: invert(1) contrast(1.25); }
}
@media (min-width: 761px) {
  .heading { padding: clamp(2.5rem, 7vw, 7rem) 4vw 4vw; }
  .heading h1 { font-size: clamp(4rem, 12vw, 12rem); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lightbox { width: min(96vw, 110rem); max-height: 94svh; }
  .lightbox__content { grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem); padding-top: 0; }
  .lightbox__image { height: 88svh; max-height: 88svh; }
}
