:root {
  --sfondo: #f2f2f5;
  --nero: #111;
  --menta: #68c8a8;
  --menta-chiaro: #92d5bf;
  --grigio: #77777c;
  --testo: #4a4a50;
  --margine: clamp(18px, 2vw, 32px);
}

body {
  background: var(--sfondo);
  color: var(--nero);
  font-family: "Outfit", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a,
button {
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--menta);
  outline-offset: 4px;
  border-radius: 8px;
}


/* header */

.barra {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--margine) 0;
}

.bottone-menu {
  background: none;
  border: 0;
  padding: 4px 0;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -.02em;
}

.bottone-menu:hover {
  color: var(--menta);
}


/* hero */

.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
}

.titolo {
  position: absolute;
  z-index: 1;
  top: clamp(56px, 7vh, 84px);
  left: var(--margine);
  right: var(--margine);
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(56px, 9.4vw, 150px);
  line-height: .92;
  letter-spacing: -.04em;
}

.riga {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
}

.riga-2 {
  color: var(--menta);
}

.lettera {
  display: inline-block;
}

.orbite {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.avatar {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0;
  height: min(60vh, 540px);
  overflow: visible;
  transform-origin: 50% 100%;
}

.forme {
  position: absolute;
  width: 0;
  height: 0;
}

.in-orbita {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, filter;
}

.pillola {
  z-index: 6;
  padding: .24em .8em .3em;
  border-radius: 50px;
  background: var(--menta-chiaro);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(20px, 1.9vw, 30px);
  letter-spacing: -.02em;
  line-height: 1;
  transition: background .25s, color .25s;
}

.pillola:hover {
  background: var(--nero);
  color: var(--sfondo);
}

.etichetta {
  z-index: 3;
  font-weight: 600;
  font-size: clamp(11px, .85vw, 14px);
  pointer-events: none;
}

.fumetto {
  position: absolute;
  z-index: 9;
  padding: 7px 13px;
  border-radius: 14px 14px 14px 4px;
  background: var(--nero);
  color: var(--sfondo);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}


/* sezioni */

.sezione {
  padding: clamp(80px, 10vw, 140px) var(--margine) 0;
}

.occhiello {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 3.4vw, 48px);
  font-weight: 700;
  font-size: clamp(24px, 2vw, 32px);
  letter-spacing: -.02em;
}

.occhiello::before {
  content: "";
  width: .8em;
  height: .8em;
  border-radius: 50%;
  background: var(--menta);
}


/* chi sono */

.chi-sono h2 {
  max-width: 17em;
  margin: 0;
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.chi-sono em {
  font-style: normal;
  color: var(--menta);
}

.bio {
  max-width: 60ch;
  margin: clamp(22px, 2.4vw, 36px) 0 0;
  color: var(--testo);
  font-size: clamp(16px, 1.2vw, 19px);
}

.competenze span {
  display: block;
  padding: 9px 16px;
  border-radius: 50px;
  background: var(--menta-chiaro);
  text-align: center;
  font-weight: 500;
  font-size: clamp(14px, 1.05vw, 17px);
  white-space: nowrap;
}

.box-cv p {
  margin-bottom: 14px;
  font-weight: 700;
  font-size: clamp(24px, 2.2vw, 36px);
  letter-spacing: -.025em;
}

.bottone-cv {
  display: inline-block;
  padding: 11px 30px;
  border-radius: 50px;
  background: var(--menta-chiaro);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(16px, 1.2vw, 19px);
  transition: .25s;
}

.bottone-cv:hover {
  background: var(--nero);
  color: var(--sfondo);
  transform: translateY(-2px);
}


/* portfolio */

.progetto {
  display: grid;
  gap: 14px;
  text-decoration: none;
}

.immagine {
  position: relative;
  aspect-ratio: 16 / 8.3;
  border-radius: clamp(14px, 1.4vw, 22px);
  background: var(--menta);
  transition: transform .5s;
}

.cornice {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.cornice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s, filter .5s;
}

.tipo {
  position: absolute;
  z-index: 1;
  top: -10px;
  right: -10px;
  padding: 5px 16px 6px;
  border-radius: 50px;
  background: var(--nero);
  color: var(--sfondo);
  font-weight: 700;
  font-size: clamp(13px, 1vw, 16px);
  transform: rotate(-7deg);
  transition: transform .4s;
}

.velo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 36px);
  background: linear-gradient(to top, rgba(17, 17, 17, .88), rgba(17, 17, 17, .35));
  color: var(--sfondo);
  opacity: 0;
  transition: opacity .4s;
}

.velo p {
  max-width: 36ch;
  margin: 0;
  font-weight: 500;
  font-size: clamp(15px, 1.3vw, 21px);
  line-height: 1.35;
}

.scopri {
  padding: 6px 16px 7px;
  border-radius: 50px;
  background: var(--menta-chiaro);
  color: var(--nero);
  font-weight: 700;
  font-size: clamp(14px, 1vw, 16px);
}

.velo p,
.scopri {
  transform: translateY(18px);
  transition: transform .5s;
}

.progetto:hover .immagine {
  transform: translateY(-4px);
}

.progetto:hover .cornice img {
  transform: scale(1.06);
  filter: grayscale(1) blur(2px);
}

.progetto:hover .velo {
  opacity: 1;
}

.progetto:hover .velo p,
.progetto:hover .scopri {
  transform: none;
}

.progetto:hover .tipo {
  transform: rotate(3deg) scale(1.06);
}

.segnaposto {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(17, 17, 17, .6);
}

.progetto:hover .segnaposto {
  opacity: 0;
}

/* work in progress */
.in-arrivo {
  cursor: default;
}

.in-arrivo .immagine {
  background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(17, 17, 17, .07) 22px 44px), var(--menta);
}

.in-arrivo .tipo {
  background: var(--sfondo);
  color: var(--nero);
}

.info {
  padding: 0 6px;
}

.info h3 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 28px);
  letter-spacing: -.02em;
}

.info span {
  font-size: clamp(15px, 1.1vw, 18px);
}


/* contatti */

.contatti {
  padding-bottom: clamp(70px, 8vw, 120px);
}

.contatti h2 {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 1;
  letter-spacing: -.04em;
}

.contatti h2 span {
  color: var(--menta);
}

.social {
  margin-top: clamp(36px, 4vw, 60px);
}

.social a,
.social button {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1.5px solid var(--nero);
  border-radius: 50%;
  background: none;
  font-size: 28px;
  line-height: 1;
  transition: border-color .3s;
}

/* cerchio menta che si riempie */
.social a::before,
.social button::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  background: var(--menta);
  transform: scale(0);
  transition: transform .4s cubic-bezier(.3, 1.6, .4, 1);
}

/* nome sotto l'icona */
.social a::after,
.social button::after {
  content: attr(data-nome);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  translate: -50% 6px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: .3s;
}

.social i {
  position: relative;
  transition: transform .4s;
}

.social a:hover,
.social button:hover {
  border-color: var(--menta);
}

.social a:hover::before,
.social button:hover::before {
  transform: scale(1);
}

.social a:hover::after,
.social button:hover::after {
  opacity: 1;
  translate: -50% 0;
}

.social a:hover i,
.social button:hover i {
  transform: rotate(-12deg) scale(1.12);
}

.email {
  margin-top: 40px;
  text-decoration: none;
  font-size: 16px;
}

.email:hover {
  color: var(--menta);
}


/* footer */

footer {
  padding: clamp(22px, 2.2vw, 34px) var(--margine);
  background: var(--menta);
  font-size: clamp(16px, 1.2vw, 19px);
}

.link-privacy {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* privacy */

.modal-backdrop {
  --bs-backdrop-bg: var(--nero);
  --bs-backdrop-opacity: .45;
}

.modal.show {
  backdrop-filter: blur(6px);
}

.modal-content {
  border: 0;
  border-radius: 28px;
  background: var(--sfondo);
}

.modal-header {
  padding: 26px 28px 6px;
  border: 0;
}

.modal-header .occhiello {
  font-size: 28px;
}

.btn-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background-color: var(--menta-chiaro);
  background-size: 12px;
  opacity: 1;
  transition: .4s;
}

.btn-close:hover {
  background-color: var(--menta);
  transform: rotate(90deg);
  opacity: 1;
}

.modal-body {
  padding: 6px 28px 28px;
}

.modal-body h3 {
  margin: 18px 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.modal-body p {
  margin: 0;
  color: var(--testo);
  font-size: 15px;
}

.modal-body .aggiornata {
  margin-bottom: 18px;
  color: var(--grigio);
  font-size: 13px;
}

.modal-body a:hover {
  color: var(--menta);
}


/* torna su */

.torna-su {
  position: fixed;
  z-index: 50;
  right: var(--margine);
  bottom: var(--margine);
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--nero);
  color: var(--sfondo);
  font-size: 22px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(.8);
  transition: .4s;
}

.torna-su.visibile {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.torna-su svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.progresso {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.torna-su i {
  transition: transform .3s;
}

.torna-su:hover {
  background: var(--sfondo);
  color: var(--nero);
}

.torna-su:hover .progresso {
  stroke: var(--nero);
}

.torna-su:hover i {
  transform: translateY(-4px);
}


@media (max-width: 700px) {
  .titolo {
    font-size: clamp(46px, 14vw, 80px);
  }

  .avatar {
    height: min(44vh, 360px);
  }

  .pillola {
    font-size: 17px;
  }
}
