* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Helvetica Neue", Inter, sans-serif;
}

header {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  height: 52px;
}

header h1 {
  margin: 0;
  position: absolute;
  left: 0;
  top: 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  font-variant: small-caps;
}

header nav {
  position: absolute;
  right: 0;
  top: 16px;
}

header ul {
  margin: 0;
  list-style: none;
}

header li {
  display: inline;
}

header li + li {
  margin-left: 18px;
}

header a {
  color: #000;
  text-decoration: none;
  font-size: 12px;
}

.grid-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 320%;
}

.grid-item {
  position: absolute;
  overflow: hidden;
}

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

.caption-bar {
  font-family: "Helvetica Neue", Inter, sans-serif;
  font-weight: 300;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5em;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: #fff;
  font-size: 11px;
  /* font-variant: small-caps; */
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.grid-item:hover .caption-bar {
  opacity: 1;
}

.grid-item:hover img {
  transform: scale(1.02);
  filter: brightness(1.08);
}

/* 
  top/height values are % of CONTAINER HEIGHT (= 320% of container width).
  Formula: css_top = original_top_pct_of_width / 3.2
           css_height = (width_pct / aspect_ratio) / 3.2
*/

.item-1  { left: 0%;    top: 0%;     width: 48.14%; height: 10.2%; }
.item-2  { left: 49%;   top: 0%;     width: 24.1%; height: 11.37%; }
.item-3  { left: 74%;   top: 0%;     width: 26%;   height: 19.12%; }
.item-4  { left: 0%;    top: 10.38%; width: 27.2%; height: 8.74%;  }
.item-5  { left: 28.1%; top: 10.38%; width: 20%;   height: 8.74%;  }
.item-6  { left: 49%;   top: 11.56%; width: 24.1%; height: 7.56%;  }
.item-7  { left: 0%;    top: 19.31%; width: 59.8%; height: 10.00%; }
.item-8  { left: 60.4%; top: 19.31%; width: 39.6%; height: 17.72%; }
.item-9  { left: 0%;    top: 29.59%; width: 59.7%; height: 26.73%; }
.item-10 { left: 60.4%; top: 37.19%; width: 39.6%; height: 19.13%; }
.item-11 { left: 0%;    top: 56.50%; width: 50.6%; height: 16.82%; }
.item-12 { left: 51.5%; top: 56.50%; width: 48.5%; height: 16.82%; }
.item-13 { left: 0%;    top: 73.55%; width: 100%;  height: 18.17%; }

#project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: #fff;
  display: none;
  overflow-y: scroll;
  overflow-x: hidden;
}

#project-overlay.visible {
  display: flex;
}

.project-images {
  width: 78%;
  padding-left: max(0px, calc((100vw - 1200px) / 2));
  /* padding-right: max(0px, calc((100vw - 1200px) / 2)); */
  overflow: visible;
  height: auto;
}

.project-images img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  display: block;
  margin-bottom: 12px;
  cursor: pointer;
}

.project-images img[src="images/10.jpg"],
.project-images img[src="images/11.jpg"] {
  object-position: center bottom;
}

.project-info {
  width: 30%;
  padding-left: 4vw;
  padding-top: 52px;
  padding-right: max(0px, calc((100vw - 1200px) / 2));
  overflow: hidden;
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.project-category {
  color: #aaa;
  font-size: 11px;
  margin-bottom: 8px;
}

.project-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #000;
  text-transform: uppercase;
}

.project-credits {
  font-size: 11px;
  color: #000;
  line-height: 1.8;
}

.project-description {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 12px;
  color: #333;
  line-height: 1.75;
}

.close-overlay {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 310;
  font-size: 18px;
  cursor: pointer;
  color: #fff;
  mix-blend-mode: difference;
  text-decoration: none;
  border: 0;
  background: transparent;
  line-height: 1;
}

#fullscreen-view {
  --fullscreen-slide-gap: clamp(40px, 8vw, 120px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#fullscreen-view.visible {
  display: flex;
}

.fullscreen-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.fullscreen-strip {
  display: flex;
  height: 100%;
  column-gap: var(--fullscreen-slide-gap);
  will-change: transform;
}

.fullscreen-slide {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 220;
  width: 52px;
  height: 52px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.fullscreen-nav.prev {
  left: 20px;
}

.fullscreen-nav.next {
  right: 20px;
}

.fullscreen-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 230;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
