@font-face {
  font-family: 'gerstner';
  src: url('Gerstner-ProgrammRegular.otf') format('opentype');
}

/* =========================
   Base Styles
   ==================== ===== */

body {
  margin: 0;
  font-family: 'Gerstner';
  display: flex;
  height: 100vh;
  color: rgba(0, 0, 0, 0.8);
  font-size: 18px;
  line-height: 1.5;
  scroll-behavior: smooth;
}

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

a:hover {
  cursor: pointer;
}

/* =========================
   Sidebar
   ========================= */

.sidebar {
  display: flex;
  width: calc(100% / 3);
  flex-shrink: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  height: 100vh;
  opacity: 0;
  animation: fadeIn 0.15s ease forwards;
}

.sidebar p {
  max-width: 400px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  font-variant-numeric: tabular-nums;
  gap: 36px;
  flex: 1;
}

.sidebar .project-item {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}

.sidebar li .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.number {
  width: 30px;
  letter-spacing: 1.5px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 15px;
  margin-bottom: 0;
  align-items: start;
  flex-shrink: 0;
  padding: 6px 0;
}

.contact-label-column {
  display: flex;
  flex-direction: column;
}

.contact-label-values {
  display: flex;
  flex-direction: column;
}

.contact-label-values a {
  transition: opacity 0.2s;
  cursor: pointer;
}

.contact-label-values a:hover {
  opacity: 0.25;
}

.contact-label {
  cursor: default;
}

.zeroes {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 1.5px;
  width: max-content;
}

.zeroes:hover {
  cursor: pointer;
}

.zeroes-top {
  display: flex;
  flex-direction: row;
  gap: 1.5px;
}

/* =========================
   Content Grid
   ========================= */

.content {
  flex: 1 1 auto;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  scroll-behavior: smooth;
}

.cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}

.cell img,
.cell video {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  transition: opacity ease 0.15s;
  cursor: pointer;
}

.cell video::-webkit-media-controls,
.cell video::-webkit-media-controls-enclosure {
  display: none !important;
}

/* Hover swap transition */
.hover-swap {
  transition: opacity 0.15s ease;
}

/* Dim all other images/videos when hovering over one */
.content:has(.cell img:hover) .cell img:not(:hover),
.content:has(.cell img:hover) .cell video:not(:hover),
.content:has(.cell video:hover) .cell img:not(:hover),
.content:has(.cell video:hover) .cell video:not(:hover) {
  opacity: 0.25;
}

/* =========================
   Overlay
   ========================= */

.project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 100000;
  color: black;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.project-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.project-content {
  position: relative;
  z-index: 10001;
  pointer-events: none;
  box-sizing: border-box;
  color: rgba(0, 0, 0, 0.8);
  display: flex;
  height: 100vh;
}


.project-content p {
  margin: 0;
  max-width: 400px;
}

.project-content-left ul {
  list-style: none;
  padding: 0;
  line-height: 1;
  margin: 0;
}

.project-header {
  display: flex;
  flex-direction: column;
  gap: 56px;
  line-height: 1.5;
}

.project-header-000 {
  display: flex;
  flex-direction: column;
  gap: 36px;
  line-height: 1.5;
}

.project-content-left .project-item {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.project-content-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: scroll;
  width: 100%;
  padding: 36px 36px;
  height: 100vh;
  box-sizing: border-box;
  transition: opacity 0.15s ease;
}

/* =========================
   Image Viewer Overlay
   ========================= */
.image-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  cursor: pointer;
}

.image-viewer-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#image-viewer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90vw;
  height: 90vh;
}

#image-viewer-content img,
#image-viewer-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
}

.close-image-viewer {
  position: fixed;
  top: 36px;
  right: 36px;
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: opacity 0.2s;
  z-index: 200001;
  padding: 0;
}

.close-image-viewer:hover {
  opacity: 0.25;
}

/* =========================
   Media Queries
   ========================= */

@media screen and (max-width:1074px) {
  .sidebar {
    width: fit-content;
    padding: 36px;
  }

  .content {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

.sidebar .project-item {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}

.sidebar li .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

}

@media screen and (max-width:800px) {
  .content {
  flex: 1 1 auto;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: repeat(1, 1fr);
}
}


@media screen and (max-width:571px) {

  .sidebar {
    width: fit-content;
  }
  .contact {
    grid-template-columns: 1fr;
    height: 108px;
  }

  .contact-label-values {
    display: none;
  }

  .contact-label {
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .contact-label:hover {
    opacity: 0.25;
  }

  .name {
    display: none;
  }
}