@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400&display=swap");

/* Project showcase: two-column header + responsive image grid */

.project-page {
  background: #fff;
}

.project-page .container {
  max-width: 1140px;
}

.project-header-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  align-items: start;
}

@media (min-width: 992px) {
  .project-header-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

.project-header-left h1 {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.375rem, 3vw, 2.125rem);
  line-height: 1.05;
  color: #000;
  margin: 0 0 1.75rem;
  letter-spacing: -0.02em;
}

.project-meta-box {
  background: #f7f7f7;
  padding: 1.75rem 1.5rem;
  text-align: left;
}

.project-meta-row {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.project-meta-row:last-child {
  margin-bottom: 0;
}

.project-meta-label {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  color: #000;
}

.project-meta-value {
  font-family: "Nunito Sans", sans-serif;
  font-weight: 400;
  color: #666;
}

.project-header-right {
  padding-top: 0.25rem;
}

.project-heading {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #000;
  margin: 0 0 0.75rem;
}

.project-header-right .project-heading:not(:first-child) {
  margin-top: 2rem;
}

.project-body {
  font-family: "Nunito Sans", sans-serif;
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #666;
  margin: 0;
  max-width: 52rem;
}

/* Gallery: uniform tiles, sharp corners, no frames */
.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
  }
}

@media (min-width: 992px) {
  .project-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.project-gallery-item {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eee;
  cursor: pointer;
}

.project-gallery-item:focus-within {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 0;
  transition: transform 0.35s ease;
}

@media (hover: hover) {
  .project-gallery-item:hover img {
    transform: scale(1.02);
  }
}

/* Lightbox */
.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1rem;
  box-sizing: border-box;
}

.project-lightbox[hidden] {
  display: none !important;
}

.project-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  z-index: 2;
}

.project-lightbox-close:hover {
  opacity: 1;
}

.project-lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(100vh - 8rem);
  min-height: 0;
}

.project-lightbox-main {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
}

.project-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s ease;
}

.project-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.project-lightbox-prev {
  left: 0.5rem;
}

.project-lightbox-next {
  right: 0.5rem;
}

@media (max-width: 575.98px) {
  .project-lightbox-prev {
    left: 0.25rem;
  }

  .project-lightbox-next {
    right: 0.25rem;
  }
}

.project-lightbox-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 100%;
  padding: 1rem 0 0;
  overflow-x: auto;
}

.project-lightbox-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  width: 4rem;
  height: 2.67rem;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  background: none;
}

.project-lightbox-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-lightbox-thumbs button.is-active,
.project-lightbox-thumbs button:hover {
  opacity: 1;
  border-color: #fff;
}

.project-page-nav {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .project-page-nav {
    gap: 1.25rem;
  }
}

.project-nav-link {
  background: #fff;
  border: 2px solid #000;
  border-radius: 50px;
  text-decoration: none;
  padding: 0.8rem 1.35rem;
  color: #000;
  min-height: auto;
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}

.project-nav-link:hover,
.project-nav-link:focus-visible {
  background: #000;
  color: #fff;
}

.project-nav-link-next {
  text-align: right;
}

.project-nav-meta {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4d4d4d;
  margin-bottom: 0.35rem;
  transition: color 0.3s ease;
}

.project-nav-name {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(0.95rem, 1.9vw, 1.15rem);
  line-height: 1.25;
  white-space: nowrap;
}

.project-nav-link:hover .project-nav-meta,
.project-nav-link:focus-visible .project-nav-meta {
  color: rgba(255, 255, 255, 0.8);
}
