:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #555;
  --line: #e7e7e7;
  --paper: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

body.menu-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

html.is-scroll-locked,
body.is-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

.selected-works-page {
  overflow-x: hidden;
}

.selected-works-page .page-shell {
  margin-bottom: 29px;
}

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

.page-shell {
  display: grid;
  grid-template-columns: 229px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0;
  width: calc(100% - 144px);
  margin: 29px 72px 72px;
}

.sidebar {
  display: contents;
}

.brand {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mobile-header {
  display: contents;
}

.mobile-header .brand {
  grid-column: 1;
  grid-row: 1;
}

.sidebar nav {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  align-self: start;
  align-content: start;
  justify-items: start;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar nav button:hover,
.sidebar nav button:focus-visible,
.site-nav a:hover,
.site-nav a:focus-visible,
.view-button:hover,
.view-button:focus-visible {
  color: var(--ink);
}

main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  animation: page-content-fade-in 220ms ease-out both;
}

.info-page {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 229px minmax(0, 1fr) minmax(260px, 710px);
  gap: 0;
  align-items: start;
  width: 100%;
}

.info-copy {
  grid-column: 1 / 3;
  justify-self: start;
  width: min(560px, 100%);
  font-size: 14px;
  line-height: 1.55;
}

.info-copy p {
  margin: 0 0 18px;
}

.contact-block {
  margin-top: 34px;
}

.contact-block h1 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-block p {
  margin-bottom: 8px;
}

.info-image {
  grid-column: 3;
  width: 100%;
  margin: 0;
}

.info-image img {
  display: block;
  width: 100%;
  height: auto;
}

.project-header {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  margin-bottom: 91px;
}

.home-page .project-header {
  margin-bottom: 77px;
}

.selected-works-page .project-header {
  margin-bottom: 78px;
}

.site-nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav .is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 8px;
  min-width: 110px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 140ms ease-out,
    visibility 140ms ease-out;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.view-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.view-button.is-active {
  color: var(--ink);
  font-weight: 700;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
  animation: panel-fade-in 180ms ease-out both;
}

.carousel {
  position: relative;
  width: 75%;
  margin: 0;
}

.selected-works-page .carousel {
  width: 75%;
  margin-left: calc((100% - 75%) / 3);
  margin-right: 0;
}

.home-page {
  height: 100vh;
  overflow: hidden;
}

.home-page .page-shell {
  height: calc(100vh - 58px);
  margin-bottom: 29px;
}

.home-carousel-wrap {
  grid-column: 1 / 3;
  grid-row: 2;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-carousel {
  width: min(59.4vw, 891px);
}

.carousel-advance {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.carousel-advance:focus {
  outline: none;
}

.carousel-frame {
  position: relative;
  display: block;
  overflow: hidden;
}

.carousel-image {
  display: block;
  width: 100%;
  height: auto;
}

.carousel-image.is-entering {
  position: absolute;
  inset: 0;
}

.carousel-image.is-entering {
  opacity: 1;
  filter: blur(3px);
}

.carousel-image.is-entering.is-active {
  animation: blur-reveal 420ms ease-out forwards;
}

.carousel-image.is-leaving {
  opacity: 0;
}

.carousel-count {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

@keyframes blur-reveal {
  0% {
    filter: blur(3px);
  }

  100% {
    filter: blur(0);
  }
}

@keyframes panel-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes page-content-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.about-panel {
  max-width: 650px;
  color: #222;
  font-size: 14px;
  line-height: 1.55;
}

.about-panel p {
  margin: 0 0 18px;
}

.thumbnail-panel.is-active {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.thumbnail-panel button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.thumbnail-panel button:focus {
  outline: none;
}

.thumbnail-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.menu-toggle {
  display: none;
}

.lightbox {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  outline: none;
}

.lightbox[open] {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  overflow: hidden;
}

.lightbox-focus-anchor {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.lightbox::backdrop {
  background: rgba(255, 255, 255, 0.88);
}

.lightbox-image {
  display: block;
  max-width: min(88vw, 1100px);
  max-height: 88vh;
}

.lightbox-frame:focus,
.lightbox-image:focus,
.lightbox:focus {
  outline: none;
}

.lightbox-image.is-transitioning {
  animation: lightbox-reveal 180ms ease-out forwards;
}

@keyframes lightbox-reveal {
  from {
    opacity: 0.92;
    filter: none;
  }

  to {
    opacity: 1;
    filter: none;
  }
}

.lightbox-count {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.lightbox-frame:not(.is-loaded) .lightbox-count {
  visibility: hidden;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.lightbox-close:focus,
.lightbox-nav:focus {
  outline: none;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 800px) {
  html {
    scrollbar-gutter: auto;
  }

  .menu-toggle {
    position: relative;
    z-index: 4;
    top: 0;
    right: 0;
    display: grid;
    gap: 6px;
    place-content: center;
    width: 32px;
    height: 23px;
    border: 0;
    background: var(--paper);
    padding: 0;
    margin: 0;
    line-height: 1;
    transform: none;
  }

  .menu-toggle::before {
    content: "";
    position: absolute;
    inset: -11px -8px;
  }

  .menu-toggle span {
    display: block;
    width: 32px;
    height: 1.5px;
    background: var(--ink);
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .page-shell {
    display: block;
    width: calc(100% - 32px);
    max-width: 680px;
    margin: 72px auto 72px;
  }

  .sidebar {
    display: block;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }


  .brand {
    position: relative;
    z-index: 4;
    display: inline-block;
    width: fit-content;
  }

  .project-header {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    padding: 0;
    background: var(--paper);
    min-height: 100dvh;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 220ms ease-out,
      visibility 220ms ease-out;
  }

  .project-header.is-open {
    opacity: 1;
    visibility: visible;
  }

  .info-image {
    width: 100%;
  }

  .info-page {
    display: block;
  }

  .info-copy {
    margin-top: 28px;
  }

  .site-nav {
    display: grid;
    gap: 24px;
    justify-items: center;
    font-size: 28px;
    color: var(--ink);
    opacity: 0;
    transition: opacity 220ms ease-out 40ms;
  }

  .project-header.is-open .site-nav {
    opacity: 1;
  }

  .dropdown-menu {
    position: static;
    display: grid;
    gap: 14px;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transition: none;
    margin-top: 14px;
    justify-items: center;
    font-size: 18px;
  }

  .thumbnail-panel.is-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .lightbox-image {
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 124px);
  }

  .lightbox-nav {
    display: none;
  }

  .lightbox-close {
    font-size: 2.75rem;
  }

  .lightbox-open .menu-toggle {
    display: none;
  }

  .lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 100vw;
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    background: rgba(255, 255, 255, 0.88);
    overflow: hidden;
    overscroll-behavior: contain;
  }

  .lightbox::backdrop {
    background: transparent;
  }

  .lightbox[open] {
    display: flex;
  }

  .lightbox-frame {
    max-width: 100%;
  }

  .lightbox-frame.is-portrait {
    margin-top: 72px;
    align-self: flex-start;
  }

  .lightbox-frame.is-landscape {
    margin-top: 18px;
    align-self: center;
  }

  @media (orientation: landscape) {
    .lightbox-image {
      max-width: calc(100vw - 32px);
      max-height: calc(100dvh - 28px);
    }

    .lightbox-frame.is-landscape,
    .lightbox-frame.is-portrait {
      align-self: center;
      margin-top: 0;
    }

    .lightbox-count {
      display: none;
    }
  }

  .selected-works-page .page-shell {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    width: calc(100% - 32px);
    max-width: 680px;
    margin: 24px auto 72px;
  }

  .selected-works-page .sidebar {
    display: contents;
    position: static;
    width: auto;
    padding: 0;
    transform: none;
    background: transparent;
    border: 0;
  }

  .selected-works-page .brand {
    grid-column: auto;
    grid-row: auto;
  }

  .selected-works-page .sidebar nav {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    gap: 18px;
    margin-top: 70px;
  }

  .selected-works-page main {
    grid-column: 1;
    grid-row: 3;
    margin-top: 24px;
  }

  .selected-works-page .carousel {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .home-page .page-shell,
  .info-page-body .page-shell {
    margin-top: 24px;
  }

  .info-page-body .page-shell {
    margin-bottom: 24px;
  }

  .info-page-body .info-page {
    margin-top: 60px;
  }

  .home-page .home-carousel-wrap {
    margin-top: 76px;
  }

  .home-page .home-carousel {
    width: 100%;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .info-page {
    column-gap: 32px;
  }

  .info-copy {
    width: min(480px, 100%);
  }

  .selected-works-page .carousel {
    width: 88%;
  }
}
