:root {
  --ink: #11100f;
  --paper: #eeeae2;
  --paper2: #e4dfd5;
  --muted: #6a645c;
  --line: rgba(17, 16, 15, .18);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;

  --max: 1380px;
  --transition-speed: .10s;
}


/* =========================================================
   RESET / BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;

  background: var(--paper);
  color: var(--ink);

  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;

  opacity: 1;
  transition: opacity .25s ease-in-out;
}

body.page-transition {
  opacity: 0;
}

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


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: fixed;
  z-index: 1000;

  top: 16px;
  left: 5vw;
  right: 5vw;

  width: auto;
  max-width: none;
  min-width: 0;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 0 18px;

  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;

  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  color: #fff;
  mix-blend-mode: normal;
}

/* Effetto Liquid Glass condiviso da brand e navigazione */
.site-header .brand-pill,
.site-header .nav-pill {
  transition:
    background var(--transition-speed) ease,
    border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;

  background: rgba(35, 32, 29, .44);

  backdrop-filter: blur(26px) saturate(105%);
  -webkit-backdrop-filter: blur(26px) saturate(105%);

  border: 1px solid rgba(255, 255, 255, .18);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -1px 0 rgba(0, 0, 0, .08),
    0 1px 2px rgba(0, 0, 0, .10),
    0 8px 24px rgba(0, 0, 0, .14),
    0 16px 35px rgba(0, 0, 0, .08);
}

.brand-pill,
.nav-pill {
  display: flex;
  align-items: center;

  height: 54px;

  border-radius: 999px;
  border: 1px solid transparent;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
}

.brand-pill {
  padding: 0 8px;
}

.nav-pill {
  padding: 0 18px;
}

.brand img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  display: block;
}


/* =========================================================
   NAVIGAZIONE
   ========================================================= */

.nav {
  display: flex;
  gap: 34px;

  margin-left: auto;

  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.nav a {
  position: relative;
  z-index: 0;

  padding: 7px 12px;

  border-radius: 999px;
  opacity: .86;

  transition:
    opacity var(--transition-speed) ease;
}

/* Sfondo vetroso dell'elemento attivo/hover */
.nav a::before {
  content: "";

  position: absolute;
  inset: -2px -4px;
  z-index: -1;

  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;

  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, .06),
    0 4px 14px rgba(0, 0, 0, .10);

  opacity: 0;
  transform: scale(.92);

  transition:
    opacity var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.nav a.active {
  opacity: 1;
}

.nav a.active::before {
  opacity: 1;
  transform: scale(1);
}

.nav a:hover::before {
  opacity: .22;
  transform: scale(1);

  background: transparent;
  border-color: rgba(255, 255, 255, .22);
  box-shadow: none;
}

.nav a:hover {
  opacity: 1;
}


/* =========================================================
   MENU MOBILE
   ========================================================= */

.menu-toggle {
  display: none;

  background: none;
  border: 0;

  color: #fff;

  text-transform: uppercase;
  letter-spacing: .12em;

  transition:
    opacity var(--transition-speed) ease;
}

.menu-toggle:hover {
  opacity: .60;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 100vh;
  position: relative;

  /* Sfondo scuro e profondo coerente con il tema del sito */
  background: #11100f; 
  color: #fff;

  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;

  align-self: end;

  padding: 0 5vw 10vh;

  max-width: 900px;
}

.eyebrow {
  margin: 0 0 20px;

  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .2em;

  color: var(--muted);
}

.hero .eyebrow {
  color: rgba(255, 255, 255, .58);
}

h1 {
  margin: 0 0 42px;

  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(68px, 8.5vw, 145px);
  line-height: .78;
  letter-spacing: -.045em;
}

h1 em,
h2 em,
.display em {
  font-style: italic;
  font-weight: 400;
}

.hero-lede {
  max-width: 420px;

  color: rgba(255, 255, 255, .72);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;

  margin-top: 34px;
}


/* =========================================================
   HERO IMAGE
   ========================================================= */

.hero-image {
  position: absolute;
  top: 0;
  right: 0;

  width: 85%;
  height: 100%;

  /* Rimuoviamo o aumentiamo l'opacità generale per renderla più brillante */
  opacity: 0.9; 

  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    /* Sfumatura morbidissima ma cortissima: copre solo il primissimo bordo di contatto a sinistra */
    linear-gradient(90deg, #11100f 0%, rgba(17, 16, 15, 0.6) 12%, transparent 35%),
    /* Leggerissima chiusura in basso per legarla al fondo */
    linear-gradient(0deg, rgba(17, 16, 15, 0.4) 0%, transparent 30%);

  pointer-events: none;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 22px;

  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;

  transition:
    background var(--transition-speed) ease,
    border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.button-light {
  background: rgba(255, 255, 255, .10);
  color: #fff;

  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;

  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -1px 0 rgba(0, 0, 0, .10),
    0 8px 24px rgba(0, 0, 0, .16);
}

.button-light:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .30);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 10px 28px rgba(0, 0, 0, .20);

  transform: translateY(-2px);
}

.text-link {
  display: inline-block;

  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;

  transition:
    opacity var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.text-link:hover {
  opacity: .60;
  transform: translateY(-2px);
}

.text-link span {
  margin-left: 8px;

  font-size: 16px;
}


/* =========================================================
   SEZIONI
   ========================================================= */

.section {
  max-width: var(--max);

  margin: auto;
  padding: 100px 5vw;
}

.section-label {
  padding-bottom: 28px;

  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .2em;

  color: var(--muted);

  border-bottom: 1px solid var(--line);
}


/* =========================================================
   PROFILO / CONTATTI GRID
   ========================================================= */

.intro-grid,
.contact-grid {
  display: grid;

  grid-template-columns: 1.2fr .8fr;
  gap: 10vw;

  padding-top: 70px;
}

.display {
  margin: 0;

  font-family: var(--serif);
  font-size: clamp(45px, 4.8vw, 72px);
  line-height: .95;
  letter-spacing: -.035em;
}

.body-copy {
  max-width: 470px;

  color: #4d4841;
}

.body-copy p {
  margin: 0 0 22px;
}

.arrow-link {
  display: inline-block;

  margin-top: 18px;
  padding-bottom: 5px;

  border-bottom: 1px solid var(--ink);

  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .14em;

  transition:
    opacity var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.arrow-link:hover {
  opacity: .45;
  transform: translateY(-2px);
}

.arrow-link span {
  margin-left: 16px;

  font-size: 16px;
}


/* =========================================================
   MANIFESTO
   ========================================================= */

.manifesto {
  padding: 25px 0;

  background: var(--ink);
  color: var(--paper);

  overflow: hidden;
}

.manifesto-inner {
  display: flex;
  justify-content: space-around;
  gap: 40px;

  white-space: nowrap;

  font-family: var(--serif);
  font-size: 34px;
}


/* =========================================================
   LAVORI
   ========================================================= */

.work-category + .work-category {
  margin-top: 75px;
}

.work-category h3 {
  margin: 55px 0 0;

  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;

  text-transform: uppercase;
  letter-spacing: .16em;
}

.work-grid {
  padding-top: 20px;
}

.work-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;

  padding: 38px 0;

  border-bottom: 1px solid var(--line);

  align-items: start;
}

.work-number {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
}

.work-card h2 {
  margin: 0 0 12px;

  font-family: var(--serif);
  font-size: clamp(35px, 3.8vw, 56px);
  font-weight: 500;
  line-height: .9;
}

.work-card p {
  margin: 0;

  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}


/* =========================================================
   SHOWREEL
   ========================================================= */

.reel {
  position: relative;

  height: 75vh;
  min-height: 540px;

  display: flex;
  align-items: center;

  padding: 8vw;

  background: linear-gradient(120deg, #1c1917, #625a50);
  color: #fff;
}

.reel::before {
  content: "";

  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at 65% 45%,
    rgba(255, 255, 255, .12),
    transparent 32%
  );
}

.reel-content {
  position: relative;
  z-index: 1;
}

.reel h2 {
  margin: 0 0 40px;

  font-family: var(--serif);
  font-size: clamp(65px, 9vw, 140px);
  font-weight: 500;
  line-height: .76;
  letter-spacing: -.04em;
}

.reel .eyebrow {
  color: rgba(255, 255, 255, .55);
}

.circle-button {
  width: 76px;
  height: 76px;

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

  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;

  font-size: 14px;

  transition:
    background var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

.circle-button:hover {
  background: #fff;
  color: #111;
}

.small-note {
  margin-top: 20px;

  color: rgba(255, 255, 255, .45);
  font-size: 10px;
}


/* =========================================================
   GALLERY
   ========================================================= */

.gallery-grid {
  display: grid;

  grid-template-columns: 1.3fr 0.8fr 1.3fr;
  grid-template-rows: 1fr 1fr;

  gap: 14px;
  padding-top: 30px;
}

.gallery-item {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;

  box-shadow:
    0 8px 24px rgba(17, 16, 15, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
}

/* Layout desktop della griglia principale */
.gallery-grid .gallery-item:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}

.gallery-grid .gallery-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.gallery-grid .gallery-item:nth-child(3) {
  grid-column: 3;
  grid-row: 1 / 3;
}

.gallery-grid .gallery-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

/*
  Immagini della griglia.
  loading="lazy" e decoding="async" vengono
  definiti nell'HTML, non nel CSS.
*/
.gallery-item img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;

  user-select: none;
  -webkit-user-drag: none;
}

/*
  Livello usato esclusivamente per lo zoom
  della galleria principale.
*/
.gallery-grid .gallery-item .gallery-media {
  width: 100%;
  height: 100%;

  transform-origin: center center;

  transition:
    transform .55s cubic-bezier(.22, 1, .36, 1);
}

/* Inquadratura specifica delle quattro fotografie */
.gallery-grid .gallery-item:nth-child(1) img {
  object-position: 15% 10%;
}

.gallery-grid .gallery-item:nth-child(2) img {
  object-position: 50% 10%;
}

.gallery-grid .gallery-item:nth-child(3) img {
  object-position: 55% 10%;
}

.gallery-grid .gallery-item:nth-child(4) img {
  object-position: 45% 15%;
}


/* =========================================================
   GALLERY — DESKTOP
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

  /*
    Le immagini sono in bianco e nero a riposo.
    Il colore viene attivato al passaggio del mouse.
  */
  .gallery-grid .gallery-item img {
    filter: grayscale(100%);

    transition:
      filter .45s ease;
  }

  .gallery-grid .gallery-item:hover img {
    filter: grayscale(0%);
  }

  /*
    Lo zoom viene applicato al contenitore,
    separandolo dal cambio di colore dell'immagine.
  */
  .gallery-grid .gallery-item:hover .gallery-media {
    transform: scale(1.03);
  }



/* =========================================================
   CV
   ========================================================= */

.cv {
  padding-top: 50px;
}

.cv-box {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;

  padding: 70px;

  background: var(--paper2);
}

.cv-box h2 {
  margin: 0;

  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 5.5vw, 82px);
  line-height: .82;
}

.cv-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.arrow-diagonal {
  position: relative;

  display: inline-block;

  width: 9px;
  height: 9px;

  margin-left: 7px;

  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;

  transition:
    transform var(--transition-speed) ease;
}

.arrow-diagonal::after {
  content: "";

  position: absolute;

  width: 11px;
  height: 1px;

  top: 3px;
  left: -2px;

  background: currentColor;

  transform: rotate(-45deg);
  transform-origin: center;
}

.arrow-diagonal:hover {
  transform: translate(3px, -3px);
}

.button-dark {
  background: rgba(17, 16, 15, .50);
  color: #fff;

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, .16),
    0 8px 24px rgba(0, 0, 0, .16);
}

.button-dark:hover {
  background: rgba(17, 16, 15, .62);
  border-color: rgba(255, 255, 255, .26);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 10px 28px rgba(0, 0, 0, .20);

  transform: translateY(-2px);
}

.text-link.dark {
  padding-bottom: 4px;

  border-bottom: 1px solid var(--ink);
}

.text-link.dark:hover {
  opacity: .35;
}


/* =========================================================
   CONTATTI
   ========================================================= */

.contact {
  padding-bottom: 150px;
}

.contact-big {
  display: block;
  position: relative;

  margin-bottom: 42px;

  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.05;

  transition:
    opacity var(--transition-speed) ease,
    transform .35s ease,
    text-shadow .35s ease;
}

.contact-big:hover {
  opacity: .35;
}

.contact-big.material-highlight {
  opacity: 1;
  transform: translateY(-2px);
  text-shadow: 0 0 20px rgba(255, 255, 255, .20);
}

.contact-big.material-highlight::before {
  content: "";

  position: absolute;
  inset: -12px -18px;
  z-index: -1;

  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, .08),
    0 8px 24px rgba(0, 0, 0, .12);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 25px;

  margin-top: 60px;

  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 9px 15px;

  background: rgba(17, 16, 15, .50);
  color: #fff;

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, .16),
    0 8px 24px rgba(0, 0, 0, .16);

  transition:
    background var(--transition-speed) ease,
    border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.socials a:hover {
  opacity: .35;

  background: rgba(17, 16, 15, .62);
  border-color: rgba(255, 255, 255, .26);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 10px 28px rgba(0, 0, 0, .20);

  transform: translateY(-2px);
}


/* =========================================================
   FOOTER / GENERIC UTILITIES
   ========================================================= */

footer {
  display: flex;
  justify-content: space-between;

  padding: 28px 5vw;
  padding-right: calc(5vw + 76px);

  border-top: 1px solid var(--line);

  color: var(--muted);

  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .13em;
}

footer a {
  display: inline-block;

  transition:
    opacity var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

footer a:hover {
  opacity: .45;
  transform: translateY(-2px);
}

.work {
  padding-bottom: 50px;
}

.gallery {
  padding-top: 50px;
}


/* =========================================================
   GALLERY — DOWNLOAD E LIGHTBOX
   ========================================================= */

/*
  La freccia di download è un vero pulsante HTML
  generato dal JavaScript.

  Questo mantiene:
  - lo stesso aspetto del precedente indicatore;
  - un'area realmente cliccabile;
  - un comportamento separato dal click sulla fotografia.
*/

@media (hover: hover) and (pointer: fine) {

  .gallery-item {
    cursor: pointer;
  }

  .gallery-download {
    position: absolute;
    z-index: 3;

    right: 14px;
    bottom: 14px;

    width: 30px;
    height: 30px;

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

    margin: 0;
    padding: 0;

    appearance: none;
    -webkit-appearance: none;

    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);

    background: rgba(255, 255, 255, .14);

    box-shadow:
      0 4px 14px rgba(17, 16, 15, .14),
      inset 0 1px 1px rgba(255, 255, 255, .35);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: #fff;

    font-family: var(--sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;

    opacity: 0;
    transform: translateY(4px);

    pointer-events: none;

    cursor: pointer;

    transition:
      opacity .25s ease,
      transform .25s ease,
      background .15s ease,
      border-color .15s ease;
  }

  /*
    La freccia appare insieme all'hover
    della fotografia.
  */
  .gallery-item:hover .gallery-download,
  .gallery-download:focus-visible {
    opacity: 1;
    transform: translateY(0);

    pointer-events: auto;
  }

  .gallery-download:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .45);
  }
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.image-modal {
  position: fixed;
  z-index: 2000;
  inset: 0;

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

  padding: 72px 40px 40px;

  background: rgba(17, 16, 15, .92);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity .25s ease,
    visibility .25s ease;
}

.image-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-modal img {
  width: auto;
  height: auto;

  max-width: 92vw;
  max-height: 88vh;

  object-fit: contain;

  display: block;

  border-radius: 4px;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, .35);

  user-select: none;
  -webkit-user-drag: none;
}

.image-modal-close {
  position: absolute;
  z-index: 2;

  top: 24px;
  right: 24px;

  width: 42px;
  height: 42px;

  padding: 0;

  display: grid;
  place-items: center;

  border-radius: 50%;

  font-size: 0;
  line-height: 0;
}

.image-modal-close::before {
  content: "×";

  position: absolute;
  top: 50%;
  left: 50%;

  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;

  transform: translate(-50%, -50%);
}

.image-modal-close:hover {
  transform: scale(1.05);
}


/*
  Durante la visualizzazione fullscreen
  blocchiamo lo scroll della pagina sottostante.
*/
body.image-modal-open {
  overflow: hidden;
}


/* =========================================================
   LIGHTBOX — MOBILE
   ========================================================= */

@media (max-width: 800px) {

  .image-modal {
    padding: 60px 16px 24px;
  }

  .image-modal img {
    max-width: 96vw;
    max-height: 86vh;
  }

  .image-modal-close {
    top: 14px;
    right: 14px;

    width: 42px;
    height: 42px;
  }
}

/* =========================================================
   PAGINA — TUTTI I LAVORI
   ========================================================= */

.archive-hero {
  min-height: 60vh;
}

.archive {
  padding-top: 120px;
  padding-bottom: 80px;
}

.archive-year {
  display: grid;

  grid-template-columns: minmax(130px, .35fr) 1fr;
  gap: 60px;

  padding: 75px 0;

  border-bottom: 1px solid var(--line);
}

.archive-year:first-of-type {
  padding-top: 30px;
}

.archive-year-number {
  font-family: var(--serif);
  font-size: clamp(46px, 5vw, 76px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.03em;
}

.archive-year-content {
  min-width: 0;
}

.archive-category {
  margin-bottom: 58px;
}

.archive-category:last-child {
  margin-bottom: 0;
}

.archive-category h2 {
  margin: 0 0 22px;

  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;

  text-transform: uppercase;
  letter-spacing: .16em;

  color: var(--muted);
}

.archive-work {
  display: grid;

  grid-template-columns: minmax(0, 1fr) minmax(180px, .45fr);
  gap: 40px;

  padding: 22px 0;

  border-top: 1px solid var(--line);
}

.archive-work-title h3 {
  margin: 0 0 7px;

  font-family: var(--serif);
  font-size: clamp(25px, 2.3vw, 36px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
}

.archive-work-title p {
  margin: 0;

  color: var(--muted);

  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
}

.archive-work-role {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;

  padding-top: 3px;

  color: var(--muted);

  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.5;

  text-align: right;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.archive-back {
  padding-top: 20px;
  padding-bottom: 140px;
}


/* =========================================================
   LINK — ARCHIVIO LAVORI
   ========================================================= */

.work-archive-link {
  margin-top: 45px;

  text-align: center;
}


/* =========================================================
   BIOGRAFIA
   ========================================================= */

.bio-text {
  max-width: 720px;

  margin: 0 0 28px;

  color: var(--muted);

  font-size: 17px;
  line-height: 1.7;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .site-header {
    height: 54px;
    padding: 0 5vw;
  }

  .hero {
    grid-template-columns: 50% 50%;
  }

  .hero-copy {
    padding: 0 5vw 8vh;
  }

  .work-card h2 {
    font-size: clamp(34px, 5vw, 50px);
  }

  h1 {
    font-size: clamp(62px, 8.5vw, 105px);
  }

  .display {
    font-size: clamp(42px, 6vw, 62px);
  }

  .intro-grid,
  .contact-grid {
    gap: 6vw;
  }

  .section {
    padding: 100px 5vw;
  }

  .cv-box {
    padding: 55px;
  }

  .cv-box h2 {
    font-size: clamp(46px, 7vw, 68px);
  }
}


/* =========================================================
   MOBILE — STRUTTURA PRINCIPALE
   ========================================================= */

@media (max-width: 800px) {

  .site-header {
    position: fixed;

    top: 10px;
    left: 5vw;
    right: 5vw;

    width: auto;
    min-width: 0;
    height: 54px;

    transform: none;

    padding: 0 18px;

    border-radius: 999px;
  }

  .nav {
    display: none;
  }

  .site-header:has(.nav.open) .nav-pill {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .cv-box h2 {
    font-size: clamp(42px, 11vw, 58px);
    line-height: .88;
  }

  .work-card h2 {
    font-size: clamp(32px, 9vw, 48px);
    line-height: .92;
  }

  .display {
    font-size: clamp(40px, 11vw, 58px);
    line-height: .95;
  }

  .menu-toggle {
    display: block;
  }

  .work-archive-link {
    text-align: center;
  }

  .body-copy > .button {
    display: table;

    margin-left: auto;
    margin-right: auto;
  }

  /*
    Se nel markup esiste un elemento <actions>,
    questa regola ne mantiene il comportamento attuale.
    Verificheremo il selettore quando analizzeremo l'HTML.
  */
  actions {
    flex-direction: row;
    align-items: center;
    gap: 10px;

    flex-wrap: nowrap;
    justify-content: center;
  }

  .cv-actions .button {
    white-space: nowrap;
  }

  .contact-big {
    overflow-wrap: anywhere;
  }

  .contact-big[href^="mailto:"] {
    font-size: 30px;
    letter-spacing: -.03em;

    white-space: nowrap;
  }

  /* Menu mobile aperto */
  .nav.open::before {
    content: "";

    position: absolute;

    top: -12px;
    left: 0;
    right: 0;

    height: 12px;
  }

  .nav.open {
    position: fixed;

    top: 76px;
    left: 5vw;
    right: 5vw;

    width: auto;

    display: flex;
    flex-direction: column;

    gap: 6px;

    padding: 18px 20px 20px;

    font-size: 12px;

    background: rgba(17, 16, 15, .58);

    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);

    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 26px;

    box-shadow:
      0 12px 35px rgba(0, 0, 0, .20),
      inset 0 1px 0 rgba(255, 255, 255, .08);
  }

  .nav.open a {
    display: block;

    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;

    text-align: right;
  }

  /* Hero mobile */
  .hero {
    display: block;

    min-height: 100svh;

    padding-top: 68px;
  }

  .hero-image {
    width: 100%;
    height: 100%;

    opacity: .55;
  }

  .hero-image img {
    object-position: center top;
  }

  .hero-copy {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 0 7vw max(8vh, 48px);
  }

  h1 {
    font-size: clamp(58px, 16vw, 88px);
  }

  .intro-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .section {
    padding: 82px 7vw;
  }

  /* Manifesto */
  .manifesto-inner {
    justify-content: flex-start;
    gap: 45px;

    font-size: 27px;

    animation: marquee 22s linear infinite;
  }

  .work-card {
    grid-template-columns: 45px 1fr;
  }

  /* Galleria principale su mobile */
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .gallery-grid .gallery-item:nth-child(1),
  .gallery-grid .gallery-item:nth-child(2),
  .gallery-grid .gallery-item:nth-child(3),
  .gallery-grid .gallery-item:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-grid .gallery-item {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .cv-box {
    display: block;

    padding: 45px 30px;
  }

  .cv-actions {
    margin-top: 40px;
  }

footer {
  flex-direction: column;
  gap: 10px;

  padding-right: 7vw;
  padding-bottom: 78px;

  font-size: 10px;
}
}


/* =========================================================
   ARCHIVIO — MOBILE
   ========================================================= */

@media (max-width: 800px) {

  .archive-hero {
    min-height: 70vh;

    padding: 130px 6vw 80px;
  }

  .archive-hero h1 {
    font-size: clamp(58px, 16vw, 100px);
    line-height: .86;
  }

  .archive-intro {
    max-width: 340px;
    font-size: 13px;
  }

  .archive {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .archive-year {
    grid-template-columns: 1fr;
    gap: 35px;

    padding: 55px 0;
  }

  .archive-year:first-of-type {
    padding-top: 10px;
  }

  .archive-year-number {
    font-size: 52px;
  }

  .archive-category {
    margin-bottom: 45px;
  }

  .archive-work {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .archive-work-role {
    justify-content: flex-start;

    padding-top: 0;

    text-align: left;
  }

  .archive-work-title h3 {
    font-size: 29px;
  }

  .archive-back {
    padding-bottom: 90px;
  }
}


/* =========================================================
   ANIMAZIONE MANIFESTO
   ========================================================= */

@keyframes marquee {
  to {
    transform: translateX(-45%);
  }
}


/* =========================================================
   ACCESSIBILITÀ / FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}


/* =========================================================
   RIDUZIONE DEL MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   SCROLL OFFSET
   ========================================================= */

section {
  scroll-margin-top: 90px;
}

@media (max-width: 800px) {

  section {
    scroll-margin-top: 78px;
  }

  .site-header:has(.nav.open) {
    background: transparent;
  }
}


/* =========================================================
   LANDSCAPE MOBILE
   ========================================================= */

@media (max-width: 800px) and (orientation: landscape) {

  .hero {
    min-height: 140svh;
    height: 140svh;
  }

  .hero-copy {
    bottom: 20px;

    padding: 0 16vw 0;
  }

  h1 {
    font-size: clamp(38px, 9vw, 58px);
  }

  .hero-lede {
    margin-bottom: 12px;
  }

  .hero-actions {
    margin-top: 12px;
  }

  .hero-image img {
    object-position: center center;
  }

  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }
}


/* =========================================================
   PAGINE SECONDARIE — MOBILE
   ========================================================= */

@media (max-width: 800px) {

  .inner-page .menu-toggle {
    display: none;
  }

  .inner-page .nav {
    display: flex;
  }
}


/* =========================================================
   TORNA IN CIMA
   ========================================================= */

.back-to-top {
  position: fixed;
  z-index: 900;

  right: calc(5vw + 18px);
  bottom: 24px;

  width: 44px;
  height: 44px;

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

  padding: 0;

  background: rgba(35, 32, 29, .44);
  color: #fff;

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -1px 0 rgba(0, 0, 0, .08),
    0 8px 24px rgba(0, 0, 0, .14),
    0 16px 35px rgba(0, 0, 0, .08);

  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;

  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);

  transition:
    opacity .25s ease,
    visibility .25s ease,
    transform .25s ease,
    background var(--transition-speed) ease,
    border-color var(--transition-speed) ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(35, 32, 29, .62);
  border-color: rgba(255, 255, 255, .28);

  transform: translateY(-2px);
}

@media (max-width: 800px) {

  .back-to-top {
    right: calc(5vw + 18px);
    bottom: 18px;

    width: 42px;
    height: 42px;
  }
}


/* =========================================================
   ZONA DI SICUREZZA HEADER
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

  /*
    Area invisibile attorno all'header che evita
    l'interruzione accidentale dell'interazione.
  */
  .site-header::before {
    content: "";

    position: absolute;

    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;

    z-index: -1;
  }
}


/* =========================================================
   GALLERIA PRINCIPALE — COLORE SU SCROLL MOBILE
   ========================================================= */

@media (max-width: 800px) {

  /*
    Tutti i ritratti partono in bianco e nero.
    JavaScript assegna .is-visible all'immagine
    più vicina al centro dello schermo.
  */
  .gallery-grid .gallery-item img {
    filter: grayscale(100%);

    transition:
      filter .5s ease;
  }

  .gallery-grid .gallery-item.is-visible img {
    filter: grayscale(0%);
  }
}


/* =========================================================
   SCHERMI MOLTO STRETTI
   ========================================================= */

@media (max-width: 380px) {

  .hero-copy {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  h1 {
    font-size: clamp(52px, 15vw, 72px);
  }

  .display {
    font-size: clamp(36px, 10vw, 50px);
  }

  .work-card h2 {
    font-size: clamp(30px, 8.5vw, 42px);
  }

  .section {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .cv-box {
    padding-left: 24px;
    padding-right: 24px;
  }

  .contact-big[href^="mailto:"] {
    font-size: 24px;
    letter-spacing: -.04em;

    white-space: normal;
    overflow-wrap: anywhere;
  }

  .socials {
    gap: 10px;
  }

  .socials a {
    padding-left: 11px;
    padding-right: 11px;
  }

footer {
  padding-left: 6vw;
  padding-right: 6vw;
  padding-bottom: 78px;
}
}


/* =========================================================
   LANDSCAPE MOBILE STRETTO
   ========================================================= */

@media (max-width: 700px) and (orientation: landscape) {

  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}


/* =========================================================
   DESKTOP — ALTEZZA RIDOTTA
   ========================================================= */

@media (min-width: 801px) and (max-height: 460px) {

  .hero-copy {
    padding-bottom: 4vh;
  }
}


/* =========================================================
   CAROSELLO FOTO
   ========================================================= */

/*
  DESKTOP:
  [ ← ] [ foto laterale ] [ FOTO CENTRALE ] [ foto laterale ] [ → ]

  MOBILE:
  [ foto laterale ] [ FOTO CENTRALE ] [ foto laterale ]

  Le frecce vengono nascoste su mobile.
*/

.photo-carousel {
  display: grid;

  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  column-gap: 18px;

  width: 100%;
  max-width: 100%;

  padding-top: 30px;
}


/* =========================================================
   CAROSELLO — PULSANTI
   ========================================================= */

.photo-carousel-button {
  width: 42px;
  height: 42px;

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

  padding: 0;

  background: rgba(35, 32, 29, .44);
  color: #fff;

  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -1px 0 rgba(0, 0, 0, .08),
    0 8px 24px rgba(0, 0, 0, .16),
    0 16px 35px rgba(0, 0, 0, .08);

  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;

  cursor: pointer;

  transition:
    background var(--transition-speed) ease,
    border-color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.photo-carousel-button:hover {
  background: rgba(35, 32, 29, .62);
  border-color: rgba(255, 255, 255, .32);

  transform: scale(1.05);
}

.photo-carousel-button:active {
  transform: scale(.96);
}

.photo-carousel-prev {
  grid-column: 1;
}

.photo-carousel-next {
  grid-column: 3;
}


/* =========================================================
   CAROSELLO — TRACK
   ========================================================= */

.photo-carousel-track {
  /*
    Larghezza della singola fotografia.
    Viene usata anche per calcolare lo spazio
    laterale necessario al centramento.
  */
  --carousel-card-width: min(27vw, 360px);

  grid-column: 2;

  min-width: 0;
  width: 100%;
  max-width: 100%;

  display: flex;
  align-items: center;
  gap: 18px;

  overflow-x: auto;
  overflow-y: hidden;

  /*
    Spazio sufficiente per centrare correttamente
    anche la prima e l'ultima fotografia.
  */
  padding-top: 30px;
  padding-bottom: 30px;

  padding-left:
    calc((100% - var(--carousel-card-width)) / 2);

  padding-right:
    calc((100% - var(--carousel-card-width)) / 2);

  /*
    Snap morbido durante lo swipe.
  */
  scroll-snap-type: x proximity;
  scroll-snap-stop: normal;

  scroll-padding-left:
    calc((100% - var(--carousel-card-width)) / 2);

  scroll-padding-right:
    calc((100% - var(--carousel-card-width)) / 2);

  /* Impedisce lo "scivolamento" dello swipe alla pagina */
  overscroll-behavior-x: contain;

  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.photo-carousel-track::-webkit-scrollbar {
  display: none;
}


/* =========================================================
   CAROSELLO — SINGOLA FOTO
   ========================================================= */

.photo-carousel-track .gallery-item {
  flex: 0 0 var(--carousel-card-width);

  width: var(--carousel-card-width);
  height: auto;

  aspect-ratio: 4 / 5;

  scroll-snap-align: center;

  transform: scale(.78);
  opacity: .62;

  transition:
    transform .45s ease,
    opacity .45s ease;

  user-select: none;
}


/* Foto centrale */
.photo-carousel-track .gallery-item.is-active {
  transform: scale(1);
  opacity: 1;

  z-index: 2;
}


/* B/N delle fotografie laterali e colore centrale */
.photo-carousel-track .gallery-item img {
  filter: grayscale(100%);

  transition:
    filter .45s ease;
}

.photo-carousel-track .gallery-item.is-active img {
  filter: grayscale(0%);
}


/* Nasconde una sezione carousel priva di immagini */
.photo-section:has(.photo-carousel-track:empty) {
  display: none;
}


/* =========================================================
   CAROSELLO — MOBILE
   ========================================================= */

@media (max-width: 800px) {

  .photo-carousel {
    display: block;
    position: relative;

    padding-bottom: 38px;
  }

  /* Indicazione visiva che il carousel può essere trascinato */
  .photo-carousel::after {
    content: "SCORRI  →";

    position: absolute;

    right: 0;
    bottom: 8px;

    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;

    letter-spacing: .16em;
    text-transform: uppercase;

    color: var(--muted);

    pointer-events: none;
  }

  .photo-carousel-button {
    display: none;
  }

  .photo-carousel-track {
    --carousel-card-width: 68vw;

    width: 100%;

    gap: 10px;

    padding-top: 25px;
    padding-bottom: 25px;

    padding-left:
      calc((100% - var(--carousel-card-width)) / 2);

    padding-right:
      calc((100% - var(--carousel-card-width)) / 2);

    scroll-padding-left:
      calc((100% - var(--carousel-card-width)) / 2);

    scroll-padding-right:
      calc((100% - var(--carousel-card-width)) / 2);

    scroll-snap-type: x proximity;
    scroll-snap-stop: normal;

    overscroll-behavior-x: contain;

    touch-action: pan-x;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .photo-carousel-track .gallery-item {
    flex: 0 0 var(--carousel-card-width);

    width: var(--carousel-card-width);

    transform: scale(.78);
  }

  .photo-carousel-track .gallery-item.is-active {
    transform: scale(1);
  }
}


/* =========================================================
   RITRATTI — LAYOUT EDITORIALE
   SOLO FOTO.HTML — DESKTOP
   ========================================================= */

@media (min-width: 801px) {

  /*
    Questo layout riguarda esclusivamente
    la sezione #portraits di foto.html.

    Non modifica la galleria principale di index.html.
  */

  .photo-section#portraits .gallery-grid {
    display: grid;

    /*
      Griglia invisibile a 12 colonne.
      Consente proporzioni irregolari mantenendo
      allineati i bordi esterni.
    */
    grid-template-columns: repeat(12, 1fr);

    /*
      Due fasce con altezze differenti.
    */
    grid-template-rows:
      clamp(220px, 20vw, 260px)
      clamp(190px, 17vw, 225px);

    column-gap: 14px;
    row-gap: 0;

    padding-top: 30px;
  }


  /* ---------------------------------------------------------
     RIGA 1 — 40 / 60
     --------------------------------------------------------- */

  .photo-section#portraits
  .gallery-grid
  .gallery-item:nth-child(1) {
    grid-column: 1 / 6;
    grid-row: 1;
  }

  .photo-section#portraits
  .gallery-grid
  .gallery-item:nth-child(2) {
    grid-column: 6 / 13;
    grid-row: 1;
  }


  /* ---------------------------------------------------------
     RIGA 2 — 65 / 35
     --------------------------------------------------------- */

  .photo-section#portraits
  .gallery-grid
  .gallery-item:nth-child(3) {
    grid-column: 1 / 9;
    grid-row: 2;
  }

  .photo-section#portraits
  .gallery-grid
  .gallery-item:nth-child(4) {
    grid-column: 9 / 13;
    grid-row: 2;
  }


  /* ---------------------------------------------------------
     DIMENSIONI DELLE FOTO
     --------------------------------------------------------- */

  .photo-section#portraits
  .gallery-grid
  .gallery-item {
    width: 100%;
    height: 100%;

    aspect-ratio: auto;
  }

  /*
    Mantiene fluido il passaggio B/N → colore
    e il leggero zoom dei ritratti di foto.html.
  */
  .photo-section#portraits
  .gallery-grid
  .gallery-item
  img {

    transition:
      filter .45s ease,
      transform .5s ease;
  }
  /* ---------------------------------------------------------
     INQUADRATURA DELLA TERZA FOTO
     --------------------------------------------------------- */

  .photo-section#portraits
  .gallery-grid
  .gallery-item
  img {
    transform: none;
  }

  /*
    Il leggero zoom al passaggio del mouse
    riguarda soltanto le foto di foto.html.
  */
  .photo-section#portraits
  .gallery-grid
  .gallery-item:hover
  img {
    transform: scale(1.03);
  }
}