* {
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

:root {
  --main-bg-color: #121212;
  --secondary-color: #ff4500;
  --stroke-color: #3e4142;
  --text-color: #f2f2f2;
  --modal-color: #181c1f;
  --footer-nav-color: #0e1113;
  --descriptional-color: #b8c5c9;
  --button-color: #2a3236;
  --wasd-arrow: #2a3236;
  --project-nothovered: rgba(255, 69, 0, 0.25);
}

/* added height margin and overflow hidden */
body {
  background-color: var(--main-bg-color);
  background-image: url(../images/bg.svg);
  background-repeat: no-repeat;
  user-select: none;
  margin: 0;
  height: 100vh;
  overflow: auto;
}

.nav-container {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--footer-nav-color);
  border-bottom: var(--stroke-color) solid 1px;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 74px;
}

.navbar-text ul li {
  margin-right: 57px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  color: var(--text-color);
  font-size: 24px;
  list-style: none;
  display: inline-flex;
  transition: color 0.1s ease;
  position: relative;
}

.project-content {
  position: relative;
  display: flex;
  justify-content: start;
  flex-direction: column;
}

.project-text {
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  color: var(--text-color);
  text-overflow: ellipsis;
  text-align: center;
  padding: 20px;
  gap: 12px;
}

.project-text h3 {
  font-size: 24px;
  color: var(--secondary-color);
}

.navbar-text ul li.active a {
  color: var(--secondary-color);
}

.navbar-text li a:hover {
  color: var(--secondary-color);
}

.navbar-text ul li .icon {
  display: none; /* Hide by default */
  position: absolute;
  bottom: -10px; /* Adjust as needed for spacing */
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 8px;
}

.navbar-text ul li.active .icon {
  display: block;
}

.navlogo {
  margin-left: 35px;
  margin-top: 14px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 36px;
  margin-top: 27px;
  height: 100%;
  display: flex;
}

.navlogo a {
  text-decoration: none;
  color: var(--secondary-color);
}

.navbar-text li a {
  text-decoration: none;
  color: var(--text-color);
}

.footer-container {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 21px;
  width: 100%;
  background-color: var(--footer-nav-color);
  border-top: var(--stroke-color) solid 1px;
  height: 32px;
  z-index: 2;
}

.footerlinks {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.footerlinks li {
  list-style: none;
}

.divider {
  display: flex;
  width: 2px;
  background-color: var(--secondary-color);
}

.mail-icon-wrapper {
  display: flex;
  align-items: center;
}

.github-icon-wrapper {
  display: flex;
  align-items: center;
}

.title {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 34px;
  color: var(--text-color);
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.description {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 22px;
  color: var(--text-color);
  text-overflow: ellipsis;
  max-width: 300px;
}

.projects-container {
  display: flex;
  flex-direction: row;
  height: calc(100dvh - 75px - 75px);
  margin: 180px 180px 180px;
  gap: 104px;
  justify-content: center;
}

/* COMPONENTS SECTION  */
.main-container {
  display: grid;
  grid-template-columns: repeat(3, 250px);
  gap: 52px;
  padding: 0;
}

.container {
  position: relative;
  width: 250px;
  height: 256px;
  margin: 0;
}

.box {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  background-color: var(--modal-color);
  z-index: 1;
  border: 1px solid var(--stroke-color);
  cursor: pointer;
  align-content: center;
}

.box-behind {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  border: 1px solid var(--project-nothovered);
  background-color: var(--modal-color);
  z-index: 1;
  transition: border-color 0.3s ease;
  cursor: pointer;
}

.container:hover .box-behind {
  border-color: var(--secondary-color);
}

/* #center-box {
  border: 1px solid var(--default-border-color); 
  transition: border-color 0.3s ease; 
}

.container#center-box:hover {
  border-color: var(--secondary-color); 
} */
/* END OF COMPONENTS SECTION */

/* width */
::-webkit-scrollbar {
  width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--main-bg-color); /* Fully transparent */
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 25px;
}

main {
  overflow-y: auto; /* Allow vertical scrolling in main */
  padding-bottom: 75px; /* Space for the fixed footer */
  height: calc(100vh - 75px - 75px); /* Height for main content area */
}

.pagination {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 52px;
  margin: 56px;
  padding-bottom: 100px;
}

.page-left,
.page-right {
  cursor: not-allowed;
}

.navlogo-footer {
  display: none;
}

.hamburger-menu {
  display: none;
}

.M-icon {
  display: none;
}

.m-navbar {
  display: none;
}

@media screen and (max-width: 768px) {
  .title {
    text-align: center;
  }

  ::-webkit-scrollbar {
    width: 1px;
  }

  .title-container {
    position: relative;
    top: -15%;
  }
  .projects-container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    margin-bottom: 0;
    gap: 50px;
  }

  .project-content {
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    top: -10%;
  }
  .pagination {
    display: none;
    margin: 0;
    position: relative;
    padding: 0;
    left: 3px;
    margin-bottom: 20%;
  }

  .main-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-column-gap: 36px;
    grid-row-gap: 36px;
    margin-bottom: 20%;
  }

  .container {
    width: 250px;
    height: 256px;
  }

  .description {
    margin-top: 30px;
    /* margin-bottom: 30px; */
    text-align: center;
  }

  .line {
    display: none;
  }

  .nav-container {
    display: none;
    justify-content: center;
    position: absolute;
    height: 100%;
    top: 100px;
    width: 100%;
    border: none;
    visibility: hidden;
  }

  .navbar-text ul {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Align items in the center horizontally */
    justify-content: center; /* Align items in the center vertically */
    height: 100%;
    gap: 60px;
  }

  .navbar-text {
    z-index: 15;
    top: -250px;
    font-size: 25px;
    left: 88%;
  }

  .navbar {
    height: 0;
    width: 0;
  }

  .m-navbar li.active {
    color: var(--secondary-color); /* Change text color */
    font-weight: 600;
    position: relative;
  }

  /* Show underline SVG */
  .m-navbar li.active img {
    display: block; /* Ensure it's visible */
  }

  /* Hide underline SVG for non-active items */
  .m-navbar li img {
    display: none;
  }

  .m-navbar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;
    position: absolute;
    align-items: center;
    color: var(--text-color);
    left: 50%;
    width: 100%;
    top: 35%;
    transform: translate(
      -50%,
      -50%
    ); /* Shifts it back by half its own width & height */
    text-align: center;
    list-style: none;
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Initially hidden */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Smooth transition */
  }

  .m-navbar.openm {
    opacity: 1; /* Make visible when opened */
    visibility: visible; /* Ensure visible when opened */
  }

  .m-navbar li {
    display: flex;
    flex-direction: column; /* Stack icon below the text */
    align-items: center;
    padding: 30px;
    font-size: 30px !important;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    opacity: 0; /* Initially hidden */
    transform: translateY(-20px); /* Slightly move the elements up */
    animation: fadeIn 0.8s ease forwards; /* Add fade-in animation */
    animation-delay: 0.8s; /* Wait 1 second before starting animation */
  }

  .m-navbar li:nth-child(1) {
    animation-delay: 1s; /* Delay for each item */
  }

  .m-navbar li:nth-child(2) {
    animation-delay: 1.2s; /* Delay for each item */
  }

  .m-navbar li:nth-child(3) {
    animation-delay: 1.4s; /* Delay for each item */
  }

  .m-navbar li:nth-child(4) {
    animation-delay: 1.6s; /* Delay for each item */
  }

  .m-navbar li img {
    padding-top: 5px;
  }

  /* Keyframes for fadeIn animation */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px); /* Start from above */
    }
    to {
      opacity: 1;
      transform: translateY(0); /* End at the normal position */
    }
  }

  .footer-container {
    padding: 21px 0px;
  }

  .navlogo-footer {
    visibility: visible;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 30px;
    height: 100%;
    width: fit-content;
    display: flex;
  }

  .footerlinks {
    justify-content: space-between;
    width: 100%;
    padding: 0px 21px;
  }

  .divider {
    display: none;
  }
}

/* TEMPORARY MAIN NONE */
@media screen and (max-width: 768px) {
  .hamburger-menu {
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-left: 1px solid var(--stroke-color);
    border-right: 1px solid var(--stroke-color);
    border-top: 1px solid var(--stroke-color);
    border-bottom: none;
    background-color: var(--footer-nav-color);
    width: 56px;
    height: 30px;
    position: absolute;
    top: 0px;
    display: flex;
    align-items: end;
    justify-content: center;
    left: 50%;
    transform: rotate(360deg) translateY(-98%) translateX(-50%);
    cursor: pointer;
    z-index: 10;
  }

  .hamburger-menu img {
    width: 30px;
    height: 20px;
    /* transform: rotate(180deg) translateY(100%); */
  }

  .open {
    height: 85%;
    display: flex;
    align-items: end;
    transition: height 0.4s ease-in-out;
  }

  .close {
    display: flex;
    align-items: end;
    transition: height 0.4s ease-in-out;
  }
}

@media screen and (max-width: 1300px) {
  .title {
    text-align: center;
  }

  .hamburger-menu {
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-left: 1px solid var(--stroke-color);
    border-right: 1px solid var(--stroke-color);
    border-top: 1px solid var(--stroke-color);
    border-bottom: none;
    background-color: var(--footer-nav-color);
    width: 56px;
    height: 30px;
    position: absolute;
    top: 0px;
    display: flex;
    align-items: end;
    justify-content: center;
    left: 50%;
    transform: rotate(360deg) translateY(-98%) translateX(-50%);
    cursor: pointer;
    z-index: 10;
  }

  .hamburger-menu img {
    width: 30px;
    height: 20px;
    /* transform: rotate(180deg) translateY(100%); */
  }

  .open {
    height: 85%;
    display: flex;
    align-items: end;
    transition: height 0.4s ease-in-out;
  }

  .close {
    display: flex;
    align-items: end;
    transition: height 0.4s ease-in-out;
  }
  ::-webkit-scrollbar {
    width: 1px;
  }

  .title-container {
    position: relative;
    top: -15%;
  }
  .projects-container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    margin-bottom: 0;
    gap: 50px;
  }

  .project-content {
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    top: -10%;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    color: var(--text-color);
    text-overflow: ellipsis;
  }
  .pagination {
    margin: 0;
    position: relative;
    padding: 0;
    left: 3px;
    margin-bottom: 20%;
  }

  .main-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-column-gap: 36px;
    grid-row-gap: 36px;
    margin-bottom: 20%;
  }

  .container {
    width: 250px;
    height: 256px;
  }

  .description {
    margin-top: 30px;
    /* margin-bottom: 30px; */
    text-align: center;
  }

  .line {
    display: none;
  }

  .nav-container {
    display: none;
    justify-content: center;
    position: absolute;
    height: 100%;
    top: 100px;
    width: 100%;
    border: none;
    visibility: hidden;
  }

  .navbar-text ul {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Align items in the center horizontally */
    justify-content: center; /* Align items in the center vertically */
    height: 100%;
    gap: 60px;
  }

  .navbar-text {
    z-index: 15;
    top: -250px;
    font-size: 25px;
    left: 88%;
  }

  .navbar {
    height: 0;
    width: 0;
  }

  .m-navbar li.active {
    color: var(--secondary-color); /* Change text color */
    font-weight: 600;
    position: relative;
  }

  /* Show underline SVG */
  .m-navbar li.active img {
    display: block; /* Ensure it's visible */
  }

  /* Hide underline SVG for non-active items */
  .m-navbar li img {
    display: none;
  }

  .m-navbar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;
    position: absolute;
    align-items: center;
    color: var(--text-color);
    left: 50%;
    width: 100%;
    top: 35%;
    transform: translate(
      -50%,
      -50%
    ); /* Shifts it back by half its own width & height */
    text-align: center;
    list-style: none;
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Initially hidden */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Smooth transition */
  }

  .m-navbar.openm {
    opacity: 1; /* Make visible when opened */
    visibility: visible; /* Ensure visible when opened */
  }

  .m-navbar li {
    display: flex;
    flex-direction: column; /* Stack icon below the text */
    align-items: center;
    padding: 30px;
    font-size: 30px !important;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    opacity: 0; /* Initially hidden */
    transform: translateY(-20px); /* Slightly move the elements up */
    animation: fadeIn 0.8s ease forwards; /* Add fade-in animation */
    animation-delay: 0.8s; /* Wait 1 second before starting animation */
  }

  .m-navbar li:nth-child(1) {
    animation-delay: 1s; /* Delay for each item */
  }

  .m-navbar li:nth-child(2) {
    animation-delay: 1.2s; /* Delay for each item */
  }

  .m-navbar li:nth-child(3) {
    animation-delay: 1.4s; /* Delay for each item */
  }

  .m-navbar li:nth-child(4) {
    animation-delay: 1.6s; /* Delay for each item */
  }

  .m-navbar li img {
    padding-top: 5px;
  }

  /* Keyframes for fadeIn animation */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px); /* Start from above */
    }
    to {
      opacity: 1;
      transform: translateY(0); /* End at the normal position */
    }
  }

  .footer-container {
    padding: 21px 0px;
  }

  .navlogo-footer {
    visibility: visible;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 30px;
    height: 100%;
    width: fit-content;
    display: flex;
  }

  .footerlinks {
    justify-content: space-between;
    width: 100%;
    padding: 0px 21px;
  }

  .divider {
    display: none;
  }
}
