/* =========================================
   HOMEPAGE CSS (assets/css/home.css)
========================================= */
body {
  font-size: clamp(0.8rem, 1vw + 0.5rem, 1rem);
  overscroll-behavior-y: none;
}

/* SECTION 1: HERO PIN */
.hero-pin-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: #f9f9f9;
}

.hero-name-container h1 {
  font-size: clamp(3rem, 8vw + 1rem, 8rem);
  margin: 0;
  font-weight: 350;
  letter-spacing: -0.04em;
  z-index: 10;
  position: relative;
  color: #111;
}

.hero-floating-images {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.float-img {
  position: absolute;
  opacity: 0;
  overflow: hidden;
  border-radius: 4px;
}

.float-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Aspect Ratio Locks */
.float-img.vertical {
  aspect-ratio: 5 / 7;
}
.float-img.horizontal {
  aspect-ratio: 7 / 5;
}

/* Scattered Positions */
.img-1 {
  width: 14vw;
  top: 8%;
  left: 17%;
}
.img-2 {
  width: 18vw;
  top: 15%;
  right: 20%;
}
.img-3 {
  width: 16vw;
  bottom: 10%;
  left: 12%;
}
.img-5 {
  width: 15vw;
  bottom: 18%;
  right: 10%;
}
.img-6 {
  width: 18vw;
  top: 70%;
  left: 65%;
}
.img-9 {
  width: 12vw;
  top: 65%;
  left: 22%;
}
.img-10 {
  width: 20vw;
  top: 10%;
  right: 35%;
}

/* SECTION 2: CTA STATEMENT */
.cta-statement {
  text-align: center;
  padding-top: -1rem;
  padding-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.cta-statement p {
  font-size: clamp(0.8rem, 1vw + 0.5rem, 1rem);
  line-height: 1.5rem;
  color: #111;
  margin: 0;
}

/* SECTION 3: SPLITTING PROJECT ROSTER */
.project-split-section {
  background-color: #f9f9f9;
  position: relative;
  z-index: 20;
  padding: 0 0 10vh 0;
}

.split-item {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: #111;
  width: 100%;
}

.split-text {
  font-size: clamp(1.5rem, 4vw + 1rem, 3.5rem);
  font-weight: 320;
  white-space: nowrap;
}

.split-image-wrapper {
  width: 0;
  height: 25vh;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  display: flex;
  justify-content: center;
}

.split-image-wrapper img {
  width: 25vw;
  height: 100%;
  object-fit: cover;
  min-width: 300px;
}

/* SECTION 4: ABOUT HERO & SKILLS */
.about-hero {
  text-align: center;
  margin-top: 10rem;
  margin-bottom: 5rem;
  display: flex;
  justify-content: center;
}

h1.hero-statement {
  max-width: 30ch;
  margin: 0;
  font-size: clamp(1.5rem, 4vw + 1rem, 3.5rem) !important;
  font-weight: 200 !important;
  letter-spacing: -0.04em !important; /* Restores the tight About page tracking */
  line-height: 1.1 !important; /* Restores the About page line-height */
}

.about-hero .highlight {
  display: inline-block;
  font-weight: 700;
  -webkit-text-stroke: 1px transparent;
  color: inherit;
  font-weight: inherit;
}

.skills-section {
  margin-bottom: 8rem;
  padding: 0;
  width: 90%;
  max-width: 45rem;
  margin-left: auto;
  margin-right: auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-column h4 {
  margin-top: 10rem;
  padding-bottom: 1rem;
  color: #111;
  font-size: clamp(0.8rem, 1vw + 0.5rem, 1rem);
}

.skill-column p {
  line-height: 1.5rem;
  font-size: clamp(0.8rem, 1vw + 0.5rem, 1rem);
}

@media (min-width: 768px) {
  .skills-grid {
    gap: 4rem;
  }
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Applica il margine del 10% della pagina About in modo forzato su TUTTI gli schermi */
.hero-pin-section,
.about-hero,
.project-split-section,
.about-cta-section {
  padding-left: 10% !important;
  padding-right: 10% !important;
  box-sizing: border-box !important;
}

/* =========================================
   MOBILE OVERRIDES (Max Width: 767px)
========================================= */
/* RESPONSIVE */
/* TABLET & MOBILE (Triggers the moment it becomes 2x2) */

@media (max-width: 1024px) {
  /* Bypasses GSAP's pin-spacer by targeting the sections directly */
  /* .hero-pin-section,
  .about-hero,
  .project-split-section,
  .about-cta-section, */
  .skills-section {
    padding-left: 10% !important;
    padding-right: 10% !important;
    box-sizing: border-box !important;
  }

  /* SKILLS */
  .skills-grid {
    row-gap: 2rem;
  }

  /* Removes the 10rem margin pushing the second row down */
  .skill-column h4 {
    margin-top: 0;
  }

  /* Scales up and repositions Section 1 images to frame the text better on Tablet */
  .img-1 {
    width: 25vw;
    top: 15%;
    left: 8%;
  }
  .img-2 {
    width: 25vw;
    top: 20%;
    right: 5%;
  }
  .img-3 {
    width: 20vw;
    bottom: 15%;
    left: 5%;
  }
  .img-5 {
    width: 20vw;
    bottom: 20%;
    right: 5%;
  }
  .img-6 {
    width: 25vw;
    top: 75%;
    left: 55%;
  }
  .img-9 {
    width: 20vw;
    top: 70%;
    left: 15%;
  }
  .img-10 {
    width: 30vw;
    top: 12%;
    right: 20%;
  }
}

@media (max-width: 767px) {
  .img-1 {
    width: 30vw;
    top: 10%;
    left: 12%;
  }
  .img-2 {
    width: 40vw;
    top: 25%;
    right: 3%;
  }
  .img-3 {
    width: 30vw;
    bottom: 18%;
    left: 2%;
  }
  .img-5 {
    width: 25vw;
    bottom: 15%;
    right: 5%;
  }
  .img-6 {
    width: 25vw;
    top: 35%;
    left: 50%;
  }
  .img-9 {
    width: 25vw;
    top: 70%;
    left: 22%;
  }
  .img-10 {
    width: 30vw;
    top: 80%;
    right: 12%;
  }

  .split-image-wrapper img {
    min-width: 150px;
    width: 40vw;
  }

  /* project names */
  /* Shrinks the project names in Section 2 so they actually fit the phone screen */
  .split-text {
    font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
  }

  /* Kills the excessive white space between the Projects (Sec 2) and the About text (Sec 3) */
  .project-split-section {
    padding-bottom: 0 !important;
  }

  .about-hero {
    margin-top: 6rem !important; /* Pulls the About hero up closer to the projects */
  }
}
