/* ══════════════════════════════════════════════
   project.css — Project Detail Page Styling
   ══════════════════════════════════════════════ */

.project-detail-page {
  min-height: 100vh;
  padding: 100px 20px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted, #94a3b8);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--accent, #6366f1);
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

.project-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.project-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-detail-icon svg {
  width: 32px;
  height: 32px;
  color: #818cf8;
}

.project-detail-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.project-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-detail-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.detail-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.detail-link-btn.live {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.detail-link-btn.live:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.detail-link-btn.github {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.detail-link-btn.github:hover {
  border-color: #818cf8;
  color: #818cf8;
}

.detail-link-btn svg {
  width: 16px;
  height: 16px;
}

/* Content sections */
.detail-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6366f1;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section-title svg {
  width: 14px;
  height: 14px;
}

.detail-section p {
  color: #cbd5e1;
  line-height: 1.75;
  font-size: 0.95rem;
}

/* Tech tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

/* Photo Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s;
  aspect-ratio: 16/9;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1000;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: rgba(99, 102, 241, 0.4);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-title {
  height: 40px;
  width: 60%;
  margin-bottom: 12px;
}

.skel-text {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skel-text.w70 {
  width: 70%;
}

/* Error */
.error-box {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.error-box h2 {
  color: #e2e8f0;
  margin-bottom: 12px;
}

@media(max-width: 600px) {
  .project-detail-title {
    font-size: 1.4rem;
  }
  .photo-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .project-detail-page {
    padding-top: 80px;
  }
}
