:root{
  --bg:#1c1d1f;
  --bg2:#141517;
  --txt:#f2f2f2;
  --muted:rgba(242,242,242,.72);
  --line:rgba(242,242,242,.14);
  --shadow: 0 20px 60px rgba(0,0,0,.45);
}

*{margin:0;padding:0;box-sizing:border-box}
html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust: 100%;
}
body{
  background:
    radial-gradient(1200px 760px at 50% -10%, rgba(255,255,255,.07), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color:var(--txt);
  font-family:"Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
}
a{color:inherit}

.wrap{padding-top:74px}
.mono{
  font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing:.16em;
  font-size:11px;
  color:var(--muted);
}

/* TOPBAR */
.topbar{
  position:fixed; top:0; left:0; width:100%;
  z-index:30;
  border-bottom:1px solid var(--line);
  background:rgba(20,20,20,.35);
  backdrop-filter: blur(10px);
}
.topbar-inner{
  padding:18px 40px;
  display:flex; align-items:center; justify-content:space-between;
}
.logo{
  height:26px;
  filter: brightness(0) invert(1);
  opacity:.95;
}
.hamburger{
  width:42px; height:34px;
  display:grid; place-items:center;
  background:transparent;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  cursor:pointer;
  transition:transform .25s ease, border-color .25s ease, background .25s ease;
}
.hamburger:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.03)
}
.hamburger span{
  display:block;
  width:18px; height:2px;
  background:var(--txt);
  margin:3px 0;
  border-radius:9px;
  transition:transform .25s ease, opacity .2s ease;
}
.hamburger.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity: 0; }
.hamburger.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

.dropdown{
  position:absolute;
  right:40px;
  top:66px;
  width:220px;
  padding:10px;
  border-radius:16px;
  background:rgba(18,18,18,.78);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  opacity:0;
  transform: translateY(-10px);
  pointer-events:none;
  transition: opacity .25s ease, transform .25s ease;
}
.dropdown.open{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}
.navlink{
  display:block;
  padding:12px 12px;
  border-radius:12px;
  text-decoration:none;
  color:var(--txt);
  font-weight:500;
  letter-spacing:.06em;
  font-size:13px;
}
.navlink:hover{ background:rgba(255,255,255,.06) }

/* BACK (work page) */
.back{
  text-decoration:none;
  border:1px solid rgba(255,255,255,.12);
  padding:10px 12px;
  border-radius:999px;
}

/* HERO */
.hero{
  min-height:92vh;
  padding:120px 40px 20px;
  position:relative;
  overflow:hidden;
}
.hero-center{
  text-align:center;
  position:relative;
  z-index:3; /* testo sopra */
}
.hero h1{
  font-size:clamp(64px,9.8vw,170px);
  line-height:.84;
  letter-spacing:-0.02em;
  font-weight:600;
}
.role{
  margin-top:18px;
  font-size:clamp(20px,2.2vw,32px);
  letter-spacing:.18em;
  font-weight:500;
  color:rgba(242,242,242,.90);
}

/* PHOTOS (desktop base) */
.photo-stack .p{
  position:absolute;
  width:170px;
  height:235px;
  object-fit:cover;
  border-radius:22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  filter:saturate(1.05) contrast(1.05);
  z-index:2; /* possono anche passare sopra */
  opacity:1; /* visibili subito */
  will-change: transform, opacity;
}

/* desktop positions: sparse */
.p1{ left:10%; top:50%; }
.p2{ left:24%; top:62%; }
.p3{ left:44%; top:52%; }
.p4{ left:58%; top:64%; }
.p5{ left:72%; top:50%; }
.p6{ left:18%; top:74%; }

/* ABOUT */
.about{ padding:80px 40px 55px; }
.about-inner{ max-width:1100px; margin:0 auto; }
.about-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:48px;
  align-items:stretch;
}
.kicker{
  font-size:clamp(30px,2.8vw,42px);
  letter-spacing:.01em;
  font-weight:600;
  margin-bottom:18px;
}
.bio{
  font-size:18px;
  line-height:1.75;
  color:rgba(242,242,242,.86);
}
.location.under-text{
  margin-top:18px;
  opacity:.78;
}
.about-image{ display:flex; align-items:stretch; }
.about-image img{
  width:100%;
  height:100%;
  object-fit:contain; /* non taglia in altezza */
  border-radius:22px;
  border:0;
  background:transparent;
}

/* WORKS */
.works{ padding:50px 40px 120px; }
.works-inner{ max-width:1100px; margin:0 auto; }
.works-title{ text-align:center; margin-bottom:22px; }
.works-title h2{
  font-size:clamp(44px,5.2vw,78px);
  line-height:.95;
  letter-spacing:-0.02em;
}
.works-list{
  display:flex;
  flex-direction:column;
  gap:54px;
  margin:0 auto;
}
.work-item{
  text-align:center;
  border-top:1px solid rgba(255,255,255,.10);
  padding-top:18px;
}
.work-link{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(242,242,242,.88);
  margin:0 auto 14px auto;
}
.open-badge{
  font-family:"IBM Plex Mono";
  font-size:10px;
  letter-spacing:.22em;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.04);
  color:rgba(242,242,242,.85);
  transform:translateY(-1px);
  transition:transform .25s ease, border-color .25s ease, background .25s ease;
}
.work-link:hover .open-badge{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.26);
  background:rgba(255,255,255,.06);
}

/* video */
.video-wrap{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
  margin:0 auto;
  transition: transform .35s ease, border-color .35s ease;
}
.video-wrap::before{ content:""; display:block; padding-top:56.25%; }
.video-wrap iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.work-item:hover .video-wrap{
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.18);
}

/* WORK PAGE */
.work-wrap{ padding:110px 40px 90px; max-width:1100px; margin:0 auto; }
.work-h1{
  font-size:clamp(26px,3.2vw,46px);
  letter-spacing:.02em;
  margin-bottom:18px;
  text-align:center;
}
.video-wrap.big{ max-width:980px; }
.video-wrap.big::before{ padding-top:56.25%; }
.credits{
  margin:34px auto 0;
  max-width:980px;
}
.credits-title{ margin-bottom:10px; text-align:left; }
.credits-list{
  border-top:1px solid rgba(255,255,255,.10);
  padding-top:14px;
  font-size:15px;
  line-height:1.65;
  color:rgba(242,242,242,.84);
}
.credits-line{ margin:6px 0; }

/* reveal */
.reveal{
  opacity:0;
  transform: translateY(18px);
  transition: opacity .85s cubic-bezier(.22,1,.36,1), transform .85s cubic-bezier(.22,1,.36,1);
}
.reveal.visible{ opacity:1; transform:none; }
.delay{ transition-delay:.10s; }

/* footer */
.footer{
  padding:40px;
  border-top:1px solid rgba(255,255,255,.10);
  display:flex;
  justify-content:space-between;
  max-width:1100px;
  margin:0 auto;
}

/* MOBILE (dedicated layout only under 900px) */
@media (max-width: 900px){
  .topbar-inner{ padding:16px 18px }
  .dropdown{ right:18px }

  /* hero: compact */
  .hero{
    min-height:72vh;
    padding:105px 18px 8px;
  }

  .hero-center{
    width:100%;
    margin:0 auto;
    text-align:center;
  }

  /* iPhone fix: centered and no overflow */
  .hero h1{
    width:100%;
    margin:0 auto;
    padding:0 10px;
    font-size:clamp(46px, 12vw, 72px);
    letter-spacing:-0.015em;
    line-height:0.90;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  .role{
    font-size:clamp(16px, 4.6vw, 22px);
    margin-top:14px;
  }

  /* MOBILE PHOTO SYSTEM: bigger spread, less overlap, behind title */
  .photo-stack .p{
    width:132px;
    height:176px;
    border-radius:18px;
    z-index:1; /* behind text */
    opacity:1;
  }

  /* more spread: 3 rows */
  .p1{ left: 5%;  top: 54%; }
  .p2{ left: 55%; top: 55%; }
  .p3{ left: 12%; top: 69%; }
  .p4{ left: 62%; top: 71%; }
  .p5{ left: 30%; top: 61%; }
  .p6{ left: 38%; top: 80%; }

  /* about close to hero */
  .about{ padding:52px 18px 40px }
  .about-grid{ grid-template-columns:1fr; gap:22px }
  .about-image img{ max-height:320px; height:auto; }

  .works{ padding:45px 18px 100px }
  .work-wrap{ padding:100px 18px 80px }
}
