/* HERO SECTION */

#hero {
  position: relative;
  background: var(--color-bg-soft);
}

.hero-container {
  min-height: min(calc(100vh - 84px), 640px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6rem;
  padding: 0 clamp(1.5rem, 6vw, 6rem);
}

.hero-text {
  flex: 1;
  max-width: 40rem;
}

.hero-text h3 {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.hero-text h1 {
  /* font-family left as Quicksand on request — do not change */
  font-family: "Quicksand", sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-transform: capitalize;
}

.hero-text p {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  text-align: left;
  max-width: 46ch;
}

/* justify only once line length (desktop) is long enough to look intentional */
@media (min-width: 1025px) {
  .hero-text p {
    text-align: justify;
  }
}

/* animated underline, more specific than the base .reveal rule so it overrides it */
.hero-text .line.reveal {
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, var(--color-accent), transparent);
  border-radius: 2px;

  opacity: 1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-text .line.reveal.active {
  transform: scaleX(1);
}

.hero-img {
  flex-shrink: 0;
}

.hero-img img {
  height: 25rem;
  width: 25rem;
  max-width: 100%;
  border-radius: 5%;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(10, 37, 64, 0.14);
  transition: transform 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hero-img img:hover {
    transform: translateY(-4px);
  }
}

/* HERO ACTIONS — socials + divider + resume */

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0.75rem;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.hero-socials {
  display: flex;
  gap: 1rem;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--color-primary);
  font-size: 1.15rem;
  box-shadow: 0 3px 8px var(--color-line);
  transition: color 0.25s ease, box-shadow 0.25s ease;
}

.hero-socials a:hover {
  color: var(--color-accent);
  box-shadow: 0 4px 12px var(--color-line-strong);
}

.hero-socials a:focus-visible,
.resume-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* thin divider tying socials and resume button into one row */
.hero-divider {
  width: 1px;
  height: 28px;
  background: var(--color-line-strong);
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  transition: filter 0.2s ease;
}

.resume-btn:hover {
  filter: brightness(0.95);
}

/* SCROLL CUE */

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  animation: cueBounce 2.2s ease-in-out infinite;
}

.scroll-cue span {
  width: 1px;
  height: 28px;
  background: var(--color-text-muted);
}

@keyframes cueBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-50%) translateY(6px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue {
    animation: none;
  }

  .hero-img img,
  .hero-text .line.reveal {
    transition: none;
  }
}

/* RESPONSIVE — tablets / small laptops */

@media (max-width: 1024px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
    padding: 4rem 2rem;
    min-height: auto;
  }

  .hero-text {
    max-width: 90%;
  }

  .hero-text .line.reveal {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-img img {
    height: 18rem;
    width: 18rem;
  }
}

/* RESPONSIVE — mobile below 768px */

@media (max-width: 768px) {
  .hero-container {
    padding: 2rem 1rem;
    gap: 2rem;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-img img {
    height: 15rem;
    width: 15rem;
  }

  .hero-actions {
    justify-content: center;
  }

  /* scroll cue gets crowded next to the mobile bottom tab bar */
  .scroll-cue {
    display: none;
  }
}

/* RESPONSIVE — small mobile 480px and below */

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .hero-img img {
    height: 12rem;
    width: 12rem;
  }
}