/* --- IMPORTAZIONE FONT --- */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&family=Inter:wght@400&display=swap");

/* --- RESET E REGOLE BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background-color: rgb(250, 249, 247);
  color: rgb(31, 31, 31);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

::selection {
  background-color: #1f1f1f;
  color: #faf9f7;
}

/* --- MENU DI NAVIGAZIONE --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  background-color: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-desktop {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: rgb(31, 31, 31);
  transition: width 250ms ease-in-out;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.nav-mobile-toggle div {
  width: 24px;
  height: 2px;
  background-color: rgb(31, 31, 31);
  transition: 300ms;
}

.nav-mobile-toggle div:not(:first-child) {
  margin-top: 6px;
}

/* --- SEZIONE HERO (FOTO PRINCIPALE - HOME) --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 80px 60px;
}

.hero-image-wrapper {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 700ms ease-out forwards;
}

.hero-img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* --- ELEMENTI GLOBALI PAGINA PORTFOLIO --- */
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 400;
  color: rgb(31, 31, 31);
  letter-spacing: -0.01em;
  padding: 0 5vw;
  max-width: 1400px;
  margin: 0 auto 60px;
}

.fade-in-element {
  opacity: 0;
  transform: translateY(40px); /* Spostamento morbido verso il basso */
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

.fade-in-element.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- GRIGLIA FOTO --- */
.gallery-section {
  padding-top: 120px;
  padding-bottom: 60px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5vw;
}

.gallery-col-1 { padding-top: 0; } 
.gallery-col-2 { padding-top: 160px; } 
.gallery-col-3 { padding-top: 80px; }


.gallery-item {
  display: block;
  margin-bottom: 60px; 
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 16px; 
  transition: transform 400ms ease, opacity 400ms ease;
}

.gallery-item:hover img {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Proporzioni originali delle foto */
.ar-3-4 { aspect-ratio: 3 / 4; }
.ar-3-2 { aspect-ratio: 3 / 2; }


.actor-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
}

/* --- FOOTER --- */
.footer {
  padding: 120px 40px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer p {
  font-size: 0.8rem;
  color: rgb(107, 107, 107);
  letter-spacing: 0.03em;
}


/* --- SEZIONE PUBLICATIONS & EXHIBITIONS --- */
.content-container {
  padding: 160px 5vw 0px;
  max-width: 1200px;
  margin: 0 auto;
}

.pub-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 400;
  color: rgb(31, 31, 31);
  margin-bottom: 80px;
  letter-spacing: -0.01em;
}


.publications-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

@media (max-width: 900px) {
    .publications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .publications-grid {
        grid-template-columns: 1fr;
    }
}


.publication-item img {
  width: 100%;
  object-fit: cover;
  display: block;
  margin-bottom: 40px; /* Aumentato da 24px a 40px */
}

.pub-card img {
  width: 100%;
  object-fit: cover;
  display: block;
  margin-bottom: 24px;
}

.publication-text {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: rgb(107, 107, 107);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* Classi di utilità per i margini inferiori */
.mb-40 { margin-bottom: 40px !important; }
.mb-60 { margin-bottom: 60px !important; }
.mb-140 { margin-bottom: 140px !important; }

/* --- SEZIONE ABOUT --- */
.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 40px;
    align-items: start;
}

/* Immagine del ritratto */
.about-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Testo biografico */
.about-text {
    max-width: 600px;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 24px;
}

/* Adattamento per smartphone */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        margin: 40px auto;
        padding: 0 24px;
    }

    .about-grid img {
        max-width: 320px;
    }
}

/* --- SEZIONE CONTACT --- */
.contact-container {
  padding: 160px 5vw 0;
  max-width: 600px;
  margin: 0 auto;
}

.contact-intro {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 48px;
  letter-spacing: 0.01em;
}

.contact-block {
  margin-bottom: 48px;
}

.contact-label {
  font-size: 0.85rem;
  color: rgb(107, 107, 107);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.contact-link {
  font-size: 0.95rem;
  color: rgb(31, 31, 31);
  border-bottom: 1px solid rgb(212, 212, 212);
  padding-bottom: 2px;
  transition: border-color 250ms ease;
}

.contact-link:hover {
  border-color: rgb(31, 31, 31);
}

.form-input {
  width: 100%;
  padding: 14px 0;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: rgb(31, 31, 31);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgb(212, 212, 212);
  outline: none;
  letter-spacing: 0.02em;
  transition: border-color 250ms ease;
  margin-bottom: 32px;
}

.form-input:focus {
  border-color: rgb(31, 31, 31);
}

.textarea-input {
  resize: none;
  margin-bottom: 40px;
}

.form-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: rgb(31, 31, 31);
  background: transparent;
  border: 1px solid rgb(31, 31, 31);
  padding: 14px 40px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background-color 250ms ease, color 250ms ease;
}

.form-btn:hover {
  background-color: rgb(31, 31, 31);
  color: rgb(250, 249, 247);
}

/* --- ANIMAZIONI AL CARICAMENTO --- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* --- RESPONSIVE (MOBILE & TABLET) --- */
@media (max-width: 1024px) {
  .gallery-grid {
    gap: 16px;
  }
  .publications-grid {
    gap: 40px;
  }
  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile-toggle {
    display: block;
  }
  .navbar {
    padding: 24px 24px;
  }
  .brand {
    font-size: 2.8rem;
  }
  .hero-section {
    padding: 100px 24px 40px;
  }
  .page-container {
    padding-top: 120px;
  }
.gallery-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
  .publications-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
.gallery-col-1,
.gallery-col-2,
.gallery-col-3 {
  padding-top: 0;
}
  }
  /* INIZIO NUOVA AGGIUNTA */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    /* Aggiungi questa riga: */
    padding-top: 120px;
  }
  /* FINE NUOVA AGGIUNTA */

/* Responsive specifica per le pubblicazioni su Mobile */
@media (max-width: 768px) {
  .publications-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .content-container {
    padding-top: 120px;
  }
  .mb-140 {
    margin-bottom: 80px !important;
  }
} 
/* Make gallery images clickable */
.gallery-item img {
    cursor: zoom-in;
}


/* Fullscreen lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.96);

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.35s ease, visibility 0.35s ease;

    padding: 40px;
}


/* Visible state */
.lightbox.active {
    opacity: 1;
    visibility: visible;
}


/* Enlarged photograph */
.lightbox-image {
    max-width: 95vw;
    max-height: 92vh;

    width: auto;
    height: auto;

    object-fit: contain;

    cursor: default;

    transform: scale(0.96);
    transition: transform 0.4s ease;
}


.lightbox.active .lightbox-image {
    transform: scale(1);
}


/* Close button */
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 30px;

    border: none;
    background: none;

    color: white;

    font-family: Arial, sans-serif;
    font-size: 42px;
    font-weight: 200;

    line-height: 1;

    cursor: pointer;

    z-index: 10000;

    opacity: 0.8;

    transition: opacity 0.2s ease, transform 0.2s ease;
}


.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.08);
}


/* Prevent scrolling while lightbox is open */
body.lightbox-open {
    overflow: hidden;
}


/* Mobile */
@media (max-width: 768px) {

    .lightbox {
        padding: 20px;
    }

    .lightbox-image {
        max-width: 94vw;
        max-height: 88vh;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 36px;
    }
}
/* =========================
   PORTFOLIO DROPDOWN
   ========================= */

.nav-dropdown {
    position: relative;
}

.portfolio-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;

    display: flex;
    flex-direction: column;
    gap: 10px;

    min-width: 130px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

/* Desktop: appare passando col mouse */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;

    transition: opacity 0.2s ease;
}

.dropdown-menu a:hover {
    opacity: 0.55;
}


/* Mobile */
@media (max-width: 768px) {

    .dropdown-menu {
        position: static;

        display: none;

        padding-top: 12px;
        padding-left: 15px;

        gap: 12px;

        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: flex;
    }
}