/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Disable image download */
.disable-download img {
  pointer-events: none;
}

/* Keyframes for spinner animation */
@keyframes rotate-forever {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Lightbox spinner */
.lightbox-spinner {
  animation: rotate-forever 0.7s linear infinite;
  height: 30px;
  width: 30px;
  border: 4px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.7;
}

/* Lightbox styles */
html.lightbox-enabled,
html.lightbox-enabled body {
  overflow: hidden;
}

html.lightbox-zoomed .lightbox-content {
  cursor: zoom-out;
  overflow: auto;
}

html.lightbox-zoomed .lightbox-content.zoomable-x {
  justify-content: flex-start;
}

html.lightbox-zoomed .lightbox-content.zoomable-y {
  align-items: baseline;
}

html.lightbox-zoomed #lightbox-wrap img {
  max-width: inherit;
  max-height: inherit;
}

html.lightbox-zoomed #lightbox-img-wrap .lightbox-extra {
  display: none;
}

.lightbox-link,
.lightbox-content.zoomable {
  cursor: zoom-in;
}

#lightbox-wrap .lightbox-contents {
  user-select: none;
}

.lightbox-content {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  opacity: 1;
  position: absolute;
  top: 0;
  transition: opacity 0.4s;
  width: 100vw;
}

#lightbox-blocking {
  align-items: center;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1002;
}

#lightbox-blocking .lightbox-spinner {
  display: none;
}

#lightbox-wrap {
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 1001;
}

#lightbox-wrap .offscreen,
#lightbox-wrap.offscreen {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  transform: translateX(-99999px);
  width: 0;
}

#lightbox-wrap.loading .lightbox-spinner {
  display: block;
}

#lightbox-wrap .hidden {
  opacity: 0;
}

#lightbox-wrap .lightbox-contents {
  display: inline-block;
  max-height: 100%;
  max-width: 100%;
}

#lightbox-wrap.single .next,
#lightbox-wrap.single .prev {
  display: none;
}

#lightbox-wrap.extras-hidden #lightbox-img-wrap .lightbox-extra {
  opacity: 0;
  transition: opacity 1s;
}

#lightbox-wrap img {
  max-height: 100vh;
  max-width: 100vw;
}

#lightbox-inner-wrap {
  height: 100%;
  margin: auto;
  position: relative;
  z-index: 1003;
}

#lightbox-inner-wrap .control {
  cursor: pointer;
  position: absolute;
  z-index: 1003;
}

#lightbox-inner-wrap svg .lightbox-icon-bg {
  fill: #696969;
  opacity: 0.2;
}

#lightbox-inner-wrap svg:hover .lightbox-icon-bg {
  opacity: 0.4;
}

#lightbox-inner-wrap .next,
#lightbox-inner-wrap .prev {
  height: 100vh;
  opacity: 0;
  top: 0;
  width: 30vw;
}

#lightbox-inner-wrap .next:hover,
#lightbox-inner-wrap .prev:hover {
  opacity: 1;
}

#lightbox-inner-wrap .next.hidden,
#lightbox-inner-wrap .prev.hidden {
  cursor: default;
}

#lightbox-inner-wrap .next.hidden svg,
#lightbox-inner-wrap .prev.hidden svg {
  display: none;
}

#lightbox-inner-wrap .next svg,
#lightbox-inner-wrap .prev svg {
  top: calc(50% - 30px);
  position: absolute;
}

#lightbox-inner-wrap .next svg .lightbox-icon-arrow,
#lightbox-inner-wrap .prev svg .lightbox-icon-arrow {
  fill: #fff;
}

#lightbox-inner-wrap .next {
  right: 0;
}

#lightbox-inner-wrap .next svg {
  right: 20px;
}

#lightbox-inner-wrap .prev {
  left: 0;
}

#lightbox-inner-wrap .prev svg {
  left: 20px;
}

#lightbox-inner-wrap .close {
  position: fixed;
  height: 40px;
  right: 20px;
  top: 20px;
  width: 40px;
}

#lightbox-inner-wrap .close:hover {
  cursor: pointer;
}

#lightbox-inner-wrap .close .lightbox-icon-bg {
  fill: #fff;
}

/* Media Queries */
@media (max-width: 1024px) {
  #lightbox-inner-wrap .close {
    right: 0;
    top: 0;
  }

  #lightbox-inner-wrap .close circle {
    display: none;
  }

  #lightbox-inner-wrap .next:hover,
  #lightbox-inner-wrap .prev:hover {
    opacity: 0;
  }
}

@media (min-width: 1024px) {
  .lightbox-link.hover-icon-enabled {
    position: relative;
  }

  .lightbox-link.hover-icon-enabled:hover::after {
    background: rgba(105, 105, 105, 0.2) url(data:image/svg+xml;base64,...) no-repeat center;
    background-size: 16px;
    border-radius: 50%;
    content: '';
    display: block;
    height: 36px;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 36px;
    z-index: 1000;
  }
}

/* Link Transitions */
.link-transition a {
  transition: background 0.2s ease, color 0.2s ease;
}

.link-transition a svg {
  transition: fill 0.2s ease;
}

/* Project Cover Transitions */
.project-cover .details {
  transition: background 0.2s ease;
}

.project-cover .title,
.project-cover .fields,
.project-cover .custom,
.project-cover .description,
.project-cover .date {
  transition: color 0.2s ease;
}

/* Fade Animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.transition-enabled {
  opacity: 0;
}

.transition-in {
  animation: fade-in ease-in 0.25s forwards;
}

.transition-out {
  opacity: 1;
  animation: fade-out ease-out 0.25s forwards;
}