html, body {
  height: 100vh;
  margin: 0;
  padding-top: 0px;
  padding-bottom: 30px;
  box-sizing: border-box;
  background-color: #060606;
  color: #f7f7f7;
  font-family: 'Space Mono', monospace;
  overflow: hidden;
}

header {
  display: flex;
  flex-direction: column;
  align-items: start;
  position: fixed;
  background-color: transparent;
  top: 0;
}

.header-content {
  margin-top: 50px;
  margin-left: 50px;
}

.top-section {
  display: block;
}

.bottom-section {
  display: flex;
  flex-direction: row;
  justify-content: start;
}

.works {
  text-decoration: underline;
}

.a-text {
  color: #060606;
  text-decoration: none;
}

.a-text:hover {
  color: #f7f7f7;
}

h1, h2 {
  font-size: 20px;
  margin: 10px;
  padding: 10px 15px;
  font-weight: 700;
  background-color: #f7f7f7;
  color: #060606;
  width: fit-content;
}

h1:hover, h2:hover {
  color: #f7f7f7;
  background-color: #060606;
  text-decoration: underline;
}

main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
  padding: 130px 60px 0 60px;
  overflow: hidden;
}

.works-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  flex: 1;
  min-height: 0;
  width: 100%;
  gap: 24px;
}

.work-image,
.work-image-tepuyes {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

.work-image img {
  width: auto;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.work-image-tepuyes {
  align-items: center;
}

.work-image-tepuyes img {
  max-height: 60vh;
}

.work-image img.source-hidden {
  opacity: 0;
}

h3 {
  margin: 0;
  font-size: 14px;
  color: transparent;
}

.work-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 14px;
  line-height: 1.25;
  padding: 0 15px 15px 0;
}

.work-info p {
  margin: 2px 0;
}

h4 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.25;
  padding: 0 0 5px 15px;
  margin: 0;
  font-size: 14px;
  color: #060606;
}

.artist-statement {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  padding: 0 0 30px 15px;
  margin: 0;
}

.work-image.multi {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  gap: 20px;
  width: 100%;
  max-width: 90vw;
  margin: -10px auto 0 auto;
  justify-content: center;
}

.work-image:has(>.multi) {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 5vh;
  gap: 3vh;
  width: 100%;
}

.work-image.multi img {
  height: calc(40vh - (var(--count, 4) - 4) * 5vh);
  width: auto;
  display: block;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: auto;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 60px;
  right: 60px;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  padding: 10px 15px;
  background-color: #f7f7f7;
  color: #060606;
  border: none;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-close:hover {
  background-color: #060606;
  color: #f7f7f7;
  text-decoration: underline;
}

.lightbox.open {
  display: block;
}

.lightbox img {
  width: 120vw;
  max-width: none;
  height: auto;
  display: inline-block;
  margin: 0 auto;
  cursor: zoom-out;
}

.lightbox-multi {
  display: none;
  position: fixed;
  inset: 0;
  background: #f7f7f7;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lightbox-multi.open {
  display: flex;
}

.lightbox-multi img {
  max-width: 85vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: inline-block;
  margin: 0 auto;
}

.lightbox-multi-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  padding: 10px 15px;
  background-color: transparent;
  color: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-multi-nav:hover {
  background-color: transparent;
  color: transparent;
}

.lightbox-multi-prev {
  left: 60px;
}

.lightbox-multi-next {
  right: 60px;
}

.lightbox-multi-counter {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  z-index: 10000;
}

.lightbox-multi-close {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  padding: 0;
}

.lightbox-multi-zone {
  position: fixed;
  top: 12vh;
  bottom: 12vh;
  width: 25vw;
  z-index: 10000;
  cursor: pointer;
  background: transparent;
}

.lightbox-multi-zone-left {
  left: 0;
}

.lightbox-multi-zone-right {
  right: 0;
}

@media (max-width: 768px) {
  html, body {
    height: 100vh;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding-top: 20px;
    padding-bottom: 0;
  }

  main {
    height: calc(100vh - 20px);
    overflow: hidden;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
  }

  .works-grid {
    min-height: auto;
    gap: 8px;
    display: flex;
    flex-direction: column;
  }
  
  .works-grid:has(.work-image.multi) {
    flex: 0 1 auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 100px;
  }  

  header {
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .header-content {
    margin-top: 30px;
    margin-left: 30px;
  }

  .bottom-section {
    flex-wrap: wrap;
  }

  h1, h2 {
    font-size: 14px;
    margin: 4px;
    padding: 6px 10px;
  }

  .work-image,
  .work-image.multi {
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
  }

  .work-image, .work-image-tepuyes {
    flex: 0 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding-bottom: 4vh;
  }

  .work-image:not(.multi) > img {
    width: auto;
    height: auto;
    max-width: 65%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }

  .work-image.multi {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 95%;
    margin: 0 auto;
  }

  .work-image.multi img {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
  }

  .work-info {
    padding: 8px 15px 6px 0;
    font-size: 10px;
    box-sizing: border-box;
    width: 100%;
  }

  .work-details {
    padding: 4px 0;
    font-size: 01px;
  }

  .artist-statement {
    font-size: 10px;
    padding: 0;
    margin: 0 15px 0 15px;
  }

  h4 {
    font-size: 10px;
  }

  .lightbox-close {
    top: 30px;
    right: 30px;
    font-size: 10px;
  }

  .lightbox img {
    width: 170vw;
  }

  .work-image-tepuyes img {
    width: auto;
    height: auto;
    max-width: 55%;
    max-height: 60vh;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }

  .lightbox-multi-nav {
    display: none;
  }
}
