.project-page {
  width: calc(100% - (var(--page-pad) * 2));
  max-width: 1600px;
  margin: 20px auto 80px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: start;
}

.project-info {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}

.project-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 6px;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 22px;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.project-meta {
  margin-bottom: 24px;
}

.project-collab,
.project-meta .meta,
.project-meta .date,
.project-content p,
.quote-author,
.project-credits,
.project-note {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
}

.project-collab {
  margin: 0;
  font-style: italic;
}

.project-meta .meta {
  margin: 0;
  font-style: normal;
}

.project-meta .date {
  margin: 0;
  font-style: italic;
}

.project-content p {
  margin: 0 0 24px;
  font-style: normal;
}

.quote-author {
  margin-top: 24px;
  font-style: normal;
}

.project-credits,
.project-note {
  margin-top: 24px;
  font-style: italic;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  grid-auto-flow: dense;
  grid-auto-rows: 10px;
  align-items: start;
  grid-column: 2;
}

.project-item {
  margin: 0;
  overflow: hidden;
}

.project-item.portrait,
.project-item.tall {
  aspect-ratio: 3 / 4;
}

.project-item.landscape,
.project-item.wide,
.project-item.big {
  aspect-ratio: 4 / 3;
}

.project-item.square {
  aspect-ratio: 1 / 1;
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.close-inline {
  text-decoration: none;
  color: #000;
  font-size: 1em;
  line-height: 1;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.close-inline:hover {
  color: #39ff14;
  transform: rotate(90deg);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
}

.lightbox button {
  outline: none;
  border: none;
  background: none;
}

.lightbox button:focus-visible {
  outline: none;
  color: #39ff14;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: transparent;
  border: 0;
  color: #000;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.lightbox-close {
  top: 20px;
  right: 30px;
  font-size: 42px;
  transition: 0.2s ease;
}

.lightbox-close:hover {
  color: #39ff14;
  transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #39ff14;
}

@media (min-width: 768px) and (max-width: 1200px) {
  .project-page {
    gap: 40px;
    grid-template-columns: 1.3fr 1.7fr;
  }

  .project-title,
  .project-collab,
  .project-meta .meta,
  .project-meta .date,
  .project-content p,
  .quote-author,
  .project-credits,
  .project-note {
    font-size: 22px;
  }

  .close-inline {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    font-size: 20px;
    z-index: auto;
  }

  .close-inline:hover {
    color: #39ff14;
    transform: rotate(90deg);
  }
}

@media (min-width: 601px) and (max-width: 767px) {
  .project-page {
    width: calc(100% - (var(--page-pad) * 2));
    margin: 30px auto 60px;
    display: block;
  }

  .menu-toggle,
  .mobile-overlay,
  .mobile-panel {
    display: none !important;
  }

  .project-info {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 24px;
  }

  .project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    grid-auto-flow: row;
    grid-auto-rows: auto;
    grid-column: auto;
  }

  .project-item,
  .project-item.wide,
  .project-item.big {
    grid-column: span 1;
    grid-row: auto !important;
    grid-row-end: auto !important;
  }

  .project-item img,
  .project-item.tall img,
  .project-item.square img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .project-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 20px;
  }

  .project-collab,
  .project-meta .meta,
  .project-meta .date,
  .project-content p,
  .quote-author,
  .project-credits,
  .project-note {
    font-size: 20px;
  }

  .close-inline {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    font-size: 1em;
    z-index: auto;
  }

  .close-inline:hover {
    color: #39ff14;
    transform: rotate(90deg);
  }
}

@media (max-width: 600px) {
  .project-page {
    width: calc(100% - (var(--page-pad) * 2));
    margin: 30px auto 60px;
    display: block;
  }

  .menu-toggle,
  .mobile-overlay,
  .mobile-panel {
    display: none !important;
  }

  .project-info {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 24px;
  }

  .project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    grid-auto-flow: row;
    grid-auto-rows: auto;
    grid-column: auto;
  }

  .project-item,
  .project-item.wide,
  .project-item.big {
    grid-column: span 1;
    grid-row: auto !important;
    grid-row-end: auto !important;
  }

  .project-item img,
  .project-item.tall img,
  .project-item.square img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .project-title {
    font-size: 20px;
  }

  .project-collab,
  .project-meta .meta,
  .project-meta .date,
  .project-content p,
  .quote-author,
  .project-credits,
  .project-note {
    font-size: 20px;
  }

  .project-content p {
    margin: 0 0 24px;
  }

  .close-inline {
    position: fixed;
    top: calc(var(--bar-h) / 2);
    right: var(--page-pad);
    transform: translateY(-50%);
    font-size: 32px;
    z-index: 2000;
  }

  .close-inline:hover,
  .close-inline.is-touched {
    color: #39ff14;
    transform: translateY(-50%) rotate(90deg);
  }
}