/* Projects Section */
.projects {
  min-height: auto;       
  display: block;
  padding: 60px 10%;
}

/* .section-title, */
.project-card 
{
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;

}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: visible;
   background: var(--card-bg-light);
  transition: 
    transform 0.3s ease, 
    box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.project-image {
  position: relative;
  height: 280px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}


.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0.5)
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-overlay h3{
  opacity: 0;
  animation: fadeInUp 0.3s ease 0.3s forwards;
}

.project-card:hover .project-overlay p{
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.6s forwards;
}

.project-title {
  font-size: 1.3rem;
  padding: 10px 20px;
  color: var(--text-primary);
  margin: 0 auto;
  border-radius: 0 0 16px 16px;
}

.project-overlay h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #E0E0E0 ;
}

.project-overlay p {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #E0E0E0;
  
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}


.project-card:hover .project-overlay .tech-stack {
  opacity: 0;
  animation: iconPop 0.8s ease 0.5s forwards;
}

@keyframes iconPop {
  0% {
      transform: scale(0.85) rotate(-8deg);
      opacity: 0.5;
  }
  50% {
      transform: scale(1.3) rotate(20deg);
  }
  100% {
      transform: scale(1) rotate(0deg);
      opacity: 1;
  }
}

.tech-stack span {
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #E0E0E0;
}

.tech-stack span:hover {
  background: #E0E7FF;
  color: #1E72CD;
  transition: 0.6s;
}

.project-links a {
  margin-right: 15px;
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-links a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* badge for 🚧 Under Development project*/
.status-badge {
    background: linear-gradient(45deg, #ff9800, #ff5722);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}



/*===============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   =============================================== */

/* ================= LARGE DESKTOP (1024px) ================= */
@media (max-width: 1024px) {

  .projects {
    padding: 60px 6%;
  }

  .project-grid {
    gap: 25px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

  .project-image {
    height: 260px;
  }

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

/*================= MOBILE LANDSCAPE ( 768px) ================= */
@media (max-width: 768px) {

  .projects {
    padding: 50px 5%;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .project-image {
    height: 220px;
  }

  .project-overlay {
    padding: 16px;
  }

  .project-overlay h3 {
    font-size: 1.2rem;
  }

  .project-overlay p {
    font-size: 0.9rem;
  }
}

/*================= SMALL MOBILE (375px - 480px) ================= */
@media (max-width: 480px) {

  .projects {
    padding: 40px 4%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-image {
    height: 200px;
  }

  .project-title {
    font-size: 1.1rem;
    padding: 8px 15px;
  }

  .tech-stack span {
    font-size: 0.7rem;
  }

  .project-links a {
    font-size: 0.9rem;
  }
}


/*================= EXTRA SMALL MOBILE (320px - 375px) ================= */
@media (max-width: 375px) {

  .project-image {
    height: 180px;
  }

  .project-overlay h3 {
    font-size: 1rem;
  }

  .project-overlay p {
    font-size: 0.8rem;
  }

  .tech-stack {
    gap: 6px;
  }

  .tech-stack span {
    padding: 4px 8px;
  }
}
