/* FONT
   Sito in Helvetica di sistema (Mac/iPhone). Dove Helvetica Neue non c'è (Android, Windows)
   si usa TeX Gyre Heros, ospitato in /fonts/: esiste in regular, bold, italic e bold italic. */

/* TeX Gyre Heros: clone libero di Helvetica, usato solo dove Helvetica Neue non c'è (Android, Windows) */
@font-face {
  font-family: 'TeX Gyre Heros';
  src: url('/fonts/TeXGyreHeros-Regular.woff2') format('woff2');
  /* metriche verticali come Helvetica Neue: senza, l'interlinea "normal" è 0,95 e le righe si toccano */
  ascent-override: 95.2%;
  descent-override: 21.3%;
  line-gap-override: 2.8%;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TeX Gyre Heros';
  src: url('/fonts/TeXGyreHeros-Bold.woff2') format('woff2');
  /* metriche verticali come Helvetica Neue: senza, l'interlinea "normal" è 0,95 e le righe si toccano */
  ascent-override: 95.2%;
  descent-override: 21.3%;
  line-gap-override: 2.8%;
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TeX Gyre Heros';
  src: url('/fonts/TeXGyreHeros-Italic.woff2') format('woff2');
  /* metriche verticali come Helvetica Neue: senza, l'interlinea "normal" è 0,95 e le righe si toccano */
  ascent-override: 95.2%;
  descent-override: 21.3%;
  line-gap-override: 2.8%;
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'TeX Gyre Heros';
  src: url('/fonts/TeXGyreHeros-BoldItalic.woff2') format('woff2');
  /* metriche verticali come Helvetica Neue: senza, l'interlinea "normal" è 0,95 e le righe si toccano */
  ascent-override: 95.2%;
  descent-override: 21.3%;
  line-gap-override: 2.8%;
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Alte Haas Grotesk (Yann Le Coroller) – freeware, distribuito insieme a fonts/LICENSE-AlteHaasGrotesk.txt.
   Solo regular e bold: i pesi più sottili usati nel CSS vengono resi in regular */
@font-face {
  font-family: 'Alte Haas Grotesk';
  src: url('/fonts/AlteHaasGrotesk-Regular.woff2') format('woff2');
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Alte Haas Grotesk';
  src: url('/fonts/AlteHaasGrotesk-Bold.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Helvetica di sistema per tutto il sito: nessun file da scaricare.
     Mac/iPhone: Helvetica Neue originale · Android e Windows: TeX Gyre Heros (ospitato sul sito) */
  /* "TeX Gyre Heros" sta prima di "Helvetica": su Android "Helvetica" e "Arial" sono alias di Roboto */
  --font-sys: "Alte Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: var(--font-sys);
  --font-mono: var(--font-sys);
  --font-text: var(--font-sys);
  --font-logo: var(--font-sys);

  /* hover monocromatico: link leggermente spenti, bianchi al passaggio del mouse */
  --link: #b3b3b3;
  --hover: #ffffff;
}

/* BASIC */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: normal;
  background: #000;
  scroll-behavior: smooth;
}

h1 {
  color: white;
}

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

/* PRE-LOADER */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-in-out;
}

.preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-timecode {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #e0e0e0;
  font-variant-numeric: tabular-nums;
}

/* SCROLL TO APPEAR */

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.block {
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;
}

.block2 {
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 10%;
}

/* COOKIE CONSENT */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #000000;
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  font-family: var(--font-mono);
}

.cookie-banner p {
  margin: 0;
  padding-right: 20px;
  color:white;
}

.cookie-banner a {
  color:var(--hover);
}

.cookie-btn {
  font-family: var(--font-mono);
  background-color: rgb(218, 95, 50);
  color: white;
  border: none;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
}

.cookie-btn:hover {
  background-color: var(--hover);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #000000;
  margin: 10% auto;
  padding: 45px;
  color:white;
  width: 70%;
  max-width: 700px;
  font-family: var(--font-mono);
  font-size:12px;
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: black;
}

/* NAV */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  padding: 3em;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 2;
  color:#fff;
  text-transform: uppercase;
}

.logo h1 {
  font-size:30px;
}

.logo a {
  text-decoration:none;
}

.logo {
  justify-self: center;
}

.logo-text {
  display: inline-block;
  font-family: var(--font-logo);
  font-weight: 300; /* Light – alternative: 260 ExtraLight, 250 Thin */
  font-size: 25px;
  line-height: 1;
  color: #e0e0e0;
  white-space: nowrap;
  text-decoration: none;
  transition: 0.2s;
}

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

nav p {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.nav-items {
  display: flex;
  align-items: center;
  gap: 3em;
}

.nav-left {
  justify-self: start;
}

.nav-right {
  justify-self: end;
}

.nav-items a i {
  font-size: 14px;
  line-height: 1;
}

.nav-items a {
  font-family: var(--font-display);
  color: #e0e0e0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.nav-items a:hover {
  color: var(--hover);
  transition: 0.2s;
}

.lower-nav {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding: 3em;
  color:#fff;
}

.lower-nav > div {
  flex: 1;
}

.short-bio a {
  width: 50%;
  font-family: var(--font-mono);
  font-size:20px;
  text-decoration: none;
  color:#e0e0e0;
  transition: 0.2s;
}

.short-bio p {
  font-family: var(--font-mono);
  font-size:20px;
  font-weight:300;
} 

.short-bio a:hover {
  color:#fff;
  transition: 0.2s;
}

.play-button {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}

.play-button p {
  text-decoration: none;
  color: white;
  font-size:50px;
  opacity: 0.7;
  transition: 0.2s;
}

.play-button p:hover {
  opacity: 1.0;
  transition: 0.2s;
}

.explore {
  display:flex;
  justify-content: end;
  align-items: end;
}

.explore a {
  width: 50%;
  font-family: var(--font-mono);
  font-size:20px;
  text-decoration: none;
  color:#ffffff;
  display:flex;
  justify-content: end;
  align-items: end;
  transition: 0.2s;
}

.explore a:hover {
  color:var(--hover);
  transition: 0.2s;
}

/* HERO */

.slider {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.slide {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slide-bg {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slide-bg video {
  left: 0;
  bottom: 0;
  width:100%;
  height:100%;
  object-fit:cover;
}

.slider-counter {
  display: flex;
}

.slider-counter p,
.slider-counter > div {
  width: 24px;
  display: flex;
  justify-content: center;
}

/* SECTION ELEMENTS */

.left-element {
  color:#fff;
  font-family: var(--font-mono);
  font-size:13px;
  font-weight:300;
}

.right-element {
  color:#fff;
  font-family: var(--font-text);
  font-size:20px;
}

.right-element h1 {
  color:#fff;
  font-family: var(--font-text);
  font-weight:500;
  font-size:40px;
}

.right-element video {
  width:100%;
}

/* PORTFOLIO FILM */

.portfolio {
  padding: 7em 3em 3em 3em;
  text-align: center;
  position: relative;
}

.portfolio h1 {
  margin-bottom:1em;
}

.portfolio-container {
  color:#fff;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  justify-content: center;
  position: relative;
}

.portfolio-item video {
  width:100%;
  margin-bottom:-5px;
}

.portfolio-item img {
  width:100%;
  margin-bottom:-5px;
}

.portfolio-link {
  position: relative;
  display: block;
}

.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-family: var(--font-logo);
  font-size: 14px;
  font-weight: 300;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.portfolio-link:hover .overlay-text {
  opacity: 1;
}

.portfolio-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.portfolio-link:hover::after {
  opacity: 1;
}

/* DESIGN PORTFOLIO */

.design {
  padding: 7em 3em;
}

.design h1 {
  font-family: var(--font-mono);
  text-align:start;
  color:white;
  font-size:12px;
  padding-bottom:10px;
  text-transform: uppercase;
}

.design-gallery {
  columns: 400px;
  gap:20px;
}

.design-gallery-item {
  position: relative;
  display: inline-block;
  margin-bottom:15px;
}

.design-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.design-hover-text {
  display:grid;
  grid-template-columns: 1fr 1fr;
  justify-content: space-between;
}

.hover-text-left {
  color:white;
  font-family: var(--font-mono);
  font-size:10px;
  text-transform: uppercase;
}

.hover-text-right {
  color:white;
  font-family: var(--font-mono);
  font-size:10px;
  text-transform: uppercase;
  text-align:end;
}

/* ABOUT */

.bio {
  padding: 6em 12em;
  position: relative;
}

.bio-container {
  display:grid;
  grid-template-columns: 1fr;
  gap:50px;
  color: rgb(223, 223, 223);
  font-family: var(--font-text);
  font-size:20px;
  font-kerning: none;
}

.bio-container a {
  color:white;
  transition: 0.2s;
}

.bio-container a:hover {
  color:var(--hover);
  transition: 0.2s;
}

/* PIC GALLERY */

.bio-pic {
  padding: 7em 3em 0 3em;
}

.bio-pic-container {
  display: flex;
  justify-content: center;
}

.bio-pic-container img {
  width:100%;
  height:70vh;
  border-radius: 10px;
}

/* SINGLE PROJECT */

.single-project {
  width:100vw;
  height:100vh;
}

.single-project-video {
  display:flex;
  justify-content: center;
}

.single-project-video iframe {
 width:100%;
 height:100vh;
}

.single-project-about {
  padding: 3em;
}

.single-project-about-project {
  text-align: center;
  color: white;
  padding: 3em 10em 3em 10em;
  font-family: var(--font-text);
  font-size:20px;
}

.single-project-gallery {
  padding: 3em;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em; 
}

.single-project-category {
  padding: 7em 3em 3em 3em ;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
}

.category-center-element {
  border-left: solid 1px white;
  border-right: solid 1px white;
}

.single-project-category h1 {
  color:white;
}

.single-project-category h5 {
  color: white;
}

/* CTA BUTTONS */

.get-in-touch {
  padding: 3em;
  text-align:center;
}

.get-in-touch a {
  text-decoration:none;
  color:white;
  font-size:50px;
  transition: 0.2s;
}

.get-in-touch a:hover {
  color:var(--hover);
  transition: 0.2s;
  font-weight:bold;
}

/* PHOTO JOURNAL */

.photo-journal {
  padding: 3em;
}

.photo-journal h1 {
  font-family: var(--font-display);
  text-align:center;
  color:white;
  font-size:12px;
  padding-bottom:10px;
}

.photo-journal h2 {
  text-align:center;
  color:white;
  font-size:9px;
  padding-bottom:3em;
}

.photo-gallery {
  columns: 300px;
  gap:20px;
}

.photo-gallery-item {
  position: relative;
  display: inline-block;
  margin-bottom:15px;
}

.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.photo-hover-title {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: white;
  padding: 5px 10px 10px 10px;
  border-radius: 3px;
  font-size: 10px;
  opacity: 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  transition: opacity 0.1s ease;
}

.photo-gallery-item:hover .photo-hover-title {
  opacity: 1;
  transition: opacity 0.1s ease;
}

/* Lightbox styles */
.photo-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.photo-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox-container {
  position: relative;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-lightbox-image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transform-origin: 0 0;
  transition: transform 0.05s ease-out;
}

.photo-lightbox-image.zoomed {
  cursor: move;
}

.photo-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* VIMEO LIGHTBOX */

.play-icon {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid white;
  margin-left: 2px;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: 80%;
  max-width: 900px;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.lightbox-content iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.close-button {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.close-button:hover {
  color: #00adef; /* Vimeo blue */
}

.reel-button {
  color:white;
  transition: 0.2s;
}

.reel-button:hover {
  color:var(--hover);
  transition: 0.2s;
  cursor: pointer;
}

/* YOUTUBE LIGHTBOX */

.yt-video-thumbnail {
  position: relative;
  max-width: 100%;
  max-height:100%;
  margin: 0 auto;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.yt-video-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.yt-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: var(--hover);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.yt-play-button::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 25px solid rgb(255, 255, 255);
  margin-left: 5px;
}

.yt-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.yt-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.yt-lightbox-content {
  position: relative;
  width: 90%;
  max-width: 900px;
}

.yt-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.yt-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.yt-close-button {
  position: absolute;
  top: -40px;
  right: 0;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.yt-close-button::before,
.yt-close-button::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: white;
  top: 50%;
}

.yt-close-button::before {
  transform: rotate(45deg);
}

.yt-close-button::after {
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .yt-play-button {
    width: 50px;
    height: 50px;
  }
  
  .yt-play-button::after {
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 18px solid white;
  }

}

.contact-container {
  display:grid;
  grid-template-columns: 1fr;
  text-align:center;
}

.contact-container a {
  padding-top: 1em;
  color:white;
  text-decoration:none;
  font-family: var(--font-mono);
  font-size:25px;
  transition: 0.2s;
}

.contact-container a:hover {
  text-decoration: line-through;
  transition: 0.2s;
}

/* FOOTER */

footer {
  padding: 3em 3rem; /* orizzontale in rem: allineato a nav e griglia */
  position: relative;
  bottom: 0px;
  display:grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color:#fff;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 12px;
}

.copyright {
  display: flex;
  justify-content: start;
  padding-left: 0;
  font-family: var(--font-mono);
}

.footer-social ul {
  display: flex;
  justify-content: center;
  gap: 1em;
  list-style-type: none;
  font-size:12px;
}

.footer-social ul li a {
  display: inline;
  text-decoration: none;
  color: #dcdcdc;
  transition: 0.2s;
}

.footer-social ul li a:hover {
  color: rgb(255, 255, 255);
  transition: 0.2s;
}

.credits {
  display:flex;
  justify-content: end;
  padding-right:0;
  font-family: var(--font-mono);
  font-size:12px;
}

.credits a {
  color:rgb(255, 255, 255);
  text-decoration: none;
  transition: 0.2s;
}

.credits a:hover {
  color: rgb(188, 188, 188);
  transition: 0.2s;
}


/* SURFACE PRO PORTRAIT */

@media only screen and (max-width: 912px) and (orientation : portrait) {
	.single-project {
    height:45vh;
  }

  .single-project-category {
    padding: 0 3em 3em 3em ;
  }

  .single-project-about {
    padding: 2em;
  }

  .single-project-about-project {
    padding: 2em;
  }


  .design-gallery {
    columns:200px;
    gap:10px;  
  }
}

/* SURFACE PRO LANDSCAPE */

@media only screen and (max-width: 1368px) and (orientation : landscape) {
	.single-project {
    height:92vh;
  }

  .single-project-category {
    padding: 0 3em 3em 3em ;
  }

  .single-project-about {
    padding: 2em;
  }

  .single-project-about-project {
    padding: 2em;
  }

}


/* IPAD MINI PORTRAIT */

@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) {
  .single-project {
    height:50vh;
  }

  .single-project-category {
    padding: 0 3em 3em 3em ;
  }

  .single-project-about {
    padding: 2em;
  }

  .single-project-about-project {
    padding: 2em;
  }

}

/* IPAD MINI LANDSCAPE */

@media all and (device-width: 1024px) and (device-height: 768px) and (orientation:landscape) {
  .single-project {
    height:85vh;
  }

  .single-project-category {
    padding: 0 3em 1em 3em ;
  }

  .single-project-about {
    padding: 1em;
  }


  .design {
    padding:7em 3em;
  }

  .design-gallery {
    columns:300px;
    gap:10px;  
  }
}

/* IPAD PRO PORTRAIT */

@media all and (device-width: 1024px) and (device-height: 1366px) and (orientation:portrait) {
  .single-project {
    height:50vh;
  }

  .single-project-category {
    padding: 1em 3em 3em 3em ;
  }

  .single-project-about {
    padding: 1em;
  }

  .single-project-about-project {
    padding: 3em;
  }


  .design-gallery {
    columns:300px;
    gap:10px;  
  }
}

/* IPAD PRO LANDSCAPE */

@media all and (device-width: 1366px) and (device-height: 1024px) and (orientation:landscape) {
  .single-project {
    height:85vh;
  }

  .single-project-category {
    padding: 0 3em 1em 3em ;
  }

  .single-project-about {
    padding: 1em;
  }

  .single-project-about-project {
    padding: 6em;
  }

}

/* IPAD AIR PORTRAIT */

@media all and (device-width: 820px) and (device-height: 1180px) and (orientation:portrait) {
  .single-project {
    height:45vh;
  }

  .single-project-category {
    padding: 1em 3em 3em 3em ;
  }

  .single-project-about {
    padding: 2em;
  }

  .single-project-about-project {
    padding: 2em;
  }

}

/* IPAD AIR LANDSCAPE */

@media all and (device-width: 1180px) and (device-height: 820px) and (orientation:landscape) {
  .single-project {
    height:90vh;
  }

  .single-project-category {
    padding: 0 3em 1em 3em ;
  }

  .single-project-about {
    padding: 1em;
  }

}


/* Smaller Screens */

@media only screen and (max-width: 600px) {

  nav {
    padding: 1em;
  }

  .nav-items {
    display: flex;
    gap: 1.5em;
  }

  .nav-items a {
    font-size:10px;
    font-weight:500;
  }

  .lower-nav {
    padding: 1em;
  }

  .short-bio h5 {
    font-family: var(--font-mono);
    font-size:10px;
    font-weight:300;
  } 

  .photo-journal {
    padding: 1em;
  }

  .photo-gallery {
    columns: 150px;
    gap:10px;
  }

  .photo-image-container {
    margin-bottom:5px;
  }

  .bio {
    padding: 4em 1em;
  }

  .bio-container {
    display:grid;
    grid-template-columns: 1fr;
    font-size:18px;
  }

  .lower-link a {
    font-size:15px;
  }

  .watch-reel a {
    font-size:15px;
  }

  .portfolio {
    padding: 5em 1em 0 1em;
  }

  .portfolio h1 {
    font-size:18px;
  }


  .overlay-text {
    font-size:12px;
  }

  /* PIC GALLERY */

  .bio-pic {
    padding: 4em 1em 0 1em;
  }

  .bio-pic-container {
    display:grid;
    grid-template-columns: 1fr;
  }

  .bio-pic-container img {
    width:100%;
    height:50vh;
    border-radius: 10px;
  }

  .contact a {
    font-size: 25px;
  }

  .single-project {
    width:100vw;
    height:35vh;
  }
   
   .single-project-about {
     padding: 1em;
   }
   
   .single-project-about-project {
    margin-top:25px;
     display:grid;
     grid-template-columns: 1fr;
   }

   .single-project-about {
    padding: 20px;
  }
  
  .single-project-about-project {
    padding: 1em;
  }

  .single-project-about-title {
    font-size:20px;
  }

  .single-project-about-project {
    font-size:14px;
  }

  .single-project-gallery {
    padding: 1em;
    display:grid;
    grid-template-columns: 1fr;
    gap: 1em; 
  }

  .single-project-category {
    padding: 1em;
  }

  .single-project-category h1 {
    font-size:15px;
  }

  .single-project-category h5 {
    font-size:8px;
  }

  .get-in-touch {
    margin-top:3em;
  }

  .get-in-touch a {
    font-size:28px;
  }

  .design {
    padding:3em 1em;
  }

  .design-gallery {
    columns:150px;
    gap:10px;  
  }

  footer {
    padding-top:3em;
    display:grid;
    grid-template-columns: 1fr;
  }

  .footer-social ul {
    padding-top:10px;
    font-size:14px;
  }

  .copyright {
    display: flex;
    justify-content: center;
  }

  .credits {
    margin-top:50px;
    display: flex;
    justify-content: center;
    font-size:10px;
  }
  
}

@media (min-width: 1080px) and (max-width: 1920px)  {
  .hide-on-big {
    display:none;
  }
}

/* Bigger Screens */

@media (min-width: 1920px) and (max-width: 2560px)  {
  
  nav {
    padding: 7em;
  }

  .nav-items {
    gap:5em;
  }

  .nav-items a {
    font-size: 15px;
  }

  .lower-nav {
    padding:7em;
  }

  .short-bio p {
    font-size:35px;
  }

  .explore a {
    font-size:35px;
  }

  .bio-pic-container {
    padding-top:7em;
  }

  .bio {
    padding: 7em 20em;
  }

  .bio-container {
    font-size:25px;
  }

  .photo-gallery {
      columns: 500px;
    }

  .hide-on-big {
    display:none;
  }

  .portfolio {
    padding: 10em 7em 3em 7em;
  }

  .portfolio h1 {
    font-size:30px;
    padding: 1em;
  }


  .single-project-about {
    padding: 7em 20em;
  }

  .single-project-about-title {
    font-size:35px;
  }

  .single-project-about-project {
    font-size:25px;
  }

  .single-project-gallery {
    padding: 7em; 
  }

  .bio-pic {
    padding: 7em;
  }

  .photo-journal {
    padding:7em;
  }

  .photo-journal h1 {
    font-size:20px;
  }

  .photo-journal h2 {
    font-size:14px;
  }

  .personal-projects {
    padding:7em;
  }

  .mobile-social {
    display:none;
  }

  .design {
    padding: 12em 7em;
  }

  .design-gallery {
    columns:500px;
  }

  .hover-text-left {
    font-size:12px;
  }

  .hover-text-right {
    font-size:12px;
  }
  
  footer {
    padding: 7em 7rem;
  }

  .footer-social ul {
    font-size:15px;
  }

  .copyright {
    font-size:15px;
  }
  
  .credits {
    font-size:15px;
  }
}

/* PORTFOLIO GRID – 1 colonna solo su smartphone in verticale */

@media only screen and (max-width: 600px) and (orientation: portrait) {
  .portfolio-container {
    grid-template-columns: 1fr;
  }
}

/* Smartphone in orizzontale: 3 colonne, testo hover più piccolo */

@media only screen and (max-height: 500px) and (orientation: landscape) {
  .overlay-text {
    font-size: 12px;
  }
}

/* LOGO RESPONSIVE */

@media only screen and (max-width: 600px) {
  .logo-text {
    font-size: 13px;
  }
}


/* NAV MOBILE PORTRAIT – logo sopra, menu in un'unica riga sotto, entrambi a tutta larghezza */

@media only screen and (max-width: 600px) and (orientation: portrait) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    row-gap: 0.75em;
  }

  .logo {
    order: -1;
    flex: 0 0 100%;
    width: 100%;
  }

  /* i gruppi sinistra/destra si "sciolgono": tutte le voci stanno sulla stessa riga */
  .nav-left,
  .nav-right {
    display: contents;
  }

  .nav-items a i {
    font-size: 12px;
  }

  /* spazio per la nav più alta */
  .portfolio {
    padding-top: 7em;
  }
}

/* FOOTER – privacy | copyright | back to top */

footer {
  grid-template-columns: 1fr auto 1fr;
}

.footer-privacy,
.back-to-top {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
}

.footer-privacy {
  justify-self: start;
}

.copyright {
  justify-self: center;
  justify-content: center;
}

.back-to-top {
  justify-self: end;
}

.footer-privacy:hover,
.back-to-top:hover {
  color: var(--hover);
}

/* margini laterali su schermi stretti */
@media only screen and (max-width: 600px) {
  footer {
    padding: 3em 1rem; /* allineato al container dei progetti */
  }
}

/* solo smartphone in verticale: copyright centrato e basta */
@media only screen and (max-width: 600px) and (orientation: portrait) {
  footer {
    grid-template-columns: 1fr;
  }

  footer {
    row-gap: 0.4em;
  }

  /* PRIVACY come terza riga, sotto copyright e P.IVA */
  .footer-privacy {
    order: 2;
    justify-self: center;
  }

  .back-to-top {
    display: none;
  }
}

/* PAGINE PROGETTO – margini laterali allineati a nav, griglia e footer */

.single-project-category,
.single-project-about,
.get-in-touch {
  padding-left: 3rem;
  padding-right: 3rem;
}

@media (min-width: 1920px) {
  .single-project-category,
  .single-project-about,
  .get-in-touch {
    padding-left: 7rem;
    padding-right: 7rem;
  }
}

@media only screen and (max-width: 600px) {
  .single-project-category,
  .single-project-about,
  .get-in-touch {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* CONTACT */

.page-contact {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* contenitore: margini allineati a nav e footer */
.contact {
  flex: 1;
  display: flex;
  padding: 8em 3rem 0;
  color: #fff;
}

/* pannello con immagine di sfondo */
.contact-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2em;
  padding: 6em 3em;
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    url("img/background.webp") center / cover no-repeat;
}

.contact-label,
.contact-info-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.contact-email {
  font-family: var(--font-logo);
  font-weight: 300;
  font-size: clamp(22px, 3.2vw, 52px);
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
  overflow-wrap: anywhere;
}

.contact-email:hover {
  color: var(--hover);
}

.contact-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #fff;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0.8em 1.6em;
  cursor: pointer;
  transition: 0.2s;
}

.contact-copy:hover {
  color: var(--hover);
  border-color: var(--hover);
}

.contact-info {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2em;
  margin-top: 2em;
}

.contact-info-title {
  margin-bottom: 0.9em;
}

.contact-info-text {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.contact-info-text a {
  font: inherit;
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
}

.contact-info-text a:hover {
  color: var(--hover);
}

@media (min-width: 1920px) {
  .contact {
    padding-left: 7rem;
    padding-right: 7rem;
  }

  .contact-info-text {
    font-size: 15px;
  }
}

@media only screen and (max-width: 600px) {
  .contact {
    padding: 9em 1rem 0;
  }

  .contact-panel {
    padding: 4em 1.25em;
  }
}

@media only screen and (max-width: 600px) and (orientation: portrait) {
  .contact-info {
    grid-template-columns: 1fr;
  }
}

/* P.IVA – a destra nel footer (al posto di back to top) */

.footer-vat {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
}

/* mobile verticale: copyright, P.IVA e PRIVACY centrati uno sotto l'altro */
@media only screen and (max-width: 600px) and (orientation: portrait) {
  .footer-vat {
    order: 1;
    justify-self: center;
  }
}
/* ABOUT – spazio sotto la nav su mobile */

@media only screen and (max-width: 600px) and (orientation: portrait) {
  .bio-pic {
    padding-top: 7em; /* stesso spazio della griglia in home */
  }
}

/* PLAY BUTTON – cerchio bianco trasparente */

.yt-play-button {
  width: 72px;
  height: 72px;
  background-color: transparent;
  border: 1.5px solid #fff;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.35)); /* leggibile anche su fotogrammi chiari */
}

.yt-play-button::after {
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
  margin-left: 5px; /* centratura ottica del triangolo */
  transition: all 0.3s ease;
}

/* hover solo sul pulsante, non su tutta l'anteprima */
.yt-play-button:hover {
  border-color: var(--hover);
  cursor: pointer;
}

.yt-play-button:hover::after {
  border-left-color: var(--hover);
}

@media only screen and (max-width: 600px) {
  .yt-play-button {
    width: 56px;
    height: 56px;
  }

  .yt-play-button::after {
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
    margin-left: 4px;
  }
}

/* PESI – menu e testo della bio più leggeri */

.nav-items a {
  font-weight: 400; /* prima 600 */
}

.bio-container {
  font-weight: 200; /* prima 400, poi 300 */
}

/* HOVER PROGETTI – titolo più grande + categoria sotto */

.overlay-text {
  width: 90%;
  font-size: 18px; /* prima 14px */
  line-height: 1.2;
}

.overlay-category {
  display: block;
  margin-top: 0.6em;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

@media only screen and (max-width: 600px) {
  .overlay-text {
    font-size: 15px; /* prima 12px */
  }
}

/* smartphone in orizzontale: riquadri piccoli */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  .overlay-text {
    font-size: 13px;
  }

  .overlay-category {
    font-size: 9px;
    margin-top: 0.4em;
  }
}

/* ANTEPRIME VIDEO – il video copre esattamente l'immagine statica */

.portfolio-link .portfolio-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  z-index: 0;
  pointer-events: none;
}

/* FIX – l'immagine sotto il video sporgeva di 2px in basso (vecchio margine -5px).
   Ora immagine, video e overlay hanno esattamente lo stesso riquadro. */
.portfolio-item img {
  display: block;
  margin-bottom: 0;
}

.portfolio-link {
  overflow: hidden;
}

/* COPERTINA SENZA VIDEO (es. documentario in lavorazione) */

.project-cover {
  cursor: default;
}

/* HERO – video a tutto schermo in apertura della home */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh; /* su mobile esclude le barre del browser */
  overflow: hidden;
  background: #000 url("img/hero.webp") center / cover no-repeat;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* leggero velo scuro, più marcato in basso dove c'è "ALL WORKS" */
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

/* il pulsante play riusa lo stile delle schede progetto */
.hero-play {
  z-index: 2;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hero-works {
  position: absolute;
  left: 50%;
  bottom: 2.5em;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s;
}

.hero-works:hover {
  color: var(--hover);
}

.hero-works i {
  font-size: 13px;
  animation: hero-bounce 2s ease-in-out infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-works i { animation: none; }
}

@media only screen and (max-width: 600px) {
  .hero-works {
    bottom: 2em;
  }
}

/* ARCHIVE – lista di tutti i lavori, video al passaggio del mouse */

.page-archive {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.archive {
  flex: 1;
  position: relative;
  padding: 9em 3rem 5em;
  color: #fff;
}

.archive-head,
.archive-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 3fr 2fr 3rem;
  column-gap: 1.5rem; /* in rem: intestazione e righe restano allineate */
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.archive-head {
  padding-bottom: 1.6em;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.archive-row {
  padding: 0.95em 0;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.archive-row:hover {
  color: #fff;
}

.archive-num {
  text-align: right;
}

/* video al centro, dietro al testo */
.archive-video {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(42vw, 820px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.archive-video.visible {
  opacity: 1;
}

@media (min-width: 1920px) {
  .archive {
    padding-top: 13.5em; /* su schermi grandi la nav è più alta (7em di margine) */
    padding-left: 7rem;
    padding-right: 7rem;
  }
}

@media only screen and (max-width: 600px) {
  .archive {
    padding: 10em 1rem 3em;
  }

  .archive-head,
  .archive-row {
    grid-template-columns: 2.6rem 1fr 1.8rem;
    column-gap: 0.8rem;
    font-size: 11px;
  }

  /* su mobile la categoria va sotto il titolo */
  .archive-row {
    grid-template-areas:
      "year title num"
      ". cat .";
    row-gap: 0.3em;
  }

  .archive-row .archive-year { grid-area: year; }
  .archive-row .archive-title { grid-area: title; }
  .archive-row .archive-cat { grid-area: cat; font-size: 10px; opacity: 0.7; }
  .archive-row .archive-num { grid-area: num; }

  .archive-head .archive-cat { display: none; }
}

/* NAV – niente più effetto "differenza": tutto bianco pieno */

.nav-items a,
.logo-text {
  color: #fff;
}

.nav-items a:hover,
.logo-text:hover {
  color: var(--hover);
}

/* CONTACT – layout a due colonne con form, tutto in un'unica schermata su desktop */

.page-contact .contact {
  padding-top: 8em;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: stretch;
  text-align: left;
  gap: clamp(2rem, 5vw, 6rem);
  padding: clamp(2rem, 6vh, 5rem) clamp(1.5rem, 5vw, 5rem);
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 1.6em;
}

.contact-panel .contact-email {
  font-size: clamp(22px, 2.4vw, 42px);
}

.contact-panel .contact-info {
  max-width: none;
  margin-top: 1em;
  gap: 1.5em;
}

/* form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4em;
  width: 100%;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4em;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.contact-field span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  font-family: var(--font-text);
  font-size: 15px;
  color: #fff;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
  padding: 0.5em 0;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.contact-field textarea {
  resize: vertical;
  min-height: 5.5em;
}

.contact-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.contact-field select option {
  color: #000;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-bottom-color: var(--hover);
}

.contact-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
}

.contact-note {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  opacity: 0.6;
  max-width: 34em;
}

.contact-note a {
  font: inherit;
  color: inherit;
  text-decoration: underline;
}

.contact-send {
  flex-shrink: 0;
}

.contact-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.contact-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}

.contact-status.is-ok { color: #9fe0a0; }
.contact-status.is-error { color: #ff6b6b; }

@media (min-width: 1920px) {
  .page-contact .contact {
    padding-top: 13.5em; /* la nav è più alta su schermi grandi */
  }
}

/* tablet verticale e telefono: una colonna, la pagina scorre normalmente */
@media only screen and (max-width: 900px) and (orientation: portrait), only screen and (max-width: 600px) {
  .contact-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-side {
    align-items: center;
  }

  .contact-actions {
    flex-direction: column;
    text-align: center;
  }
}

@media only screen and (max-width: 600px) {
  .page-contact .contact {
    padding-top: 9em;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .contact-panel .contact-info {
    grid-template-columns: 1fr;
  }
}


/* CONTACT – versione essenziale: solo intestazione e form, centrati */

.contact-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5em;
}

.contact-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}

.contact-based {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.contact-form {
  max-width: 640px;
  text-align: left;
}

@media only screen and (max-width: 600px) {
  .contact-actions {
    flex-direction: column;
    text-align: center;
  }
}

/* schermi bassi (es. portatili 1280×720): spaziature più compatte per stare in una schermata */
@media (max-height: 800px) and (min-width: 601px) {
  .contact-panel {
    gap: 1.5em;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .contact-form {
    gap: 1em;
  }

  .contact-field textarea {
    min-height: 4em;
  }
}

/* =========================================================
   TEMA CHIARO – si attiva da solo se il dispositivo è in modalità chiara.
   Il tema scuro resta quello di base. Restano sempre "scuri" gli elementi
   che stanno sopra immagini e video (hero, riquadri dei progetti,
   pulsante play, lightbox, pannello della pagina contact).
   ========================================================= */

@media all { /* ex tema chiaro automatico: ora sempre attivo */
  :root {
    --light-bg: #ffffff;
    --light-fg: #141414;
    --link: #6b6b6b;  /* tema chiaro: link grigio scuro, neri al passaggio del mouse */
    --hover: #000000;
  }

  html,
  html body {
    background: var(--light-bg);
    color: var(--light-fg);
  }

  h1 {
    color: var(--light-fg);
  }

  /* loader */
  .preloader { background-color: var(--light-bg); }
  .preloader-timecode { color: var(--light-fg); }

  /* nav */
  nav,
  .nav-items a,
  .logo-text {
    color: var(--light-fg);
  }

  .nav-items a:hover,
  .logo-text:hover {
    color: var(--hover);
  }

  /* sopra il video dell'header in home la nav resta bianca */
  nav.nav-on-media,
  nav.nav-on-media .nav-items a,
  nav.nav-on-media .logo-text {
    color: #fff;
  }

  nav.nav-on-media .nav-items a:hover,
  nav.nav-on-media .logo-text:hover {
    color: var(--hover);
  }

  /* footer */
  footer,
  .footer-privacy,
  .footer-vat {
    color: var(--light-fg);
  }

  .footer-privacy:hover { color: var(--hover); }

  /* about */
  .bio-container { color: rgba(20, 20, 20, 0.85); }
  .bio-container a { color: var(--light-fg); }
  .bio-container a:hover { color: var(--hover); }

  /* schede progetto */
  .single-project-about-project,
  .single-project-category h1,
  .single-project-category h5 {
    color: var(--light-fg);
  }

  .category-center-element {
    border-left-color: var(--light-fg);
    border-right-color: var(--light-fg);
  }

  .get-in-touch a { color: var(--light-fg); }
  .get-in-touch a:hover { color: var(--hover); }

  /* archivio */
  .archive { color: var(--light-fg); }
  .archive-head { color: rgba(20, 20, 20, 0.4); }
  .archive-row { color: rgba(20, 20, 20, 0.55); }
  .archive-row:hover { color: var(--light-fg); }

  /* privacy policy e 404 (hanno uno stile interno alla pagina) */
  html body .privacy-policy,
  html body .main-content {
    color: var(--light-fg);
  }

  html body .privacy-policy a { color: var(--hover); }
}

/* =========================================================
   HOVER MONOCROMATICO
   stato normale = var(--link), passaggio del mouse = var(--hover)
   ========================================================= */

.nav-items a,
.footer-privacy,
.get-in-touch a,
.bio-container a,
.contact-info-text a,
.single-project-category a,
.single-project-category a h5 {
  color: var(--link);
}

.nav-items a:hover,
.footer-privacy:hover,
.get-in-touch a:hover,
.bio-container a:hover,
.contact-info-text a:hover,
.single-project-category a:hover,
.single-project-category a:hover h5,
.logo-text:hover {
  color: var(--hover);
}

/* sopra immagini e video (header, copertine, nav sopra le copertine) restano chiari in entrambi i temi */
nav.nav-on-media {
  --link: rgba(255, 255, 255, 0.72);
  --hover: #ffffff;
}

.hero-works {
  color: rgba(255, 255, 255, 0.72);
}

.hero-works:hover {
  color: #ffffff;
}

.yt-play-button {
  border-color: rgba(255, 255, 255, 0.72);
}

.yt-play-button::after {
  border-left-color: rgba(255, 255, 255, 0.72);
}

.yt-play-button:hover {
  border-color: #ffffff;
}

.yt-play-button:hover::after {
  border-left-color: #ffffff;
}

/* pagina contact: il pannello è sempre scuro, quindi usa i valori del tema scuro */
.contact-panel {
  --link: #b3b3b3;
  --hover: #ffffff;
}

/* cifre a larghezza fissa dove servono allineate (timecode, archivio, footer) */
.preloader-timecode,
.archive-row,
.archive-head,
footer {
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   BLOG – elenco articoli (/blog) e articolo singolo (/blog/slug)
   I colori usano "currentColor" con trasparenze, così funzionano
   sia nel tema scuro sia in quello chiaro.
   ========================================================= */

.page-blog,
.page-post {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.blog,
.post {
  flex: 1;
  padding: 9em 3rem 5em;
}

/* intestazione del blog */
.blog-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2em;
  flex-wrap: wrap;
  padding-bottom: 1.5em;
}

.blog-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  line-height: 1;
}

.blog-intro {
  font-size: 14px;
  opacity: 0.6;
  max-width: 36ch;
}

/* filtri categoria */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.6em;
  padding: 1em 0 2.5em;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-filters a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-filters a:hover,
.blog-filters a.is-active {
  color: var(--hover);
}

/* elenco: primo articolo in evidenza, poi griglia a 3 colonne */
.blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3em 10px;
}

.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.post-card-link:hover .post-card-media img {
  opacity: 0.8;
}

.post-card-body {
  padding-top: 1em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 1.2em;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0.6em 0 0.5em;
}

.post-card-link:hover .post-card-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.7;
}

/* articolo in evidenza: immagine grande a sinistra, testo a destra */
.post-card--featured {
  grid-column: 1 / -1;
}

.post-card--featured .post-card-link {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2em;
  align-items: end;
}

.post-card--featured .post-card-body {
  padding-top: 0;
}

.post-card--featured .post-card-title {
  font-size: clamp(22px, 2.2vw, 32px);
}

.post-card--featured .post-card-excerpt {
  font-size: 15px;
}

/* ---------- articolo singolo ---------- */

.post-header,
.post-body,
.post-footer {
  max-width: 720px;
  margin: 0 auto;
}

.post-back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--link);
  text-decoration: none;
  margin-bottom: 2.5em;
  transition: color 0.2s;
}

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

.post-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  margin: 0.5em 0 0.5em;
}

.post-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  opacity: 0.75;
}

.post-cover {
  max-width: 1200px;
  margin: 3.5em auto;
}

.post-cover img,
.post-figure img {
  width: 100%;
  display: block;
}

.post-cover figcaption,
.post-figure figcaption,
.post-video figcaption {
  font-size: 12px;
  opacity: 0.55;
  padding-top: 0.8em;
}

.post-body {
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.65;
}

.post-body > * + * {
  margin-top: 1.2em;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2em;
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 1.6em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.2em;
}

.post-body li + li {
  margin-top: 0.3em;
}

.post-body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover {
  opacity: 0.7;
}

.post-body code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.post-body blockquote {
  margin: 2em 0;
  padding-left: 1em;
  border-left: 2px solid currentColor;
  font-size: 22px;
  line-height: 1.4;
}

/* immagini e video possono uscire un po' dalla colonna di testo */
.post-figure,
.post-video {
  margin: 2.2em -6vw;
}

.post-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.post-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-cta {
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-footer {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.post-tags span {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35em 0.8em;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}

.post-nav {
  margin-top: 3em;
  display: flex;
  justify-content: flex-end;
}

.post-nav a {
  color: inherit;
  text-decoration: none;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.post-nav-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.post-nav-title {
  font-size: 18px;
  font-weight: 500;
}

.post-nav a:hover .post-nav-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- responsive ---------- */

@media (min-width: 1920px) {
  .blog,
  .post {
    padding: 13.5em 7rem 6em;
  }
}

@media only screen and (max-width: 1024px) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-figure,
  .post-video {
    margin-left: 0;
    margin-right: 0;
  }
}

@media only screen and (max-width: 600px) {
  .blog,
  .post {
    padding: 10em 1rem 3em;
  }

  .blog-list {
    grid-template-columns: 1fr;
  }

  .post-card--featured .post-card-link {
    grid-template-columns: 1fr;
    gap: 1em;
  }

  .post-body {
    font-size: 17px;
  }

  .post-body blockquote {
    font-size: 19px;
  }
}

/* BLOG – video YouTube nell'articolo: miniatura con play, il player si carica al clic */
.post-yt {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.post-yt-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.post-yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-yt-facade:hover .yt-play-button {
  border-color: #fff;
}

.post-yt-facade:hover .yt-play-button::after {
  border-left-color: #fff;
}

.post-notes {
  margin-top: 2.5em;
}

.post-notes > * + * {
  margin-top: 1.2em;
}

/* =========================================================
   NAV – home/archive/journal a sinistra, about/contact/social a destra.
   Sotto i 900px: logo a sinistra + pulsante "menu", menu a comparsa.
   ========================================================= */

.nav-toggle {
  display: none;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--link);
  background: none;
  border: 0;
  padding: 0.5em 0;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-toggle:hover {
  color: var(--hover);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50; /* sopra i contenuti, sotto la nav: logo e "close" restano visibili */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7em 1rem 2.5em;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.mobile-menu-links a {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 52px);
  line-height: 1.15;
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu-social {
  display: flex;
  gap: 1.8em;
}

.mobile-menu-social a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--link);
  text-decoration: none;
}

.mobile-menu-links a:hover,
.mobile-menu-social a:hover {
  color: var(--hover);
}

@media only screen and (max-width: 900px) {
  nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: none;
    align-items: center;
    padding: 1.4em 1rem;
  }

  .nav-left,
  .nav-right {
    display: none;
  }

  .logo {
    order: 0;
    justify-self: start;
    width: auto;
  }

  .logo-text {
    font-size: 20px;
  }

  .nav-toggle {
    display: block;
  }

  /* la nav ora è più bassa: meno spazio sopra i contenuti */
  .portfolio { padding-top: 5em; }
  .bio-pic { padding-top: 5em; }
}

@media (min-width: 901px) {
  .mobile-menu { display: none; }
}

/* con il menu aperto la nav usa i colori normali anche sopra le copertine */
body.menu-open nav.nav-on-media {
  --link: #b3b3b3;
  --hover: #ffffff;
}

@media all { /* ex tema chiaro automatico: ora sempre attivo */
  .mobile-menu {
    background: var(--light-bg);
  }

  body.menu-open nav.nav-on-media {
    --link: #6b6b6b;
    --hover: #000000;
    color: var(--light-fg);
  }

  body.menu-open nav.nav-on-media .logo-text {
    color: var(--light-fg);
  }
}

/* la nav sta sopra il menu a comparsa (ma sotto lightbox e loader, che sono a 1000+) */
nav {
  z-index: 60;
}

/* titolo leggibile da Google e lettori di schermo, ma invisibile */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   SPAZIO SOTTO LA NAV – uguale su tutte le pagine
   (circa 40px tra la nav e il primo contenuto)
   ========================================================= */

.archive,
.blog,
.post,
.page-contact .contact,
.bio-pic {
  padding-top: 7em;
}

@media (min-width: 1920px) {
  .archive,
  .blog,
  .post,
  .page-contact .contact,
  .bio-pic {
    padding-top: 11em;
  }
}

@media only screen and (max-width: 900px) {
  .archive,
  .blog,
  .post,
  .page-contact .contact,
  .bio-pic {
    padding-top: 5.5em;
  }
}

/* =========================================================
   DISPOSITIVI SENZA HELVETICA NEUE (Android, Windows)
   TeX Gyre Heros ha solo regular e bold: si compensa così
   ========================================================= */

/* logo: GIORGIO regular + MARANGOLO bold, per mantenere il contrasto del Mac */
.logo-text b {
  font-weight: 700;
}

/* =========================================================
   MENU MOBILE – voci e social allineati a destra, maiuscole, più sottili
   ========================================================= */

.mobile-menu-links {
  align-items: flex-end;
  text-align: right;
}

.mobile-menu-links a {
  font-size: clamp(26px, 7.5vw, 44px);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.mobile-menu-social {
  justify-content: flex-end;
}

/* JOURNAL – intestazione dell'articolo più essenziale: ← Journal, data, titolo */
.post-back {
  margin-bottom: 1.8em;
}

.post-title {
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.12;
  margin: 0.4em 0 0;
}

.post-cover {
  margin-top: 2.5em;
}

/* PAGINE DI SERVIZIO (/services/... e /it/servizi/...) */
.page-service .post-header {
  margin-bottom: 2.5em;
}

.service-projects {
  margin: 4em 0;
}

.service-projects-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 1.2em;
}

.service-projects .blog-list {
  grid-template-columns: repeat(4, 1fr);
  gap: 2em 10px;
}

.service-projects .post-card-title {
  font-size: 15px;
  margin-top: 0.5em;
}

@media only screen and (max-width: 1024px) {
  .service-projects .blog-list { grid-template-columns: repeat(2, 1fr); }
}

@media only screen and (max-width: 600px) {
  .service-projects .blog-list { grid-template-columns: 1fr; }
}

/* SERVIZI – link agli altri servizi e pagina indice */
.service-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 1.6em;
}

.service-related-links a {
  font-size: 14px;
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

.service-related-links a:hover {
  color: var(--hover);
}

.service-index {
  margin-top: 2.5em;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.service-index-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9em 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--link);
  text-decoration: none !important;
  transition: color 0.2s;
}

.service-index-link:hover {
  color: var(--hover);
}

.service-index-link + .service-index-link {
  margin-top: 0;
}

/* ABOUT – blocco dei servizi sotto la bio, allineato al testo */
.about-services {
  padding: 0 12em 6em;
}

.about-services-it {
  margin-top: 2em;
}

@media only screen and (max-width: 900px) {
  .about-services { padding: 0 1rem 4em; }
}

/* =========================================================
   FOOTER – privacy + selettore di lingua (EN / IT)
   ========================================================= */

.footer-left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 1.8em;
}

.footer-lang {
  display: inline-flex;
  gap: 0.4em;
  font-size: 12px;
  color: var(--link);
}

.footer-lang a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-lang a:hover,
.footer-lang a.is-active {
  color: var(--hover);
}

@media only screen and (max-width: 600px) and (orientation: portrait) {
  .footer-left {
    order: 2;
    justify-self: center;
  }
}

/* =========================================================
   ABOUT – tre anteprime dei servizi
   ========================================================= */

.about-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.about-service {
  color: inherit;
  text-decoration: none;
}

.about-service img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.about-service:hover img {
  opacity: 0.8;
}

.about-service-label {
  padding-top: 0.8em;
  font-size: 14px;
  color: var(--link);
  transition: color 0.2s;
}

.about-service:hover .about-service-label {
  color: var(--hover);
}

@media only screen and (max-width: 600px) {
  .about-services-grid {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }
}

/* 404 bilingue */
.not-found-it {
  opacity: 0.6;
}

/* MENU MOBILE – selettore di lingua a sinistra di Instagram e Vimeo */
.mobile-menu-lang {
  display: inline-flex;
  gap: 0.4em;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--link);
}

.mobile-menu-social .mobile-menu-lang a {
  color: var(--link);
}

.mobile-menu-social .mobile-menu-lang a.is-active,
.mobile-menu-social .mobile-menu-lang a:hover {
  color: var(--hover);
}

/* sotto i 900px (dove c'è il menu a comparsa) il selettore non sta più nel footer */
@media only screen and (max-width: 900px) {
  .footer-lang {
    display: none;
  }
}

/* =========================================================
   HOME – lista dei servizi dopo la griglia dei lavori
   ========================================================= */

.home-services {
  --page-bg: #000;
  padding: 4em 3rem 2em;
}

.home-services-title {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 1.2em;
}

.home-services-list {
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

.home-service {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  padding: 0.35em 0.25em;
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  font-size: clamp(30px, 5vw, 72px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--hover);
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* hover: tutto il rettangolo si inverte */
.home-service:hover,
.home-service:focus-visible {
  background-color: var(--hover);
  color: var(--page-bg);
}

.home-service-arrow {
  width: 0.7em;
  height: 0.7em;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.home-service:hover .home-service-arrow {
  transform: translate(0.08em, -0.08em);
}

@media all { /* ex tema chiaro automatico: ora sempre attivo */
  .home-services { --page-bg: var(--light-bg); }
}

@media (min-width: 1920px) {
  .home-services { padding-left: 7rem; padding-right: 7rem; }
}

@media only screen and (max-width: 600px) {
  .home-services { padding: 3em 1rem 1em; }
}

/* =========================================================
   JOURNAL – impaginazione da diario: voci datate per anno
   ========================================================= */

.journal {
  flex: 1;
  position: relative;
  padding: 7em 3rem 5em;
}

.journal-year + .journal-year {
  margin-top: 3.5em;
}

.journal-year-label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--link);
  padding-bottom: 0.8em;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.journal-list {
  list-style: none;
  position: relative;
  z-index: 1;
}

.journal-entry {
  display: grid;
  grid-template-columns: 8em 10em 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.1em 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

.journal-entry:hover {
  color: var(--hover);
}

.journal-date,
.journal-place {
  font-size: 12px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.journal-text {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  min-width: 0;
}

.journal-title {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.25;
  color: var(--hover);
}

.journal-excerpt {
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70ch;
}

/* miniatura al passaggio del mouse, dietro al testo (come nell'archivio) */
.journal-preview {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(38vw, 720px);
  height: auto !important; /* evita che regole generali sulle immagini la allunghino */
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.journal-preview.visible {
  opacity: 0.35;
}

/* singola voce: luogo e data in apertura, come in cima a una pagina di diario */
.entry-dateline {
  font-size: 14px;
  color: var(--link);
  margin-top: 0.4em;
}

.entry-nav {
  display: flex;
  justify-content: space-between;
  gap: 2em;
}

.entry-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  color: inherit;
  text-decoration: none;
  max-width: 45%;
}

.entry-nav-next {
  text-align: right;
  margin-left: auto;
}

.entry-nav a:hover .post-nav-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 1920px) {
  .journal { padding: 11em 7rem 6em; }
}

@media only screen and (max-width: 900px) {
  .journal { padding: 5.5em 1rem 3em; }

  .journal-entry {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date place"
      "text text";
    row-gap: 0.4em;
    column-gap: 1em;
  }

  .journal-date { grid-area: date; }
  .journal-place { grid-area: place; }
  .journal-text { grid-area: text; }

  .journal-excerpt {
    white-space: normal;
  }
}

/* =========================================================
   PLAYER DEL SITO (video su R2) – controlli minimali, monocromatici
   ========================================================= */

.gm-lightbox-content {
  width: 92%;
  max-width: 1400px;
}

.gm-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.gm-player.is-fullscreen {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
}

.gm-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.gm-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5em 1.2em 0.8em;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gm-player.show-controls .gm-controls,
.gm-player:not(.is-playing) .gm-controls {
  opacity: 1;
  pointer-events: auto;
}

.gm-player.is-playing:not(.show-controls) .gm-video {
  cursor: none;
}

/* barra di avanzamento: linea sottile che si ingrandisce al passaggio */
.gm-progress {
  position: relative;
  height: 14px;
  cursor: pointer;
  touch-action: none;
}

.gm-progress::before,
.gm-progress-buffer,
.gm-progress-played {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  height: 2px;
  transition: height 0.15s, top 0.15s;
}

.gm-progress::before { right: 0; background: rgba(255, 255, 255, 0.25); }
.gm-progress-buffer { width: 0; background: rgba(255, 255, 255, 0.4); }
.gm-progress-played { width: 0; background: #fff; }

.gm-progress:hover::before,
.gm-progress:hover .gm-progress-buffer,
.gm-progress:hover .gm-progress-played {
  top: 5px;
  height: 4px;
}

.gm-bar {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-top: 0.3em;
}

.gm-spacer { flex: 1; }

.gm-btn {
  display: inline-flex;
  width: 30px;
  height: 30px;
  padding: 4px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: color 0.2s;
}

.gm-btn:hover,
.gm-btn:focus-visible { color: #fff; }

.gm-btn svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.gm-play .i-pause,
.gm-player.is-playing .gm-play .i-play,
.gm-mute .i-muted,
.gm-player.is-muted .gm-mute .i-vol { display: none; }

.gm-player.is-playing .gm-play .i-pause,
.gm-player.is-muted .gm-mute .i-muted { display: block; }

.gm-time {
  font-size: 12px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
}

/* indicatore di caricamento discreto */
.gm-player.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gm-spin 0.9s linear infinite;
}

@keyframes gm-spin { to { transform: rotate(360deg); } }

@media only screen and (max-width: 600px) {
  .gm-lightbox-content { width: 100%; }
  .gm-controls { padding: 2em 0.8em 0.5em; }
  .gm-btn { width: 34px; height: 34px; }
}

.gm-progress:focus { outline: none; }
.gm-progress:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }

/* PAGINE PROGETTO – senza "go back", spazio tra la galleria e il footer */
.single-project-gallery {
  margin-bottom: 6em;
}

@media only screen and (max-width: 600px) {
  .single-project-gallery {
    margin-bottom: 3.5em;
  }
}

/* JOURNAL – player del sito dentro la voce, immagini e didascalie nel testo */
.entry-player .gm-player .gm-video { cursor: pointer; }

.post-body img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body figure.post-figure {
  margin: 2.2em 0;
}

/* pulsante play grande prima del primo avvio (player nella pagina) */
.gm-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.2s;
}

.gm-big-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-left: 16px solid rgba(255, 255, 255, 0.85);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.gm-player.has-started .gm-big-play { opacity: 0; }

/* NAV – le parti vuote della barra (i margini) lasciano passare i clic ai contenuti sotto;
   restano cliccabili solo logo, voci del menu, icone e pulsante del menu mobile */
nav {
  pointer-events: none;
}

nav a,
nav button {
  pointer-events: auto;
}

/* =========================================================
   REDESIGN NOVEMBRE 2026
   - solo tema chiaro (fondo grigio chiarissimo, vedi --light-bg)
   - nav: logo a sinistra, tutte le voci a destra (tutte le pagine)
   - home: hero con immagine statica nel contenitore + "Latest projects"
   ========================================================= */

/* NAV */
@media (min-width: 901px) {
  nav {
    grid-template-columns: auto 1fr;
  }

  nav .logo {
    justify-self: start;
  }

  nav .nav-right {
    justify-self: end;
    gap: 2.4em;
  }
}

/* HOME – HERO */
.home-hero.portfolio {
  text-align: left;
  padding-bottom: 0;
}

.home-hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #f0f0f0;
}

.home-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* HOME – ULTIMI PROGETTI */
.home-latest.portfolio {
  text-align: left;
  padding-top: 6em;
}

.latest-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2em;
  margin-bottom: 2.6em;
}

.latest-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--light-fg);
  margin: 0;
}

.latest-text {
  max-width: 26em;
  text-align: right;
  font-size: clamp(14px, 1.15vw, 19px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--light-fg);
  margin: 0;
}

.latest-grid {
  grid-template-columns: repeat(3, 1fr);
  column-gap: 14px;
  row-gap: 3em;
  color: var(--light-fg);
}

.latest-label {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  font-size: 12px;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--light-fg);
}

.latest-name {
  color: var(--link);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.latest-link {
  aspect-ratio: 16 / 9;
  background: #f0f0f0;
}

.latest-link img {
  height: 100%;
}

/* niente velo scuro né titolo al centro: c'è l'etichetta "View project" */
.latest-link::after {
  display: none;
}

.latest-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.1em;
  background: #fff;
  color: #141414;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.latest-link:hover .latest-pill {
  opacity: 1;
}

.latest-link:hover .latest-name,
.latest-item:hover .latest-name {
  color: var(--hover);
}

@media (hover: none) {
  .latest-pill { display: none; }
}

@media only screen and (max-width: 900px) {
  .latest-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .latest-text {
    text-align: left;
  }

  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 600px) {
  .home-hero-frame {
    aspect-ratio: 3 / 2;
  }

  .home-latest.portfolio {
    padding-top: 3.5em;
  }

  .latest-grid {
    grid-template-columns: 1fr;
    row-gap: 2.2em;
  }
}

/* HOME – il video dell'anteprima compare solo quando parte (al passaggio del mouse) */
.latest-link .portfolio-video {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.latest-link.is-playing .portfolio-video {
  opacity: 1;
}

/* l'etichetta sta sopra il video */
.latest-link .latest-pill { z-index: 3; }

/* NAV – larghezza senza la barra di scorrimento: 100vw la includeva e
   spingeva l'ultima icona oltre il margine destro del contenuto */
nav {
  left: 0;
  right: 0;
  width: auto;
}

/* ABOUT – i paragrafi della bio compaiono subito, senza dissolvenza allo scorrimento */
.bio-container .block {
  animation: none;
  opacity: 1;
}

/* PAGINE PROGETTO – niente stelline nel titolo, testo con interlinea esplicita */
.single-project-about-project p {
  line-height: 1.5;
  margin: 0 0 1em;
}

/* MOBILE – copertina del progetto più grande (4:5, l'immagine viene tagliata) */
@media only screen and (max-width: 600px) {
  .single-project {
    width: 100%;
    height: auto;
  }

  .single-project .yt-video-thumbnail {
    aspect-ratio: 4 / 5;
  }

  .single-project .yt-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .single-project-about-project {
    font-size: 16px;
  }
}

/* MENU MOBILE – voci centrate in verticale, social sempre in basso */
.mobile-menu-links {
  flex: 1;
  justify-content: center;
}

/* HOME – Latest projects: 2 colonne x 2 righe (4 progetti) su desktop, tablet e telefono orizzontale;
   1 colonna solo sul telefono in verticale */
.latest-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media only screen and (max-width: 600px) and (orientation: portrait) {
  .latest-grid {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 600px) and (orientation: landscape) {
  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   HOME – intestazione "Latest Projects" centrata (Instrument Serif)
   e titolo/categoria in sovraimpressione al passaggio del mouse
   ========================================================= */

/* Instrument Serif: serif libero (licenza OFL, vedi fonts/LICENSE-InstrumentSerif.txt), già stretto di suo */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.home-latest.portfolio {
  padding-top: 9em;
}

.latest-head {
  display: block;
  text-align: center;
  margin: 0 0 7em;
}

.latest-kicker {
  margin: 0 0 0.9em;
  font-family: var(--font-text);
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--light-fg);
}

.latest-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 7.4vw, 8.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--light-fg);
}

/* sovraimpressione: titolo + categoria */
.latest-link::after {
  display: block;
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.latest-caption {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1em;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.latest-caption-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.latest-caption-cat {
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.latest-link:hover::after,
.latest-link:hover .latest-caption,
.latest-link:focus-visible::after,
.latest-link:focus-visible .latest-caption {
  opacity: 1;
}

@media only screen and (max-width: 900px) {
  .home-latest.portfolio {
    padding-top: 6em;
  }

  .latest-head {
    margin-bottom: 4em;
  }
}

/* senza mouse (telefono, tablet) titolo e categoria restano sempre visibili */
@media (hover: none) {
  .latest-link::after {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 55%);
  }

  .latest-caption {
    opacity: 1;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
  }

  .latest-caption-title {
    font-size: 18px;
  }
}

/* HOME – stesso spazio tra righe e colonne di Latest projects */
.latest-grid,
.home-latest .latest-grid {
  column-gap: 14px;
  row-gap: 14px;
}

/* HOME MOBILE (telefono in verticale) – hero come la copertina delle pagine progetto:
   a tutta larghezza, dal bordo superiore (la nav ci sta sopra, in bianco), formato 4:5 */
@media only screen and (max-width: 600px) and (orientation: portrait) {
  .home-hero.portfolio {
    padding: 0;
  }

  .home-hero-frame {
    aspect-ratio: 4 / 5;
  }

  .home-latest.portfolio {
    padding-top: 4.5em;
  }

  .latest-head {
    margin-bottom: 3em;
  }

  .latest-title {
    font-size: 2.8rem;
  }

  .latest-kicker {
    font-size: 11px;
  }
}


/* "Latest Projects" come immagine (SVG vettoriale dalla versione consumata in Instrument Serif) */
.latest-title img {
  display: block;
  width: clamp(280px, 30vw, 700px);
  height: auto;
  margin: 0 auto;
}

@media only screen and (max-width: 600px) {
  .latest-title img {
    width: 60vw;
  }
}

/* ABOUT – player Spotify che si carica solo al clic (niente cookie di Spotify prima) */
.music-embed {
  width: 100%;
  height: 152px;
  margin: 0; /* larghezza piena, come il testo della bio */
}

.music-embed-load {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.2em;
  padding: 0 1.5em;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  background: #f4f4f4;
  color: var(--light-fg);
  font-family: var(--font-text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.music-embed-load:hover {
  background: #ececec;
}

.music-embed-load i {
  font-size: 36px;
  line-height: 1;
}

.music-embed-load small {
  display: block;
  margin-top: 0.3em;
  font-size: 11px;
  color: #777;
}

.music-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* =========================================================
   HOME – INTRO a schermo intero (prima dell'hero)
   ========================================================= */

.home-intro {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 3em 2.4em; /* stessi margini laterali della griglia */
  background: var(--light-bg);
}

/* foto piccola al centro (senza cornice né ombra) */
.intro-polaroid {
  margin: 0;
  width: clamp(120px, 12vw, 220px);
}

.intro-polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* in basso: ruolo in piccolo (come la reference) e freccia verso lo showreel */
.intro-bottom {
  position: absolute;
  left: 3rem;
  right: 3rem;
  bottom: 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.intro-role {
  max-width: 16em;
  margin: 0;
  text-wrap: balance; /* righe bilanciate: "DIRECTOR, CINEMATOGRAPHER / AND CREATOR" */
  font-family: var(--font-sys);
  font-size: clamp(15px, 1.35vw, 24px);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  color: var(--light-fg);
}

/* freccia: nessuna animazione, solo cambio colore al passaggio del mouse */
.intro-down {
  display: block;
  padding: 0.4rem;
  color: var(--link);
  line-height: 0;
  transition: color 0.2s;
}

.intro-down:hover,
.intro-down:focus-visible {
  color: var(--hover);
}

.intro-down svg {
  width: clamp(18px, 1.4vw, 26px);
  height: auto;
}

@media (min-width: 1920px) and (max-width: 2560px) {
  .home-intro { padding-left: 7em; padding-right: 7em; }
  .intro-bottom { left: 7rem; right: 7rem; }
}

@media only screen and (max-width: 600px) {
  .home-intro { padding-left: 1em; padding-right: 1em; }
  .intro-bottom { left: 1rem; right: 1rem; bottom: 1.6rem; }
  .intro-polaroid { width: 42vw; }
}


/* HOME INTRO – tablet in verticale (601–1199px, portrait):
   la foto al centro più grande, tra la misura desktop (12vw) e quella del telefono (42vw) */
@media only screen and (min-width: 601px) and (max-width: 1199px) and (orientation: portrait) {
  .intro-polaroid { width: 30vw; }
}

/* ABOUT – tablet in verticale (601–1199px, portrait):
   foto nelle sue proporzioni (3:2, orizzontale) come su desktop, invece di 70vh d'altezza che la deformava;
   testo della bio largo quanto la foto (stessi margini laterali di .bio-pic) */
@media only screen and (min-width: 601px) and (max-width: 1199px) and (orientation: portrait) {
  .bio-pic-container img {
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
  }

  .bio {
    padding-left: 3em;
    padding-right: 3em;
  }
}
