/* Portfolio veloce (portfolio.html, "/portfolio"): base A "Foglio del CV", come css/scelta.css.
 * Colori del CV, Montserrat come nel CV, Patrick Hand per le note a mano. Testo base 18 px, contrasto alto,
 * tutto usabile da tastiera. Le animazioni (poche) sono in fondo e si spengono con "riduci movimento". */
/* Montserrat "optional": si usa se arriva subito (dalla pagina iniziale e gia scaricato, o con rete normale); con rete lenta
 * resta il carattere di riserva per tutta la visita, invece di cambiare a meta e far saltare la pagina */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: optional; src: url(../assets/fonts/montserrat-latin.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 400 800; font-display: swap;   /* solo nel CV, che compare a richiesta: qui swap non fa saltare la pagina */ src: url(../assets/fonts/montserrat-italic-latin.woff2) format('woff2'); }
@font-face { font-family: 'Patrick Hand'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/patrickhand-latin.woff2) format('woff2'); }

:root {
  --teal: #50c5cb;
  --teal-ink: #1d8a90;   /* turchese scuro per testi e icone: leggibile sul bianco */
  --yellow: #f8be19;
  --yellow-soft: #fff3c9;
  --ink: #1d1d1b;
  --paper: #ffffff;
  --soft: #55554f;       /* testo secondario: contrasto 7:1 sul bianco */
  --line: #d9d9d4;
  --sans: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --hand: 'Patrick Hand', 'Comic Sans MS', cursive;
  --wrap: 1120px;
  --gut: max(20px, env(safe-area-inset-left));
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 18px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; }
.v-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* "Vai ai progetti" per chi usa la tastiera: compare solo col Tab */
.v-skip { position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 16px; background: var(--yellow); border-radius: 10px; font-weight: 700; text-decoration: none; }
.v-skip:focus { top: 12px; box-shadow: 0 6px 18px rgba(29, 29, 27, .15); }

/* ---------- testata: il nome come nel CV, ruolo, motto, i due pulsanti; il disegno del CV che sbuca a destra ---------- */
.v-head { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.v-head-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding-top: max(44px, env(safe-area-inset-top)); }
.v-id { padding-bottom: 40px; min-width: 0; }
.v-first { margin: 0; font: 800 clamp(22px, 3.2vw, 32px)/1 var(--sans); text-transform: uppercase; }
.v-last { margin: 2px 0 0; font: 800 clamp(30px, 8vw, 84px)/1 var(--sans); text-transform: uppercase; letter-spacing: -.01em; }
.v-bars { display: flex; width: min(640px, 100%); height: clamp(9px, 1.3vw, 14px); margin-top: 12px; }
.v-bars i { display: block; height: 100%; transform-origin: left center; }
.v-bars i:first-child { width: 31%; background: var(--teal); }
.v-bars i:last-child { width: 69%; background: var(--yellow); }
.v-role { margin: 18px 0 0; font-weight: 700; font-size: 19px; }
.v-motto { margin: 2px 0 0; color: var(--soft); white-space: nowrap; }   /* su una riga sola (js/veloce.js, fitLine) */
.v-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.v-doodle { display: block; width: clamp(150px, 20vw, 240px); height: auto; margin-bottom: -6px; rotate: -3deg; transform-origin: bottom center; }

/* pulsanti fatti a mano: bordo a matita sottile e tremolante, al passaggio si alzano con un'ombra morbida
 * (niente bordi neri spessi ne ombre piene). Il giallo pieno solo per l'azione principale */
.v-btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 50px; padding: 10px 22px;
  font: 700 17px/1.2 var(--sans); color: var(--ink); text-decoration: none; background: var(--paper); border: 0;
  border-radius: 999px; cursor: pointer;
  transition: background-color .15s, transform .25s cubic-bezier(.3, 1.3, .5, 1), box-shadow .25s;
}
/* contorno pulito (prima a matita tremolante: sembrava rotto) */
.v-btn::before { content: ''; position: absolute; inset: 0; border: 1.6px solid rgba(29, 29, 27, .45); border-radius: inherit; pointer-events: none; transition: border-color .15s; }
.v-btn:hover::before { border-color: rgba(29, 29, 27, .7); }
.v-btn--yes::before { border-color: transparent; }
.v-btn svg { width: 20px; height: 20px; flex: none; }
.v-btn--yes { background: var(--yellow); }
.v-btn:hover, .v-btn:focus-visible { background: #fff6d6; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(29, 29, 27, .13); outline: none; }
.v-btn--yes:hover, .v-btn--yes:focus-visible { background: #ffcb35; }
.v-btn:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; }
.v-btn:active { transform: none; box-shadow: none; }

/* ---------- barra delle sezioni: resta in alto scorrendo ---------- */
.v-bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); transition: box-shadow .2s; }
.v-bar.is-stuck { box-shadow: 0 6px 18px rgba(29, 29, 27, .06); }
.v-bar-in { display: flex; align-items: center; gap: 8px 20px; min-height: 60px; }
.v-bar-name { font: 800 15px/1 var(--sans); text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.v-bar.is-stuck .v-bar-name { opacity: 1; }
.v-menu { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.v-menu a { position: relative; display: block; padding: 12px 10px; font: 700 15px/1 var(--sans); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
/* sottolineatura a matita: tratto giallo un po' tremolante che si allunga da sinistra */
.v-menu a::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 12px; background: linear-gradient(transparent 4px, var(--yellow) 4px 8px, transparent 8px); filter: url(#wob); transform: scaleX(0); transform-origin: left center; transition: transform .28s cubic-bezier(.3, .8, .3, 1); }
.v-menu a:hover::after, .v-menu a.is-here::after, .v-menu a:focus-visible::after { transform: none; }
/* torna alla pagina iniziale, in alto a sinistra (in alto a destra c'e la lingua) */
.v-home { position: absolute; z-index: 2; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); display: inline-flex; align-items: center; gap: 6px; padding: 8px 6px; font: 700 14px/1 var(--sans); letter-spacing: .02em; color: var(--soft); text-decoration: none; border-radius: 4px; }
.v-home svg { width: 16px; height: 16px; }
.v-home:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.v-home:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-lang { position: absolute; z-index: 2; top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: flex; gap: 2px; }
/* lingua scelta: passata di evidenziatore giallo (come nella pagina iniziale) */
.v-lang button { font: 700 14px/1 var(--sans); letter-spacing: .06em; color: var(--soft); background: none; border: 0; border-radius: 4px; padding: 9px 10px; cursor: pointer; }
.v-lang button[aria-pressed="true"] { color: var(--ink); background: linear-gradient(100deg, transparent 4%, var(--yellow) 6% 94%, transparent 96%) 0 60% / 100% 62% no-repeat; }
.v-lang button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- sezioni: titolo in maiuscolo con la barra turchese, come ESPERIENZE nel CV ---------- */
.v-sec { padding: 56px 0 24px; }
.v-h2 { display: flex; align-items: center; gap: 16px; margin: 0 0 28px; font: 800 clamp(26px, 3.6vw, 34px)/1 var(--sans); text-transform: uppercase; }
.v-h2::after { content: ''; flex: 1; height: clamp(14px, 1.8vw, 20px); background: var(--teal); transform-origin: left center; }
.v-lead { margin: 0 0 18px; max-width: 62ch; }
/* finche js/veloce.js non ha disegnato progetti, Chi sono e CV il loro posto resta riservato: la pagina non salta mentre carica */
.js #v-projects:empty { min-height: 160vh; }
.js #v-about:empty { min-height: 90vh; }
.v-note { padding: 14px 18px; background: var(--yellow-soft); border-radius: 10px; max-width: 62ch; }

/* contatti (provvisori: la versione completa con "Copia" e nella Parte 23) */
.v-contacts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.v-contacts li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.v-c-k { min-width: 96px; font-weight: 800; text-transform: uppercase; font-size: 14px; letter-spacing: .06em; color: var(--teal-ink); }
.v-contacts a { font-weight: 700; overflow-wrap: anywhere; }

/* ---------- piede ---------- */
.v-foot { margin-top: 64px; border-top: 1px solid var(--line); }
.v-foot-in { display: grid; gap: 8px; padding-top: 28px; padding-bottom: max(32px, env(safe-area-inset-bottom)); font-size: 15px; }
.v-foot p { margin: 0; }
.v-foot-name { font-weight: 800; text-transform: uppercase; }
.v-foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.v-foot-note { color: var(--soft); }

/* ---------- telefono ---------- */
@media (max-width: 720px) {
  html { scroll-padding-top: 64px; }
  .v-head-in { display: block; padding-top: max(58px, env(safe-area-inset-top)); }
  .v-id { position: relative; z-index: 1; padding-bottom: 28px; }
  .v-last { font-size: min(10vw, 60px); }
  .v-cta { padding-right: 84px; }
  .v-doodle { position: absolute; right: -14px; bottom: 0; width: 100px; }
  .v-bar-name { display: none; }
  .v-menu { margin: 0; width: 100%; justify-content: space-between; }
  .v-menu a { padding: 14px 4px; font-size: 13.5px; letter-spacing: .02em; }
  .v-sec { padding-top: 44px; }
}

/* ---------- animazioni (poche): le barre del nome si disegnano all'apertura ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .v-bars i:first-child { animation: v-draw .45s .15s cubic-bezier(.4, .1, .2, 1) both; }
  .js .v-bars i:last-child { animation: v-draw .6s .5s cubic-bezier(.4, .1, .2, 1) both; }
  .js .v-doodle { animation: v-peek .7s .35s cubic-bezier(.3, 1.3, .5, 1) both; }
}
@keyframes v-draw { from { transform: scaleX(0); } }
@keyframes v-peek { from { transform: translateY(60%); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* ---------- progetti: tag e griglia (Parte 21) ---------- */
/* tag: pastiglie col bordo a matita; quello scelto ha la passata gialla */
.v-tagbar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0 0 32px; }   /* le frecce hanno la loro colonna: non coprono i tag */
/* una riga sola che scorre di lato (dito, rotella o frecce), senza barra di scorrimento */
.v-tags { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.v-tags::-webkit-scrollbar { display: none; }
.v-tagbar.is-r .v-tags { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 70px), transparent); }
.v-tagbar.is-l .v-tags { -webkit-mask-image: linear-gradient(90deg, transparent, #000 70px); mask-image: linear-gradient(90deg, transparent, #000 70px); }
.v-tagbar.is-l.is-r .v-tags { -webkit-mask-image: linear-gradient(90deg, transparent, #000 70px, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(90deg, transparent, #000 70px, #000 calc(100% - 70px), transparent); }
.v-tagarr { position: relative; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--ink); background: var(--paper); border: 1.5px solid rgba(29, 29, 27, .3); border-radius: 50%; box-shadow: 0 4px 12px rgba(29, 29, 27, .12); cursor: pointer; }
.v-tagarr[hidden] { display: grid; visibility: hidden; }   /* resta il suo posto: la riga non si sposta */
.v-tagarr--l[hidden] { display: none; }   /* a sinistra niente vuoto prima di "Tutti": compare solo dopo aver scorso */
.v-tagarr svg { width: 20px; height: 20px; }
.v-tagarr:hover { background: var(--yellow-soft); }
.v-tagarr:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  font: 700 15.5px/1.1 var(--sans); color: var(--ink); background: var(--paper); border: 0; cursor: pointer;
  flex: none; white-space: nowrap; border: 1.5px solid rgba(29, 29, 27, .28); border-radius: 999px;
  transition: background-color .15s, border-color .15s, transform .25s cubic-bezier(.3, 1.4, .5, 1);
}
.v-chip-n { font-weight: 600; font-size: 13px; color: var(--soft); }
.v-chip:hover { background: var(--yellow-soft); border-color: rgba(29, 29, 27, .5); }
.v-chip[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); }
.v-chip[aria-pressed="true"] .v-chip-n { color: var(--ink); }
.v-chip:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-chip:active { transform: scale(.96); }

/* schede: immagine con gli angoli morbidi, titolo, anno, due righe di descrizione, tag in turchese */
.v-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 40px 28px; margin: 0; padding: 0; list-style: none; }
.v-card[hidden] { display: none; }
.v-card-a { display: grid; gap: 14px; color: inherit; text-decoration: none; }
.v-card-im { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px 14px 9px 13px; background: #f1f0eb; box-shadow: 0 1px 0 rgba(29, 29, 27, .06); rotate: -.7deg; transition: transform .3s cubic-bezier(.3, 1.2, .5, 1), rotate .3s cubic-bezier(.3, 1.2, .5, 1), box-shadow .3s; }
.v-card:nth-child(even) .v-card-im { rotate: .6deg; }
.v-card:nth-child(3n) .v-card-im { rotate: -.3deg; }
.v-card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
.v-card-txt { display: grid; gap: 4px; min-width: 0; }
.v-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.v-card-h strong { font: 800 20px/1.2 var(--sans); }
.v-card-y { flex: none; font-size: 15px; color: var(--soft); font-variant-numeric: tabular-nums; }
.v-card-b { font-size: 16px; line-height: 1.45; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v-card-t { font-size: 13.5px; font-weight: 700; letter-spacing: .03em; color: var(--teal-ink); }
/* "in corso": nota a mano su un pezzetto di evidenziatore */
.v-wip { position: absolute; top: 12px; left: 12px; padding: 2px 10px 4px; font: 400 19px/1 var(--hand); background: var(--yellow); border-radius: 3px; rotate: -4deg; box-shadow: 0 2px 6px rgba(29, 29, 27, .15); }
a.v-card-a:hover .v-card-im, a.v-card-a:focus-visible .v-card-im { transform: translateY(-4px); rotate: 0deg; box-shadow: 0 14px 30px rgba(29, 29, 27, .14); }   /* si raddrizza */
a.v-card-a:hover .v-card-img, a.v-card-a:focus-visible .v-card-img { transform: scale(1.035); }
a.v-card-a:hover strong { background: linear-gradient(transparent 62%, var(--yellow) 62% 92%, transparent 92%); }
a.v-card-a:focus-visible { outline: none; }
a.v-card-a:focus-visible .v-card-im { outline: 3px solid var(--teal-ink); outline-offset: 3px; }
/* scegliendo un tag le schede rientrano una dopo l'altra */
@media (prefers-reduced-motion: no-preference) {
  .v-card.is-in { animation: v-in .38s cubic-bezier(.2, .8, .3, 1) both; }
}
@keyframes v-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 720px) {
  .v-tagbar { margin-bottom: 26px; }
  .v-tags { gap: 8px; }
  .v-tagbar { display: block; }
  .v-tagarr, .v-tagarr[hidden] { display: none; }   /* da telefono si scorre col dito */
  .v-chip { min-height: 42px; padding: 8px 13px; font-size: 15px; }
  .v-grid { gap: 34px; }
}

/* ---------- pagina del progetto (#slug, Parte 22): al suo posto spariscono testata e sezioni ---------- */
body.is-proj .v-head, body.is-proj .v-sec, .v-boot-proj .v-head, .v-boot-proj .v-sec, .v-boot-proj .v-foot { display: none; }   /* v-boot-proj: indirizzo di un progetto, prima che js/veloce.js lo disegni */
.v-proj { padding: 28px 0 8px; }
.v-proj:focus { outline: none; }
.v-proj-in { max-width: 920px; }
.v-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 4px; font-weight: 700; font-size: 16px; text-decoration: none; }
.v-back svg { width: 20px; height: 20px; transition: transform .2s; }
.v-back:hover svg { transform: translateX(-4px); }
.v-back:hover span { background: linear-gradient(transparent 62%, var(--yellow) 62% 92%, transparent 92%); }
.v-proj-head { margin: 22px 0 26px; }
.v-proj-tags { margin: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--teal-ink); }
.v-proj-title { margin: 0; font: 800 clamp(34px, 6vw, 58px)/1.05 var(--sans); text-wrap: balance; }
.v-proj-title::after { content: ''; display: block; width: min(320px, 70%); height: 10px; margin-top: 14px; background: linear-gradient(90deg, var(--teal) 0 31%, var(--yellow) 31% 100%); }
.v-proj-title:focus { outline: none; }
.v-proj-lead { margin: 18px 0 0; font-size: 21px; line-height: 1.45; max-width: 46ch; }
.v-wip--inline { position: static; display: inline-block; margin: 16px 0 0; }

/* dati del progetto: tipo, stato, data, ruolo */
.v-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px 24px; margin: 0 0 26px; padding: 18px 20px; background: #f7f6f1; border-radius: 12px 16px 11px 15px; }
.v-facts div { min-width: 0; }
.v-facts dt { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-ink); }
.v-facts dd { margin: 2px 0 0; font-size: 16px; line-height: 1.4; }
.v-proj-files { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 30px; }

/* testo: colonna comoda da leggere; "Titolo:: testo" mette il titolo in grassetto */
.v-proj-body p { max-width: 66ch; }
.v-proj-text, .v-proj-sec > p { margin-bottom: 8px; }
.v-proj-sec { margin-top: 44px; }
.v-pswitch { margin-top: 44px; }
.v-pswitch + .v-proj-sec, .v-pswitch ~ .v-proj-sec { margin-top: 0; }
.v-proj-sec[hidden] { display: none; }
.v-h3 { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; font: 800 24px/1.1 var(--sans); text-transform: uppercase; }
.v-h3::after { content: ''; flex: 1; height: 10px; background: var(--teal); }

/* immagini una sotto l'altra, didascalia sotto; si aprono grandi in un'altra scheda */
.v-fig { margin: 30px 0 0; }
.v-fig > a, .v-play { display: block; }
.v-fig-img { display: block; width: 100%; height: auto; border-radius: 10px 14px 9px 13px; background: #f1f0eb; }
.v-fig figcaption { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--soft); max-width: 66ch; }
.v-fig > a:hover .v-fig-img { box-shadow: 0 12px 28px rgba(29, 29, 27, .12); }
/* video e modelli 3D: copertina con il pulsante, si caricano al tocco */
.v-play { position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); }
.v-play-b { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; font: 700 17px/1 var(--sans); background: var(--yellow); border-radius: 999px; box-shadow: 0 8px 24px rgba(29, 29, 27, .25); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.v-play-b svg { width: 22px; height: 22px; }
.v-play:hover .v-play-b, .v-play:focus-visible .v-play-b { transform: scale(1.06); }
.v-play:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; border-radius: 12px; }
.v-mv { display: block; width: 100%; aspect-ratio: 4 / 3; background: #f1f0eb; border-radius: 10px 14px 9px 13px; }
video.v-fig-img { aspect-ratio: auto; }
/* libri: le prime pagine in fila, si scorrono di lato */
.v-book-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.v-book-p { flex: 0 0 auto; width: clamp(130px, 22vw, 190px); scroll-snap-align: start; }
.v-book-p img { display: block; width: 100%; height: auto; aspect-ratio: var(--r, 0.707); object-fit: cover; border-radius: 4px; box-shadow: 0 4px 14px rgba(29, 29, 27, .14); transition: transform .25s; }
.v-book-p:hover img { transform: translateY(-3px) rotate(-1deg); }
/* gallerie: griglia di immagini piccole */
.v-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); gap: 10px; }
.v-gal-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #f1f0eb; }
.v-gal-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.v-gal-grid a:hover img { transform: scale(1.05); }

/* precedente / successivo */
.v-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.v-pn-a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 4px; text-decoration: none; font-weight: 800; font-size: 18px; line-height: 1.25; }
.v-pn-a small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.v-pn-a svg { width: 22px; height: 22px; flex: none; transition: transform .2s; }
.v-pn-a--next { justify-content: flex-end; text-align: right; }
.v-pn-a:hover span { background: linear-gradient(transparent 70%, var(--yellow) 70% 95%, transparent 95%); }
.v-pn-a:hover svg { transform: translateX(-3px); }
.v-pn-a--next:hover svg { transform: translateX(3px); }
@media (max-width: 720px) {
  .v-proj { padding-top: 14px; }
  .v-proj-lead { font-size: 19px; }
  .v-pn-a { font-size: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .v-proj:not([hidden]) .v-proj-in { animation: v-in .35s cubic-bezier(.2, .8, .3, 1) both; }
}

/* ---------- Chi sono (Parte 23) ---------- */
.v-about-top { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px 48px; align-items: center; }
.v-me { position: relative; margin: 0; }
.v-me img { display: block; width: 100%; height: auto; rotate: -2.5deg; filter: drop-shadow(0 10px 18px rgba(29, 29, 27, .13)); }
.v-me figcaption { position: absolute; right: 2%; bottom: 4%; font: 400 21px/1 var(--hand); rotate: -6deg; background: linear-gradient(transparent 55%, var(--yellow) 55% 90%, transparent 90%); padding: 0 4px; }
.v-hi { margin: 0; font: 800 clamp(28px, 4vw, 40px)/1.1 var(--sans); }
.v-quote { margin: 10px 0 18px; font: 400 23px/1.25 var(--hand); color: var(--teal-ink); white-space: nowrap; }   /* il motto su una riga sola (js/veloce.js, fitLine, rimpicciolisce se non ci sta) */
.v-about-txt .v-lead { font-size: 19px; }
/* le parti dello zaino: lavoro, studi, premi, lingue, competenze, hobby */
.v-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; margin-top: 44px; }
.v-part--wide { grid-column: 1 / -1; }
.v-part-h { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 800 18px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .02em; }
.v-part-h::after { content: ''; flex: 1; height: 8px; background: var(--teal); }
.v-rows { margin: 0; padding: 0; list-style: none; }
.v-rows li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.4; }
.v-rows-y { flex: none; color: var(--soft); font-variant-numeric: tabular-nums; }
.v-skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.v-skills span { padding: 7px 14px; font-size: 16px; font-weight: 600; background: #f3f2ed; border-radius: 999px; }
/* nastro delle competenze (js/veloce.js, marq): una riga sola che scorre; la barra di scorrimento non si vede */
.v-marq { position: relative; overflow-x: auto; scrollbar-width: none; cursor: grab; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.v-marq::-webkit-scrollbar { display: none; }
.v-marq.is-drag { cursor: grabbing; }
.v-marq .v-skills { flex-wrap: nowrap; width: max-content; padding: 2px 0; -webkit-user-select: none; user-select: none; }
.v-marq .v-skills span { flex: none; white-space: nowrap; }
.v-marq .v-marq-2 { display: flex; gap: 8px; padding: 0; background: none; border-radius: 0; }
/* esperienze, studi, premi: cosa in grassetto, sotto dove */
.v-row-what { display: block; font-weight: 700; }
.v-row-at { display: block; color: var(--soft); font-size: .92em; }
/* hobby: etichette piccole con l'icona */
.v-hob { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; }
.v-hob li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; font-size: 15.5px; border: 1px solid var(--line); border-radius: 999px; }
.v-hob .v-row-i { width: 26px; height: 26px; margin: 0; }
.v-hob .v-row-i svg { width: 15px; height: 15px; }
/* striscia dello sketchbook: pagine appoggiate sul tavolo, un po' storte */
.v-sb { margin-top: 52px; }
.v-sb-note { margin: -6px 0 16px; color: var(--soft); font-size: 16px; }
.v-sb-row { display: flex; gap: 18px; overflow-x: auto; padding: 10px 6px 18px; scroll-snap-type: x mandatory; }
.v-sb-p { padding: 0; border: 0; background: none; font: inherit; cursor: zoom-in; -webkit-tap-highlight-color: transparent; flex: 0 0 auto; width: clamp(140px, 20vw, 200px); scroll-snap-align: start; rotate: -1.5deg; transition: rotate .25s, transform .25s; }
.v-sb-p:nth-child(even) { rotate: 1.5deg; }
.v-sb-p img { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 6px 16px rgba(29, 29, 27, .16); }   /* width/height veri: caricandosi non spostano la pagina */
.v-sb-p--wide { width: clamp(260px, 36vw, 440px); }   /* doppie pagine */
.v-sb-p:hover, .v-sb-p:focus-visible { rotate: 0deg; transform: translateY(-4px); }

/* ---------- CV impaginato come il PDF (Parte 23) ---------- */
.v-cv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px 56px; }
.v-cv .v-h3 { margin-top: 8px; }
.v-cv-main .v-h3 + .v-tl { margin-bottom: 36px; }
.v-tl { margin: 0; padding: 0; list-style: none; display: grid; gap: 26px; }
.v-tl-i { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 24px; }
.v-tl-when { margin: 2px 0 0; font-size: 15.5px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.v-tl-where { margin: 0; font: 800 19px/1.3 var(--sans); }
.v-tl-role { margin: 2px 0 0; font-style: italic; font-weight: 500; }
/* i punti con la linea gialla e i pallini, come nel PDF */
.v-tl-pts { margin: 10px 0 0; padding: 0 0 0 20px; list-style: none; border-left: 2px solid var(--yellow); font-size: 16.5px; line-height: 1.5; }
.v-tl-pts li { position: relative; margin: 0 0 6px; }
.v-tl-pts li::before { content: ''; position: absolute; left: -27px; top: .5em; width: 8px; height: 8px; border: 2px solid var(--yellow); border-radius: 50%; background: var(--paper); }
.v-cv-sk { margin-bottom: 22px; }
.v-cv-sk h4 { margin: 0 0 6px; font: 800 17px/1.2 var(--sans); }
.v-cv-sk ul { margin: 0; padding: 0; list-style: none; font-size: 16.5px; line-height: 1.55; }
/* citazione con le virgolette gialle, come in fondo al CV */
.v-cv-q { position: relative; margin: 34px 0 0; padding: 30px 6px 30px 34px; font: 400 20px/1.55 Georgia, 'Times New Roman', serif; }
.v-cv-q p { margin: 0; }
.v-cv-q::before, .v-cv-q::after { position: absolute; font: 800 86px/1 Georgia, 'Times New Roman', serif; color: var(--yellow); }
.v-cv-q::before { content: '\201C'; left: -4px; top: -8px; }
.v-cv-q::after { content: '\201D'; right: 0; bottom: -46px; }
/* il disegno del CV sotto la citazione: il dito alzato la indica (come in fondo al PDF) */
.v-cv-me { display: block; width: min(230px, 80%); height: auto; margin: 40px 0 0 auto; }

/* ---------- Contatti con "Copia" (Parte 23) ---------- */
.v-contacts li { align-items: center; gap: 8px 16px; padding: 6px 0; }
/* Copia: pastiglia piccola col contorno pulito (con la scritta nei contatti, solo icona accanto ai link dei progetti) */
.v-copy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 0 10px; font: 700 14.5px/1 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid rgba(29, 29, 27, .3); border-radius: 999px; cursor: pointer; vertical-align: middle; transition: background-color .15s, border-color .15s; }
.v-copy svg { width: 17px; height: 17px; }
.v-copy--txt { padding: 0 14px 0 12px; }
.v-copy:hover { background: var(--yellow-soft); border-color: rgba(29, 29, 27, .55); }
.v-copy.is-done { background: var(--yellow); border-color: var(--yellow); }
.v-copy:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-proj-files { align-items: center; }
.v-proj-files .v-copy { margin-left: -6px; }
/* avviso in basso: "Link copiato!" scritto a mano */
.v-toast { position: fixed; z-index: 50; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); translate: -50% 20px; margin: 0; padding: 10px 20px; font: 400 21px/1 var(--hand); color: var(--ink); background: var(--yellow); border-radius: 999px; box-shadow: 0 8px 22px rgba(29, 29, 27, .2); opacity: 0; pointer-events: none; transition: opacity .2s, translate .25s; }
.v-toast.is-on { opacity: 1; translate: -50% 0; }

@media (max-width: 860px) {
  .v-cv { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .v-about-top { grid-template-columns: minmax(0, 1fr); }
  .v-me { width: min(240px, 70%); margin: 0 auto; }
  .v-parts { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 34px; }
  .v-tl-i { grid-template-columns: minmax(0, 1fr); }
  .v-tl-when { margin: 0; }
  .v-rows li { font-size: 16px; }
}


/* ---------- animazioni fatte a mano (Parte 25) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* barre dei titoli: si disegnano quando il titolo entra nello schermo (il testo resta sempre visibile).
     html.v-anim la mette js/veloce.js solo se il browser sa dire cosa si vede */
  .v-anim .v-h2::after, .v-anim .v-h3::after, .v-anim .v-part-h::after { transition: transform .7s cubic-bezier(.4, .1, .2, 1); }
  .v-anim .v-h2:not(.is-seen)::after, .v-anim .v-h3:not(.is-seen)::after, .v-anim .v-part-h:not(.is-seen)::after { transform: scaleX(0); }
  .v-h3::after, .v-part-h::after { transform-origin: left center; }
  /* tag scelto: si "attacca" con un colpetto */
  .v-chip.is-stick { animation: v-stick .42s cubic-bezier(.3, 1.4, .5, 1); }
}
@keyframes v-stick { 0% { transform: scale(1.18) rotate(-5deg); } 55% { transform: scale(.94); } 100% { transform: none; } }


/* ---------- interruttore Chi sono / Full CV (sezione Chi sono) ---------- */
/* e il titolo stesso della sezione: CHI SONO / FULL CV, grande come gli altri titoli e con la barra turchese dopo.
 * La parte scelta e nera con la passata gialla, l'altra grigia */
.v-switch { flex-wrap: wrap; gap: 4px 12px; }
.v-switch[hidden] { display: none; }
.v-switch button { position: relative; padding: 4px 6px; font: inherit; text-transform: inherit; letter-spacing: inherit; color: #a3a39c; background: none; border: 0; border-radius: 4px; cursor: pointer; transition: color .2s; }
.v-switch button::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 52%; bottom: 2%; background: var(--yellow); border-radius: 3px; transform: scaleX(0); transform-origin: left center; transition: transform .3s cubic-bezier(.3, .8, .3, 1); }
.v-switch button[aria-selected="true"] { color: var(--ink); }
.v-switch button[aria-selected="true"]::before { transform: none; }
.v-switch button:hover { color: var(--ink); }
.v-switch button:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-switch { isolation: isolate; }
.v-switch-sep { color: #c9c9c2; font-weight: 400; }
/* con JavaScript il CV si vede solo quando lo si sceglie (senza, si vedono tutte e due le parti) */
.js .v-cv-panel:not(.is-open) { display: none; }
.v-cv-dl { margin: 0 0 30px; }
@media (prefers-reduced-motion: reduce) { .v-switch button::before { transition: none; } }

/* "Scarica il CV" sulla striscia turchese del titolo, a destra (solo col Full CV aperto); il pulsante sotto resta senza JavaScript */
.v-sw-row { position: relative; }
.v-bar-dl { position: absolute; right: 0; top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; font: 700 16px/1 var(--sans); color: var(--ink); text-decoration: none; background: var(--yellow); border-radius: 999px; box-shadow: 0 4px 12px rgba(29, 29, 27, .15); transition: transform .2s, box-shadow .2s; }
.v-bar-dl[hidden] { display: none; }
.v-bar-dl svg { width: 19px; height: 19px; }
.v-bar-dl:hover, .v-bar-dl:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(29, 29, 27, .2); outline: none; }
.v-bar-dl:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.js .v-cv-dl { display: none; }
@media (max-width: 720px) {
  .v-bar-dl { position: static; translate: none; margin: -14px 0 24px; }
}

/* sito vero in una finestra (Homichi, Sito web): barra con l'indirizzo e "Apri in una nuova scheda", sotto il sito da scorrere */
.v-site { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(29, 29, 27, .18), 0 12px 30px rgba(29, 29, 27, .1); }
.v-site-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #f3f2ed; font-size: 14px; color: var(--soft); }
.v-site-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d6d5cf; }
.v-site-bar span { flex: 1; min-width: 0; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-site-bar a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.v-site-bar a svg { width: 16px; height: 16px; }
.v-site-bar a:hover span { text-decoration: underline; }
.v-site iframe { display: block; width: 100%; height: min(72vh, 760px); border: 0; background: #fff; }
@media (max-width: 720px) { .v-site-bar a span { display: none; } .v-site iframe { height: 70vh; } }


/* ======================================================================================================================
   Pagina del progetto, nuova disposizione: riquadro delle informazioni, carosello delle immagini, testo accanto.
   Da pc (finestra larga e alta abbastanza) tutto in una schermata, senza scorrere la pagina
   ====================================================================================================================== */
.v-proj-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.v-proj-top .v-pn { display: flex; gap: 6px; margin: 0; padding: 0; border: 0; }
.v-proj-top .v-pn-a { min-height: 40px; padding: 6px 12px; font-size: 14.5px; font-weight: 700; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(29, 29, 27, .22); }
.v-proj-top .v-pn-a span { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-proj-top .v-pn-a svg { width: 18px; height: 18px; }
.v-proj-top .v-pn-a:hover { background: var(--yellow-soft); }
.v-proj-top .v-pn-a:hover span { background: none; }
/* riquadro con le informazioni principali */
.v-proj-box { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px 36px; margin: 14px 0 22px; padding: 22px 26px; background: #f7f6f1; border-radius: 16px; }
.v-proj-box .v-proj-head { margin: 0; }
.v-proj-box .v-proj-title { font-size: clamp(30px, 4vw, 46px); }
.v-proj-box .v-proj-title::after { height: 8px; margin-top: 10px; width: min(260px, 70%); }
.v-proj-box .v-proj-lead { margin-top: 12px; font-size: 18px; max-width: 52ch; }
.v-proj-box .v-proj-files { margin: 16px 0 0; }
.v-proj-box .v-facts { margin: 0; padding: 0; background: none; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.v-proj-box .v-facts dd { font-size: 15.5px; }
/* immagini + testo */
.v-proj-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.v-proj-main--text { grid-template-columns: minmax(0, 1fr); }
.v-proj-text { min-width: 0; }
.v-proj-text p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.6; }
.v-proj-text > p:first-child { margin-top: 0; }
.v-proj-sec { margin-top: 0; }
.v-pswitch { margin: 0 0 18px; }
/* "presto negli store" (Homichi, App): etichetta gialla */
.v-soon-box { display: grid; place-items: center; aspect-ratio: 16 / 11; width: 100%; height: 100%; box-sizing: border-box; border-radius: 14px; background: #f3f2ed; }
.v-soon { margin: 0; padding: 10px 22px; font: 800 clamp(18px, 2.4vw, 26px)/1.2 var(--sans); letter-spacing: .02em; text-transform: uppercase; background: var(--yellow); border-radius: 999px; rotate: -3deg; box-shadow: 0 8px 20px rgba(29, 29, 27, .12); }
/* da telefono App / Sito web / Social media su una riga sola */
@media (max-width: 720px) {
  .v-pswitch { flex-wrap: nowrap; white-space: nowrap; gap: 4px 6px; font-size: min(24px, 4.6vw); }
  .v-pswitch button { padding: 4px 3px; }
}

/* carosello: la diapositiva scelta grande al centro, le vicine piu piccole e chiare ai lati (si toccano per portarle al centro) */
.v-car { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.v-car-stage { position: relative; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 14px; background: #f3f2ed; }
.v-car-s { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 14px 0; transition: transform .45s cubic-bezier(.3, .9, .3, 1), opacity .45s; will-change: transform; }
.v-car-s > a, .v-car-s > button { display: grid; place-items: center; width: 72%; height: 100%; }
.v-car-img, .v-car-s video, .v-car-s model-viewer { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 28px rgba(29, 29, 27, .18); background: #fff; }
.v-car-s model-viewer { width: 100%; height: 100%; touch-action: none; }
.v-car-s[data-d="0"] { z-index: 3; transform: none; opacity: 1; }
.v-car-s[data-d="-1"] { z-index: 2; transform: translateX(-56%) scale(.62); opacity: .55; cursor: pointer; }
.v-car-s[data-d="1"] { z-index: 2; transform: translateX(56%) scale(.62); opacity: .55; cursor: pointer; }
.v-car-s[data-d="-2"], .v-car-s[data-d="-3"] { z-index: 1; transform: translateX(-80%) scale(.4); opacity: 0; pointer-events: none; }
.v-car-s[data-d="2"], .v-car-s[data-d="3"] { z-index: 1; transform: translateX(80%) scale(.4); opacity: 0; pointer-events: none; }
.v-car-s[data-d="-1"]:hover, .v-car-s[data-d="1"]:hover { opacity: .8; }
.v-car-s .v-play { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.v-car-s[data-d]:not([data-d="0"]) .v-play-b { display: none; }
.v-car-arr { position: absolute; z-index: 4; top: calc(50% - 30px); display: grid; place-items: center; width: 46px; height: 46px; padding: 0; color: var(--ink); background: var(--paper); border: 1.5px solid rgba(29, 29, 27, .25); border-radius: 50%; box-shadow: 0 6px 16px rgba(29, 29, 27, .15); cursor: pointer; }
.v-car-arr svg { width: 22px; height: 22px; }
.v-car-arr--l { left: 12px; }
.v-car-arr--r { right: 12px; }
.v-car-arr:hover { background: var(--yellow); border-color: var(--yellow); }
.v-car-arr:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-car-cap { display: flex; justify-content: space-between; gap: 16px; margin: 10px 2px 0; font-size: 15px; line-height: 1.4; color: var(--soft); min-height: 1.4em; }
.v-car-cap b { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }

/* sfogliatore dei libri: sopra tutto, fondo scuro */
.v-lock, .v-lock body { overflow: hidden; }
.v-bookv { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: max(56px, env(safe-area-inset-top)) 24px max(18px, env(safe-area-inset-bottom)); background: rgba(22, 22, 20, .92); }
.v-bookv-area { position: relative; display: grid; place-items: center; min-height: 0; }
.v-bookv-book { transition: transform .5s ease-in-out; }
.v-bk-page { background: #fff; }
.v-bk-page img { display: block; width: 100%; height: 100%; object-fit: contain; }   /* mai tagliate */
.v-bookv-x { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 16px; width: 46px; height: 46px; font: 400 34px/1 var(--sans); color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%; cursor: pointer; }
.v-bookv-x:hover { background: rgba(255, 255, 255, .25); }
.v-bookv-ctl { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 14px; color: #f2f2ee; font-weight: 700; font-variant-numeric: tabular-nums; }
.v-bookv-ctl .v-car-arr { position: static; }

/* da pc, finestra grande: tutto in una schermata. La pagina non scorre; scorre solo il testo nella sua colonna */
@media (min-width: 1000px) and (min-height: 640px) {
  html.v-onescreen, html.v-onescreen body { overflow: hidden; }
  html.v-onescreen .v-foot { display: none; }
  body.is-proj .v-proj { padding: 14px 0 0; }
  body.is-proj .v-proj-in { max-width: 1240px; height: calc(100vh - 62px - 14px); height: calc(100dvh - 62px - 14px); display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
  .v-proj-box { margin: 10px 0 16px; padding: 18px 24px; }
  .v-proj-box .v-proj-lead { font-size: 17px; }
  .v-proj-body { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .v-proj-body > .v-proj-main, .v-proj-body > .v-proj-sec { grid-row: 1 / -1; }
  .v-proj-body > .v-pswitch + .v-proj-sec, .v-proj-body > .v-pswitch ~ .v-proj-sec { grid-row: 2; }
  .v-proj-sec:not([hidden]) { min-height: 0; display: grid; }
  .v-proj-main { min-height: 0; height: 100%; padding-bottom: 18px; }
  .v-proj-vis { height: 100%; min-height: 0; }
  .v-proj-vis .v-car { height: 100%; }
  .v-proj-vis .v-car-stage { aspect-ratio: auto; height: 100%; }
  .v-proj-vis .v-site { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); margin: 0; }
  .v-proj-vis .v-site iframe { height: 100%; }
  .v-proj-text { height: 100%; overflow-y: auto; padding-right: 10px; scrollbar-width: thin; }
}
@media (max-width: 720px) {
  .v-proj-box { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .v-proj-main { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .v-car-stage { aspect-ratio: 4 / 3.4; }
  .v-car-s > a, .v-car-s > button { width: 82%; }
  .v-car-arr { width: 40px; height: 40px; top: calc(50% - 28px); }
  .v-proj-top .v-pn-a span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .v-car-s, .v-bookv-book { transition: none; } }

/* ---------- protezione dei contenuti (js/protect.js, come nel portfolio creativo) ---------- */
img, video, canvas, model-viewer, iframe { -webkit-user-drag: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#shield { position: fixed; inset: 0; z-index: 2147483647; display: none; align-items: center; justify-content: center; padding: 16px; background: #000; }
html.is-shielded #shield { display: flex; }
.shield-box { max-width: 420px; padding: 22px 26px; text-align: center; color: var(--ink); background: var(--paper); border-radius: 18px; font-family: var(--hand); }
.shield-t { margin: 0 0 10px; font-size: 26px; line-height: 1.15; }
.shield-mail { font-size: 21px; color: var(--teal-ink); word-break: break-all; user-select: text; -webkit-user-select: text; }
@media print { html, body { display: none !important; } }


/* ======================================================================================================================
   Pagina del progetto (2a versione): in alto titolo e link; sotto immagini grandi a sinistra e, a destra, il riquadro dei
   dati e il testo; in fondo precedente / tutti i progetti / successivo
   ====================================================================================================================== */
.v-proj-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; margin: 6px 0 18px; }
.v-proj-id { min-width: 0; }
.v-proj-head .v-proj-title { font-size: clamp(30px, 4vw, 44px); }
.v-proj-head .v-proj-title::after { height: 7px; margin-top: 8px; width: min(220px, 60%); }
.v-proj-head .v-proj-lead { margin-top: 10px; font-size: 18px; max-width: 60ch; }
.v-proj-head .v-proj-files { margin: 0; }
.v-proj-side { min-width: 0; display: grid; gap: 18px; align-content: start; }
.v-proj-side .v-facts { margin: 0; padding: 16px 18px; background: #f7f6f1; border-radius: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.v-proj-side .v-facts dd { font-size: 15px; }
.v-proj-main { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); }
/* in fondo: precedente / tutti i progetti / successivo, col carattere di prima */
.v-pn { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.v-pn-all { justify-self: center; padding: 10px 18px; font: 700 15px/1 var(--sans); text-transform: uppercase; letter-spacing: .05em; text-decoration: none; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(29, 29, 27, .25); }
.v-pn-all:hover, .v-pn-all:focus-visible { background: var(--yellow-soft); outline: none; }
.v-pn-a { min-height: 54px; }
/* immagini a tutto schermo */
.v-light { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: max(60px, env(safe-area-inset-top)) 76px max(20px, env(safe-area-inset-bottom)); background: rgba(22, 22, 20, .94); }
.v-light-fig { margin: 0; display: grid; justify-items: center; gap: 12px; max-width: 100%; max-height: 100%; min-height: 0; }
.v-light-img { display: block; max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.v-light-cap { color: #e9e9e4; font-size: 15px; text-align: center; }
.v-light-cap b { margin-left: 10px; color: #fff; font-variant-numeric: tabular-nums; }
.v-light .v-car-arr { position: fixed; top: 50%; translate: 0 -50%; }
.v-light .v-car-arr--l { left: 16px; }
.v-light .v-car-arr--r { right: 16px; }
.v-car-big { cursor: zoom-in; }
/* immagini e schede dei progetti: niente menu della pressione lunga (iPhone: apri in un'altra scheda, indirizzo del file) */
.v-car-big, .v-sb-p, .v-card-a, .v-light { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (min-width: 1000px) and (min-height: 640px) {
  body.is-proj .v-proj-in { grid-template-rows: auto minmax(0, 1fr) auto; }
  .v-proj-head { margin: 4px 0 14px; }
  .v-proj-head .v-proj-lead { font-size: 16.5px; margin-top: 8px; }
  .v-proj-main { padding-bottom: 0; }
  .v-proj-side { height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  .v-proj-side .v-proj-text { height: auto; min-height: 0; }
  .v-pn { margin-top: 12px; padding: 10px 0 12px; }
  .v-pn-a { min-height: 44px; font-size: 16px; }
}
@media (max-width: 720px) {
  .v-proj-side .v-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v-light { padding: 56px 8px 16px; }
  .v-light .v-car-arr { top: auto; bottom: 18px; translate: none; }
  .v-pn { grid-template-columns: 1fr 1fr; }
  .v-pn-all { grid-column: 1 / -1; grid-row: 1; }
}


/* ======================================================================================================================
   Pagina del progetto (3a versione): immagini intere nel carosello, piu respiro, riquadro dei dati compatto,
   testo da sfogliare; da telefono: titolo, sottotitolo, carosello, dati, testo, link
   ====================================================================================================================== */
/* immagini intere: il contenitore ha un'altezza vera, cosi max-height 100% funziona (prima le verticali si tagliavano) */
.v-car-s { display: flex; align-items: center; justify-content: center; }
.v-car-s > a, .v-car-s > button { display: flex; align-items: center; justify-content: center; height: 100%; }
.v-car-img, .v-car-s video { max-width: 100%; max-height: 100%; }
/* piu respiro */
.v-proj-head { margin-bottom: 26px; }
.v-proj-main { gap: 40px; }
.v-proj-side { gap: 26px; }
.v-pn { margin-top: 34px; }
/* riquadro dei dati compatto: un dato per riga, etichetta a sinistra */
.v-proj-side .v-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; padding: 14px 16px; }
.v-proj-side .v-facts > div { display: contents; }
.v-proj-side .v-facts dt { padding-top: 2px; font-size: 11.5px; }
.v-proj-side .v-facts dd { margin: 0; font-size: 14.5px; line-height: 1.4; }
/* testo da sfogliare: un paragrafo alla volta */
.v-tx { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
.v-tx-pages { min-height: 0; overflow-y: auto; }
.v-tx-p[hidden] { display: none; }
.v-tx-p { animation: v-fadein .3s ease both; }
.v-tx-nav { display: flex; align-items: center; gap: 12px; }
.v-tx-arr { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--ink); background: var(--paper); border: 1.5px solid rgba(29, 29, 27, .25); border-radius: 50%; cursor: pointer; }
.v-tx-arr svg { width: 18px; height: 18px; }
.v-tx-arr:hover { background: var(--yellow); border-color: var(--yellow); }
.v-tx-arr:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }
.v-tx-n { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--soft); }
@keyframes v-fadein { from { opacity: 0; transform: translateY(4px); } }
.v-proj-files--low { display: none; }
@media (min-width: 1000px) and (min-height: 640px) {
  .v-proj-head { margin-bottom: 20px; }
  .v-proj-side .v-tx { height: auto; min-height: 0; overflow: hidden; }
}
@media (max-width: 720px) {
  .v-proj-head { margin: 8px 0 22px; }
  .v-proj-files--top { display: none; }
  .v-proj-files--low { display: flex; }
  .v-proj-main { grid-template-columns: minmax(0, 1fr); gap: 26px; }   /* una colonna: la regola per pc piu sopra la copriva */
  .v-proj-side { gap: 22px; }
  .v-car-stage { aspect-ratio: 1 / 1; }
  .v-car-s > a, .v-car-s > button { width: 84%; }
  .v-proj-text p { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { .v-tx-p { animation: none; } }

/* icone delle parti di Chi sono: un cerchio giallo chiaro col disegno a tratto */

/* icona a sinistra di ogni riga delle parti di Chi sono (separa meglio le righe) */
.v-rows li { align-items: center; }
.v-row-i { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; margin-right: -4px; color: var(--ink); background: var(--yellow-soft); border-radius: 50%; }
.v-row-i svg { width: 17px; height: 17px; }
.v-row-t { flex: 1; min-width: 0; }

/* lingue e hobby: righe a due a due su tutta la larghezza; bandiere tonde */
.v-rows--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
/* bandiere dentro il cerchio giallo, come le altre icone */
.v-row-flag svg { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(29, 29, 27, .18); }
.v-row-lv { color: var(--soft); font-weight: 500; }
@media (max-width: 720px) { .v-rows--two { grid-template-columns: minmax(0, 1fr); } }

/* personaggio 3D in Chi sono (scene3d/veloce-char.js): al posto del disegno fermo, che resta sotto finche non e pronto */
.v-me { min-height: 320px; }
.char-gl--inline { position: absolute; z-index: 1; cursor: pointer; opacity: 0; transition: opacity .5s; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; outline: none; }
.char-gl--inline.is-on { opacity: 1; }
.v-me.is-3d img { opacity: 0; }
.v-me figcaption { z-index: 2; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .char-gl--inline { transition: none; } }

/* riga del titolo Chi sono / Full CV: titolo-interruttore, striscia turchese che finisce dove comincia "Scarica il CV" */
.v-sw-row { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; }
.v-sw-row .v-switch { flex: 1; min-width: 0; margin: 0; }
.v-sw-row .v-bar-dl { position: static; translate: none; flex: none; margin: 0; }
.v-bar-dl-s { display: none; }
/* da telefono: Chi sono / Full CV su una riga con la linea, il tasto sotto */
@media (max-width: 720px) {
  .v-sw-row { flex-wrap: wrap; gap: 14px; }
  .v-sw-row .v-switch { flex: 1 1 100%; flex-wrap: nowrap; gap: 4px 8px; white-space: nowrap; }
  .v-sw-row .v-bar-dl { min-height: 42px; padding: 7px 15px 7px 12px; font-size: 15px; }
}

/* ---------- da telefono: progetti a gruppi, tag che seguono lo schermo, contatti e piede ordinati ---------- */
.v-more { display: none; }
.v-tagfab { display: none; }
@media (max-width: 720px) {
  /* i primi 4 progetti, gli altri con "Mostra altri" */
  .v-grid:not(.is-open) .v-card.is-extra { display: none; }
  .v-more:not([hidden]) { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin: 30px 0 0; padding: 10px 18px; font: 700 16px/1.2 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid rgba(29, 29, 27, .3); border-radius: 999px; cursor: pointer; }
  .v-more:active { transform: scale(.98); }
  .v-more:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }

  /* tag in un cerchio in basso a destra, finche si e tra i progetti; toccato si apre coi tag */
  .v-tagfab { display: block; position: fixed; z-index: 30; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); pointer-events: none; }
  .v-tagfab-btn { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-left: auto; padding: 0; color: var(--ink); background: var(--yellow); border: 1.5px solid var(--yellow); border-radius: 50%; box-shadow: 0 8px 22px rgba(29, 29, 27, .18); cursor: pointer; opacity: 0; scale: .6; transition: opacity .2s, scale .25s cubic-bezier(.3, 1.4, .5, 1), background-color .15s; }
  .v-tagfab-btn svg { width: 24px; height: 24px; }
  .v-tagfab-x { display: none; }
  .v-tagfab.is-tag .v-tagfab-btn { border-color: var(--ink); }   /* cerchio sempre giallo; con un tag scelto prende il contorno scuro */
  .v-tagfab.is-on { pointer-events: auto; }
  .v-tagfab.is-on .v-tagfab-btn { opacity: 1; scale: 1; }
  .v-tagfab.is-open .v-tagfab-i { display: none; }
  .v-tagfab.is-open .v-tagfab-x { display: block; }
  .v-tagfab-panel { position: absolute; right: 0; bottom: 68px; display: flex; flex-wrap: wrap; gap: 8px; width: calc(100vw - 32px); padding: 14px; background: var(--paper); border: 1.5px solid rgba(29, 29, 27, .18); border-radius: 18px; box-shadow: 0 14px 34px rgba(29, 29, 27, .2); opacity: 0; visibility: hidden; translate: 0 10px; transform-origin: bottom right; transition: opacity .18s, translate .22s, visibility 0s .22s; }
  .v-tagfab.is-open .v-tagfab-panel { opacity: 1; visibility: visible; translate: 0 0; transition: opacity .18s, translate .22s; }
  .v-tagfab-panel .v-chip { min-height: 40px; padding: 7px 12px; font-size: 14.5px; }

  /* contatti: una scheda per voce, nome sopra, indirizzo che non va a capo, Copia a destra */
  .v-contacts { gap: 12px; }
  .v-contacts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k b" "a b"; align-items: center; gap: 4px 12px; padding: 12px 12px 12px 16px; border: 1.5px solid rgba(29, 29, 27, .14); border-radius: 14px; }
  .v-c-k { grid-area: k; min-width: 0; font-size: 12.5px; }
  .v-contacts li > a { grid-area: a; min-width: 0; overflow-wrap: anywhere; font-size: 16px; }
  .v-contacts .v-copy { grid-area: b; width: 44px; height: 44px; padding: 0; }   /* solo l'icona: c'e piu posto per l'indirizzo */
  .v-contacts .v-copy span { display: none; }

  /* piede: tutto centrato, nome su due righe, link su una riga */
  .v-foot { margin-top: 48px; }
  .v-foot-in { justify-items: center; gap: 12px; text-align: center; }
  .v-foot-sep { display: none; }
  .v-foot-st { display: block; margin-top: 2px; font-weight: 700; font-size: 14px; letter-spacing: .04em; color: var(--soft); }
  .v-foot-links { justify-content: center; gap: 8px 22px; }
  .v-foot-mail { flex-basis: 100%; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) { .v-tagfab-btn, .v-tagfab-panel { transition: none; } }

/* nome in fondo: Flavio turchese, Martusciello giallo (piu scuri dei colori del CV, cosi si leggono sul bianco) */
.v-foot-f { color: var(--teal-ink); }
.v-foot-m { color: #dfa20c; }

/* testo fermo (tools/prep_static.js) per chi legge la pagina senza JavaScript: con JavaScript non si vede mai,
   js/veloce.js riscrive i contenitori */
html.js .v-static { display: none; }
.v-static h3 { margin: 22px 0 6px; font-size: 18px; }
.v-static ul { padding-left: 20px; }
.v-static p { margin: 4px 0; }

/* telefono in orizzontale (#rot-lock): copre tutto e chiede di girarlo in verticale. Solo telefoni: col dito e schermo
   basso (in orizzontale un telefono e alto meno di 500 px; i tablet no). Uguale al portfolio creativo (css/base.css) */
#rot-lock { display: none; position: fixed; inset: 0; z-index: 1000; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: var(--paper); color: #e8a400; text-align: center; }
#rot-lock p { margin: 0; color: var(--ink); font: 24px/1.3 var(--hand); }
#rot-lock .rot-lock-ph { transform-box: fill-box; transform-origin: center; animation: rot-lock 2.6s ease-in-out infinite; }
@keyframes rot-lock { 0% { rotate: 90deg; opacity: 0; } 10%, 22% { rotate: 90deg; opacity: 1; } 55%, 85% { rotate: 0deg; opacity: 1; } 100% { rotate: 0deg; opacity: 0; } }   /* sdraiato, si mette dritto girando come la freccia (antiorario), poi sparisce e ricomincia */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 520px) {
  #rot-lock { display: flex; }
  html, body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { #rot-lock .rot-lock-ph { animation: none; } }
