
:root {
  --ink:#131714;
  --ink-2:#202722;
  --paper:#f4f3ee;
  --paper-2:#ebeae4;
  --white:#fff;
  --sage:#9aae98;
  --sage-dark:#60745f;
  --sage-soft:#dbe2d7;
  --line:rgba(19,23,20,.13);
  --muted:#69716c;
  --radius:28px;
  --shadow:0 30px 80px rgba(13,18,14,.12);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Manrope",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
.container{width:min(1180px,calc(100% - 48px));margin:0 auto}
.site-header{
  position:fixed;inset:0 0 auto 0;z-index:50;
  background:rgba(244,243,238,.78);
  border-bottom:1px solid transparent;
  backdrop-filter:blur(18px);
  transition:.25s ease;
}
.site-header.scrolled{border-color:var(--line);background:rgba(244,243,238,.92)}
.nav-wrap{width:min(1240px,calc(100% - 40px));height:78px;margin:auto;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;gap:12px;align-items:center;font-weight:800;letter-spacing:.11em;font-size:13px}
.brand-mark{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;font-family:"Playfair Display",serif;font-size:18px}
.main-nav{display:flex;align-items:center;gap:34px;font-size:13px;font-weight:600}
.main-nav a{position:relative}
.main-nav a:not(.nav-cta)::after{content:"";position:absolute;left:0;right:100%;bottom:-7px;height:1px;background:var(--ink);transition:.25s}
.main-nav a:hover::after{right:0}
.nav-cta{padding:12px 18px;border:1px solid var(--ink);border-radius:999px}
.menu-toggle{display:none;background:transparent;border:0;padding:8px}
.menu-toggle span{display:block;width:24px;height:1px;background:var(--ink);margin:6px}

.hero{
  min-height:100vh;position:relative;overflow:hidden;padding:148px 0 68px;
  display:flex;align-items:center;
}
.hero-grid{display:grid;grid-template-columns:1.06fr .94fr;gap:60px;align-items:center;position:relative;z-index:2}
.hero-bg{position:absolute;border-radius:50%;filter:blur(2px);opacity:.8}
.hero-bg-a{width:640px;height:640px;background:radial-gradient(circle,var(--sage-soft),transparent 68%);right:-220px;top:70px}
.hero-bg-b{width:500px;height:500px;background:radial-gradient(circle,#ffffff,transparent 65%);left:-220px;bottom:-230px}
.eyebrow,.section-kicker{text-transform:uppercase;font-size:11px;letter-spacing:.18em;font-weight:800;color:var(--sage-dark);display:flex;align-items:center;gap:12px}
.eyebrow span{display:inline-block;width:34px;height:1px;background:var(--sage-dark)}
.hero h1{font-size:clamp(56px,6.7vw,96px);line-height:.94;letter-spacing:-.055em;margin:23px 0 28px;font-weight:800}
.hero h1 em{font-family:"Playfair Display",serif;font-weight:600;color:var(--sage-dark)}
.hero-lead{max-width:650px;color:#4d5650;font-size:18px;line-height:1.75}
.hero-actions{display:flex;gap:12px;margin-top:34px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:0 22px;border-radius:999px;font-size:13px;font-weight:700;transition:.25s}
.btn-primary{background:var(--ink);color:white}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 14px 28px rgba(19,23,20,.17)}
.btn-ghost{border:1px solid var(--line);background:rgba(255,255,255,.32)}
.hero-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:55px;padding-top:24px;border-top:1px solid var(--line)}
.hero-meta strong,.hero-meta span{display:block}
.hero-meta strong{font-size:12px}
.hero-meta span{font-size:10px;color:var(--muted);margin-top:5px}

.hero-visual{min-height:650px;display:flex;align-items:flex-end;justify-content:center}
.portrait-shell{width:min(100%,560px);height:620px;position:relative;display:flex;align-items:flex-end;justify-content:center}
.portrait-panel{
  position:absolute;left:6%;right:4%;bottom:0;height:82%;
  border-radius:44% 44% 26px 26px;
  background:linear-gradient(145deg,#dfe5db 0%,#b8c6b5 56%,#8aa08a 100%);
  box-shadow:var(--shadow);
}
.portrait-orbit{position:absolute;border:1px solid rgba(96,116,95,.33);border-radius:50%}
.orbit-1{width:470px;height:470px;top:28px;right:-18px}
.orbit-2{width:380px;height:380px;top:73px;right:26px}
.portrait{position:relative;z-index:2;max-height:605px;max-width:110%;object-fit:contain;filter:drop-shadow(0 20px 30px rgba(21,25,21,.12))}
.floating-card{position:absolute;z-index:4;background:rgba(255,255,255,.86);backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.8);box-shadow:0 20px 55px rgba(28,33,29,.13);border-radius:16px;padding:13px 16px;display:flex;align-items:center;gap:10px}
.floating-card b,.floating-card small{display:block}
.floating-card b{font-size:12px}
.floating-card small{font-size:9px;color:var(--muted);margin-top:2px}
.card-one{left:-12px;top:28%;}.card-two{right:-16px;bottom:16%}
.mini-icon{width:30px;height:30px;border-radius:9px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:9px}
.status-dot{width:10px;height:10px;border-radius:50%;background:#789674;box-shadow:0 0 0 6px rgba(120,150,116,.15)}
.scroll-hint{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);width:28px;height:48px;border:1px solid var(--line);border-radius:18px;display:flex;justify-content:center;padding-top:8px}
.scroll-hint span{width:3px;height:8px;background:var(--ink);border-radius:2px;animation:scroll 1.6s infinite}
@keyframes scroll{0%{transform:translateY(0);opacity:1}70%{transform:translateY(18px);opacity:0}100%{opacity:0}}

.section{padding:120px 0}
.about{background:#fff}
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:100px;margin-top:55px}
.about h2,.projects-head h2,.build-head h2,.exp-heading h2,.contact-box h2{font-size:clamp(44px,5.2vw,72px);line-height:1.02;letter-spacing:-.045em;margin:0}
.about h2 span,.exp-heading h2 span,.contact-box h2 span{font-family:"Playfair Display",serif;color:var(--sage-dark)}
.about-copy{font-size:15px;line-height:1.8;color:#566059}
.about-copy .large{font-size:22px;line-height:1.55;color:var(--ink);margin-top:0}
.skill-chips{display:flex;flex-wrap:wrap;gap:9px;margin-top:28px}
.skill-chips span,.project-tags span,.card-tags span{border:1px solid var(--line);border-radius:999px;padding:7px 10px;font-size:10px;font-weight:700;color:#58605b;background:rgba(255,255,255,.5)}

.builds{background:var(--ink);color:white}
.section-kicker.light{color:#b6c6b4}
.build-head{display:flex;justify-content:space-between;align-items:end;gap:50px;margin-top:50px}
.build-head p{max-width:420px;color:#9da59f;line-height:1.7}
.build-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:54px}
.build-card{min-height:370px;border:1px solid rgba(255,255,255,.11);border-radius:26px;padding:28px;position:relative;background:linear-gradient(155deg,rgba(255,255,255,.065),rgba(255,255,255,.018));transition:.3s}
.build-card:hover{transform:translateY(-6px);border-color:rgba(184,202,181,.4)}
.build-number{font-size:10px;color:#7e8982;letter-spacing:.18em}
.build-icon{font-size:34px;color:#b8c9b6;margin:70px 0 28px}
.build-card h3{font-size:28px;margin:0 0 12px}
.build-card p{color:#a8b0aa;font-size:13px;line-height:1.7;max-width:310px}
.card-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:22px}
.card-tags span{border-color:rgba(255,255,255,.12);color:#aab3ad;background:transparent}

.projects{background:var(--paper)}
.projects-head{display:flex;align-items:end;justify-content:space-between;gap:50px;margin-top:50px;margin-bottom:70px}
.projects-head p{max-width:410px;color:var(--muted);line-height:1.7}
.project-feature{display:grid;grid-template-columns:1.18fr .82fr;gap:64px;align-items:center;padding:38px 0 82px;border-bottom:1px solid var(--line)}
.project-feature.reverse{grid-template-columns:.82fr 1.18fr}
.project-feature.reverse .project-visual{order:2}.project-feature.reverse .project-copy{order:1}
.project-visual{min-height:520px;border-radius:30px;position:relative;overflow:hidden;display:grid;place-items:center}
.visual-chimiaiuta{background:linear-gradient(135deg,#d6dfd3,#93a991)}
.visual-portale{background:linear-gradient(135deg,#f0d2a4,#d89348)}
.browser-mock{width:78%;height:67%;border-radius:18px;background:#fff;box-shadow:0 38px 65px rgba(26,33,26,.22);overflow:hidden;transform:perspective(900px) rotateY(-5deg) rotateX(2deg)}
.browser-top{height:35px;background:#f1f1ee;display:flex;align-items:center;gap:6px;padding:0 12px}
.browser-top span{width:7px;height:7px;border-radius:50%;background:#b8b8b3}
.mock-content{padding:28px}.mock-logo{width:44px;height:44px;border-radius:12px;background:#253329;color:#fff;display:grid;place-items:center;font-weight:800}
.mock-lines{margin-top:25px}.mock-lines i{display:block;height:9px;border-radius:5px;background:#e1e6df;margin-bottom:9px}.mock-lines i:nth-child(2){width:78%}.mock-lines i:nth-child(3){width:54%}
.mock-card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:28px}.mock-card-grid b{height:85px;border-radius:10px;background:#eef1eb}
.phone-mock{width:245px;height:480px;background:#1a1d1b;border:8px solid #292e2a;border-radius:42px;padding:11px;box-shadow:0 35px 70px rgba(75,45,11,.28);transform:rotate(5deg)}
.phone-screen{height:100%;border-radius:28px;background:#fff7ec;padding:35px 18px 18px;position:relative}.phone-speaker{position:absolute;z-index:3;width:75px;height:19px;border-radius:0 0 12px 12px;background:#292e2a}
.lion-mark{width:48px;height:48px;border-radius:16px;background:#ef9e3f;color:#fff;display:grid;place-items:center;font-weight:800}.app-title{font-size:17px;font-weight:800;margin:18px 0}.app-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.app-grid i{height:74px;border-radius:14px;background:#f2d8b8}.app-note{height:72px;border-radius:14px;background:#f3e6d6;margin-top:12px}
.project-index{font-size:10px;letter-spacing:.18em;font-weight:800;color:var(--sage-dark)}
.project-copy h3,.small-copy h3{font-size:42px;letter-spacing:-.04em;margin:16px 0 14px}
.project-copy p,.small-copy p{color:#626a65;line-height:1.75;font-size:14px}
.project-tags{display:flex;flex-wrap:wrap;gap:7px;margin:24px 0}
.project-link{font-size:12px;font-weight:800;display:inline-flex;align-items:center;gap:10px;border-bottom:1px solid var(--ink);padding-bottom:5px}
.project-pair{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding-top:74px}
.project-small{border-radius:28px;background:#fff;overflow:hidden;border:1px solid rgba(19,23,20,.08)}
.small-visual{height:330px;display:grid;place-items:center}
.visual-memorial{background:linear-gradient(135deg,#d9d1c5,#aaa192)}
.visual-home{background:linear-gradient(135deg,#c9d9d5,#6d8983)}
.memorial-frame{width:200px;height:245px;border-radius:4px;background:#f7f3e9;border:10px solid #6c5f51;box-shadow:0 24px 48px rgba(50,41,33,.25);display:flex;align-items:center;justify-content:center;position:relative}
.memorial-frame span{font-family:"Playfair Display";font-size:80px;color:#8a7a68}.memorial-frame i{position:absolute;width:45px;height:1px;background:#aa9a87;bottom:45px}
.dashboard{width:78%;height:68%;background:#111816;border-radius:20px;padding:20px;box-shadow:0 30px 55px rgba(21,31,28,.24)}
.dash-row{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.dash-row i,.dash-bottom i{display:block;background:#26342f;border-radius:9px;height:45px}
.dash-chart{height:90px;background:#1b2723;border-radius:10px;margin:10px 0;position:relative;overflow:hidden}.dash-chart b{position:absolute;left:-5%;right:-5%;bottom:26px;height:2px;background:#9ab1aa;transform:rotate(-8deg);box-shadow:35px -10px 0 #9ab1aa}
.dash-bottom{display:grid;grid-template-columns:1fr 1fr;gap:9px}.dash-bottom i{height:55px}
.small-copy{padding:26px 28px 32px}.small-copy h3{font-size:29px}

.experience{background:#fff}
.experience-grid{display:grid;grid-template-columns:.95fr 1.05fr;gap:100px}
.exp-heading .section-kicker{margin-bottom:50px}.exp-heading p{color:var(--muted);line-height:1.75;max-width:460px;margin-top:26px}
.timeline{padding-top:60px}
.timeline-item{display:grid;grid-template-columns:110px 1fr;gap:20px;padding:0 0 46px 28px;border-left:1px solid var(--line);position:relative}
.timeline-item::before{content:"";position:absolute;left:-5px;top:5px;width:9px;height:9px;border-radius:50%;background:#b6bdb7;border:3px solid #fff}
.timeline-item.active::before{background:var(--sage-dark);box-shadow:0 0 0 5px var(--sage-soft)}
.timeline-year{font-size:10px;text-transform:uppercase;letter-spacing:.16em;color:var(--sage-dark);font-weight:800}
.timeline-content h3{margin:0;font-size:22px}.timeline-content p{margin:7px 0;font-size:13px}.timeline-content span{font-size:10px;color:var(--muted)}
.timeline-item.muted{opacity:.62}

.contact{background:var(--paper);padding-top:0}
.contact-box{background:var(--ink);color:white;border-radius:34px;padding:70px;display:flex;align-items:end;justify-content:space-between;gap:60px}
.contact-box .section-kicker{margin-bottom:35px}
.contact-button{width:145px;height:145px;border-radius:50%;border:1px solid rgba(255,255,255,.28);display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;transition:.3s}
.contact-button b{font-size:20px;font-weight:400}.contact-button:hover{background:white;color:var(--ink);transform:scale(1.04)}

footer{padding:38px 0 55px;background:var(--paper)}
.footer-inner{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:26px;font-size:10px;color:var(--muted)}
.footer-brand{color:var(--ink)}.back-top{font-weight:800;color:var(--ink)}

.reveal{opacity:0;transform:translateY(24px);transition:opacity .75s ease,transform .75s ease}
.reveal.visible{opacity:1;transform:none}.delay-1{transition-delay:.12s}.delay-2{transition-delay:.22s}

@media(max-width:980px){
  .hero-grid{grid-template-columns:1fr;gap:0}.hero{padding-top:130px}.hero-copy{padding-bottom:15px}
  .hero-visual{min-height:560px}.portrait-shell{height:550px;max-width:520px}
  .about-grid,.experience-grid{grid-template-columns:1fr;gap:48px}
  .build-grid{grid-template-columns:1fr}.build-card{min-height:auto}.build-icon{margin:35px 0 22px}
  .project-feature,.project-feature.reverse{grid-template-columns:1fr;gap:38px}.project-feature.reverse .project-visual,.project-feature.reverse .project-copy{order:initial}
  .project-pair{grid-template-columns:1fr}
}
@media(max-width:760px){
  .container{width:min(100% - 30px,1180px)}
  .nav-wrap{height:68px;width:calc(100% - 26px)}
  .menu-toggle{display:block}
  .main-nav{position:absolute;top:68px;left:13px;right:13px;display:none;flex-direction:column;align-items:stretch;padding:22px;background:#f7f6f1;border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 50px rgba(0,0,0,.1)}
  .main-nav.open{display:flex}.nav-cta{text-align:center}
  .hero{padding:112px 0 35px;min-height:auto}
  .hero h1{font-size:53px}.hero-lead{font-size:15px}
  .hero-actions{flex-direction:column;align-items:stretch}.btn{width:100%}
  .hero-meta{grid-template-columns:1fr;gap:14px;margin-top:35px}.hero-meta div{display:flex;justify-content:space-between;gap:20px}
  .hero-visual{min-height:470px}.portrait-shell{height:460px}.portrait{max-height:455px}.portrait-panel{height:80%;border-radius:38% 38% 24px 24px}
  .orbit-1{width:340px;height:340px}.orbit-2{width:275px;height:275px}
  .floating-card{transform:scale(.88)}.card-one{left:0}.card-two{right:0}
  .scroll-hint{display:none}
  .section{padding:84px 0}.about-grid{margin-top:38px}.about h2,.projects-head h2,.build-head h2,.exp-heading h2,.contact-box h2{font-size:42px}
  .about-copy .large{font-size:18px}
  .build-head,.projects-head{display:block}.build-head p,.projects-head p{margin-top:20px}
  .build-grid{margin-top:35px}
  .project-visual{min-height:380px}.browser-mock{width:87%;height:62%}.phone-mock{width:190px;height:375px;border-width:6px}.phone-screen{padding:27px 14px 14px}.app-grid i{height:55px}
  .project-feature{padding-bottom:62px}.project-copy h3{font-size:34px}
  .project-pair{padding-top:55px}.small-visual{height:260px}
  .experience-grid{gap:20px}.timeline{padding-top:30px}.timeline-item{grid-template-columns:70px 1fr;padding-left:20px}
  .contact-box{padding:42px 28px;display:block}.contact-button{margin-top:40px;width:100%;height:54px;border-radius:999px}
  .footer-inner{gap:20px;flex-wrap:wrap}.footer-inner p{order:3;width:100%;margin:5px 0 0}
}


/* V8 — modifiche minime sul prototype originale */
.real-project-shot{
  padding:0;
  height:calc(100% - 35px);
  overflow:hidden;
}
.real-project-shot img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}
.real-phone-screen{
  padding:0;
  overflow:hidden;
}
.real-phone-screen img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center top;
}

/* Mantiene la timeline originale, ma consente più voci senza allungare troppo la pagina */
.timeline{
  max-height:560px;
  overflow-y:auto;
  padding-right:12px;
  scrollbar-width:thin;
  scrollbar-color:var(--sage) transparent;
}
.timeline::-webkit-scrollbar{width:5px}
.timeline::-webkit-scrollbar-thumb{background:var(--sage);border-radius:999px}


/* V9 — sostituzione immagini progetto con mockup dedicati */
.project-visual-mockup{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  overflow:hidden;
}
.project-mockup-image{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:28px;
  box-shadow:0 20px 60px rgba(19,23,20,.14);
  display:block;
}

@media (max-width: 960px){
  .project-visual-mockup{
    min-height:380px;
    padding:18px;
  }
}

@media (max-width: 760px){
  .project-visual-mockup{
    min-height:300px;
    padding:14px;
  }
  .project-mockup-image{
    border-radius:22px;
  }
}


/* V10 — centra davvero i mockup nei riquadri progetto */
.project-visual-mockup{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  overflow:hidden;
}

.project-mockup-image{
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center center !important;
  border-radius:28px;
  box-shadow:0 20px 60px rgba(19,23,20,.14);
  display:block;
  background:transparent;
}

@media (max-width: 960px){
  .project-visual-mockup{
    min-height:380px;
    padding:20px;
  }
}

@media (max-width: 760px){
  .project-visual-mockup{
    min-height:300px;
    padding:18px;
  }
  .project-mockup-image{
    border-radius:22px;
  }
}


/* V11 cacheproof hard override */
.project-visual-mockup{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  padding:24px !important;
}
.project-visual-mockup .project-mockup-image{
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  margin:auto !important;
  position:static !important;
  transform:none !important;
}
@media(max-width:760px){
  .project-visual-mockup{
    min-height:300px !important;
    padding:16px !important;
  }
  .project-visual-mockup .project-mockup-image{
    width:auto !important;
    height:auto !important;
    max-width:100% !important;
    max-height:100% !important;
  }
}


/* V12 — ChiMiAiuta artwork aggiornato; cache bust completo */
.project-visual-mockup .project-mockup-image{
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  margin:auto !important;
}


/* V13 — brand update header/footer */
.brand{
  gap:14px;
}
.brand > span:last-child{
  letter-spacing:.03em;
}
.brand-mark.elegant-mark{
  font-size:18px;
  letter-spacing:-0.04em;
  font-weight:700;
}
.footer-brand .brand-mark.elegant-mark{
  font-size:17px;
}
@media (max-width: 760px){
  .brand{
    gap:12px;
  }
  .brand > span:last-child{
    font-size:16px;
  }
  .brand-mark.elegant-mark{
    font-size:16px;
  }
}


/* V14 — sposta il badge Maker e allinea il brand favicon/monogramma */
.card-one{
  left:-8px;
  top:18%;
}
.card-two{
  right:-10px;
  bottom:16%;
}

/* Spostamento più deciso su mobile per non coprire il viso */
@media (max-width: 760px){
  .card-one{
    left:8px !important;
    top:44% !important;
    transform:none !important;
  }
  .card-two{
    right:8px !important;
    bottom:14% !important;
  }
}
