* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}
html {
  font-size: 1vw;
  --leading: 1.1;
  --margin: 1.4rem;
  --line-break: calc(1em * var(--leading));
  --ease: linear;
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
  --fg: white;
  --bg: black;
}
body {
  font-size: 3.2rem;
  font-family: "Arial", sans-serif;
  font-weight: bold;
  background: var(--bg);
  color: var(--fg);
  line-height: var(--leading);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection {
  background: var(--fg);
  color: var(--bg);
}

footer#bottom {
  margin: auto var(--margin) 0;
  padding-top: calc(var(--margin) * 4);
  padding-bottom: var(--margin);
  font-size: 1.6rem;
  display: flex;
  justify-content: space-between;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
}

img {
  cursor: pointer;
}

header#top {
  display: flex;
  justify-content: space-between;
  padding: var(--margin);
  padding-bottom: 0;
  z-index: 2;
  position: relative;
  mix-blend-mode: difference;
}

article a {
  display: block;
}
article header {
  position: sticky;
  top: var(--margin);
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--margin);
  mix-blend-mode: difference;
  z-index: 15;
}
article header h2 {
  flex: 1;
}
article header div {
  padding-left: 1em;
}
article .images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding-bottom: calc(var(--line-break) * 1.5);
  position: relative;
  --thumb-size: 40vw;
}
.images.feature figure:not(:hover) canvas {
  display: none;
}
.images.feature figure {
  position: relative;
}
.images.feature figure canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 10;
  image-rendering: pixelated;
  height: calc(100vw - (var(--margin) * 2));
  width: auto;
  mix-blend-mode: difference;
}
article .images.feature {
  margin-top: calc(0rem - var(--line-break) * 2);
}
article .images.thumbs {
  padding: 14rem 0 17rem;
  height: calc(var(--thumb-size) + 14rem + 17rem);
}
article .images.feature figure {
  margin: calc(var(--margin) * 2);
}
article .images.feature img {
  max-width: 40vw;
}
article:nth-of-type(odd) .images.feature[data-num="2"] figure:nth-child(2) img,
article:nth-of-type(even)
  .images.feature[data-num="2"]
  figure:nth-child(1)
  img {
  max-width: 35vw;
}
article .images.feature[data-num="1"] img {
  max-width: 60vw;
}
article .thumbs img {
  height: var(--thumb-size);
  width: auto;
}
article .inner {
  position: relative;
}
article .images + .mast-outer {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  mix-blend-mode: difference;
  pointer-events: none;
  /* transition: opacity 1s var(--ease-out-expo); */
}
article .images:not(:hover) + .mast-outer {
  opacity: 0;
}

.mast {
  position: relative;
  font-size: 50vw;
  line-height: 0.8;
  margin: calc(var(--margin) * 2) 0;
}
.mast span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  text-align: center;
  margin-top: -2rem;
}

.slides,
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.slide__prev,
.slide__next {
  display: block;
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 1;
}
.slide__prev {
  left: 0;
  cursor: w-resize;
}
.slide__next {
  right: 0;
  cursor: e-resize;
}
.slide {
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.loading {
  position: fixed;
  top: var(--margin);
  left: 0;
  bottom: calc(var(--margin) * 5);
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  display: none;
}

.slides.busy {
  pointer-events: none;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: difference;
  display: none;
  align-items: center;
  justify-content: center;
}
.slide figure {
  position: relative;
  margin: calc(var(--margin) / 2);
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}
.slide figure:first-of-type {
  margin-left: var(--margin);
}
.slide figure:last-of-type {
  margin-right: var(--margin);
}
.slide figure.medium img.image,
.slide figure:not(.full) img.image,
.slide figure:not(.thumb) img.image,
.slide figure:not(.inset) img.image {
  height: 70vh;
  width: auto;
}
.slide.odd figure.even.medium img.image,
.slide.even figure.odd.medium img.image,
.slide.odd figure.even:not(.full) img.image,
.slide.even figure.odd:not(.full) img.image,
.slide.odd figure.even:not(.thumb) img.image,
.slide.even figure.odd:not(.thumb) img.image,
.slide.odd figure.even:not(.inset) img.image,
.slide.even figure.odd:not(.inset) img.image {
  height: 78vh;
}
.slide.odd figure.even.thumb img.image,
.slide.even figure.odd.thumb img.image {
  height: 58vh;
}
.slide figure.thumb img.image {
  height: 47vh;
  width: auto;
}
.slide figure.full img.image {
  height: 100vh;
  width: auto;
}
.slide figure.inset img.image {
  height: calc(100vh - var(--margin) - 0.8rem) !important;
  width: auto;
}
.slide__title {
  position: absolute;
  top: var(--line-break);
  left: 0;
  right: 0;
  padding: var(--margin);
  mix-blend-mode: difference;
  z-index: 1;
}
.slide__caption {
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 0;
  padding: var(--margin);
  mix-blend-mode: difference;
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.slide-out .slide__caption,
.slide-out .slide__title {
  display: none;
}
.slide img {
  display: block;
  /* object-fit: contain; */
}
.slide .overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

h1.project-title {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vh;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0.8;
  text-align: center;
  z-index: 999;
  display: none;
}
h1.project-title span.fit {
  margin-top: -4rem;
}

.slides__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 3;
  margin: var(--margin);
  width: 100%;
  mix-blend-mode: difference;
  pointer-events: none;
}
body[data-template="project"] .slides__footer {
  bottom: initial;
  top: calc(var(--line-break));
  left: 55%;
}

header.project-header {
  padding: 0 var(--margin);
  position: relative;
  z-index: 3;
  mix-blend-mode: difference;
  width: 56%;
}
header.project-header h1 span {
  cursor: help;
}
.project-thumbs {
  margin: calc(var(--margin) / 2);
  margin-top: 4rem;
  display: flex;
  flex-wrap: wrap;
}
.project-thumbs figure {
  margin: calc(var(--margin) / 2);
}
.project-text {
  padding: 0 var(--margin) var(--margin);
  position: relative;
  z-index: 2;
  mix-blend-mode: difference;
}
.project-text p {
  margin-bottom: var(--line-break);
}

.will-mask:not(.masked) {
  opacity: 0;
}

.index-project {
  margin-bottom: calc(var(--margin) * 2);
}
.index-project .inner {
  margin: calc(var(--margin) / 2) var(--margin);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
}
.index-project .inner img {
  display: block;
  height: auto;
  width: 100%;
}

main.default {
  padding: var(--margin);
  padding-top: 0;
}
.bio-precede {
  z-index: 3;
  mix-blend-mode: difference;
}

@media (min-device-width: 721px) {
  .mobile-only {
    display: none !important;
  }
  body:not(.show-text) .project-text {
    display: none;
  }
  body.show-precede .slide__title,
  body.show-precede .project-header {
    display: none;
  }
  body[data-template="projects"] .bio-precede {
    position: absolute;
    padding-top: calc(var(--margin) + var(--line-break));
    pointer-events: none;
  }
  body[data-template="projects"].show-precede .index-project:first-of-type h2 {
    visibility: hidden;
  }
  body:not(.show-precede) .bio-precede {
    display: none;
  }
}

#about {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 20;
  flex-direction: column;
  padding-top: calc(var(--margin) + var(--line-break));
  display: none;
}
body.show-about header#top {
  z-index: 21;
}
body.show-about #about {
  display: flex;
}
body:not(.show-about) .with-about,
body.show-about .not-about,
body.show-about .index-project {
  display: none;
}

@media (max-device-width: 720px) {
  html {
    font-size: 2.5vw;
    --margin: 1.8rem;
  }
  .desktop-only {
    display: none !important;
  }
  header#top {
    display: block;
  }
  header#top .or {
    display: none;
  }
  header#top .socials {
    display: flex;
    justify-content: space-between;
  }
  .slides__footer {
    width: auto;
  }
  .slide__caption {
    left: initial;
  }
  .slide__title {
    top: initial;
    bottom: var(--line-break);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .switcher {
    position: absolute;
    top: 0;
    right: 0;
    margin: var(--margin);
  }
  footer#bottom {
    display: block;
  }
  .slide figure:not(:first-of-type) {
    display: none;
  }
  .slide figure {
    margin: var(--margin);
  }
  .slide figure.full,
  .slide figure.inset {
    margin: 0;
    background-size: cover;
    -webkit-mask-size: cover !important;
    mask-size: cover !important;
  }
  header.project-header {
    position: absolute;
    padding: var(--margin);
    top: 0;
    left: 0;
    width: 100%;
  }
  body[data-template="project"] .slides__footer {
    display: none;
  }
  .project-subhead {
    display: flex;
  }
  .project-subhead > div {
    flex: 1;
  }
  .project-subhead > div:nth-child(2) {
    text-align: right;
  }
  .project-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
  }
  .project-text p {
    margin-bottom: 0;
  }
  .project-text:not(.open) p {
    display: none;
  }
  .index-project .inner {
    grid-template-columns: repeat(3, 1fr);
  }
  article header {
    display: block;
  }
  article header div {
    padding-left: 0;
  }
  #about {
    padding-top: calc(var(--margin) + var(--line-break) * 2);
  }
  .slide figure.thumb img.image {
    height: 38vh !important;
  }
}
