.projects-section {
  display: flex;
  padding: 6rem 5%;
  padding-top: 7rem;
  gap: 4rem;
  align-items: flex-start;
  flex-wrap: wrap;
  font-family: "Poppins", sans-serif;
}
.cloud-column {
  flex: 1;
  min-width: 300px;
  width: 60%;
}

.toggle-container {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.toggle-container button {
  padding: 0.8rem 2rem;
  background: transparent;
  color: #121212;
  border: none;
  font-weight: bold;
  font-size: 1.8rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.toggle-container button.active {
  border-bottom: 2px solid rgb(157, 99, 246);
  color: rgb(157, 99, 254);
  background: rgba(0, 0, 0, 0.055);
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.projects-list ul,
.api-list ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.projects-list li,
.api-list li {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 0.8rem;
  padding: 2rem;
  font-size: 1.8rem;
  color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.074);
  display: inline-flex;
}

.api-list li strong,
.api-list li span {
  font-size: 1.8rem;
}

.api-list li span {
  color: rgb(78, 78, 78);
  font-weight: bold;
}

.api-list li i {
  font-size: 2rem;
  color: rgb(157, 99, 246);
  margin-right: 1rem;
}

.project-item-wrapper {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap;
  transition: flex-direction 0.4s ease;
}

.project-item-wrapper .image-wrapper {
  flex: 1;
  min-width: 40%;
  max-width: 100%;
  background-image: linear-gradient(135deg, #623aa2 25%, #000000 50%, #623aa2 75%, #000000 100%);
  aspect-ratio: 3/2;
  overflow: hidden;
  padding: 0.3rem;
  border-radius: 1rem;
}

.project-item-wrapper .image-wrapper img {
  object-fit: fill;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
}

.project-item-wrapper .text-wrapper {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.project-item-wrapper .text-wrapper h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.project-item-wrapper .text-wrapper p {
  margin-bottom: 2rem;
  font-size: 1.6rem;
  color: #444;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.tech-stack span {
  background: #eee;
  color: #333;
  font-size: 1.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: 0.3s ease;
}

.tech-stack span:hover {
  background-color: rgb(157, 99, 246);
  color: #fff;
}

.project-links {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.project-links .btn {
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  font-size: 1.5rem;
  border-radius: 0.6rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn.live {
  background: linear-gradient(135deg, #6c63ff, #9d63f6);
  color: #fff;
}

.btn.github {
  background: #fff;
  border: 2px solid #9d63f6;
  color: #9d63f6;
}

.btn.github:hover {
  background: #9d63f6;
  color: #fff;
}

.btn.live:hover {
  opacity: 0.9;
}

/* Tablet */
@media (max-width: 1200px) {
  .projects-section {
    flex-direction: column;
    align-items: center;
  }

  .content-left,
  .cloud-column {
    max-width: 100%;
    width: 100%;
  }
  .toggle-container button {
    width: 100%;
    text-align: center;
    font-size: var(--font-paragraph);
  }
  .project-item-wrapper .text-wrapper h1{
    font-size: var(--font-heading);

  }
  .project-links .btn,
  .tech-stack span,
  .project-item-wrapper .text-wrapper p{
    font-size: var(--font-paragraph);
    
  }
  .project-item-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .project-item-wrapper .image-wrapper {
    order: 1;
    width: 100%;
  }

  .project-item-wrapper .text-wrapper {
    order: 2;
    width: 100%;
    padding-top: 1rem;
  }
}

/* Phone */
@media (max-width: 768px) {
  .toggle-container {
    flex-direction: column;
    gap: 1rem;
  }

  .toggle-container button {
    width: 100%;
    text-align: center;
    font-size: var(--font-paragraph);
  }

  .projects-list li,
  .api-list li {
    font-size: 2rem;
    display: block;
  }

  .api-list li i {
    overflow: hidden;
    font-size: 2.5rem;
  }

  .api-list li strong,
  .api-list li span {
    font-size: 2.5rem;
  }

  .api-list li span {
    font-weight: normal;
  }

  .project-item-wrapper .text-wrapper h1 {
    font-size: 3.6rem;
    margin-bottom: 1rem;
  }

  .project-item-wrapper .text-wrapper p {
    font-size: 2.4rem;
    color: #444;
  }

  .project-item-wrapper .text-wrapper span {
    font-size: 2rem;
  }

  .project-links .btn {
    width: 100%;
    text-align: center;
    font-size: 2rem;
  }

  .tech-stack {
    justify-content: flex-start;
  }
}
