/* Portfolio Project Page Styles */
.portfolio-hero {
  min-height: 60vh;
  background: linear-gradient(135deg, rgba(0,212,255,0.1) 0%, rgba(123,44,191,0.1) 100%), var(--card-bg);
  display: flex;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
}

.portfolio-hero h1 {
  font-size: 3rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tech-badge {
  padding: 0.5rem 1.5rem;
  background: rgba(0,212,255,0.2);
  color: var(--primary-color);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 4rem 0;
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  height: 250px;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.gallery-item img, .gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox img, .lightbox video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  font-size: 3rem;
  color: white;
  cursor: pointer;
}

.project-section {
  background: var(--card-bg);
  padding: 4rem 0;
  margin: 4rem 0;
  border-radius: 20px;
}

.project-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Enhanced Responsive */
@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 992px) {
  .gallery-grid {
    gap: 1.2rem;
  }
  
  .project-tech {
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  .portfolio-hero h1 { 
    font-size: clamp(1.8rem, 6vw, 2.5rem); 
  }
  .gallery-grid { 
    grid-template-columns: 1fr; 
    gap: 1rem;
  }
  
  .gallery-item {
    height: 200px;
  }
  
  .lightbox-content {
    max-width: 95%;
    max-height: 85vh;
  }
}

/* Small Phone (576px) */
@media (max-width: 576px) {
  .portfolio-hero {
    padding: 60px 15px;
  }
  
  .project-buttons {
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .project-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .project-buttons .btn {
    width: 100%;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .gallery-item {
    transition: none;
  }
}

/* Floating Back Button */
.back-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: var(--dark-bg);
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

@media (max-width: 768px) {
  .back-btn {
    bottom: 20px;
    left: 20px;
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
  }
}

