:root {
  color-scheme: dark;
  --bg: #080807;
  --bg-soft: #11110f;
  --paper: #ede8dc;
  --muted: #b7b0a4;
  --dim: #7f786e;
  --line: rgba(237, 232, 220, 0.18);
  --line-strong: rgba(237, 232, 220, 0.34);
  --accent: #d4b16a;
  --font-sans: "Avenir Next", "Gill Sans", "Trebuchet MS", system-ui, sans-serif;
  --font-display: "Avenir Next Condensed", "DIN Condensed", "Gill Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(8, 8, 7, 0) 0%, var(--bg) 38rem),
    var(--bg);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body.viewer-open {
  overflow: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.045;
  background-image:
    repeating-radial-gradient(circle at 19% 23%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.site-top-band {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 5.75rem;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 8, 7, 0.74), rgba(8, 8, 7, 0.48) 64%, rgba(8, 8, 7, 0));
}

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

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

.site-header {
  position: fixed;
  top: 1.2rem;
  left: 1.4rem;
  right: 1.4rem;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto minmax(6rem, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding: 0;
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.8rem;
  min-width: 0;
}

.site-nav a,
.section-label,
.section-title,
.work-meta {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-nav {
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.nav-center {
  justify-self: center;
}

.nav-right {
  justify-self: end;
}

.site-nav a {
  padding: 0.5rem 0.58rem;
  border-radius: 0.25rem;
  color: rgba(237, 232, 220, 0.8);
  white-space: nowrap;
  transition: color 260ms var(--ease), background-color 260ms var(--ease), transform 260ms var(--ease);
}

.site-nav a:hover {
  color: var(--paper);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 8rem 1.25rem 3rem;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: var(--bg) url("/public/images/hero-poster.jpg") center / cover no-repeat;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 900ms var(--ease);
}

.hero-media video.is-loaded {
  opacity: 1;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 8, 7, 0.26), rgba(8, 8, 7, 0) 48%, rgba(8, 8, 7, 0.38)),
    linear-gradient(180deg, rgba(8, 8, 7, 0.12), rgba(8, 8, 7, 0) 44%, rgba(8, 8, 7, 0.1));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 62rem);
  padding-bottom: 2rem;
}

.section-label,
.section-title,
.work-meta {
  margin: 0 0 0.8rem;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  max-width: 13ch;
  font-size: 6.15rem;
  text-transform: uppercase;
}

h2 {
  max-width: 12ch;
  font-size: 4.3rem;
}

.section-title {
  max-width: none;
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.2;
}

h3 {
  font-size: 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  padding: 0.85rem 1.05rem;
  border-radius: 0.25rem;
  font-weight: 700;
  transition: transform 260ms var(--ease), background-color 260ms var(--ease), border-color 260ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button.primary {
  gap: 0.8rem;
  background: var(--paper);
  color: var(--bg);
}

.button.secondary {
  border: 1px solid var(--line-strong);
  color: var(--paper);
}

.button.secondary:hover {
  border-color: rgba(237, 232, 220, 0.62);
  background: rgba(237, 232, 220, 0.08);
}

.button-glyph {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: rgba(8, 8, 7, 0.12);
  line-height: 1;
}

.not-found-copy {
  max-width: 35rem;
  margin: 1.2rem 0 0;
  color: rgba(237, 232, 220, 0.84);
  font-size: 1.35rem;
  line-height: 1.35;
}

.not-found-action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.section {
  padding: 7rem 1.25rem;
}

.section-inner {
  width: min(100%, 72rem);
  margin: 0 auto;
}

.work-section .section-inner {
  width: min(100%, 92rem);
}

.photography-section .section-inner {
  width: min(100%, 92rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.55fr minmax(0, 1.45fr);
  gap: 3.5rem;
  align-items: start;
}

.about-copy p {
  margin: 0;
  max-width: 55rem;
  color: rgba(237, 232, 220, 0.82);
  font-size: clamp(1.12rem, 1.5vw, 1.32rem);
  line-height: 1.45;
}

.about-copy p + p {
  margin-top: 1.4rem;
}

.about-copy a {
  color: var(--paper);
  border-bottom: 1px solid rgba(212, 177, 106, 0.55);
  transition: border-color 220ms var(--ease), color 220ms var(--ease);
}

.about-copy a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.section-heading {
  margin-bottom: 3rem;
}

.work-card,
.photo-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.4rem, 2vw, 2rem);
}

.photo-card {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: clamp(1.1rem, 3vw, 2.5rem);
  border: 0;
  background: rgba(237, 232, 220, 0.03);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.photo-card img,
.work-card img,
.work-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card img {
  opacity: 0.82;
  filter: saturate(0.9) contrast(1.05);
  transition: opacity 420ms var(--ease), transform 900ms var(--ease);
}

.photo-card--night-houses img {
  object-position: 50% 56%;
}

.photo-card--american-dreaming img {
  object-position: 50% 50%;
}

.photo-card--street-life img {
  object-position: 50% 50%;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 7, 0.06), rgba(8, 8, 7, 0.68));
}

.photo-card .work-meta,
.photo-card h3 {
  position: relative;
  z-index: 1;
}

.photo-card h3 {
  max-width: 11ch;
  font-size: clamp(3rem, 8vw, 7rem);
}

.photo-card:hover img,
.photo-card:focus-visible img {
  opacity: 0.96;
  transform: scale(1.025);
}

.work-copy p:last-child {
  max-width: 30rem;
  margin: 0.8rem 0 0;
  color: rgba(237, 232, 220, 0.72);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.work-card {
  display: grid;
  align-items: end;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.work-card img {
  opacity: 0.86;
  filter: saturate(0.82) contrast(1.08);
  transition: opacity 420ms var(--ease), transform 700ms var(--ease);
}

.work-video {
  opacity: 0;
  filter: saturate(0.86) contrast(1.05);
  transition: opacity 420ms var(--ease), transform 700ms var(--ease);
}

.work-card.is-video-playing img {
  opacity: 0;
}

.work-card.is-video-playing .work-video {
  opacity: 1;
  transform: scale(1.025);
}

.work-card:not(.has-video):hover img,
.work-card:not(.has-video):focus-within img {
  transform: scale(1.025);
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 7, 0.04), rgba(8, 8, 7, 0.74));
  opacity: 0;
  transition: opacity 360ms var(--ease);
}

.work-card:hover::after,
.work-card:focus-within::after {
  opacity: 1;
}

.work-copy {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.work-card:hover .work-copy,
.work-card:focus-within .work-copy {
  opacity: 1;
  transform: translateY(0);
}

.work-copy h3 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.92;
}

.about-section {
  background:
    linear-gradient(180deg, rgba(237, 232, 220, 0.03), rgba(237, 232, 220, 0));
}

.contact-section {
  padding-bottom: 4rem;
}

.contact-panel {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-panel h2 {
  max-width: 13ch;
}

.contact-link {
  width: fit-content;
  margin-top: 1.6rem;
  color: var(--paper);
  font-size: 1.35rem;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 260ms var(--ease), color 260ms var(--ease);
}

.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 4.5rem 1fr 4.5rem;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--bg);
}

.photo-viewer[hidden] {
  display: none;
}

.photo-viewer-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.viewer-title {
  max-width: none;
  margin-top: 0.1rem;
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 2.8vw, 2.75rem);
  line-height: 1.05;
  color: var(--paper);
}

.viewer-count {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.viewer-close,
.viewer-nav {
  border: 0;
  background: rgba(237, 232, 220, 0.08);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  transition: background-color 220ms var(--ease), transform 220ms var(--ease);
}

.viewer-close:hover,
.viewer-nav:hover {
  background: rgba(237, 232, 220, 0.16);
}

.viewer-close:active,
.viewer-nav:active {
  transform: scale(0.98);
}

.viewer-close {
  width: 3rem;
  height: 3rem;
  font-size: 1.7rem;
  line-height: 1;
}

.viewer-nav {
  align-self: center;
  width: 3.5rem;
  height: min(18rem, 42vh);
  font-size: 3.4rem;
  line-height: 1;
}

.viewer-prev {
  grid-column: 1;
  grid-row: 2;
}

.viewer-next {
  grid-column: 3;
  grid-row: 2;
}

.viewer-frame {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.viewer-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 7.5rem);
  object-fit: contain;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(1.35rem);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}

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

@media (max-width: 860px) {
  .site-nav a {
    padding: 0.6rem 0.55rem;
  }

  .hero {
    padding: 9rem 1rem 2.4rem;
  }

  h1 {
    font-size: 4.15rem;
  }

  h2 {
    font-size: 3rem;
  }

  .about-copy p {
    font-size: 1.18rem;
  }

  .about-grid,
  .section {
    padding: 5rem 1rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card {
    aspect-ratio: 16 / 9;
  }
}

@media (hover: none) {
  .work-card::after {
    opacity: 1;
  }

  .work-card .work-copy {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    top: 0.85rem;
    left: 1rem;
    right: 1rem;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.45rem;
  }

  .nav-center,
  .nav-right {
    justify-self: start;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .site-nav a {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 3.45rem;
  }

  .brand-name {
    font-size: 1.18rem;
  }

  .site-nav a {
    font-size: 0.68rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.45rem;
  }

  h3 {
    font-size: 1.8rem;
  }

  .button {
    width: 100%;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-viewer {
    grid-template-columns: 3rem 1fr 3rem;
    gap: 0.6rem;
    padding: 0.75rem;
  }

  .viewer-nav {
    width: 2.6rem;
    height: min(12rem, 34vh);
    font-size: 2.4rem;
  }

  .viewer-frame img {
    max-height: calc(100dvh - 7rem);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .hero-media video {
    display: none;
  }
}
