/* ==================== PROJECTS PAGE STYLES ==================== */

.projects-section {
  padding: 120px 0 80px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.projects-section .container {
  position: relative;
  z-index: 2;
}

.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInDown 1s ease;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary-color);
  background: var(--card-bg);
  color: var(--primary-color);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--glow-md);
}

.filter-btn i {
  font-size: 1.125rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  border: 2px solid rgba(0, 217, 255, 0.1);
  animation: fadeInUp 0.8s ease;
  backdrop-filter: blur(10px);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glow-lg);
  border-color: var(--primary-color);
}

.project-card.hide {
  display: none;
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: var(--gradient-primary);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: white;
  background: var(--gradient-primary);
  transition: all var(--transition-speed) ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 217, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition-speed) ease;
}

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

.overlay-content {
  display: flex;
  gap: 1rem;
  transform: translateY(20px);
  transition: all var(--transition-speed) ease;
}

.project-card:hover .overlay-content {
  transform: translateY(0);
}

.project-link {
  width: 50px;
  height: 50px;
  background: var(--dark-bg);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.project-link:hover {
  transform: scale(1.2) rotate(360deg);
  box-shadow: var(--glow-md);
}

.project-info {
  padding: 2rem;
}

.project-category {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-iot {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.badge-ece {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.badge-web {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.badge-ml {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  color: white;
}

.project-title {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  transition: all var(--transition-speed) ease;
}

.project-card:hover .project-title {
  color: var(--primary-color);
}

.project-description {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  padding: 0.5rem 1rem;
  background: rgba(0, 217, 255, 0.1);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  border: 1px solid rgba(0, 217, 255, 0.2);
}

.tech-tag:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(0, 217, 255, 0.1);
}

.project-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-date i {
  color: var(--primary-color);
}

.view-details {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed) ease;
}

.view-details:hover {
  gap: 0.75rem;
}

.view-details i {
  transition: all var(--transition-speed) ease;
}

.view-details:hover i {
  transform: translateX(5px);
}

/* Project Card Animation Stagger */
.project-card:nth-child(1) {
  animation-delay: 0.1s;
}

.project-card:nth-child(2) {
  animation-delay: 0.2s;
}

.project-card:nth-child(3) {
  animation-delay: 0.3s;
}

.project-card:nth-child(4) {
  animation-delay: 0.4s;
}

.project-card:nth-child(5) {
  animation-delay: 0.5s;
}

.project-card:nth-child(6) {
  animation-delay: 0.6s;
}

.project-card:nth-child(7) {
  animation-delay: 0.7s;
}

.project-card:nth-child(8) {
  animation-delay: 0.8s;
}

/* Gradient Variations for Image Placeholders */
.project-card:nth-child(8n+1) .image-placeholder {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-card:nth-child(8n+2) .image-placeholder {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.project-card:nth-child(8n+3) .image-placeholder {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.project-card:nth-child(8n+4) .image-placeholder {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.project-card:nth-child(8n+5) .image-placeholder {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.project-card:nth-child(8n+6) .image-placeholder {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.project-card:nth-child(8n+7) .image-placeholder {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.project-card:nth-child(8n+8) .image-placeholder {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

/* Responsive Design */
@media (max-width: 968px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .project-filters {
    gap: 0.75rem;
  }

  .filter-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-image {
    height: 200px;
  }

  .image-placeholder {
    font-size: 4rem;
  }
}

@media (max-width: 480px) {
  .projects-section {
    padding: 100px 0 60px;
  }

  .project-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-btn {
    justify-content: center;
  }

  .project-info {
    padding: 1.5rem;
  }

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

  .project-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* Loading Animation */
@keyframes projectLoad {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.project-card.show {
  animation: projectLoad 0.6s ease forwards;
}