* {
  box-sizing: border-box;
}
/* Background */
#projects.section-background {
  position: relative;
  background: transparent;
  height: 100%;
  width: auto;
  z-index: 1;
} 

.projects:nth-child(2) {
  transition-delay: 200ms;
}
.projects:nth-child(3) {
  transition-delay: 400ms;
}
.projects:nth-child(4) {
  transition-delay: 600ms;
}

.projects{
  opacity: 0;
  filter: blur(5px);
  transition: opacity 1s, filter 1s;
}


/* Projects Section */
#projects {
  z-index: 0;
  width: 100%;
}
.proj-head{
  text-align: center;
  font-size: 1.4rem;
  color: #a0a0a0;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.learn-more{
  font-size: .8rem;
}

/* Grid Container */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 10px auto;
  position: relative;
  width: 80%;
  max-width: 1000px;
  gap: 20px;
}

/* Boxes */
.box {
  border-radius: 0.6rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
  width: 100%;
  height: 280px;
}

.box:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.box-text {
  position: relative;
  width: 100%;
  height: 100%;
}

.box-text img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0.6rem;
  filter: brightness(0.2);
}

.box-text::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0.6rem;
  pointer-events: none;
  z-index: 0;
}

.box-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem;
  border-radius: 0.6rem;
  z-index: 1;
}

.box-overlay h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: var(--second-weight);
}

.box-overlay p {
  font-size: 0.95rem;
  font-weight: var(--third-weight);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

/* Pills */
.pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.pill {
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-color);
}

.pill-ml {
  background-color: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: rgb(147, 197, 253);
}
.github-more {
  text-align: center;
  margin-top: 4rem;
}

.github-more a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding-bottom: 3px;
  transition: border-color 0.2s ease;
}

.github-more a:hover {
  border-color: var(--text-color);
}

/* Media Container For Projects Section */
@media (max-width: 850px) {
  .projects {
    width: 90%;
    grid-template-columns: 1fr;
  }
  .proj-head {
    font-size: 1.1rem;
    width: 90%;
    padding: 0 1rem;
  }
  .box {
    height: 200px;
  }
  .box-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
    justify-content: flex-end;
    padding: 1rem;
  }
  .box-overlay h2 {
    font-size: 1.2rem;
  }
  .box-overlay p {
    display: none;
  }
  .live-badge {
    display: flex !important;
  }
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.8rem;
  color: #4ade80;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
