.h1-bg-img {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 1.777;
    display: flex;
    justify-content: center;
    align-items: center;
}

.picture-text {
    display: flex;
    justify-content: center;
}

.picture-text-reverse {
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
}

.h1-bg-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.h1-bg-img h1 {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 0;
}

.description {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 2rem;
    max-width: 600px;
    width: 90%;
}

.description > * {
  margin: 8px 0 8px 0;
}

@media (max-width: 1300px) {
    .aboutme-section {
        flex-direction: column;
        align-items: center;
    }
}

.projects-button {
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    text-decoration: none;
    padding: 1rem;
    width: fit-content;
    border: 2px solid black;
    border-radius: 8px;
    cursor: pointer;
    align-self: center;
    scale: 1; /* Needed to keep image size correct */
    transition:
      background-color 0.1s,
      scale 0.5s ease,
      box-shadow 0.5s ease;
    overflow: hidden;
}

.projects-button:hover {
    background-color: var(--highlight-color-low);
    animation:
      projects-intro 1.2s,
      projects-loop 4s 1.2s infinite;
    scale: 1.1;
    box-shadow: 0 0 10px 5px var(--highlight-color-low);
}

.projects-button:hover img {
    display: block;
    animation:
      projects-img-intro 1.2s,
      projects-img-loop 4s 1.2s infinite;
}

.p-bg-img img {
    display: none;
    position: absolute;
    top: -25px;
    left: -25px;
    width: 150%;
    z-index: 1;
}

.p-bg-img p {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 0;
}

.projects-button:hover div {
    display: block;
}

.projects-button div {
    display: none;
    position: absolute;
    top: -10px;
    left: -10px;
    background-color: rgba(0, 0, 0, 0.2);
    width: 150%;
    height: 150%;
    z-index: 2;
}

/* TODO: Replace the background color changes with image changes */
@keyframes projects-intro {
  0% {
    animation-timing-function: step-end;
    box-shadow: 0 0 1px 0px var(--projects-color1);
  }

  5% {
    animation-timing-function: step-end;
    box-shadow: 0 0 5px 1px var(--projects-color2);
  }

  15% {
    animation-timing-function: step-end;
    box-shadow: 0 0 7px 2px var(--projects-color3);
  }

  30% {
    animation-timing-function: step-end;
    box-shadow: 0 0 9px 2px var(--projects-color4);
  }

  60% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color2);
  }

  100% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color2);
  }
}

@keyframes projects-loop {
  0% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color1);
  }

  25% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color2);
  }

  50% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color3);
  }

  75% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color4);
  }

  100% {
    animation-timing-function: step-end;
    box-shadow: 0 0 10px 2px var(--projects-color1);
  }
}

@keyframes projects-img-intro {
  0% {
    content: var(--projects-img1);
    animation-timing-function: step-end;
  }

  5% {
    content: var(--projects-img2);
    animation-timing-function: step-end;
  }

  15% {
    content: var(--projects-img3);
    animation-timing-function: step-end;
  }

  30% {
    content: var(--projects-img4);
    animation-timing-function: step-end;
  }

  60% {
    content: var(--projects-img2);
    animation-timing-function: step-end;
  }

  100% {
    content: var(--projects-img2);
    animation-timing-function: step-end;
  }
}

@keyframes projects-img-loop {
  0% {
    content: var(--projects-img1);
    animation-timing-function: step-end;
  }

  25% {
    content: var(--projects-img2);
    animation-timing-function: step-end;
  }

  50% {
    content: var(--projects-img3);
    animation-timing-function: step-end;
  }

  75% {
    content: var(--projects-img4);
    animation-timing-function: step-end;
  }

  100% {
    content: var(--projects-img1);
    animation-timing-function: step-end;
  }
}

/* animate-on-view is already applied to element at load time so we are using this to initialize the proper values to avoid flickering*/
.about-me.animate-on-view {
    opacity: 0;
}

.about-me {
    margin-top: 30px;
}

.about-me.animate-in {
    animation-name: slide-in-left;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

/* animate-on-view is already applied to element at load time so we are using this to initialize the proper values to avoid flickering*/
.self-description.animate-on-view {
    opacity: 0;
}

.self-description.animate-in {
    animation-name: slide-in-right;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

/* animate-on-view is already applied to element at load time so we are using this to initialize the proper values to avoid flickering*/
.my-skills.animate-on-view {
    opacity: 0;
}
.my-skills.animate-in {
    animation-name: slide-in-right;
    animation-duration: 1s;
    animation-delay: 0.5s;
    animation-fill-mode: forwards;
}

/* animate-on-view is already applied to element at load time so we are using this to initialize the proper values to avoid flickering*/
.skill-description.animate-on-view {
    opacity: 0;
}

.skill-description.animate-in {
    animation-name: slide-in-left;
    animation-duration: 1s;
    animation-delay: 0.2s;
    animation-fill-mode: forwards;
}

@keyframes slide-in-left {
    from {
        translate: -200px 0;
        opacity: 0;
    }
    
    to {
        translate: 0 0;
        opacity: 1;
    }
}

@keyframes slide-in-right {
    from {
        translate: 200px 0;
        opacity: 0;
    }
    
    to {
        translate: 0 0;
        opacity: 1;
    }
}

.description .skill-list {
  justify-content: center;
}