/* ! HTML Elements */

* {
  border: 0;
  line-height: 1;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile devices */
}

body {
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-image: url("assets/moon_phase.webp"); /* Fallback background color: black */
  background-repeat: no-repeat;
  background-position: center;
  background-size: 200%; /* Relative to the size of the current element */
  font-family: "Ubuntu", sans-serif;
  font-size: 100%; /* Defaults to 16px */
}

button {
  cursor: pointer;
  background: transparent;
  font-family: inherit; /* Form elements don't inherit font settings by default */
}

/* ! Global Classes */

.flex-column {
  display: flex;
  flex-direction: column;
}

.cloud-white-color {
  color: #e8e6e3;
}

.black-bg-color {
  background-color: #000000;
}

.charcoal-gray-bg-color {
  background-color: #222222;
}

.graphite-gray-bg-color {
  background-color: #333333;
}

.ash-gray-bg-color {
  background-color: #444444;
}

/* ! Main Section */

.index-container,
.sub-project-container {
  position: relative;
  border: 2px solid #777777; /* width | style | color */
  border-radius: 15px;
  padding: 4px;
  row-gap: 4px;
  overflow: hidden; /* Clip the .backdrop to the correct dimensions */
}

.backdrop {
  position: absolute;
  inset: 0; /* Instead of: top, right, bottom, left | Fill the entire .index-container */
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  transition: opacity 0.3s linear; /* Fade-out effect */
}

.sub-project-container {
  position: absolute;
  transform: translate(-2px, -2px); /* Compensate for the .index-container border */
}

.index-element {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 65px;
  width: 270px;
  border-radius: 10px;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.index-element:hover {
  background-color: #e8e6e3;
  color: #333333;
}

.project-title {
  font-size: 1.2rem;
  font-weight: bold;
}

/* ! Layout Manipulation */

.hidden {
  display: none;
}

.visually-hidden {
  opacity: 0;
}

.visible {
  opacity: 1;
  animation: fade-in 0.3s linear;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* ! Scrollbar Styling */

::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #555555;
}

::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: #b9bbb6;
}

::-webkit-scrollbar-corner {
  width: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #e8e6e3;
}

/* ! Media Queries */

@media screen and (min-width: 576px) {
  body {
    background-size: 56%; /* Relative to the size of the current element */
  }

  .index-element {
    height: 75px;
    width: 320px;
  }

  .project-title {
    font-size: 1.4rem;
  }
}
