@font-face {
  font-family: "The Centurion";
  src: url("/Centurion.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "AngelWish";
  src: url("/AngelWish.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Germania One";
  src: url("/GermaniaOne.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "YouMurderer BB";
  src: url("/Youmurdererbb-pwoK.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  background: linear-gradient(40deg, black, #1a1a1a, black);
  background-size: 100vw 100vh;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: "AngelWish", "Courier New", Courier, monospace;
  max-width: 100vw;
  max-height: 100vh;
  user-select: none;
  scroll-behavior: smooth;
  cursor: url("cursor.svg"), auto;

  &:has(header.enlarged) .section::after {
    opacity: 0;
  }
}

content {
  margin: 0;
  display: block;
  position: relative;
  max-width: 100vw;
  max-height: 100vh;
  background-color: transparent;
  font-family: "AngelWish", "Courier New", Courier, monospace;
  background-image: url(abby8a.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: top center;
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
  transition: background 1s ease-in-out;
  scroll-snap-type: y mandatory;
}

*::-webkit-scrollbar-track {
  box-shadow: none;
  background: linear-gradient(to top, #1a1a1a, black);
}

*::-webkit-scrollbar {
  border: none;
  width: 7px;
  background-color: transparent;
}

*::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #2a2a2a;
  border: 2px solid #2c2c2c;
}

nav {
  background: linear-gradient(to right, black 20vw, transparent);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;

  ul {
    display: flex;
    width: 100%;
    font-size: 3vh;
    transition: all 0.2s ease-in-out;
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;

    li {
      float: left;

      a {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        transition: all 0.1s ease-in-out;
        gap: 1vh;
        color: white;
        padding: 1vh 1vw;
        text-decoration: none;
        cursor: url(pointer.svg), auto;

        &:hover,
        &.active {
          background: linear-gradient(
            70deg,
            transparent 10%,
            white 10%,
            white 80%,
            transparent 80%
          );
          color: crimson;
        }

        icon {
          background-position: center;
          background-size: 110%;
          filter: invert(1);
          display: block;
          width: 3vh;
          height: 3vh;
          border-radius: 100%;
          transition: all 0.1s ease-in-out;

          &.home {
            background-image: url(home.png);
          }

          &.poems {
            background-image: url(poems.png);
          }
          
          &.items {
            background-image: url(items.png);
          }

          &.circus {
            background-image: url(circus.png);
          }

          &.gallery {
            background-image: url(gallery.png);
          }

          &.about-me {
            background-image: url(about-me.png);
          }
        }

        &:hover icon,
        &.active icon {
          filter: invert(0);
          width: 10vh;
          height: 10vh;
          margin-block: -5vh;
          margin-left: -1vw;
          object-fit: cover;
          box-shadow: 1px 1px 3px #1a1a1a;
        }
      }
    }
  }

  .menu-toggle {
    display: none;
    color: white;
    padding: 14px 16px;
    cursor: url(pointer.svg), auto;

    div {
      width: 25px;
      height: 3px;
      background-color: white;
      margin: 5px 0;
      transition: 0.2s;
    }

    &.change .bar1 {
      transform: rotate(-45deg) translate(-5px, 6px);
    }

    &.change .bar2 {
      opacity: 0;
    }

    &.change .bar3 {
      transform: rotate(45deg) translate(-5px, -6px);
    }
  }
}

.section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  width: 100dvw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: transparent;
  background-attachment: unset;
  position: relative;

  &::after {
    content: "";
    display: block;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(21, 21, 21, 0.7);
    backdrop-filter: blur(5px);
    mix-blend-mode: overlay;
    opacity: 1;
    transition: all 0.1s ease-in-out;
  }

  &:not(.welcome-section) * {
    z-index: 1;
  }
}

.welcome-section {
  color: white;
  text-align: center;
}

.poems-section {
  color: white;
  text-align: center;
  overflow: hidden;
  font-size: 3vh;

  ul {
    list-style-type: none;
    padding: 0;
    width: 100vw;
  }

  li {
    margin: 0;
    cursor: url(pointer.svg), auto;
    transition: color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 0.3vh;
    position: relative;
    margin-block: 5vh;
    background: linear-gradient(
      to right,
      transparent,
      rgba(21, 21, 21, 0.8),
      crimson,
      transparent,
      crimson,
      rgba(21, 21, 21, 0.8),
      transparent
    );
    background-size: 0;
    background-position: center;
    mix-blend-mode: overlay;
    transition: all 0.1s ease-in-out;
    z-index: 1;
  }

  li:hover {
    color: #fad0c4;
    background-size: 100%;
    text-shadow: 0 0 5px rgba(21, 21, 21, 0.8);
  }
}

.slideshow-section {
  color: white;
  overflow: hidden;
}

.about-section {
  color: white;
  text-align: center;
  display: flex;
  align-items: stretch;
  justify-content: center;
  font-size: 2vw;
  position: relative;
}

poem {
  font-size: 2vh;
  background-color: rgba(21, 21, 21, 0.8);
  padding: 0 5vh 10vh 5vh;
  border-radius: 10px 0 0 10px;
  max-height: 80vh;
  box-sizing: border-box;
  margin-top: 15vh;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.8);

  poem-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    p {
      padding: 0;
      margin: 0;
      font-family: "Germania One", "Courier New", Courier, monospace;
    }

    paragraph-break {
      margin: 1.5vh;
    }
  }

  author {
    right: 5vh;
    margin-top: 3vh;
    font-size: 2vh;
    float: right;
  }
}

side-img {
  border-radius: 0 10px 10px 0;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
  max-height: 80vh;
  margin-top: 15vh;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.8);
  z-index: 1;

  img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transform: scale(2) translateY(20%);
  }
}

header {
  font-family: "The Centurion", "Courier New", Courier, monospace;
  position: fixed;
  top: calc((5vw + 5vh) / 2);
  margin-top: 2vh;
  left: 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 2px 2px 0 #1a1a1a;
  font-size: calc((5vw + 5vh) / 2);
  font-weight: 100;
  background: linear-gradient(to right, transparent, #1a1a1a, transparent);
  width: 100vw;
  height: 10px;
  z-index: 5;
  pointer-events: none;
  transition: all 0.1s ease-in-out;
  transition-delay: 0;
  opacity: 0.6;

  &.enlarged {
    top: 50vh;
    font-size: calc((15vw + 15vh) / 2);
    mix-blend-mode: color-dodge;
    transition-delay: 0.1s;
    color: crimson;
    opacity: 1;
  }
}

.bottom {
  position: fixed;
  bottom: 0;
  transition: all 0.2s ease-in-out;
  height: 3vh;
  width: 100vw;
  font-size: 3vh;
  margin-bottom: 1vh;
  z-index: 5;

  .relative {
    position: relative;
    text-align: center;
    width: 100%;
    height: 100%;
    animation-delay: 0.5s;
    animation-duration: 2s;

    .scroll-more {
      position: absolute;
      opacity: 0;
      transition: all 0.2s ease-in-out;
      bottom: 0;
      margin: 0;
      width: 100%;
    }

    .back-to-top {
      position: absolute;
      opacity: 1;
      transition: all 0.2s ease-in-out;
      bottom: 0;
      width: 100%;
      left: 0;
      cursor: url(pointer.svg), auto;
    }
  }
}

.section:has(header.enlarged) {
  .scroll-more {
    opacity: 1;
  }

  .back-to-top {
    opacity: 0;
  }
}

.slideshow-container {
  position: relative;
  width: 100vw;
  margin: auto;
  overflow: hidden;
  height: 100vh; /* Ensure the container takes full height of the viewport */
}

.slideshow-wrapper {
  display: flex;
  animation: slide 30s infinite linear; /* Adjust the duration as needed */
  
  &:not([style*="width"]) {
      display: none;
  }
}

#gallery:has(.slideshow-wrapper[style*="width"]) h2 {
    display: none;
}

#gallery:has(.slideshow-wrapper:not([style*="width"])) .slideshow-container {
    height: 0;
    display: none;
}

.slideshow-slide {
  flex: 0 0 auto; /* Each slide takes the full viewport width */
  height: 70vh;
  margin: 15vh 5vh 15vh 0;
  background-color: #1a1a1a;
}

.focus-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Ensures images cover the container without distortion */
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.8);
  opacity: 0.5;
  transition: opacity 0.5s;
  cursor: url(pointer.svg), auto;
  user-select: none;
  transition: all 0.1s ease-in-out;

  &:hover {
    transform: scale(1.05);
    animation: flicker 0.3s forwards;
  }
}

@keyframes flicker {
  0%,
  20%,
  60%,
  80%,
  100% {
    opacity: 1;
  }
  10%,
  30%,
  70%,
  90% {
    opacity: 0.8;
  }
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* Adjust according to the number of slides */
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes float-up {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.float-element {
  animation: float 10s ease-in-out infinite;
}

.float-up-element {
  animation: float-up 10s ease-in-out infinite;
}

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Ensure overlay is on top */
  backdrop-filter: blur(5px);

  .overlay-content {
    width: 100vw;
    max-height: 100vh;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    position: relative;
    font-size: 3vh;
    overflow-y: auto;

    p {
      font-family: "Germania One", "Courier New", Courier, monospace;
      font-size: 2.5vh;
      max-width: 90vw;
    }
  }

  img {
    max-width: 90vw;
    max-height: 90vh;
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: url(pointer.svg), auto;
  z-index: 1;
}

/* Responsive Styles */
@media screen and (max-aspect-ratio: 1/1) {
  nav {
    background: transparent;

    &:has(.change) {
      background: linear-gradient(to right, black 15vw, transparent);
      backdrop-filter: blur(5px);

      ul {
        display: block;
        opacity: 1;
        height: 100vh;
        transition: all 0.2s ease-in-out;
      }
    }

    ul {
      display: block;
      opacity: 0;
      height: 0;
      flex-direction: column;
      width: 100%;
      font-size: 3vh;
      transition: all 0.2s ease-in-out;
      li {
        &:first-of-type {
          margin-top: 2vh;
        }

        float: none;
        width: 100%;

        a {
          width: 100%;
          text-align: left;
          padding-block: 1.8vh;
          padding-left: 5vw;
          display: flex;
          align-items: center;
          gap: 4vw;
          transition: all 0.1s ease-in-out;

          &:hover,
          &.active {
            background: linear-gradient(to right, transparent 10%, white 10%);
            color: crimson;
          }

          icon {
            background-position: center;
            background-size: 110%;
            filter: invert(1);
            display: block;
            width: 3vh;
            height: 3vh;
            border-radius: 100%;
            transition: all 0.1s ease-in-out;
          }
        }

        .social-links {
          flex-direction: column;
          margin-top: 20px;
          img {
            margin: 5px 0;
          }
        }
      }
    }

    .menu-toggle {
      display: block;
    }
  }

  content {
    background-size: cover;
  }

  side-img {
    display: none;
  }

  poem {
    border-radius: 10px;
    left: 0;
  }
}

div.audio {
  display: block;
  .music-button {
    animation-duration: 8s;
    animation-delay: .2s;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
  }

  .play-pause-icon {
    width: 50px;
    height: 50px;
    position: relative;
    border: 2px solid #444;
    border-radius: 50%;
    background-color: #222;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
  }

  .play-pause-icon::before,
  .play-pause-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
  }

  .play-pause-icon.play::before {
    left: 19px;
    width: 0;
    height: 0;
    border-left: 16px solid #ff0000; /* Red triangle */
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
  }

  .play-pause-icon.play::after {
    display: none;
  }

  .play-pause-icon.pause::before,
  .play-pause-icon.pause::after {
    width: 6px;
    height: 24px;
    background-color: #ff0000; /* Red bars */
  }

  .play-pause-icon.pause::before {
    left: 16px;
  }

  .play-pause-icon.pause::after {
    right: 16px;
  }

  /* Gothic styling */
  .music-button:hover .play-pause-icon {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
  }

  .play-pause-icon::before {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.7);
  }

  .play-pause-icon::after {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.7);
  }
}

.collected-items-section, .circus-section {
  color: white;
  text-align: center;
  overflow: hidden;
  font-size: 3vh;

  ul {
    list-style-type: none;
    padding: 0;
    width: 100vw;
  }

  li {
    margin: 10px 0;
    cursor: url(pointer.svg), auto;
    transition: color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 0.3vh;
    margin-block: 5vh;
    background: linear-gradient(
      to right,
      transparent,
      rgba(21, 21, 21, 0.8),
      crimson,
      transparent,
      crimson,
      rgba(21, 21, 21, 0.8),
      transparent
    );
    background-size: 0;
    background-position: center;
    mix-blend-mode: overlay;
    transition: all 0.1s ease-in-out;
  }

  li:hover {
    color: #fad0c4;
    background-size: 100%;
    text-shadow: 0 0 5px rgba(21, 21, 21, 0.8);
  }
}

.section:not(#about-me) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: transparent;
  background-attachment: unset;
  position: relative;

  h2 {
    color: white;
    font-size: 4vh;
    margin-bottom: 2vh;
  }
}

.welcome-section {
  color: white;
  text-align: center;
}

.poems-section, .collected-items-section, .circus-section {
  color: white;
  text-align: center;
  overflow: hidden;
  font-size: 3vh;

  ul {
    list-style-type: none;
    padding: 0;
    width: 100vw;
  }

  li {
    margin: 10px 0;
    cursor: url(pointer.svg), auto;
    transition: color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 0.3vh;
    margin-block: 5vh;
    background: linear-gradient(
      to right,
      transparent,
      rgba(21, 21, 21, 0.8),
      crimson,
      transparent,
      crimson,
      rgba(21, 21, 21, 0.8),
      transparent
    );
    background-size: 0;
    background-position: center;
    mix-blend-mode: overlay;
    transition: all 0.1s ease-in-out;
    margin-block: 4vh;
    white-space: nowrap;
  }

  li:hover {
    color: #fad0c4;
    background-size: 100%;
    text-shadow: 0 0 5px rgba(21, 21, 21, 0.8);
  }
}

img.cast {
    max-height: 65vh;
}

img:not(.cast) {
    position: relative;
}

#gallery .slideshow-slide {
    display: flex;
    justify-content: flex-end;

    &::after {
        content: attr(data-number);
        position: absolute;
        top: 0;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        font-family: "YouMurderer BB";
        color: #880808;
        font-size: 120px;
        height: 70vh;
        margin: 15vh 0 15vh 0;
        z-index: 1;
        text-shadow: 0 2px black;
        opacity: 0.5;
    }
}
