/* ==========================================================================
   PROJECT DETAIL PAGE STYLES - MODERN MAGAZINE LAYOUT
   ========================================================================== */

/* ==========================================================================
   1. PROJECT HERO SECTION
   ========================================================================== */

.project-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(16, 185, 129, 0.05) 0%,
    rgba(59, 130, 246, 0.05) 100%
  );
}

.project-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 0.8s ease-out;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: fadeIn 1s ease-out 0.2s backwards;
}

.project-type-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--color-emerald-500), var(--color-emerald-600));
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
}

.project-date {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-gray-700);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.tech-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--color-blue-600);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.project-title {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-gray-900);
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.project-description {
  font-size: var(--font-size-xl);
  line-height: 1.7;
  color: var(--color-gray-600);
  margin: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.project-hero-image {
  position: relative;
  width: 100%;
  max-width: 1200px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 1s ease-out 0.4s backwards;
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-hero-image:hover {
  transform: scale(1.02);
}

.project-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
}

/* ==========================================================================
   2. PROJECT CONTENT LAYOUT
   ========================================================================== */

.project-content {
  position: relative;
  padding: 4rem 0 6rem;
  background: var(--color-white);
}

.project-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Main Content Area */
.project-main {
  min-width: 0;
  animation: fadeIn 0.8s ease-out 0.6s backwards;
}

/* ==========================================================================
   3. CONTENT SECTIONS
   ========================================================================== */

.content-section {
  margin-bottom: 4rem;
  animation: fadeInUp 0.8s ease-out backwards;
  animation-delay: calc(var(--section-index, 0) * 0.1s);
}

.content-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--color-emerald-500);
  display: inline-block;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-gray-800);
  margin: 2rem 0 1rem 0;
}

.section-content {
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-gray-700);
}

.section-content p {
  margin-bottom: 1.25rem;
}

.section-content ul,
.section-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.section-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.section-content li::marker {
  color: var(--color-emerald-500);
  font-weight: 600;
}

/* ==========================================================================
   4. IMAGE GALLERY & CONTENT BLOCKS
   ========================================================================== */

.image-gallery {
  margin: 3rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Feature Highlights */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-emerald-500);
}

.feature-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-gray-900);
  margin: 0 0 0.75rem 0;
}

.feature-description {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-gray-600);
}

/* Code Blocks */
pre {
  background: var(--color-gray-900);
  color: var(--color-gray-100);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

/* Video Embeds */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  margin: 3rem 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   5. ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   6. PARTICLES CANVAS
   ========================================================================== */

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .project-hero {
    min-height: 60vh;
    padding: 6rem 1.5rem 3rem;
  }

  .project-title {
    font-size: var(--font-size-4xl);
  }

  .project-description {
    font-size: var(--font-size-lg);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .project-hero {
    min-height: auto;
    padding: 5rem 1rem 2rem;
  }

  .project-hero-content {
    margin-bottom: 2rem;
  }

  .project-title {
    font-size: var(--font-size-3xl);
  }

  .project-description {
    font-size: var(--font-size-base);
  }

  .project-meta {
    gap: 0.5rem;
  }

  .project-type-badge,
  .project-date,
  .tech-tag {
    font-size: var(--font-size-xs);
    padding: 0.4rem 0.9rem;
  }

  .project-hero-image {
    border-radius: var(--radius-lg);
  }

  .project-hero-image img {
    max-height: 400px;
  }

  .project-container {
    padding: 0 1rem;
  }

  .project-content {
    padding: 2rem 0 4rem;
  }

  .content-section {
    margin-bottom: 2.5rem;
  }

  .section-title {
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
  }

  .section-subtitle {
    font-size: var(--font-size-lg);
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
  .project-hero {
    padding: 4rem 1rem 1.5rem;
  }

  .project-title {
    font-size: var(--font-size-2xl);
  }

  .project-description {
    font-size: var(--font-size-sm);
  }

  .project-meta {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: var(--font-size-lg);
  }
}

/* ==========================================================================
   8. PRINT STYLES
   ========================================================================== */

@media print {
  .wave-background,
  #particles-canvas {
    display: none;
  }

  .project-hero {
    min-height: auto;
    page-break-after: avoid;
  }

  .content-section {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   9. UTILITY CLASSES
   ========================================================================== */

.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
