/* it.simonerenzi.com · sezioni ripensate come una presentazione di prodotto.
   Tutto è sotto html.cx: senza JS (o con "riduci movimento") resta il sito com'era. */

html.cx{--ink:#1d1d1f;--ink2:#6e6e73;--ink3:#64646b;--paper:#fff;--paper2:#f5f5f7;--night:#000;--blue:#0071e3;--sec-y:clamp(110px,15vw,220px)}

/* ---------- ritmo generale: niente più sezioni impilate, tutta larghezza ---------- */
html.cx .primary,html.cx .products-section,html.cx .secondary-bis,html.cx .third,html.cx .forth,html.cx .sixth,html.cx .fifth{
  position:relative!important;top:auto!important;min-height:0!important;height:auto!important;display:block!important;overflow:visible!important;
  padding:var(--sec-y) 0!important;transform:none!important;filter:none!important;border-radius:0!important}
html.cx .primary{background:var(--paper)}
html.cx .products-section{background:var(--paper2)}
html.cx .secondary-bis{background:var(--night);color:#f5f5f7}
html.cx .third{background:var(--paper)}
html.cx .forth{background:var(--paper2)}
html.cx .sixth{background:var(--night);color:#f5f5f7}
html.cx .fifth{background:var(--paper)}

/* il vecchio titolo diventa l'occhiello sopra il titolo grande */
html.cx #cv>:is(h1,h2.seo-section-title),html.cx .products-section>:is(h1,h2.seo-section-title),html.cx .secondary-bis>:is(h1,h2.seo-section-title),html.cx .third>:is(h1,h2.seo-section-title),html.cx .forth>:is(h1,h2.seo-section-title),html.cx .sixth>:is(h1,h2.seo-section-title),html.cx .fifth :is(h1,h2.seo-section-title).contact-title{
  writing-mode:horizontal-tb!important;transform:none!important;display:block;margin:0 0 18px!important;padding:0 var(--gut)!important;max-width:none!important;
  font-size:13px!important;font-weight:600!important;letter-spacing:.14em!important;text-transform:uppercase;line-height:1.2!important;color:var(--ink3)!important;text-align:left}
html.cx .secondary-bis>:is(h1,h2.seo-section-title),html.cx .sixth>:is(h1,h2.seo-section-title){color:#86868b!important}

.cx-head{padding:0 var(--gut);margin-bottom:clamp(48px,7vw,110px)}
.cx-big{margin:0;font-family:Inter,system-ui,sans-serif;font-weight:800;font-size:clamp(52px,9vw,168px);line-height:.92;letter-spacing:-.055em;color:inherit}
.cx-big span{color:var(--ink3)}
html.cx .secondary-bis .cx-big span,html.cx .sixth .cx-big span{color:#6e6e73}
.cx-sub{margin:28px 0 0;max-width:30ch;font-size:clamp(20px,2vw,30px);line-height:1.25;font-weight:600;letter-spacing:-.02em;color:var(--ink3)}
.cx-line{display:block;overflow:hidden;padding-bottom:.08em;margin-bottom:-.08em}
.cx-wd{display:inline}

/* ======================================================================
   CURRICULUM
   ====================================================================== */
html.cx #cv>.container{display:none}
.cx-cv{padding:0 var(--gut)}
.cx-lead{margin:0 0 clamp(56px,8vw,120px);max-width:22ch;font-size:clamp(30px,3.9vw,64px);line-height:1.12;font-weight:700;letter-spacing:-.035em;color:var(--ink)}
.cx-lead .cx-w{opacity:.16}
.cx-bio{position:relative}
.cx-bio-rest{columns:2 340px;column-gap:clamp(40px,5vw,96px);font-size:clamp(17px,1.25vw,20px);line-height:1.65;color:var(--ink2);max-height:30em;overflow:hidden;transition:max-height 1s var(--expo)}
.cx-bio-rest p{margin:0 0 1.1em;break-inside:avoid-column}
.cx-bio-rest strong,.cx-bio-rest b{color:var(--ink);font-weight:600}
.cx-bio:not(.is-open) .cx-bio-rest{-webkit-mask-image:linear-gradient(180deg,#000 70%,transparent);mask-image:linear-gradient(180deg,#000 70%,transparent)}
.cx-bio.is-open .cx-bio-rest{max-height:none}
.cx-actions{display:flex;flex-wrap:wrap;gap:14px;margin:36px 0 0}
.cx-pill{min-height:48px;padding:0 24px;border-radius:999px;display:inline-flex;align-items:center;gap:10px;font-size:15px;font-weight:600;border:0;cursor:pointer;text-decoration:none;transition:transform .5s var(--expo),background .3s}
.cx-pill:hover{transform:translateY(-2px)}
.cx-pill-dark{background:var(--ink);color:#fff}
.cx-pill-blue{background:var(--blue);color:#fff}
.cx-pill-ghost{background:transparent;color:var(--blue);box-shadow:inset 0 0 0 1.5px var(--blue)}
.cx-pill img{width:20px;height:auto;border-radius:3px}

/* stack: nastri di tecnologie + griglia con i livelli */
.cx-stack{margin-top:clamp(110px,14vw,200px)}
.cx-stack h3{margin:0 0 28px;font-size:clamp(40px,5.6vw,96px);font-weight:800;letter-spacing:-.05em;line-height:.95;color:var(--ink)}
.cx-ribbons{margin:0 calc(-1 * var(--gut));overflow:hidden;padding:12px 0 40px}
.cx-ribbon{display:flex;gap:.45em;width:max-content;white-space:nowrap;font-size:clamp(48px,7.5vw,132px);font-weight:800;letter-spacing:-.05em;line-height:1.02;will-change:transform}
.cx-ribbon span:nth-child(3n+2){color:transparent;-webkit-text-stroke:1.5px var(--ink)}
.cx-ribbon span:nth-child(3n){color:var(--ink3)}
.cx-ribbon+.cx-ribbon{margin-left:-30vw}
.cx-skills{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:28px 40px;margin-top:24px}
.cx-skill{display:grid;grid-template-columns:1fr auto;align-items:end;gap:10px 12px;padding-top:14px;border-top:1px solid rgba(0,0,0,.1)}
.cx-skill b{font-size:15px;font-weight:600;color:var(--ink)}
.cx-skill i{font-style:normal;font-size:26px;font-weight:700;letter-spacing:-.03em;color:var(--ink);font-variant-numeric:tabular-nums}
.cx-skill s{grid-column:1/-1;display:block;height:3px;border-radius:3px;background:rgba(0,0,0,.08);overflow:hidden;text-decoration:none}
.cx-skill s::after{content:"";display:block;height:100%;width:var(--v);background:var(--ink);border-radius:3px;transform-origin:0 50%;transform:scaleX(var(--f,1))}
html.cx #skills-scroll,html.cx .skills-scroll-overlay,html.cx #bio-scroll-arrow,html.cx #bio-scroll-fade{display:none!important}

/* domanda al CV: una grande scheda scura */
html.cx .cx-cv .cvq{margin:clamp(110px,14vw,200px) 0 0;padding:clamp(32px,5vw,80px);border-radius:clamp(24px,3vw,44px);background:#000;color:#f5f5f7;border:0;box-shadow:none;max-width:none}
html.cx .cx-cv .cvq-title{font-size:clamp(40px,5.4vw,92px)!important;font-weight:800!important;letter-spacing:-.05em!important;line-height:.95!important;color:#fff!important}
html.cx .cx-cv .cvq-sub{font-size:clamp(17px,1.5vw,22px)!important;color:#a1a1a6!important;margin-top:16px!important}
html.cx .cx-cv .cvq-head{align-items:flex-start;gap:20px}
html.cx .cx-cv .cvq-chip{background:#1d1d1f!important;color:#f5f5f7!important;border-color:#2d2d30!important;font-size:15px!important;padding:12px 18px!important}
html.cx .cx-cv .cvq-chip:hover{background:#2d2d30!important}
html.cx .cx-cv .cvq-bar{background:#1d1d1f!important;border-color:#2d2d30!important}
html.cx .cx-cv .cvq-input{color:#fff!important;font-size:18px!important;background:transparent!important}

/* ======================================================================
   PRODOTTI — galleria orizzontale su desktop
   ====================================================================== */
html.cx .product-card{opacity:1;transition:box-shadow .4s var(--expo)}
html.cx .product-name{font-size:clamp(30px,3vw,54px)!important;letter-spacing:-.045em!important;line-height:1!important}
html.cx .product-desc{font-size:clamp(15px,1.15vw,19px)!important;line-height:1.45!important}
@media (min-width:1024px){
  html.cx .products-section{overflow:hidden!important;padding-bottom:0!important}
  html.cx .cx-prod-pin{height:100vh;height:100lvh;display:flex;align-items:center}
  html.cx .products-grid{display:flex!important;gap:24px!important;width:max-content!important;max-width:none!important;margin:0!important;padding:0 var(--gut)!important;grid-template-columns:none!important;will-change:transform}
  html.cx .product-card{flex:none;width:clamp(380px,34vw,560px);height:min(74vh,680px);min-height:0!important;padding:clamp(28px,2.6vw,48px)!important;border-radius:32px!important}
  html.cx .product-card--hero{width:clamp(560px,52vw,880px)}
  html.cx .product-card .product-desc{max-width:40ch}
  html.cx .product-card .product-icon svg{width:72px;height:72px}
}
@media (max-width:1023px){
  html.cx .products-grid{padding:0 var(--gut)!important}
  html.cx .product-card{border-radius:26px!important}
}

/* ======================================================================
   PROTOTIPAZIONE 3D — palcoscenico scuro, viewer gigante
   ====================================================================== */
html.cx .secondary-bis .cx-sub{color:#86868b}
html.cx .container-prototyping{display:flex!important;flex-direction:column!important;gap:22px!important;max-width:none!important;padding:0 var(--gut)!important;min-height:0!important}
html.cx #stl-viewer{order:1;flex:none!important;width:100%!important;height:min(78vh,820px)!important;min-height:420px;border-radius:32px;overflow:hidden;background:radial-gradient(120% 90% at 50% 40%,#2a2a2e 0%,#0b0b0d 70%)!important}
html.cx .stl-sidebar{order:2;width:100%!important;max-width:none!important;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;position:static!important}
html.cx .stl-sidebar-title{display:none}
html.cx .stl-list{display:flex!important;gap:10px;overflow-x:auto;padding:4px 0 8px!important;margin:0!important;scrollbar-width:none}
html.cx .stl-list::-webkit-scrollbar{display:none}
html.cx .stl-list-item{flex:none;display:inline-flex!important;align-items:center;gap:8px;white-space:nowrap;padding:12px 18px!important;border-radius:999px!important;background:#1d1d1f!important;color:#d2d2d7!important;border:1px solid #2d2d30!important;font-size:14px;cursor:pointer;transition:background .3s,color .3s}
html.cx .stl-list-item:hover{background:#2d2d30!important;color:#fff!important}
html.cx .stl-list-item.active{background:#f5f5f7!important;color:#000!important;border-color:#f5f5f7!important}
html.cx .stl-list-item .stl-list-icon{display:inline-flex;opacity:.7}

/* ======================================================================
   COLLABORAZIONI
   ====================================================================== */
html.cx .collab-section{display:block!important;max-width:none!important;padding:0 var(--gut)!important}
html.cx .collab-desc{max-width:none!important}
html.cx .collab-desc>p:first-child{max-width:24ch;margin:0 0 clamp(48px,6vw,96px);font-size:clamp(28px,3.4vw,56px);line-height:1.12;font-weight:700;letter-spacing:-.035em;color:var(--ink)}
html.cx .collab-desc>p:first-child .cx-w{opacity:.16}
html.cx .collab-desc .cx-cols{columns:2 340px;column-gap:clamp(40px,5vw,96px);font-size:clamp(17px,1.25vw,20px);line-height:1.65;color:var(--ink2)}
html.cx .collab-desc .cx-cols p{margin:0 0 1.1em;break-inside:avoid-column}
html.cx .collab-desc.cx-collab{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);grid-template-areas:"lead photo" "cols photo";column-gap:clamp(40px,6vw,110px);align-items:start}
html.cx .cx-collab>p:first-child{grid-area:lead;max-width:20ch;font-size:clamp(28px,3vw,50px)}
html.cx .cx-collab .cx-cols{grid-area:cols;columns:1}
html.cx .cx-collab-photo{grid-area:photo;position:sticky;top:110px;justify-self:end;width:min(100%,calc((100vh - 150px) * 2 / 3));margin:0;border-radius:32px;overflow:hidden;aspect-ratio:2/3;background:var(--paper2)}
html.cx .cx-collab-photo picture,html.cx .cx-collab-photo img{display:block;width:100%;height:100%}
html.cx .cx-collab-photo img{object-fit:cover;object-position:50% 30%;max-width:none;transform-origin:50% 40%}
@media (max-width:900px){
  html.cx .collab-desc.cx-collab{grid-template-columns:1fr;grid-template-areas:"lead" "photo" "cols"}
  html.cx .cx-collab-photo{position:relative;top:auto;width:100%;aspect-ratio:4/5;margin:0 0 clamp(36px,8vw,56px);border-radius:26px}
}
html.cx .collab-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:18px!important;margin-top:clamp(56px,7vw,110px)!important;max-width:none!important}
html.cx .collab-card{aspect-ratio:1/1.05;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:28px!important;border-radius:28px!important;background:var(--paper2)!important;border:0!important;box-shadow:none!important;text-align:center}
html.cx .collab-card img{width:58%!important;max-width:150px;height:auto!important;filter:grayscale(1);opacity:.85;transition:filter .5s,opacity .5s;mix-blend-mode:multiply}
html.cx .collab-card:hover img{filter:none;opacity:1}
html.cx .collab-card span{font-size:14px;font-weight:600;color:var(--ink2)}
@media (max-width:900px){html.cx .collab-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* ======================================================================
   ASSOCIAZIONI — i numeri prima di tutto
   ====================================================================== */
html.cx .assoc-section{max-width:none!important;padding:0 var(--gut)!important}
html.cx .cx-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(20px,3vw,48px);margin:0 0 clamp(80px,10vw,160px)}
html.cx .cx-numbers .assoc-stat{display:flex;flex-direction:column;gap:12px;padding-top:22px;border-top:1px solid rgba(0,0,0,.12);background:none!important}
html.cx .cx-numbers .assoc-stat-num{font-size:clamp(64px,10.5vw,190px)!important;font-weight:800!important;letter-spacing:-.06em!important;line-height:.9!important;color:var(--ink)!important;font-variant-numeric:tabular-nums}
html.cx .cx-numbers .assoc-stat-lbl{font-size:clamp(15px,1.3vw,20px)!important;font-weight:600;color:var(--ink3)!important;text-transform:none!important;letter-spacing:0!important}
html.cx .cx-numbers .assoc-stat-divider{display:none}
html.cx .assoc-body{display:grid!important;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(40px,6vw,110px);align-items:start}
html.cx .assoc-portrait{border-radius:32px;overflow:hidden;aspect-ratio:4/5;width:100%!important;max-width:none!important}
html.cx .assoc-portrait img{width:100%;height:120%!important;object-fit:cover;max-width:none}
html.cx .assoc-text{max-height:none!important;overflow:visible!important}
html.cx .assoc-hero{margin-bottom:28px!important}
html.cx .assoc-name{font-size:clamp(34px,3.6vw,60px)!important}
html.cx .assoc-text p{font-size:clamp(16px,1.2vw,19px);line-height:1.65;color:var(--ink2)}
html.cx .assoc-extra{margin-top:40px}
@media (max-width:900px){html.cx .cx-numbers{grid-template-columns:1fr}html.cx .assoc-body{grid-template-columns:1fr}}

/* ======================================================================
   GITHUB — scuro, a tutta larghezza
   ====================================================================== */
html.cx .github-section{max-width:none!important;padding:0 var(--gut)!important}
html.cx .sixth .gh-profile{background:#1d1d1f!important;border:0!important;border-radius:32px!important;padding:clamp(24px,3vw,44px)!important}
html.cx .sixth .gh-graph-container{border-radius:24px;overflow:hidden}

/* ======================================================================
   CONTATTI — la chiusura
   ====================================================================== */
.cx-outro{padding:0 var(--gut);margin-bottom:clamp(56px,8vw,120px)}
.cx-outro .cx-big{font-size:clamp(72px,15vw,300px);letter-spacing:-.065em;line-height:.86}
html.cx .contact-section{max-width:none!important;padding:0 var(--gut)!important;gap:clamp(40px,6vw,110px)!important}
html.cx .contact-subtitle{font-size:clamp(18px,1.6vw,24px)!important;font-weight:600;color:var(--ink3)!important}

@media (max-width:768px){
  html.cx{--sec-y:96px}
  .cx-big{font-size:clamp(46px,14vw,80px)}
  .cx-lead{font-size:clamp(26px,7.4vw,36px)}
  .cx-bio-rest{max-height:26em}
  .cx-outro .cx-big{font-size:17vw}
  .cx-skills{grid-template-columns:1fr 1fr;gap:18px 18px}
  .cx-skill b{font-size:12.5px}
  .cx-skill i{font-size:19px}
}

/* curriculum: ritratto fermo a destra mentre si legge */
.cx-cv-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.8fr);gap:clamp(40px,5vw,96px);align-items:start}
.cx-cv-main .cx-head{padding:0}
.cx-cv-main .cx-lead{max-width:none}
.cx-cv-main .cx-bio-rest{columns:auto}
.cx-cv-aside{position:sticky;top:clamp(84px,11vh,120px);height:calc(100vh - clamp(120px,16vh,170px));min-height:420px;max-height:900px}
.cx-cv-aside picture{display:block;width:100%;height:100%;overflow:hidden;border-radius:36px;background:#e8e8ed}
.cx-cv-aside img{width:100%;height:100%;max-width:none;object-fit:cover;object-position:50% 20%;transform-origin:50% 30%}
@media (max-width:1023px){
  .cx-cv-grid{grid-template-columns:1fr}
  .cx-cv-main{display:contents}
  .cx-cv-main>*{order:2}
  .cx-cv-main>.cx-head{order:0;margin-bottom:28px}
  .cx-cv-aside{order:1;position:relative;top:auto;height:auto;min-height:0;max-height:none;aspect-ratio:4/5;margin-bottom:40px}
}

/* stack per categorie, senza percentuali */
.cx-cats{margin-top:24px;border-top:1px solid rgba(0,0,0,.1)}
.cx-cat{display:grid;grid-template-columns:minmax(180px,.32fr) 1fr;gap:20px clamp(24px,4vw,64px);align-items:start;padding:clamp(22px,2.6vw,36px) 0;border-bottom:1px solid rgba(0,0,0,.1)}
.cx-cat h4{margin:0;font-size:clamp(22px,2vw,30px);font-weight:700;letter-spacing:-.03em;line-height:1.15;color:var(--ink)}
.cx-pills{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.cx-pills li{padding:11px 18px;border-radius:999px;background:var(--paper2);font-size:clamp(14px,1.05vw,17px);font-weight:600;letter-spacing:-.01em;color:var(--ink);line-height:1.2}
@media (max-width:760px){.cx-cat{grid-template-columns:1fr;gap:14px}.cx-pills li{padding:9px 14px;font-size:14px}}

.seo-explore{position:relative;z-index:2;background:#0b0b0d;color:#f5f5f7;padding:70px clamp(24px,6vw,100px);font:16px/1.6 Inter,system-ui,sans-serif}.seo-explore h2{color:inherit;font-size:clamp(26px,3vw,44px);line-height:1.25}.seo-explore ul{padding-left:20px}.seo-explore a{color:#b7d6ff}.seo-explore a:focus-visible{outline:3px solid #91c2ff;outline-offset:3px}
