/* ── Development detail page ─────────────────────────────────────── */

/* ── Hero ───────────────────────────────────────────────────────── */
.dev-hero {
  padding: 2.5rem 0 1rem;
}

.dev-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.dev-hero__year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--c-muted);
}
.dev-hero__title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.7rem;
  color: var(--c-text);
}
@media (max-width: 768px) {
  .dev-hero__title {
    font-size: 1.75rem;
  }
}
.dev-hero__subtitle {
  font-size: 1.1rem;
  color: var(--c-muted);
  line-height: 1.7;
}

/* Hero image — constrained so it doesn't overpower the text */
.dev-hero__img-wrap {
  border-radius: 12px;
  border: 1px solid var(--c-border);
  overflow: hidden;
  line-height: 0;
  max-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-hero__img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

/* ── Sections ────────────────────────────────────────────────────── */
.dev-section {
  padding: 2rem 0;
  border-top: 1px solid var(--c-border);
}
.dev-section__title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

/* ── Description + image: 2 columns ─────────────────────────────── */
.dev-desc-grid {
  display: grid;
  grid-template-columns: 1fr 0.5fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .dev-desc-grid {
    grid-template-columns: 1fr;
  }
}
.dev-description {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.9;
  white-space: pre-wrap;
}

/* ── Specs ───────────────────────────────────────────────────────── */
.dev-specs {
  width: 100%;
  border-collapse: collapse;
  max-width: 680px;
}
.dev-specs tr {
  border-bottom: 1px solid var(--c-border);
}
.dev-specs tr:last-child {
  border-bottom: none;
}
.dev-specs td {
  padding: 0.7rem 0.25rem;
  font-size: 1rem;
  vertical-align: top;
}
.dev-specs td:first-child {
  color: var(--c-muted);
  width: 42%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding-right: 1.5rem;
}
.dev-specs td:last-child {
  color: var(--c-text);
  font-weight: 500;
}

/* ── Media row: video + gallery side by side ─────────────────────── */
.dev-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .dev-media-row {
    grid-template-columns: 1fr;
  }
}

/* ── Videos grid — 2 columns ─────────────────────────────────────── */
.dev-videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
@media (max-width: 560px) {
  .dev-videos-grid {
    grid-template-columns: 1fr;
  }
}

/* Hide YouTube external link */
.dev-video-cell > p {
  display: none !important;
}

/* Gallery grid — 4 columns standalone, 3 inside media row */
.dev-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.dev-media-row .dev-gallery {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) {
  .dev-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .dev-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dev-gallery__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  cursor: pointer;
  position: relative;
  background: var(--c-surface);
}
.dev-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s;
}
.dev-gallery__item:hover img {
  transform: scale(1.06);
}
.dev-gallery__item::after {
  content: "⤢";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 0.18s;
}
.dev-gallery__item:hover::after {
  opacity: 1;
}

/* ── Docs ────────────────────────────────────────────────────────── */
.dev-docs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 600px;
}
.dev-docs__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--c-text);
  font-size: 1rem;
  transition: border-color 0.18s;
}
.dev-docs__item:hover {
  border-color: var(--c-accent);
}
.dev-docs__item-icon {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  padding: 0.18rem 0.4rem;
  border-radius: 4px;
  flex: none;
}

/* ── Lightbox ────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}
.lightbox.open {
  display: flex;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  user-select: none;
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.65;
  transition: opacity 0.15s;
}
.lightbox__close:hover {
  opacity: 1;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: background 0.15s;
  line-height: 1;
}
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox__prev {
  left: 1rem;
}
.lightbox__next {
  right: 1rem;
}
.lightbox__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
