@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
html {
  scroll-behavior: smooth;
}
body {
  background: black;
  color: white;
  margin: 0;
  padding: 0;
}

#projects {
  padding: 50px 10%;

  text-align: center;
}

#projects h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: white;
  text-transform: uppercase;
}
.pj {
  color: #ffc107;
}
/* Project Grid */
.projects-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(300px, 1fr)
  ); /* Responsive grid */
  gap: 15px; /* Ensure proper spacing between cards */
  justify-content: center;
}

/* Project Cards */
.project-card {
  position: relative;
  width: 100%;
  height: 200px; /* Larger size */
  padding: 20px;
  color: #fff;
  font-size: 1rem;
  font-weight: 200px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Prevents overflow from appearing */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box; /* Prevents overflow */
}

.project-card:hover {
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2); /* Shadow effect */
}

/* Overlay with Gradient */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.096),
    rgba(200, 200, 200, 0.226)
  ); /* Light gradient effect */

  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* Show overlay on hover */
.project-card:hover .overlay {
  opacity: 1;
  transform: scale(1); /* Smoothly reveals the overlay */
}

strong {
  color: black;
  font-weight: 80px;
}

.project-card:hover h3 {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-links {
  margin-top: 15px;
}

.project-links a {
  display: inline-block;
  margin: 5px;
  padding: 8px 16px;
  pointer-events: auto;
  background: #ffd900d0;
  color: rgba(0, 0, 0, 0.692);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 800px;
  transition: background 0.3s;
}

.project-links a:hover {
  background: rgba(0, 0, 0, 0.233);
  color: #ffd900d0;
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr); /* 2 cards per row on tablets */
  }
  .project-card {
    height: 250px;
  }
}

@media screen and (max-width: 768px) {
  .projects-container {
    grid-template-columns: repeat(1, 1fr);
  }
  .project-card {
    height: 220px;
    font-size: 1.2rem;
  }
  .overlay {
    font-size: 1rem;
  }
}
@media screen and (max-width: 480px) {
  .project-card {
    height: 200px;
  }
  .overlay {
    font-size: 0.9rem;
  }
}
