/* ==========================================================
   Priscilla Cafaggi -- v9
   Base font: Times New Roman. Name header: Times New Roman italic
   uppercase. Intro description: Arial uppercase. Bold reserved for the
   name header, the project title, and the .site-footer links.
   Photo credits live in data-credits on each gallery <img> and are only
   ever shown inside the fullscreen lightbox.
   ========================================================== */

:root {
  --fs: 16px;
  --lh: 1.5;
  --black: #000000;
  --grey50: rgba(0, 0, 0, 0.5);
  --eggplant: #6E1A7D; /* viola melanzana scura, per il nome in alto */
  --page-margin-v: 8vh;
  --font-serif: "Times New Roman", Times, Georgia, serif;
  --font-sans: Arial, Helvetica, sans-serif;
  --header-gap: 6em;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--black);
  font-family: var(--font-serif);
  font-size: var(--fs);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--page-margin-v) 32px var(--page-margin-v);
}

.header-name {
  display: block;
  text-align: right;
  font-family: "Didot", "Bodoni MT", var(--font-serif);
  font-style: italic;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--eggplant);
  font-size: calc(var(--fs) + 1px);
  margin: 0 0 var(--header-gap);
  transition: color 0.3s ease;
}

.header-name:hover { color: var(--black); }

.intro {
  font-family: var(--font-sans);
  text-transform: uppercase;
  text-align: center;
  max-width: 620px;
  margin: 0 auto var(--header-gap);
  font-weight: normal;
  font-size: var(--fs);
}

.intro a {
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.intro a:hover { color: var(--grey50); }

.at-sign {
  font-size: 0.8em;
  position: relative;
  top: -0.15em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 18px;
  row-gap: 34px;
}

.grid-cell { display: block; }

.grid-cell a.grid-link {
  display: block;
  text-decoration: none;
  color: var(--black);
}

.grid-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #c4c4c4;
}

.grid-caption {
  margin-top: 0.6em;
  text-align: center;
  font-weight: normal;
  font-size: var(--fs);
  line-height: 1.3;
  color: #333333;
}

.grid-cell a.grid-link:hover .grid-caption { text-decoration: underline; }

.site-footer {
  margin-top: 7em;
  text-align: center;
  font-weight: bold;
  font-size: var(--fs);
}

.site-footer a {
  color: var(--black);
  text-decoration: none;
}

.site-footer a:hover { color: var(--grey50); }

.project-title {
  font-weight: bold;
  font-size: var(--fs);
  line-height: 1.25;
  margin: 0;
}

.project-bio {
  font-weight: normal;
  font-size: var(--fs);
  max-width: 700px;
  margin: 0 0 3em;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 3em;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #c4c4c4;
  cursor: zoom-in;
}

/* Foto "in evidenza": a piena larghezza, orizzontale, senza taglio
   (mostra l'immagine intera invece del ritaglio quadrato). */
.project-gallery img.gallery-featured {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.archive-intro {
  font-weight: normal;
  font-size: var(--fs);
  max-width: 700px;
  margin: 0 0 4em;
}

/* ---------- Testo di Apoc Dreams ----------
   Stesso font/dimensione del resto del sito. Allineato al margine
   sinistro (non centrato), senza giustificato/rientri/corsivo diffuso:
   niente impaginazione "a libro", solo paragrafi semplici come il resto
   del sito. */

.book-text {
  max-width: 700px;
  margin: 3em 0 0;
  font-family: var(--font-serif);
  font-size: var(--fs);
  font-style: italic;
  line-height: var(--lh);
  text-align: left;
  color: var(--black);
}

.book-chapter-title {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: bold;
  font-size: var(--fs);
  text-align: left;
  margin: 2em 0 1em;
}

.book-text > p {
  margin: 0;
  text-indent: 0;
}

.book-text sup {
  font-size: 0.7em;
}

.book-text > p.book-dialogue-heading {
  font-family: var(--font-serif);
  font-style: normal;
  text-align: left;
  font-size: var(--fs);
  margin: 1.5em 0 0.8em;
  text-indent: 0;
}

.book-quote,
.book-dialogue {
  margin: 1.2em 0;
  padding-left: 0;
}

.book-quote p,
.book-dialogue p {
  text-indent: 0;
  margin: 0 0 0.8em;
}

.book-dialogue p:last-child { margin-bottom: 0; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 92vw;
  max-height: 74vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-credits {
  font-family: var(--font-serif);
  font-size: var(--fs);
  color: var(--black);
  text-align: center;
  max-width: 80vw;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--black);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-close:hover { color: var(--grey50); }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
  .project-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  :root {
    --page-margin-v: 6vh;
    --header-gap: 3em;
  }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-close { top: 14px; right: 16px; }
  .intro { font-size: 13px; }
}
