/* Individual Project Page Styles */

/* Constrain the full layout to readable width */
.page-layout-full .quarto-container,
.page-layout-full #quarto-content,
.page-layout-full main.content {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Grid should use full available width */
.grid {
  max-width: 100% !important;
  width: 100% !important;
}

/* Ensure content columns are properly sized */
.column-page,
.column-body,
.column-screen {
  max-width: 100% !important;
}

/* Extra wide screens */
@media (min-width: 1600px) {
  .page-layout-full .quarto-container,
  .page-layout-full #quarto-content,
  .page-layout-full main.content {
    max-width: 1600px !important;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .page-layout-full .quarto-container,
  .page-layout-full #quarto-content,
  .page-layout-full main.content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Make project subtitle bold */
header .description {
  font-weight: 700 !important;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bs-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--bs-body-color);
  font-weight: 400;
  line-height: 1.6;
}

.project-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Image gallery styling */
.project-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* YouTube embed styling */
.project-content iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.project-content {
  line-height: 1.8;
}

.project-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--bs-primary);
}

.project-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--bs-body-color);
}

.project-content ul,
.project-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.project-content li {
  margin-bottom: 0.5rem;
}

.back-link {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bs-border-color);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bs-primary-bg-subtle);
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary);
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Gallery Grid Styles - matching maps-and-infographics.css */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.gallery-item figure {
  margin: 0;
}

.gallery-item figcaption {
  padding: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #666;
  background: white;
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .tech-tag {
    background: rgba(13, 110, 253, 0.15);
    border-color: #6ea8fe;
    color: #6ea8fe;
  }

  .gallery-item {
    background: #1e1e1e;
  }

  .gallery-item figcaption {
    background: #1e1e1e;
    color: #ccc;
  }
}
