/* ── Project Page Layout ── */
.project-page {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 2.5rem 6rem;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

/* ── Project Header ── */
.project-header {
  margin-bottom: 2.5rem;
}

.project-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.project-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ── Hero Image ── */
.project-hero-img {
  width: 100%;
  height: 500px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 3.5rem;
  overflow: hidden;
}

.project-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* ── Sections ── */
.project-section {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.project-section p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.975rem;
}

.project-section ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-section ul li {
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.5;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.project-section pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}

.project-section code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.project-section p code {
  background: var(--surface);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ── In-section Image Placeholders ── */
.project-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
}

.project-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── In-section Images (uniform containers) ── */
.project-img {
  width: 100%;
  height: 400px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-img-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.project-img-row .project-img {
  flex: 1;
  min-width: 0;
  height: 260px;
}

@media (max-width: 680px) {
  .project-img-row {
    flex-direction: column;
  }
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .project-page {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: calc(var(--nav-h) + 1.5rem);
  }

  .project-header h1 {
    font-size: 1.75rem;
  }

  .project-hero-img {
    height: 320px;
    margin-bottom: 2rem;
  }

  .project-img {
    height: 300px;
  }

  .project-img-row .project-img {
    height: 220px;
  }

  .project-section {
    margin-bottom: 2rem;
  }

  .project-section h2 {
    font-size: 1rem;
  }

  .project-section pre {
    font-size: 0.75rem;
    padding: 0.85rem 1rem;
  }
}
