/* Hero — tecnológico, bg com blur, tag, título, CTA */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0 100px;
  overflow: hidden;
}

/* Background: vídeo + fallback imagem + overlays */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Fallback: imagem com blur (visível se o vídeo não carregar) */
.hero__bg-image {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  object-fit: cover;
  object-position: center;
  filter: blur(4px) brightness(0.56) saturate(1.04);
  transform: scale(1.04);
}

/* Vídeo de fundo */
.hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.5) saturate(0.85) contrast(1.05);
  z-index: 1;
}

/* Overlay escuro */
.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.72) 0%,
    rgba(10, 10, 10, 0.84) 50%,
    rgba(10, 10, 10, 0.94) 100%
  );
  z-index: 2;
  opacity: 0.4;
}

/* Overlay em tons da paleta principal */
.hero__bg-overlay--green {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--primary-rgb), 0.1) 0%,
    rgba(var(--primary-weak-rgb), 0.05) 50%,
    rgba(var(--primary-rgb), 0.05) 100%
  );
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 3;
}

/* Glow azul e branco */
.hero__bg-glow {
  position: absolute;
  width: 60%;
  max-width: 500px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(var(--primary-rgb), 0.18) 0%,
    rgba(var(--primary-weak-rgb), 0.06) 38%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 4;
}

/* Conteúdo em cima do bg */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Tag no topo — com StarBorder (cores atuais) */
.hero__tag.star-border {
  display: inline-flex;
}

.hero__tag .star-border__inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.1);
}

.hero__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: hero-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes hero-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* Título */
.hero__title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--light);
  margin: 0;
}

.hero__title .highlight {
  color: var(--primary);
  font-weight: 600;
  text-shadow: 0 0 40px rgba(var(--primary-rgb), 0.3);
}

/* CTA — com StarBorder (cores atuais: fundo primary, texto preto) */
.hero__cta.star-border {
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.25s ease, filter 0.25s ease;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

.hero__cta .star-border__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.25);
  transition: box-shadow 0.25s ease;
}

.hero__cta:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.hero__cta:hover .star-border__inner {
  box-shadow: 0 20px 50px rgba(var(--primary-rgb), 0.4);
}

/* Layout portfólio: grid 2 colunas (texto + foto) */
.hero__container {
  width: min(calc(100% - (var(--container-gutter) * 2)), var(--container-max));
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0;
}

.hero__logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--light);
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .hero__logo {
    text-align: left;
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  padding: 32px 0 48px;
}

@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    padding: 48px 0 64px;
  }
}

.hero__text-wrap {
  text-align: center;
}

@media (min-width: 768px) {
  .hero__text-wrap {
    text-align: left;
  }
}

.hero__subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--light);
  margin: 0 0 8px 0;
}

.hero__title--large {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--light);
  margin: 0 0 16px 0;
  line-height: 1.15;
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--light);
  background: var(--primary);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.hero__cta iconify-icon {
  font-size: 1.35em;
  flex-shrink: 0;
}

.hero__cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(var(--primary-rgb), 0.4);
  filter: brightness(1.08);
  color: var(--light);
}

/* Título em duas linhas: "Desenvolvedor" fixo + typewriter "Front-end & Mobile" */
.hero__title--typewriter {
  display: block;
  max-width: 480px;
}

.hero__title--typewriter .hero__title-line {
  display: block;
}

.hero__title--typewriter .hero__title-line--typewriter {
  display: inline-block;
  min-height: 1.2em;
  vertical-align: bottom;
}

@media (min-width: 768px) {
  .hero__title--typewriter .hero__title-line--typewriter {
    min-width: 18ch;
  }
}

.hero__title--typewriter .text-type__content {
  display: inline;
}

.hero__title--typewriter .text-type__cursor {
  margin-left: 0.15em;
  display: inline-block;
  font-weight: 400;
  opacity: 1;
  animation: text-type-blink 0.6s step-end infinite;
}

@keyframes text-type-blink {
  50% { opacity: 0; }
}

/* Card da foto — fundo com img/bg-profile.png (opacidade 60%, 100% no hover) */
.hero__photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
  min-height: 280px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
}

.hero__photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 24px;
  background: url("../img/bg-profile.png") center / cover no-repeat;
  animation: hero-profile-bg-pulse 3s ease-in-out infinite;
}

.hero__photo {
  position: relative;
  z-index: 1;
  max-height: 360px;
  width: auto;
  object-fit: contain;
  border-radius: 24px;
  display: block;
}

@keyframes hero-profile-bg-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Linhas decorativas no hero */
.hero__line {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

.hero__line--bottom-left {
  bottom: 0;
  left: 0;
  height: 288px;
}

.hero__line--top-right {
  top: 0;
  right: 0;
  height: 288px;
}

/* Responsivo */
@media (max-width: 640px) {
  .hero {
    padding: 60px 0 80px;
    min-height: 100vh;
  }

  .hero__grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .hero__photo-wrap {
    order: 1;
    max-width: 280px;
  }

  .hero__photo {
    max-height: 320px;
  }

  .hero__text-wrap {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero__subtitle {
    order: 1;
  }

  .hero__title--large {
    order: 2;
  }

  .hero__cta {
    order: 4;
    margin-top: 0;
  }

  .hero__tagline {
    order: 3;
    margin: 16px 0 16px 0;
  }

  .hero__tag .star-border__inner {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    padding: 8px 16px;
  }

  .hero__title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .hero__title--typewriter .hero__title-line--typewriter {
    min-height: auto;
    white-space: nowrap;
  }

  .hero__title--typewriter .text-type__cursor {
    display: none;
  }

  .hero__cta.star-border {
    width: 100%;
    max-width: 320px;
  }

  .hero__cta .star-border__inner {
    width: 100%;
    padding: 16px 24px;
  }

  .hero__line--bottom-left,
  .hero__line--top-right {
    height: 200px;
  }
}
