/* Base */

body {
  margin: 0;
  font-family: articulat-cf, sans-serif;
  font-weight: 400;
  font-style: normal;
  background: #ffffff;
  color: #252429;
  font-size: 0.875rem;
  line-height: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

p {
  margin-top: 0;
}

/* Links */

a {
  color: #252429;
  text-decoration: none;
}

a:hover {
  color: #c9c9c5;
}

.site-title,
.site-title:hover,
.site-title:visited {
  color: #252429;
}

.site-title {
  margin-bottom: 1rem;
}

/* Page Layers */

#pages-wrapper {
  flex: 1;
  min-height: 0;
  position: relative;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  z-index: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
}

.page.active {
  z-index: 1;
  visibility: visible;
  pointer-events: auto;
}

.work-page {
  background: transparent;
  overflow: hidden;
}

.work-panel {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
}

.work-page .work-panel .section {
  padding: 0;
}

.work-page.show-details .work-panel {
  position: relative;
  background: #ffffff;
}

.work-page:not(.show-details) .work-meta,
.work-page:not(.show-details) .work-description,
.work-page:not(.show-details) .work-credits {
  display: none;
}

/* Layout */

.container {
  max-width: 87.5rem;
  margin: 0;
  padding: 2rem 3rem;
}


/* Portfolio layout (main) */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1.5fr 2fr 4fr 3.5fr;
  gap: 2rem;
}

/* Typography */

.content {
  display: block;
  max-width: 37.5rem;
  width: fit-content;
}

.content-nm {
  margin: 0;
}

.skills-tools-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.skills-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skills-title {
  margin: 0;
}

.skills-list {
  display: grid;
}

/* Media */

.media-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.media-section .media-frame {
  flex: 1;
  min-height: 0;
}

.media-frame {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.media-frame img {
  width: auto;
  max-width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
}

.media-frame video {
  width: auto;
  max-width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.contact-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10rem;
  pointer-events: none;
}

.contact-center a {
  pointer-events: auto;
}

.navigation-hint {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  max-width: min(90vw, 44rem);
  padding: 0.75rem 1rem;
  border: 1px solid #252429;
  background: #ffffff;
  color: #252429;
  text-align: center;
  line-height: 1.2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
}

.navigation-hint.visible {
  opacity: 1;
  visibility: visible;
}

.work-nav {
  display: flex;
  flex-direction: column;
}

.work-nav a.content {
  display: inline-block;
  width: fit-content;
  max-width: fit-content;
}

.misc-grid {
  display: grid;
  grid-template-columns: 1.5fr 8fr;
  gap: 2rem;
  height: 100%;
  min-height: 0;
}

.misc-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.misc-intro {
  margin: 0;
  max-width: 48rem;
}

.misc-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-height: 0;
  height: 100%;
}

.misc-column {
  display: grid;
  align-content: start;
  gap: 1rem;
  overflow-y: auto;
  height: 100%;
  min-height: 0;
  padding-right: 0.25rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.misc-column::-webkit-scrollbar {
  display: none;
}

.misc-item {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.misc-item .content-nm {
  text-align: right;
  justify-self: end;
}

.misc-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

#page-misc {
  overflow: hidden;
}

#page-misc .container {
  height: 100%;
}

#page-misc .work-nav {
  position: sticky;
  top: 2rem;
  align-self: start;
}

/* Responsive */

@media (max-width: 64em) {
  .page {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
  }

  .container {
    padding: 2rem 2rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .content,
  .content-nm {
    width: 100%;
    max-width: 100%;
    line-height: 1;
  }

  .skills-tools-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .misc-grid {
    grid-template-columns: 1fr;
    height: 100%;
    min-height: 0;
    gap: 1rem;
  }

  .misc-content {
    height: 100%;
    min-height: 0;
  }

  .misc-gallery {
    grid-template-columns: 1fr;
    height: 100%;
  }

  .misc-column {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  .media-frame {
    touch-action: pan-y;
  }

  #page-misc {
    overflow: hidden;
  }

  #page-misc .container {
    height: 100%;
  }

  #page-misc .work-nav {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #ffffff;
    padding: 0.5rem 0 0.75rem;
  }
}

@media (max-width: 47.9375em) {
  .container {
    padding: 1rem 1rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  }

  .portfolio-grid {
    gap: 1.5rem;
  }

  .work-nav {
    margin-bottom: 0.5rem;
  }

  .contact-center {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
  }

  .navigation-hint {
    width: calc(100% - 2rem);
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .misc-gallery {
    gap: 0.75rem;
  }
}
