/* project_detail.css */

:root {
  --detail-max: 1100px;

  --card-radius: 16px;
  --border: rgba(0, 0, 0, 0.10);

  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.62);
  --muted-2: rgba(0, 0, 0, 0.50);

  --soft-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

/* Page wrapper */
.project-detail {
  max-width: var(--detail-max);
  margin: 5% auto;
  padding: 18px 16px 40px;
  color: var(--text);
}

/* Header block */
.detail-header {
  margin-bottom: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.70);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 120ms ease, border-color 120ms ease;
}

.back-link:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.detail-title {
  margin: 12px 0 6px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0.1px;
}

.detail-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Meta + chips + CTAs */
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.62);
}

.meta-line .dot {
  opacity: 0.4;
}

/* Tags */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.62);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.07);
}

/* CTAs (reuse the badge-link look) */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-link {
  display: inline-flex;
  align-items: center;

  padding: 8px 12px;
  border-radius: 999px;

  text-decoration: none;
  font-size: 12px;
  font-weight: 800;

  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.10);
  color: rgba(0, 0, 0, 0.78);

  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn-link:hover {
  background: rgba(0, 0, 0, 0.065);
  border-color: rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

/* Gallery section */
.detail-gallery {
  margin-top: 16px;
}

/* Base grid */
.gallery-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

/* Two columns on medium screens */
@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Three columns on large screens */
@media (min-width: 1050px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Hero spans full width of the grid */
.gallery-item.hero {
  grid-column: 1 / -1;
}

.gallery-item.hero img {
  height: 420px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.03);
}


/* Normal gallery cards */
.gallery-item {
  margin: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.caption {
  padding: 10px 12px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.50);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Mobile tuning: hero not too tall */
@media (max-width: 550px) {
  .gallery-item.hero img {
    height: 300px;
  }
}

/* Body / prose */
.detail-body {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  padding: 18px;
}

.prose {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.78);
}

.prose p {
  margin: 0 0 12px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: rgba(0, 0, 0, 0.85);
  font-weight: 700;
  text-decoration: underline;
}
