.project-page { background: var(--paper); min-height: 100vh; }

.project-page .nav { margin-bottom: 1rem; }

.project-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.project-detail h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  color: var(--magenta);
  transform: rotate(-1deg);
}

.project-meta {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--maroon);
  margin: 0.8rem 0 1.5rem;
}

.project-desc {
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 2.5rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.project-gallery img {
  width: 100%;
  border: 3px solid var(--magenta);
  border-radius: 12px;
  background: #fff;
  padding: 0.5rem;
  box-sizing: border-box;
  box-shadow: 5px 6px 0 rgba(237, 15, 104, 0.15);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-gallery img:hover {
  transform: scale(1.04);
  box-shadow: 8px 10px 0 rgba(237, 15, 104, 0.25);
  position: relative;
  z-index: 1;
}

/* Lightbox: la imagen abarca toda la pantalla */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vmin;
  background: rgba(132, 21, 35, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.4rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--magenta);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  .project-gallery { grid-template-columns: 1fr; }
}
