:root {
  color-scheme: light;
  --bg: #f8f7f4;
  --text: #161616;
  --muted: #6f6d68;
  --line: rgba(22, 22, 22, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

img,
iframe {
  display: block;
}

img {
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03);
}

main img {
  cursor: pointer;
}

main img[data-no-lightbox] {
  cursor: inherit;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 244, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: Arial, Helvetica, sans-serif;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--text);
}

main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
  flex: 1;
}

.view {
  animation: fade-in 180ms ease-out;
}

.view[hidden] {
  display: none;
}

.home-intro {
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-intro h1 {
  margin: 0 0 22px;
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 7.6rem);
  font-weight: 400;
  line-height: 0.95;
}

.home-intro p:last-child {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.selected-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: start;
  justify-content: center;
}

.selected-item {
  flex: 0 0 auto;
}

.selected-item img {
  width: auto;
  max-width: min(90vw, 780px);
  height: 465px;
  margin-inline: auto;
  object-fit: contain;
}

.selected-work-button {
  width: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: center;
}

.selected-video-thumb {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: min(90vw, 780px);
  height: 465px;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  overflow: hidden;
  background: #e9e5dd;
}

.selected-video-thumb img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.selected-video-thumb::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(22, 22, 22, 0.08);
  content: "";
  transition: background 220ms ease;
}

.selected-work-button:hover .selected-video-thumb::before,
.selected-work-button:focus-visible .selected-video-thumb::before {
  background: rgba(22, 22, 22, 0.18);
}

.selected-work-button:hover .play-icon,
.selected-work-button:focus-visible .play-icon {
  border-color: #ffffff;
  background-color: rgba(22, 22, 22, 0.16);
  transform: translate(-50%, -50%) scale(1.06);
}

.video-entry p {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.42fr);
  gap: 24px;
  align-items: end;
  padding-top: 22px;
  margin-bottom: 30px;
  border-top: 1px solid var(--line);
}

.section-heading h2,
.about-layout h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
}

.section-heading p:last-child,
.about-layout p {
  margin: 0;
  color: var(--muted);
}

.project-section {
  padding: 18px 0 24px;
}

.project-section:first-of-type {
  padding-top: 0;
}

.project-heading {
  align-items: baseline;
  margin-bottom: 12px;
}

.project-heading h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.project-heading p {
  margin: 0;
  color: var(--muted);
}

.carousel-shell {
  --fade-size: 34px;
  --carousel-scroll-space: 16px;
  position: relative;
}

.carousel-shell::before,
.carousel-shell::after {
  position: absolute;
  top: 0;
  bottom: var(--carousel-scroll-space);
  z-index: 1;
  width: var(--fade-size);
  opacity: 0;
  pointer-events: none;
  content: "";
  transition: opacity 420ms ease;
}

.carousel-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), rgba(248, 247, 244, 0));
}

.carousel-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), rgba(248, 247, 244, 0));
}

.carousel-shell.has-scrolled::before,
.carousel-shell.has-scrolled::after {
  opacity: 0.72;
}

.carousel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 0 16px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(22, 22, 22, 0.34) transparent;
  scrollbar-width: thin;
}

.carousel::-webkit-scrollbar {
  height: 12px;
}

.carousel::-webkit-scrollbar-track {
  margin-inline: var(--fade-size);
  background:
          linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}

.carousel::-webkit-scrollbar-thumb {
  border: 4px solid transparent;
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.42);
  background-clip: content-box;
}

.carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 22, 22, 0.62);
  background-clip: content-box;
}

.carousel img {
  width: auto;
  max-width: none;
  height: 360px;
  flex: 0 0 auto;
  object-fit: contain;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.video-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px 20px;
  max-width: 860px;
  margin-inline: auto;
}

.simple-video-stack {
  padding-top: 0;
}

.video-entry {
  padding-top: 0;
}

.video-entry:first-child {
  padding-top: 0;
}

.video-card {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e9e5dd;
  isolation: isolate;
}

.video-thumb::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(22, 22, 22, 0.08);
  content: "";
  transition: background 220ms ease;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(248, 247, 244, 0.12);
  box-shadow: 0 16px 40px rgba(22, 22, 22, 0.18);
  transform: translate(-50%, -50%);
  transition: background-color 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.play-icon::before {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #ffffff;
  content: "";
  transform: translate(-50%, -50%);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  transition: transform 360ms ease, filter 360ms ease;
}

.video-thumb + span {
  display: block;
}

.video-card > span:last-child {
  display: block;
  margin: 12px 0 0;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-card:hover span,
.video-card:focus-visible span {
  color: var(--text);
}

.video-card:hover .video-thumb::before,
.video-card:focus-visible .video-thumb::before {
  background: rgba(22, 22, 22, 0.18);
}

.video-card:hover .play-icon,
.video-card:focus-visible .play-icon {
  border-color: #ffffff;
  background-color: rgba(22, 22, 22, 0.16);
  transform: translate(-50%, -50%) scale(1.06);
}

.video-card:hover .video-thumb img,
.video-card:focus-visible .video-thumb img {
  filter: saturate(0.92) contrast(1.08);
  transform: scale(1.025);
}

.video-thumb::before,
.play-icon {
  pointer-events: none;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 460px) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 92px);
  align-items: center;
}

.about-layout img {
  width: min(460px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 0;
  justify-self: center;
}

.about-layout h2 {
  margin-bottom: 24px;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 20px;
  padding: 70px 32px 36px;
  background: rgba(248, 247, 244, 0.58);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 260ms ease, backdrop-filter 260ms ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-closing {
  opacity: 0;
  backdrop-filter: blur(0);
}

.lightbox-figure {
  min-width: 0;
  margin: 0;
}

.lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  margin: 0 auto;
  border: 10px solid #ffffff;
  cursor: pointer;
  object-fit: contain;
  filter: saturate(0.9) contrast(1.02);
  box-shadow: 0 24px 80px rgba(22, 22, 22, 0.22);
  opacity: 1;
  transition: opacity 260ms ease;
}

.lightbox.is-opening .lightbox-image,
.lightbox.is-closing .lightbox-image {
  opacity: 0;
}

.lightbox-caption {
  max-width: min(620px, 100%);
  margin: 14px auto 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lightbox-button:hover,
.lightbox-button:focus-visible {
  color: var(--text);
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
}

.lightbox-prev {
  justify-self: start;
}

.lightbox-next {
  justify-self: end;
}

body.video-overlay-open {
  overflow: hidden;
}

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 74px 32px 40px;
  background: rgba(248, 247, 244, 0.58);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 260ms ease, backdrop-filter 260ms ease;
}

.video-overlay[hidden] {
  display: none;
}

.video-overlay.is-opening .video-player,
.video-overlay.is-closing .video-player {
  opacity: 0;
}

.video-overlay.is-closing {
  opacity: 0;
  backdrop-filter: blur(0);
}

.video-player {
  position: relative;
  width: min(430px, calc(100vw - 64px));
  max-height: calc(100vh - 114px);
  aspect-ratio: 9 / 16;
  background: #111111;
  border: 10px solid #ffffff;
  box-shadow: 0 24px 80px rgba(22, 22, 22, 0.22);
  opacity: 1;
  transition: opacity 260ms ease;
}

.video-player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-overlay-close {
  position: absolute;
  top: 28px;
  right: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-overlay-close:hover,
.video-overlay-close:focus-visible {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer p {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.instagram-link {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.instagram-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.instagram-link:hover,
.instagram-link:focus-visible {
  color: var(--text);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@media (max-width: 900px) {
  .section-heading,
  .project-heading,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .home-intro {
    min-height: auto;
    padding-bottom: 42px;
  }

  .about-layout img {
    width: min(360px, 100%);
  }
}

@media (max-width: 620px) {
  .nav {
    width: min(100% - 28px, 1240px);
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

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

  main,
  .site-footer p {
    width: min(100% - 28px, 1240px);
  }

  main {
    padding: 34px 0 48px;
  }

  .selected-grid {
    gap: 8px;
  }

  .selected-item,
  .selected-large,
  .selected-wide {
    flex-basis: auto;
  }

  .selected-item img,
  .selected-video-thumb {
    max-width: calc(100vw - 28px);
    height: 315px;
  }

  .project-section {
    padding: 18px 0 24px;
  }

  .project-heading {
    gap: 8px;
    margin-bottom: 10px;
  }

  .carousel-shell {
    --fade-size: 18px;
    --carousel-scroll-space: 14px;
    margin-inline: -14px;
  }

  .carousel {
    gap: 10px;
    padding: 0 14px 14px;
    scroll-padding-inline: 14px;
  }

  .carousel img {
    width: auto;
    max-width: none;
    height: min(62vh, 420px);
    min-height: 280px;
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 18px;
    padding: 72px 18px 26px;
  }

  .lightbox-figure {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: center;
  }

  .lightbox-image {
    max-height: calc(100vh - 190px);
  }

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

  .lightbox-next {
    grid-column: 2;
    grid-row: 2;
  }

  .lightbox-close {
    right: 18px;
  }

  .video-overlay {
    padding: 72px 18px 26px;
  }

  .video-player {
    width: min(390px, calc(100vw - 36px));
    max-height: calc(100vh - 98px);
    border-width: 6px;
  }

  .video-overlay-close {
    right: 18px;
  }
}

@media (max-width: 620px) and (orientation: portrait) {
  .video-stack {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}
