/* Personal projects are an independent homepage section since160. Their geometry
   must not depend on the obsolete Stories wrapper or on the neighbouring section. */
.theme125 #contenuto > .personal-projects131 {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 64px max(24px, calc((100% - 1220px) / 2)) 80px;
}
.theme125 .personal-projects131 .section-head {
  min-width: 0;
  margin: 0 0 32px;
}
.theme125 .personal-project-mount131 { min-width: 0; }
.theme125 .personal-project-grid131 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
/* A short collection stays centred at photographic-card scale. The existing
   ResizeObserver then measures this actual width before positioning its cards. */
.theme125 .personal-project-grid131:has(> .personal-project131:only-child) {
  max-width: 400px;
  grid-template-columns: minmax(0, 1fr);
}
.theme125 .personal-project-grid131:has(> .personal-project131:nth-child(2):last-child) {
  max-width: 820px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* The controls precede the stage in the DOM. Their row never follows the varying
   photo/caption height, and keeps the same place for portrait and landscape. */
.theme125 .statement.has-panorama124 .panorama124 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.theme125 .statement.has-panorama124 .panorama124[hidden] { display: none; }
.theme125 .panorama124-controls {
  flex: 0 0 auto;
  justify-content: flex-end;
  min-height: 44px;
  margin: 0 0 12px;
  padding: 0;
  gap: 12px;
}
.theme125 .panorama124-controls[hidden] { display: none; }
.theme125 .panorama124-controls [data-panorama-count] {
  min-width: 6ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.theme125 .panorama124-controls button {
  border: 0;
  box-shadow: none;
  background: transparent;
}
.theme125 .panorama124-controls button:focus-visible {
  outline: 2px solid var(--accent, #c99773);
  outline-offset: 2px;
}
@media (max-width: 767px) {
  .theme125 #contenuto > .personal-projects131 {
    padding: 48px 24px 56px;
  }
  .theme125 .personal-projects131 .section-head { margin-bottom: 24px; }
  .theme125 .personal-project-grid131:has(> .personal-project131:only-child),
  .theme125 .personal-project-grid131:has(> .personal-project131:nth-child(2):last-child) {
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .theme125 .panorama124-controls {
    justify-content: center;
    margin: 0 0 12px;
  }
}

/* Only the visible photograph determines the stage height. */
.theme125 .statement.has-panorama124 .panorama124-frame { position: absolute; top: 0; }
.theme125 .statement.has-panorama124 .panorama124-frame.is-active { position: relative; }
@media (max-width: 767px) {
  .theme125 .statement.has-panorama124 { gap: 8px; }
  .theme125 .statement.has-panorama124 .statement-text { margin-bottom: 0; }
  .theme125 .statement.has-panorama124 .panorama124-controls { margin: 0 0 8px; }
}
