:root {
  --primary-bg: #242526;
  --secondary-bg: #f6f3f3;
  --primary-text-color: #000;
  --secondary-text-color: #555;
  --border-radius: 0.5rem;
  --background-color: #edeaea;
  --speed: 200ms;
  --select-color: #33b959;
  --border-color: #e2511f;
  font-family: "Poppins", sans-serif;
  line-height: 2rem;
  word-spacing: 0.3rem;
}
::-webkit-scrollbar {
  visibility: hidden;
}
html {
  scrollbar-width: none; /* Removes scrollbar */
}
ul {
  list-style: none;
}
hr {
  height: 0.5px;
  width: 100%;
  border: none;
  background-color: #000;
  margin: 1rem;
}
a {
  text-decoration: none;
  color: var(--primary-text-color);
  /* font-weight: 500; */
  border-bottom: 1px dashed var(--border-color);
}

a:hover {
  color: var(--select-color);
  border-bottom: 1px solid var(--border-color);
}

body {
  margin: 0 20%;
  padding: 0;
  background-color: var(--secondary-bg);
  color: var(--primary-text-color);
  text-align: justify;
}

body header nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 1rem;
  padding: 1rem;
  gap: 1rem;
}

header nav ul li:first-child {
  font-size: 1.5rem;
  margin-right: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--primary-text-color);
  padding: 0.3rem;
  border-radius: 50%;
}

header nav ul li:first-child img {
  width: 2rem;
  height: auto;
}

header nav ul li:not(:first-child) {
  cursor: pointer;
  transition: all var(--speed) ease-in-out;
  margin: 0;
  font-weight: 500;
  padding: 0.4rem;
  border-radius: 0.2rem;
}

header nav ul li:not(:first-child):hover {
  /* border-bottom: 1px solid var(--border-color); */
  background-color: var(--background-color);
}

.body .about {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.body > .header {
  /* font-size: 2rem; */
  /* font-weight: 500; */
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

header > div > h2 {
  color: var(--secondary-text-color);
}

body .body {
  /* margin: 1rem; */
  padding: 1rem;
}
body .footerinfo {
  padding: 1rem;
  margin: 1rem;
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  gap: 20px;
  justify-content: center; /* Centers the grid horizontally */
  align-items: center; /* Centers the items vertically within their cells */
  margin: 0 auto; /* Centers the grid within the container */
  text-align: center;
  width: 90%; /* Adjust width as needed for your layout */
}

.stack-item img {
  width: 50px;
  height: 50px;
  /* margin-bottom: 10px; */
}

.stack-item p {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.projects {
  text-align: center;
  margin: 2rem;
  display: flex;
  flex-direction: column;
}

.project {
  margin-bottom: 3rem;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-bottom: 1px solid #ccc;
}

.project-title {
  font-size: 1.2rem;
  font-weight: bold;
}

.project-content {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.project-images {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.project-images img {
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-description {
  flex: 2;
  max-width: 700px;
  text-align: left;
}

.project-description ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.project-description p {
  margin: 0.5rem 0;
}

.project-description b {
  font-weight: bold;
}
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  display: none; /* Hidden by default */
}

#backToTop:hover {
  background-color: #555;
}

.stack-item {
  cursor: pointer;
}

.stack-item:hover {
  transform: scale(1.1);
  transition: all 0.2s ease-in-out;
}

.desktop-nav {
  overflow: hidden;
  display: flex;
  /* flex-direction: row; */
}

.desktop-nav li {
  float: left;
  display: block;
  /* color: #f2f2f2; */
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.desktop-nav li.active {
  background-color: #04aa6d;
  color: white;
}

.desktop-nav .icon {
  display: none;
}

@media screen and (max-width: 1024px) {
  body {
    margin: 0 10%;
  }
  .tech-stack {
    grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  }
}

@media screen and (max-width: 768px) {
  body {
    margin: 0 5%;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  .project-content {
    flex-direction: column;
  }
  .project-images img {
    max-width: 100%;
  }
  .desktop-nav li:not(:first-child) {
    display: none;
  }
  .desktop-nav li.icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .desktop-nav.responsive {
    position: relative;
  }

  .desktop-nav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .desktop-nav.responsive li {
    float: none;
    display: block;
    text-align: left;
  }
}

@media screen and (max-width: 480px) {
  .header {
    flex-direction: column;
    text-align: center;
  }
  .tech-stack {
    grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
  }
  .stack-item img {
    width: 40px;
    height: 40px;
  }
}
