:root {
  color-scheme: dark;
  --bg: #050505;
  --text: #f8f7f2;
  --muted: rgba(248, 247, 242, 0.68);
  --soft: rgba(248, 247, 242, 0.12);
  --dim: rgba(5, 5, 5, 0.58);
  --accent: #be3e3a;
  --gutter: clamp(1.25rem, 5vw, 5rem);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  margin: 0;
}

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

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

.skip-link {
  background: var(--text);
  color: var(--bg);
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 1.45rem var(--gutter);
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand-link,
.footer-brand,
.project-nav a,
.footer-actions a,
.work-card-copy span,
.work-card-copy p,
.project-meta,
.back-link {
  font-family: Montserrat, Manrope, sans-serif;
  font-size: clamp(0.78rem, 1.1vw, 0.96rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.brand-link {
  pointer-events: auto;
}

.home-hero {
  height: 100vh;
  min-height: 38rem;
  overflow: hidden;
  position: relative;
}

.home-hero::after {
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.58), rgba(5, 5, 5, 0.1) 46%, rgba(5, 5, 5, 0.08)),
    linear-gradient(180deg, rgba(5, 5, 5, 0.12), rgba(5, 5, 5, 0.02) 42%, rgba(5, 5, 5, 0.5));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.hero-stack,
.hero-image {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-image {
  animation: heroDissolve 18s infinite;
  filter: brightness(1.18) contrast(1.04);
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
}

.hero-image-one {
  animation-delay: 0s;
}

.hero-image-two {
  animation-delay: 6s;
}

.hero-image-three {
  animation-delay: 12s;
}

.hero-intro {
  bottom: clamp(3rem, 8vw, 5.5rem);
  font-size: clamp(1.02rem, 1.35vw, 1.35rem);
  left: var(--gutter);
  line-height: 1.45;
  margin: 0;
  max-width: 45rem;
  position: absolute;
  width: min(46rem, calc(100% - var(--gutter) * 2));
  z-index: 2;
}

@keyframes heroDissolve {
  0%,
  7% {
    opacity: 0;
    transform: scale(1.07);
  }

  13%,
  38% {
    opacity: 1;
    transform: scale(1);
  }

  45%,
  100% {
    opacity: 0;
    transform: scale(1.03);
  }
}

.work-section {
  padding: clamp(4rem, 8vw, 8rem) var(--gutter);
}

.work-grid {
  display: grid;
  gap: clamp(2rem, 4.5vw, 4.5rem) clamp(1.75rem, 4vw, 3.5rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-card {
  display: grid;
  gap: 1rem;
}

.work-card-wide {
  grid-column: span 2;
}

.work-card figure {
  aspect-ratio: 1.4;
  background: #111;
  margin: 0;
  overflow: hidden;
}

.work-card-wide figure {
  aspect-ratio: 2.1;
}

.work-card img {
  filter: saturate(0.9);
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: filter 300ms ease, transform 500ms ease;
  width: 100%;
}

.work-card:hover img,
.work-card:focus-visible img {
  filter: saturate(1.06);
  transform: scale(1.045);
}

.work-card-copy {
  display: grid;
  gap: 0.5rem;
}

.work-card-copy h2 {
  font-family: Manrope, system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.8vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 1.04;
  margin: 0;
  max-width: 14ch;
}

.work-card-copy span {
  color: var(--muted);
}

.work-card-copy p {
  margin: 0.45rem 0 0;
}

.site-footer {
  align-items: end;
  border-top: 1px solid var(--soft);
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr auto;
  min-height: 55vh;
  padding: clamp(3rem, 7vw, 7rem) var(--gutter) 1.5rem;
}

.footer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  justify-content: flex-end;
}

.social-link {
  align-items: center;
  border: 1px solid var(--soft);
  display: inline-flex;
  height: 2.5rem;
  justify-content: center;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
  width: 2.5rem;
}

.social-link:hover,
.social-link:focus-visible {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.social-link svg {
  fill: currentColor;
  height: 1.1rem;
  width: 1.1rem;
}

.site-footer p {
  color: var(--muted);
  grid-column: 1 / -1;
  margin: 0;
}

.project-page .site-header {
  position: absolute;
}

.project-hero {
  min-height: 70vh;
  padding: clamp(7rem, 12vw, 11rem) var(--gutter) clamp(3rem, 7vw, 6rem);
}

.project-title-block {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 74rem;
}

.project-meta {
  color: var(--muted);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.project-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 8.5vw, 8.8rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.91;
  margin: 0;
  text-wrap: balance;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
}

.project-nav a {
  align-items: center;
  border: 1px solid rgba(190, 62, 58, 0.9);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  height: 3.1rem;
  justify-content: center;
  width: 3.1rem;
}

.project-image-main {
  margin: 0 var(--gutter);
  overflow: hidden;
}

.project-image-main img {
  aspect-ratio: 1.82;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.project-copy {
  display: grid;
  gap: 1.15rem;
  margin: 0 auto;
  max-width: 58rem;
  padding: clamp(4rem, 8vw, 8rem) var(--gutter);
}

.project-copy p {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.45vw, 1.4rem);
  margin: 0;
}

.project-gallery {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 var(--gutter) clamp(5rem, 10vw, 10rem);
}

.project-gallery figure {
  background: #111;
  margin: 0;
  overflow: hidden;
}

.project-gallery figure:first-child {
  grid-column: span 2;
}

.project-gallery img {
  height: 100%;
  min-height: 22rem;
  object-fit: cover;
  width: 100%;
}

.back-link {
  color: var(--muted);
  display: inline-block;
  margin-top: 2rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

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

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

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

  .hero-image-one {
    opacity: 1;
  }
}

@media (max-width: 820px) {
  .site-header {
    padding-top: 1.1rem;
  }

  .home-hero {
    min-height: 35rem;
  }

  .work-grid,
  .project-title-block,
  .project-gallery,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .work-card-wide,
  .project-gallery figure:first-child {
    grid-column: span 1;
  }

  .work-card figure,
  .work-card-wide figure,
  .project-image-main img {
    aspect-ratio: 1;
  }

  .project-meta {
    max-width: 20rem;
  }

  .project-title {
    font-size: clamp(3.5rem, 16vw, 6rem);
  }

  .site-footer {
    align-items: start;
    min-height: 48vh;
  }

  .footer-actions {
    justify-content: flex-start;
  }
}
