#modal-container {
  position: fixed;
  display: flex;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  transform: scale(0);
}

.model-active {
  overflow: hidden;
}

.modal-in {
  transform: scale(1) !important;
}

.modal-background {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  /* background: rgba(0, 0, 0, .0); */
}

.modal-in .modal-background {
  animation: fadeIn var(--speed) var(--curve) forwards;
}

.modal-out .modal-background {
  animation: fadeOut var(--speed) var(--curve) forwards;
}

@keyframes fadeIn {
  0% {
    background: rgba(0, 0, 0, .0);
  }

  100% {
    background: rgba(0, 0, 0, .5);
  }
}

@keyframes fadeOut {
  0% {
    background: rgba(0, 0, 0, .5);
  }

  100% {
    background: rgba(0, 0, 0, .0);
  }
}

.modal {
  position: relative;
  width: calc(var(--rect-w) * 1px);
  height: calc(var(--rect-h) * 1px);
}

.modal-in .modal {
  animation: modalFadeIn var(--speed) calc(var(--speed) * 1.6) var(--curve) forwards;
}

.modal-out .modal {
  animation: modalFadeOut var(--speed) var(--curve) forwards;
}

@keyframes modalFadeIn {
  0% {
    background-color: transparent;
  }

  100% {
    background-color: var(--clr-about);
  }
}

@keyframes modalFadeOut {
  0% {
    background-color: var(--clr-about);
  }

  100% {
    background-color: transparent;
  }
}


.modal-content {
  position: relative;
  overflow: scroll;
  height: 100%;
  padding-inline: 1em;
  font-size: var(--fs-400);
  opacity: 0;
}

.modal-in .modal-content {
  animation: modalContentFadeIn var(--speed) calc(var(--speed) * 2) var(--curve) forwards;
}

.modal-out .modal-content {
  animation: modalContentFadeOut var(--speed) var(--curve) forwards;
}

@keyframes modalContentFadeIn {
  0% {
    opacity: 0;
    top: -20px;
  }

  100% {
    opacity: 1;
    top: 0;
  }
}

@keyframes modalContentFadeOut {
  0% {
    opacity: 1;
    top: 0px;
  }

  100% {
    opacity: 0;
    top: -20px;
  }
}

.modal-svg {
  position: absolute;
  pointer-events: none;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
}

rect {
  stroke: var(--clr-about);
  stroke-width: 3px;
  stroke-dasharray: calc((var(--rect-w) + var(--rect-h)) * 2);
  stroke-dashoffset: calc((var(--rect-w) + var(--rect-h)) * 2);
}

.modal-in rect {
  animation: sketchIn var(--speed) calc(var(--speed) * 0.6) var(--curve) forwards;
}

.modal-out rect {
  animation: sketchOut var(--speed) var(--curve) forwards;
}


@keyframes sketchIn {
  0% {
    stroke-dashoffset: var(--rect-perimeter);
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes sketchOut {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: var(--rect-perimeter);
  }
}

.project-info {
  display: none;
  flex-direction: column;
}

.project-info span {
  font-weight: 600;
}

.project-info>div:not(:has(a)) {
  text-align: center;
  text-align-last: center;
  font-size: var(--fs-600);
  font-style: italic;
}

.project-info>* {
  margin: 0.4em;
}

.project-info a {
  background-color: var(--clr-back-2);
  color: white;
}