/* Leonardo Dawson — proyectos de fotografía (página Photographie y fichas de proyecto) */

/* Índice: una tarjeta por proyecto, todas del mismo tamaño */
.ph-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px);
}
.ph-card { display: block; }
.ph-cover { aspect-ratio: 2 / 3; overflow: hidden; background: var(--surface); margin-bottom: 16px; }
.ph-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .3s; }
.ph-card:hover .ph-cover img { transform: scale(1.03); }
.ph-card h3 { font-size: 1.45rem; margin: 0 0 .2em; }
.ph-card .meta { margin: 0; }
@media (max-width: 1100px) { .ph-index { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .ph-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-card h3 { font-size: 1.2rem; }
}

/* Proyecto: texto y créditos */
.ph-head h1 { margin-bottom: .6em; }
.ph-about { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ph-about .prose { max-width: 68ch; }
.ph-about .specs { margin: 0; }
.ph-about .specs dd { max-width: 60%; }
.ph-about.no-intro { grid-template-columns: minmax(0, 560px); }
@media (max-width: 900px) { .ph-about { grid-template-columns: 1fr; } }

/* Proyecto: filas justificadas; cada foto entera */
.ph-rows {
  --row: clamp(200px, 30vw, 440px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 16px);
}
.ph-rows::after { content: ""; flex: 100000 1 0; }
.ph-item {
  flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row));
  max-width: calc(var(--r) * var(--row) * 1.6);
  background: var(--surface);
  cursor: zoom-in;
}
.ph-item img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: opacity .3s; }
.ph-item:hover img { opacity: .85; }
@media (max-width: 700px) {
  .ph-rows { --row: 180px; }
  .ph-item { max-width: none; }
  .ph-rows::after { display: none; }
}

.ph-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 10vw, 140px);
}
@media (max-width: 700px) { .ph-pager { flex-direction: column; align-items: flex-start; gap: 8px; } }
