/* Google fonts*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root{
    /*Colors*/
    --hue-color:242;
    /* HSL color mode*/
    --skin-color: hsl(342,92%,46%);
    --title-color: hsl(var(--hue-color),8%,95%);
    --text-color:hsl(var(--hue-color),8%,85%);
    --body-color:hsl(var(--hue-color),19%,5%);
    --box-color:hsl(var(--hue-color),14%,10%);
    --scroll-bar-color:hsl(var(--hue-color),12%,38%);
    --scroll-thumb-color:hsl(var(--hue-color),12%,26%);

    /* Font and Typography*/

    --body-font:'Poppins',sans-serif;

    /*.5 rem =8px, 1rem = 16px 1.5rem=24px ...*/
    --biggest-font-size:3rem;
    --h1-font-size:2.25rem;
    --h2-font-size:1.5rem;
    --h3-font-size:1.25rem;
    --normal-font-size:1rem;
    --small-font-size:.875rem;
    --smaller-font-size:.813rem;

    /* Font weight */
    --font-medium:500;
    --font-bold:600;

    /* Margenes Bottom */
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75:.75rem;
    --mb-1:1rem;
    --mb-1-5:1.5rem;
    --mb-2:2rem;
    --mb-2-5:2.5rem;
    --mb-3:3rem;

    /* Z Index */
    --z-fixed:10;
    --z-modal:100;
}

/* Responsive Typography */
@media screen and (max-width:1024px){
    :root{
        --biggest-font-size:2rem;
        --h1-font-size:1.5rem;
        --h2-font-size:1.25rem;
        --h3-font-size:1.125rem;
        --normal-font-size:.938rem;
        --small-font-size:.813rem;
        --smaller-font-size:.75rem;
    }

}

/*====== BASE =========*/
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body,
button,
input{
    font-family: var(--body-font);
    font-size:var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    overflow-x: hidden;
}
h1,h2,h3 {
    color:var(--title-color);
    font-weight: var(--font-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}
img {
    max-width: 100%;
    height: auto;
}
button{
    cursor: pointer;
}

button,
input{
    border: none;
    outline: none;
}


/*====== LAYOUT=========*/
.container {
    max-width:1250px;
    margin-left: auto;
    margin-right: auto;
}
.grid {
    display: grid;

}
/*====== RESUABLE CSS CLASSES =========*/
.section {
    padding:6.5rem 0 2rem;
}

.section__title{
    text-align: center;
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-3);
}

.section__title::before{
    content: attr(data-heading);
    display: block;
    font-size: var(--normal-font-size);
    font-weight:var(--font-medium);
    color: var(--skin-color);
}



/*====== SIDEBAR =========*/
.sidebar {
    position: fixed;
    width: 100px;
    height: 100vh;
    background-color: var(--body-color);
    border-right: 1px solid var(--box-color) ;
}

.nav__logo {
    position: absolute;
    left: 0;
    right: 0;
    top:1.8rem;
    width: 40px;
    height: 40px;
    border-radius:50%;
    background-color: var(--skin-color);
    text-align: center;
    margin: auto;
}

.nav__logo-text {
    font-size: 1.125rem;
    color: var(--title-color);
    font-weight: var(--font-bold);
    line-height: 40px;
}

.nav__menu {
    position: fixed;
    transform: rotate(-90deg) translateX(-100%);
    transform-origin: left top;
    width: 100vh;
}
.menu {
    display: flex;
}
.nav__list {
    display: flex;
    flex-direction: row-reverse;
    margin: -2px auto 0 auto;
}
.nav__link {
    float: right;
    height:100%;
    line-height: 100px;
    padding: 0 1rem;
    color: var(--title-color);
    font-weight: var(--font-medium);
    position: relative;
    transition: .4s;
}
.btn__share{
    position: absolute;
    bottom: 1.8rem;
    left: 0;
    right: 0;
    text-align: center;
}
.social__share {
    font-size: 1.5rem;
}
/* Active link */
.nav__link.active-link, .nav__link:hover{
    color: var(--skin-color);
}
.nav__link.nav__link.active-link::after, .nav__link:hover::after{
    position: absolute;
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--skin-color);
    border-radius: 50%;
    bottom: 1.8rem;
    left: 0;
    right: 0;
    margin: auto;

}
/*====== MAIN =========*/
.main {
    width: 100%;
    padding: 0 1rem;
  }

/*====== Home section =========*/
.home {
    background:;
    background-size: cover;
    background-position: center center;
    height: 100vh;
}
.home__data {
    padding: 50px;
}
.home__container {
    position: relative;
    height: 100%;
    align-items: center;
}
.home__social {
    position: absolute;
    top:1.8rem;
    left:50px;
    display: flex;
    align-items: center;
    column-gap: 3.5rem;
   
}
.home__social-follow{
    font-weight: var(--font-medium);
    position: relative;
}

.home__social-follow::after{
    content: '';
    position: absolute;
    width: 1rem;
    height:2px;
    background-color: var(--text-color);
    right: -45%;
    top:50%;
}
.home__social-links {
    display: inline-flex;
    column-gap: 1rem;
}
.home__social-link {
    font-size: 1.08rem;
    color: var(--text-color);
    transition: .4s;
}
.home__social-link:hover {
    transform: translateY(.25rem);
}
.home__img{
    display: none;
}
.home__title{
    font-size: var(--biggest-font-size);
}

.home__subtitle{
    font-size:var(--h3-font-size);
    font-weight: var(--font-medium);
    margin-bottom:var(--mb-0-75) ;
}

.home__description{
    max-width: 450px;
    margin-bottom: var(--mb-2);
}

.my__info{
    display: flex;
    column-gap: 1.8rem;
    position: absolute;
    left: 50px;
    bottom: 1.8rem;
}
.info__item{
    display: flex;
    align-items: center;
}
.info__title,
.info_subtitle{
    font-size:var(--small-font-size) ;
}
.info__title {
    font-weight: var(--font-medium);
}
.info__icon {
    font-size: 1.8rem;
    color: var(--skin-color);
    margin-right: var(--mb-0-75);
}
/*====== Buttons =========*/

.button {
    display:inline-flex;
    align-items: center;
    column-gap: .5rem;
    background-color: var(--skin-color);
    color: var(--title-color);
    padding: .75rem 1.4rem;
    border-radius: .25rem;
    font-weight: var(--font-medium);
    position: relative;
    z-index: 1;
    
}
.button::after{
    position: absolute;
    content: '';
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #343a40;
    z-index:-1;
    transform-origin:center ;
    transform: scale(0);
    border-radius: .25rem; 
    transition: .4s;
}

.button:hover::after {
    transform: scale(1);
}
.button__icon {
    font-size: 1.25rem;
}

/*===== About ======*/
.about__container {
    grid-template-columns: repeat(2,1fr);
    column-gap: 4rem;
    align-items: center;
}
.about__img {
    width: 480px;
    border-radius: 0.75rem;
    justify-self:center;
}
.about__heading {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-75);
}
.about__description {
    text-align: justify;
    padding-right: 6rem;
    margin-bottom: var(--mb-2);
}

.about__info {
    grid-template-columns: repeat(3,140px);
    column-gap: .5rem;
    margin-bottom: var(--mb-3);
}
.about__box {
    text-align: center;
    border-radius: .25rem;
    padding: 1rem 1.25rem;
    background-color: var(--box-color);
}
.about__icon {
    font-size: 1.5rem;
    color: var(--skin-color);
    margin-bottom: var(--mb-0-75);
}
.about__title {
    font-size: var(--small-font-size);
}
.about__subtitle {
    font-size: var(--smaller-font-size);
}
/*===== Qualificstion Section ======*/
.qualification__container {
    grid-template-columns: repeat(2,340px);
    column-gap: 3rem;
    justify-content: center;
}
.qualification__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-2);
}

.timeline__item{
    position: relative;
    padding-left: 3rem;
    margin-bottom: var(--mb-2-5);
}

.timeline__item:last-child{
    margin-bottom: 0;
}
.timeline__item::before{
    content: '';
    width: 1px;
    position: absolute;
    left: .48rem;
    top: 0;
    height: 100%;
    background-color: var(--skin-color);
}
.circle__dot {
    position: absolute;
    left: 0;
    top: 0;
    height: 1rem;
    width: 1rem;
    border: 2px solid var(--skin-color);
    border-radius: 50%;
    background-color: var(--skin-color);
    transition: .3s;
}

.timeline__item:hover .circle__dot {
    background-color: var(--body-color);
}

.timeline__title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    margin-bottom:var(--mb-0-25);
}
.timeline__text{
    font-size: var(--smaller-font-size);
    margin-bottom: var(--mb-1);
}

.timeline__date {
    display: flex;
    align-items: center;
    column-gap: .4rem;
    font-size: var(--small-font-size);
    color: var(--skin-color);
}
/*===== Skills Section ======*/
.skills__container {
    grid-template-columns: 360px 320px;
    column-gap: 3rem;
    justify-content: center;
}

.skills__header{
    display: flex;
    align-items: center;
    cursor: pointer;

}

.skills__header:not(:last-child){
    margin-bottom: var(--mb-2-5);
}
.skills__icon,
.skills__arrow {
    color: var(--skin-color);
}
.skills__icon{
    margin-right: var(--mb-0-75);
    font-size: 2rem;
}
.skills__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
}
.skills__subtitle{
    font-size: var(--small-font-size);
}
.skills__arrow {
    font-size: 1rem;
    margin-left: auto;
}
.skills__active .skills__arrow{
    transform: rotate(-90deg);
    transition: .3s;
}
.skills [data-content]{
    display: none;
}
.skills [data-content].skills__active {
    display: block;
}

.skills__list {
    row-gap: 1.8rem;
}
.skills__titles{
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--mb-0-5);
}
.skills__name{
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
}
.skills__bar,
.skills__percentage {
    height: 5px;
    border-radius: .25rem;
}
.skills__bar {
    background-color: var(--box-color);
}
.skills__percentage{
    display: block;
    background-color: var(--skin-color);
}

/*===== Work Section ======*/
.work__container {
    grid-template-columns: repeat(3,330px);
    gap: 1.8rem;
    justify-content: center;
    padding-top: 1rem;
}
.work__filters {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: .75rem;
    margin-bottom: 2rem;
}
.work__item{
    cursor: pointer;
    color: var(--title-color);
    padding: .25rem .75rem;
    font-weight: var(--font-medium);
    border-radius: .5rem;
}
.work__card {
    background-color: var(--box-color);
    padding: 1.25rem;
    border-radius:.5rem ;  
}
.portfolio__item-details{
    display: none;
}
.work__img {
    border-radius: .5rem;
    margin-bottom: var(--mb-1);
}
.work__title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-0-5);
}
.work__button {
    color: var(--skin-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    column-gap: .25rem;
    cursor: pointer;
}
.work__button-icon{
    font-size: 1rem;
    transition:.3s;
}
.work__button:hover .work__button-icon {

}
/*===== Active Item Work ======*/
.active-work {
    background-color: var(--skin-color);
    color:var(--title-color);
}
/*===== Contact Section ======*/
.contact__container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }
  
  .contact__info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .contact__card {
    background: var(--box-color);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    transition: 0.3s;
  }
  
  .contact__card:hover {
    transform: translateY(-5px);
  }
  
  .contact__icon {
    font-size: 2rem;
    color: var(--skin-color);
    margin-bottom: 0.5rem;
  }
  
  .contact__title {
    font-size: 1.1rem;
    font-weight: 600;
  }
  
  .contact__subtitle {
    display: block;
    margin: 0.25rem 0 0.5rem;
    color: var(--text-color-light);
  }
  
  .contact__button {
    font-size: 0.9rem;
    color: var(--skin-color);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .contact__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .contact__form-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .contact__input {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color, #ccc);
    background: var(--input-bg, #f9f9f9);
    font-size: 1rem;
    width: 75%;
  }
  .button__small {
    width: 75%;
}

.footer {
    padding: 3rem 0;
    background-color: var(--box-color);
    color: var(--text-color);
    text-align: center;
  }
  
  .footer__container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .footer__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
  }
  
  .footer__description {
    font-size: var(--small-font-size);
    margin: 0.5rem 0 1rem;
  }
  
  .footer__social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .footer__social-link {
    font-size: 1.2rem;
    color: var(--skin-color);
    transition: transform 0.3s;
  }
  
  .footer__social-link:hover {
    transform: translateY(-3px);
  }
  
  .footer__links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }
  
  .footer__link {
    color: var(--text-color);
    font-size: var(--small-font-size);
    transition: color 0.3s;
  }
  
  .footer__link:hover {
    color: var(--skin-color);
  }
  
  .footer__cv .button {
    margin-top: 1rem;
  }
  
  .footer__copy {
    text-align: center;
    font-size: var(--smaller-font-size);
    color: var(--text-color);
    margin-top: 2rem;
    padding-top: 1rem;
  }
.button__cv {
    width: 63%;
}  

/*========== RESPONSIVE DESIGN ==========*/

@media screen and (max-width: 450px) {
    .contact__container {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 0 1rem;
    }
  
    .contact__info,
    .contact__form {
      width: 100%;
      max-width: 350px;
      align-items: center;
    }
  
    .contact__card {
      width: 100%;
    }
  
    .contact__form-group {
      flex-direction: column;
      gap: 1rem;
      
    }
  
    .contact__input,
    .button__small {
      width: 100%;
    }

  /* Immagine About responsive */
  .about__img {
    max-width: 100%;
    height: auto;
    margin: 0 auto 1.5rem auto;
    display: block;
  }

  /* Box Experience/Completed/Support impilati */
  .about__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .about__box {
    width: 90%;
    max-width: 300px;
  }
}

  
/* ========== Mobile (fino a 767px) ========== */
@media screen and (max-width: 767px) {
    html, body {
      font-size: 15px;
      max-width: 100vw;
      overflow-x: hidden;
    }

    .info {
      margin-right: 40px;
    }
    .email{
      margin-top: 20px;
    }
    .em{
      margin-left: 10px;

    }
      
    
  
  
    .sidebar {
      display: none;
    }

    .home__img {
        display: block;
        max-width: 100vw;
        width: 100%;
        height: auto;
        margin: 0 auto;
        object-fit: cover;
        box-sizing: border-box;
      }
      

  
    .nav__toggle {
      display: block;
      position: fixed;
      top: 1rem;
      right: 1rem;
      font-size: 2rem;
      z-index: 9999;
      color: var(--title-color);
      cursor: pointer;
    }
  
    .nav__menu {
      position: fixed;
      top: 0;
      right: -100%;
      width: 75%;
      height: 100vh;
      background-color: var(--body-color);
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding-top: 4rem;
      padding-left: 2rem;
      transition: 0.3s;
      z-index: 9998;
    }
  
    .nav__menu.show {
      right: 0;
    }
  
    .nav__list {
      flex-direction: column;
      gap: 1.5rem;
    }
  
    .nav__link {
      font-size: var(--h2-font-size);
      width: 100%;
      display: block;
      padding: 0.5rem 0;
    }
  
    .container,
    .main,
    section {
      padding-left: 1rem;
      padding-right: 1rem;
      width: 100%;
      margin: 0 auto;
    }
    .home__container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2rem 1rem;
      }
    .main {
        margin-left:0 ;
    }
      .home__data {
        padding: 1rem;
        text-align: center;
      }
        .home__social {
          position: static; /* non assoluto */
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          row-gap: 0.5rem;
          margin-bottom: 1rem;
          margin-top: 1.5rem;
        }
      
        .home__social-follow {
          font-weight: var(--font-medium);
          font-size: 1rem;
          position: static;
        }
      
        .home__social-follow::after {
          display: none; /* nascondi la linea decorativa */
        }
      
        .home__social-links {
          display: flex;
          flex-wrap: wrap;
          justify-content: center;
          column-gap: 1rem;
          row-gap: 0.5rem;
        }
      
        .home__social-link {
          font-size: 1.25rem;
          color: var(--text-color);
        }
    
      
  
    .about__container,
    .skills__container,
    .work__container,
    .qualification__container,
    .contact__container,
    .footer__container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.25rem;
      text-align: center;
      padding: 0;
    }
  
    .about__img,
    .work__img {
      max-width: 100%;
      height: auto;
      margin: 0 auto;
      display: block;
    }
  
    .home__social {
      position: static;
      justify-content: center;
      margin-top: 1rem;
      column-gap: 1rem;
    }
  
    .home__data,
    .about__description,
    .home__title,
    .home__subtitle,
    .home__description {
      padding: 0 1rem;
    }
  
    .my__info {
      position: static;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      margin-top: 2rem;
    }
  
    .button,
    .button__cv,
    .button--small {
      width: 90%;
      max-width: 320px;
      padding: 0.75rem;
      font-size: 1rem;
      text-align: center;
    }
  
    .section {
      padding: 4rem 0 2rem;
    }
    
    .contact__container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1.5rem 1rem;
        text-align: center;
        max-width: 100%;
        overflow-x: hidden;
        }
      
    .contact__info,
    .contact__form {
        width: 100%;
        max-width: 400px;
        }
      
    .contact__form-group {
        flex-direction: column;
        gap: 1rem;
        }
      
    .contact__input,
    .button__small {
        width: 100%;
        max-width: 100%;
        }
      
    .contact__card {
        width: 100%;
        box-sizing: border-box;
        }   
  
    .footer__container {
      flex-direction: column;
      gap: 2rem;
    }
  
    .footer__links {
      flex-direction: column;
      gap: 0.75rem;
    }
  
    .footer__cv .button {
      width: 80%;
    }
  
    .footer__copy {
      width: 100%;
      text-align: center;
      font-size: 0.9rem;
      margin-top: 2rem;
      padding-top: 1rem;
      border-top: 1px solid var(--text-color);
    }
  }
  
  /* ========== Tablet (768px – 1023px) ========== */
  @media screen and (min-width: 768px) and (max-width: 1023px) {
    .container {
      padding: 0 1rem;
      margin: 0 auto;
    }
    .main {
        margin-left: 100px;
    }
  
  
    .work__container {
      grid-template-columns: repeat(2, 1fr);
    }
  
    .about__container,
    .skills__container,
    .qualification__container {
      grid-template-columns: 1fr 1fr;
      gap: 2rem;
      padding: 0 1rem;
    }
    
  }
  
  /* ========== Medium Desktop (1024px – 1279px) ========== */
  @media screen and (min-width: 1024px) and (max-width: 1279px) {
    .container {
      padding: 0 2rem;
      margin: 0 auto;
    }
    .main {
        margin-left: 100px;
    }
    .work__container {
      grid-template-columns: repeat(2, 1fr);
    }
}
    
  
  
  /* ========== Large Desktop (1280px+) ========== */
  @media screen and (min-width: 1280px) {
    .container {
      padding: 0;
      margin: 0 auto;
    }
  
  
    .work__container {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  /* === Star background canvas (behind everything) === */
/* Star background: fixed, behind everything */
#bg-stars{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout paint size;
}


/* Keep sections transparent so stars remain visible (your sections are already dark) */
.section { background: transparent; }

/* === Round avatar with soft glow — non-invasive, stacked above text === */
.hero__avatar{
  position: relative;
  width: 220px;                 /* safe default size */
  max-width: 60vw;              /* shrink on very small phones */
  aspect-ratio: 1/1;
  margin: 1.25rem auto 0;       /* centered, above your text */
  border-radius: 50%;
  isolation: isolate;
}
.hero__avatar > img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
  filter: contrast(1.03) saturate(1.02);
}
/* soft neon ring, subtle */
.hero__ring{
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(from 0deg,
    #8b5cf6, #06b6d4, #22c55e, #f59e0b, #ef4444, #8b5cf6);
  filter: blur(8px);
  opacity: .85;
  z-index: -1;
  animation: hero-spin 14s linear infinite;
}
/* soft glow blob */
.hero__blob{
  position: absolute; inset: -20px; border-radius: 50%; z-index: -2;
  background: radial-gradient(60% 60% at 50% 50%, rgba(99,102,241,.22), transparent 70%);
  animation: hero-float 7s ease-in-out infinite;
}

/* animations for the ring + gentle float */
@keyframes hero-spin { to { transform: rotate(360deg); } }
@keyframes hero-float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

/* Respect user “reduced motion” preference */
@media (prefers-reduced-motion: reduce){
  .hero__ring, .hero__blob { animation: none; }
}

/* Optional: slightly larger avatar on big screens WITHOUT touching layout */
@media (min-width: 992px){
  .hero__avatar{ width: 260px; }
}
/* === HOME: layout avatar a destra (desktop) e sotto (mobile) === */
/* Imposto aree di griglia per poter ordinare data/avatar senza toccare l'HTML */
.home__container{
  display: grid;               /* già grid, ribadisco per sicurezza */
  grid-template-columns: 1fr;  /* mobile: una colonna */
  grid-template-areas:
    "data"
    "avatar";
  gap: 1.5rem;
}
.home__data{ grid-area: data; }
.hero__avatar{ grid-area: avatar; }

/* Desktop/tablet larghi: due colonne, testo a sinistra e avatar a destra */
@media (min-width: 992px){
  .home__container{
    grid-template-columns: 1.2fr .9fr;
    grid-template-areas: "data avatar";
    align-items: center;
  }
  .hero__avatar{
    justify-self: center;   /* spinge l’avatar al bordo destro della colonna */
    margin: 2.5;
  }
}

/* === AVATAR TONDO: anello grigio/rosso (no rainbow), glow soft === */
.hero__avatar{
  position: relative;
  width: 240px;             /* dimensione di base */
  max-width: 60vw;
  aspect-ratio: 1/1;
  margin: 0 auto;           /* centrato su mobile */
  border-radius: 50%;
  isolation: isolate;
}
@media (min-width: 992px){
  .hero__avatar{ width: 280px; margin: 0; } /* più grande su desktop */
}
.hero__avatar > img{
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
  display: block;
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
  filter: contrast(1.03) saturate(1.02);
}

/* Anello: toni grigi -> rosso del tema (usa --skin-color) */
.hero__ring{
  position: absolute; inset: -6px; border-radius: 50%;
  /* gradiente neutro che richiama il rosso del sito senza effetto arcobaleno */
  background: conic-gradient(
    from 0deg,
    rgba(255,255,255,0.10),
    rgba(200,200,200,0.18),
    rgba(120,120,120,0.24),
    rgba(80,80,80,0.22),
    rgba(40,40,40,0.20),
    var(--skin-color),
    rgba(120,120,120,0.24),
    rgba(200,200,200,0.18),
    rgba(255,255,255,0.10)
  );
  filter: blur(7px);
  opacity: .85;
  z-index: -1;
  animation: hero-ring-spin 18s linear infinite; /* rotazione molto soft */
}
@keyframes hero-ring-spin { to { transform: rotate(360deg); } }

/* Glow morbido dietro (leggermente rossastro + grigio) */
.hero__blob{
  position: absolute; inset: -20px; border-radius: 50%; z-index: -2;
  background:
    radial-gradient(60% 60% at 50% 50%, color-mix(in hsl, var(--skin-color) 35%, transparent), transparent 70%),
    radial-gradient(80% 80% at 50% 50%, rgba(180,180,180,.15), transparent 75%);
  animation: hero-blob-float 8s ease-in-out infinite;
}
@keyframes hero-blob-float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

@media (prefers-reduced-motion: reduce){
  .hero__ring, .hero__blob { animation: none; }
}


/* === ABOUT: testo centrato === */
/* Se usi già <div class="about__container container grid about--centered"> */
.about__container.about--centered{
  grid-template-columns: 1fr !important;
  justify-items: center;
}
.about--centered .about__data{
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.about--centered .about__description{ padding-right: 0 !important; }
.about--centered .about__info{ justify-content: center; }

.about__container:not(.about--centered) .about__img + .about__data{ text-align: left; }
.about__container:not(.about--centered):has(.about__data):not(:has(.about__img)) .about__data{
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
/* === HOME: griglia desktop per avere testo a sinistra e avatar a destra === */
@media (min-width: 992px){
  .home__container{
    display: grid;
    grid-template-columns: 1.2fr .9fr;
    align-items: center;
    gap: 1.5rem;
  }
}

/* === Avatar base (dimensioni, forma, glow) === */
.hero__avatar{
  position: relative;
  width: 220px;             /* size mobile */
  max-width: 60vw;
  aspect-ratio: 1/1;
  border-radius: 50%;
  isolation: isolate;
}
.hero__avatar > img{
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
  display: block;
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
  filter: contrast(1.03) saturate(1.02);
}

/* Ring: grey -> site red (no rainbow) */
.hero__ring{
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255,255,255,0.10),
    rgba(200,200,200,0.18),
    rgba(120,120,120,0.24),
    rgba(80,80,80,0.22),
    rgba(40,40,40,0.20),
    var(--skin-color),
    rgba(120,120,120,0.24),
    rgba(200,200,200,0.18),
    rgba(255,255,255,0.10)
  );
  filter: blur(7px);
  opacity: .85;
  z-index: -1;
}

/* Back glow */
.hero__blob{
  position: absolute; inset: -20px; border-radius: 50%; z-index: -2;
  background:
    radial-gradient(60% 60% at 50% 50%, color-mix(in hsl, var(--skin-color) 35%, transparent), transparent 70%),
    radial-gradient(80% 80% at 50% 50%, rgba(180,180,180,.15), transparent 75%);
}

/* === Stop animations on small/medium to avoid “moving around” === */
.hero__ring, .hero__blob{ animation: none; }

/* === Visibility + placement: mobile vs desktop === */
.hero__avatar--mobile{
  display: block;
  margin: 1rem auto 0;         /* centrata tra testo e bottone */
}
.hero__avatar--desktop{
  display: none;
}

@media (min-width: 992px){
  .hero__avatar{ width: 280px; }     /* size desktop */
  .hero__avatar--mobile{ display: none; }
  .hero__avatar--desktop{
    display: block;
    justify-self: center;            /* più centrata, non appiccicata a destra */
    margin-left: 1.2rem;             /* leggero spostamento verso il centro */
  }

  /* Attiva animazioni SOLO su desktop, sottili */
  .hero__ring{ animation: hero-ring-spin 18s linear infinite; }
  .hero__blob{ animation: hero-blob-float 8s ease-in-out infinite; }
  @keyframes hero-ring-spin { to { transform: rotate(360deg); } }
  @keyframes hero-blob-float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }
}

/* === About centrato (se non l’hai già messo) === */
.about__container.about--centered{
  grid-template-columns: 1fr !important;
  justify-items: center;
}
.about--centered .about__data{
  text-align: center; max-width: 780px; margin: 0 auto;
}
.about--centered .about__description{ padding-right: 0 !important; }
.about--centered .about__info{ justify-content: center; }
/* ================================
   HOME — Small & Medium fixes only
   Keep laptop (>= 992px) as-is
   ================================ */

/* Phones + Tablets (<= 991px): stable vertical flow */
@media (max-width: 991px){

  /* Avoid 100vh issues and jumping */
  .home{
    height: auto !important;
    min-height: 0 !important;
    padding: 2rem 0 2.25rem;
  }

  /* One column, centered, predictable */
  .home__container{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem;
  }

  /* Social: not absolute on small/medium */
  .home__social{
    position: static !important;
    margin: .25rem 0 1rem !important;
    display: flex; align-items: center; justify-content: center;
    gap: .75rem 1rem;
  }
  .home__social-follow::after{ display:none !important; }

  /* Text block width */
  .home__data{
    padding: 0 1rem !important;
    max-width: 720px;
  }

  /* Avatar sits between description and button, with breathing room */
  .hero__avatar{
    width: 220px;               /* phones/tablets */
    max-width: 65vw;
    margin: 1rem auto 1.2rem !important;  /* separates from text & button */
  }

  /* No glow animation on small/medium (looks like movement) */
  .hero__ring, .hero__blob{ animation: none !important; }

  /* Button never touches the photo */
  .home .button{ margin-top: .25rem !important; }

  /* Bottom info strip: inline, not absolute */
  .my__info{
    position: static !important;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem 1.25rem;
    margin-top: 1rem;
  }
}

/* Phones only (<= 767px): slightly smaller avatar & tighter paddings */
@media (max-width: 767px){
  .hero__avatar{ width: 200px; max-width: 70vw; }
  .home{ padding: 1.6rem 0 2rem; }
  .home__title{ line-height: 1.15; }
}

/* Tablets only (768px–991px): give text a bit more room */
@media (min-width: 768px) and (max-width: 991px){
  .hero__avatar{ width: 230px; }
  .home__data{ max-width: 760px; }
}
/* =========================================
   SKILLS — FAQ-style accordion (<=724px)
   Imitates the demo: plus/minus, smooth slide
   ========================================= */
   @media (max-width: 724px){
    /* make the whole section a clean stack */
    .skills__container{
      display: block;
    }
  
    /* Each header looks like a FAQ item header */
    .skills__header{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: .75rem;
      padding: 14px 16px;
      margin: 10px 0 6px;
      background: var(--box-color);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 12px;
      cursor: pointer;
      position: relative;
      user-select: none;
    }
  
    /* Left part (icon + titles) align nicely */
    .skills__header i.skills__icon{ font-size: 1.2rem; color: var(--skin-color); margin-right: .5rem; }
    .skills__title{ display:block; font-size: 1rem; }
    .skills__subtitles{ display:block; font-size: .85rem; opacity:.8; }
  
    /* Replace the chevron with a plus/minus like the demo */
    .skills__header .skills__arrow{ display: none; } /* hide your chevron */
    .skills__header::after{
      content: '+';
      font-weight: 700;
      font-size: 1.2rem;
      line-height: 1;
      opacity: .9;
      transition: transform .25s ease, opacity .25s ease, content .2s;
    }
    .skills__header.skills__open::after{
      content: '—'; /* en dash look */
      transform: none;
    }
  
    /* Panels behave like a dropdown under the header */
    .skills__group{
      overflow: hidden;
      max-height: 0;                 /* closed by default */
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 10px;
      background: rgba(255,255,255,.02);
      margin: 0 0 10px;
      transition: max-height .35s ease;
    }
  
    /* we add an inner wrapper via JS so padding doesn't affect height calc */
    .skills__group-inner{
      padding: 12px 14px 14px;
      opacity: 0;
      transform: translateY(-4px);
      transition: opacity .25s ease, transform .25s ease;
    }
    .skills__group.is-open .skills__group-inner{
      opacity: 1;
      transform: translateY(0);
    }
  
    /* Grid of skills inside panel stays neat */
    .skills__list{
      display: grid;
      gap: .9rem;
      grid-template-columns: 1fr 1fr;
    }
    @media (max-width: 480px){
      .skills__list{ grid-template-columns: 1fr; }
    }
  
    /* Avoid tabs behavior on mobile look&feel */
    .skills__tabs{ margin-bottom: 6px; }
  }
  /* Skills: ensure panels are visible on small screens */
@media (max-width: 724px){
  .skills [data-content]{
    display: block !important;
  }
}
