:root {
  --ink: #050608;
  --paper: #eeece6;
  --muted: #9da0a5;
  --line: rgba(238, 236, 230, 0.18);
  --accent: #f04866;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  transition: background 300ms ease, padding 300ms ease, backdrop-filter 300ms ease;
}

.site-header.scrolled {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: rgba(5, 6, 8, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wordmark {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.75rem);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-header nav a {
  position: relative;
  padding-bottom: 0.25rem;
}

.site-header nav a::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #0a0b0e;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: saturate(0.9) brightness(0.82);
  animation: hero-in 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 4, 6, 0.2) 12%, rgba(3, 4, 6, 0.02) 48%, rgba(3, 4, 6, 0.76) 100%), linear-gradient(90deg, rgba(3, 4, 6, 0.34), transparent 52%);
}

.hero-copy {
  position: absolute;
  z-index: 2;
  right: 2rem;
  bottom: clamp(2.5rem, 7vh, 6rem);
  left: 2rem;
}

.eyebrow,
.section-number,
.section-heading > p,
.hero-index {
  margin: 0;
  color: rgba(238, 236, 230, 0.72);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  display: flex;
  max-width: 12ch;
  flex-direction: column;
  margin: 1rem 0 1.4rem;
  font-size: clamp(4.25rem, 12vw, 11rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.76;
  text-transform: uppercase;
}

.view-work,
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  border-bottom: 1px solid rgba(238, 236, 230, 0.58);
  padding-bottom: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: gap 200ms ease, border-color 200ms ease;
}

.view-work:hover,
.contact-link:hover {
  gap: 2rem;
  border-color: var(--paper);
}

.hero-index {
  position: absolute;
  z-index: 2;
  right: 2rem;
  bottom: 2rem;
}

.work-section,
.about-section,
.contact-section {
  padding: clamp(6rem, 11vw, 11rem) 2rem;
}

.section-heading {
  display: grid;
  max-width: 1600px;
  margin: 0 auto clamp(3rem, 7vw, 7rem);
  grid-template-columns: minmax(3rem, 0.5fr) 2fr 1fr;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5.5vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.gallery {
  display: grid;
  max-width: 1600px;
  margin: 0 auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.3vw, 1.35rem);
  align-items: start;
}

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #111318;
  color: inherit;
  cursor: zoom-in;
}

.gallery-item.wide {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}

.gallery-item.landscape {
  grid-column: span 7;
  aspect-ratio: 3 / 2;
}

.gallery-item.portrait {
  grid-column: span 5;
  aspect-ratio: 2 / 3;
}

.gallery-item.portrait.small {
  grid-column: span 4;
  margin-top: 15%;
}

.gallery-item.portrait.offset {
  margin-top: clamp(2rem, 10vw, 8rem);
}

.gallery-item.closing {
  margin-top: clamp(2.5rem, 8vw, 8rem);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 450ms ease;
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  content: "";
  pointer-events: none;
}

.gallery-item:hover img {
  filter: brightness(1.08);
  transform: scale(1.015);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 700ms ease, transform 850ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

.about-section {
  max-width: 1664px;
  margin: 0 auto;
}

.section-heading.compact {
  margin-bottom: clamp(3rem, 6vw, 6rem);
  grid-template-columns: minmax(3rem, 0.5fr) 3fr;
}

.about-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.8fr);
  gap: clamp(3rem, 9vw, 10rem);
}

.about-lead {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.about-details {
  align-self: end;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  color: #b8babd;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.65;
}

.about-details p {
  margin: 0 0 1.5rem;
}

.contact-section {
  min-height: 80svh;
  border-top: 1px solid var(--line);
  background: #ece9e1;
  color: #08090b;
}

.contact-section .section-number {
  color: rgba(8, 9, 11, 0.54);
}

.contact-section h2 {
  margin: clamp(4rem, 9vw, 8rem) 0 4rem;
  font-size: clamp(4rem, 13vw, 12rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.78;
  text-transform: uppercase;
}

.contact-section .contact-link {
  border-color: rgba(8, 9, 11, 0.45);
}

footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 2rem 2rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--paper);
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgba(3, 4, 6, 0.98);
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(3, 4, 6, 0.98);
}

.lightbox-inner {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: 5rem minmax(0, 1fr) 5rem;
  align-items: center;
}

.lightbox figure {
  display: flex;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 3.5rem 0 1.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox figure img {
  display: block;
  min-height: 0;
  max-width: 100%;
  max-height: calc(100dvh - 7rem);
  object-fit: contain;
}

.lightbox figcaption {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 1.5rem;
  right: 1.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-nav {
  height: 100%;
  font-size: 1.7rem;
}

.lightbox-nav:hover {
  color: var(--accent);
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: scale(1.025);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 1.15rem;
  }

  .site-header nav {
    gap: 1rem;
  }

  .site-header nav a:nth-child(2) {
    display: none;
  }

  .hero-copy {
    right: 1.15rem;
    bottom: 3.5rem;
    left: 1.15rem;
  }

  .hero h1 {
    font-size: clamp(4rem, 21vw, 7rem);
  }

  .hero-index {
    right: 1.15rem;
    bottom: 1.2rem;
  }

  .work-section,
  .about-section,
  .contact-section {
    padding-right: 1.15rem;
    padding-left: 1.15rem;
  }

  .section-heading {
    grid-template-columns: 3rem 1fr;
  }

  .section-heading > p:last-child {
    display: none;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .gallery-item.wide,
  .gallery-item.landscape,
  .gallery-item.portrait,
  .gallery-item.portrait.small {
    grid-column: 1;
    margin-top: 0;
  }

  .gallery-item.portrait {
    width: 88%;
  }

  .gallery-item.portrait.offset {
    margin-left: 12%;
  }

  .gallery-item.wide,
  .gallery-item.landscape {
    aspect-ratio: 3 / 2;
  }

  .about-copy {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .contact-section {
    min-height: 70svh;
  }

  .contact-section h2 {
    margin-top: 5rem;
    font-size: clamp(3.8rem, 20vw, 7rem);
  }

  footer {
    grid-template-columns: 1fr auto;
    padding-right: 1.15rem;
    padding-left: 1.15rem;
  }

  footer p:nth-of-type(1) {
    display: none;
  }

  .lightbox-inner {
    display: block;
  }

  .lightbox figure {
    padding: 4rem 1rem 4.5rem;
  }

  .lightbox-nav {
    position: absolute;
    z-index: 2;
    bottom: 0;
    width: 50%;
    height: 3.5rem;
  }

  .lightbox-nav.previous {
    left: 0;
    text-align: left;
    padding-left: 1.25rem;
  }

  .lightbox-nav.next {
    right: 0;
    text-align: right;
    padding-right: 1.25rem;
  }
}

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

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