/* Hero */
#hero {
  --hero-content-width: min(var(--content-width), calc(100% - (var(--padding-x) * 2)));
  --hero-side-gap: calc((100% - var(--hero-content-width)) / 2);
  height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(6, 6, 6, 0.28) 0%, rgba(6, 6, 6, 0.14) 26%, rgba(6, 6, 6, 0) 48%),
    radial-gradient(circle at 34% 58%, rgba(8, 8, 8, 0.4) 0%, rgba(8, 8, 8, 0.22) 38%, rgba(8, 8, 8, 0) 68%),
    radial-gradient(circle at 78% 30%, rgba(var(--color-dark-teal-rgb), 0.9) 0%, rgba(var(--color-dark-teal-rgb), 0.62) 30%, rgba(var(--color-dark-teal-rgb), 0.14) 58%, rgba(var(--color-dark-teal-rgb), 0) 74%),
    linear-gradient(90deg, #141515 0%, #161717 36%, #102a26 72%, #0b3f37 100%);
  display: flex;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: 0;
}

/* Bottom fade */
#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  background: linear-gradient(to bottom, rgba(23, 25, 25, 0) 0%, rgba(var(--color-overlay-dark-rgb), 0.12) 48%, rgba(var(--color-overlay-dark-rgb), 0.4) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Cursor glow */
.hero-cursor-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
  background: radial-gradient(circle at center, rgba(var(--color-cursor-glow-rgb), 0.32) 0%, rgba(var(--color-cursor-glow-rgb), 0.16) 38%, rgba(var(--color-cursor-glow-rgb), 0.05) 62%, rgba(var(--color-cursor-glow-rgb), 0) 78%);
  filter: blur(28px);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.hero-cursor-glow.is-visible {
  opacity: 0.6;
}

/* Title */
.hero-title {
  position: absolute;
  top: 43%;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 755px;
  width: min(755px, calc(100% - 64px));
  text-align: center;
  z-index: 2;
}

/* Copy */
.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(16px, 1.6vw, 18px);
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 1px;
}

.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(60px, 8vw, 110px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 0.98;
  white-space: nowrap;
}

.hero-buttons {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-buttons .btn {
  min-height: 42px;
  padding: 8px 24px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(17, 17, 17, 0.4);
}

.hero-buttons .btn-loop-cta {
  position: relative;
  justify-content: center;
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, transform 0.2s ease;
}

.hero-buttons .btn:link,
.hero-buttons .btn:visited {
  color: rgba(255, 255, 255, 0.95);
}

.hero-buttons .btn:hover,
.hero-buttons .btn:focus-visible,
.hero-buttons .btn.is-looping,
.hero-buttons .btn.is-returning {
  transform: none;
  color: #76e1da;
  border-color: #76e1da;
  background: rgba(var(--color-dark-teal-rgb), 0.32);
}

.hero-buttons .btn:hover .btn-loop-track,
.hero-buttons .btn:focus-visible .btn-loop-track,
.hero-buttons .btn.is-looping .btn-loop-track,
.hero-buttons .btn.is-returning .btn-loop-track {
  color: #76e1da;
}

/* Left rail */
.hero-left-lateral {
  position: absolute;
  top: 60%;
  left: var(--hero-side-gap);
  transform: translateY(-50%);
  width: 30px;
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

/* Scroll pill */
.hero-scroll-pill {
  width: 32px;
  height: 52px;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  background: rgba(17, 17, 17, 0.45);
  box-shadow: 0 0 0 1px rgba(var(--color-cursor-glow-rgb), 0.08) inset;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.hero-scroll-icon {
  width: 10px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  will-change: transform;
}

.hero-scroll-pill:hover,
.hero-scroll-pill:focus-visible {
  background: rgba(17, 17, 17, 0.45);
  color: var(--color-white);
}

.hero-scroll-pill:hover .hero-scroll-icon,
.hero-scroll-pill:focus-visible .hero-scroll-icon {
  animation: hero-scroll-arrow-bob 0.9s ease-in-out infinite;
}

@keyframes hero-scroll-arrow-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* Left line */
.hero-left-line {
  width: 1px;
  flex: 1;
  background: rgba(var(--color-accent-rgb), 0.72);
}

/* Right rail */
.hero-right-lateral {
  position: absolute;
  top: 50%;
  right: var(--hero-side-gap);
  transform: translateY(-18%);
  width: 32px;
  height: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 2;
}

/* Email */
.hero-email {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.2px;
  color: #ffffff;
  transition: color 0.2s ease;
}

.hero-email:hover,
.hero-email:focus-visible {
  color: var(--color-accent);
}

/* Social links */
.hero-socials {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-socials a {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 0;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Social hover */
.hero-socials a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.hero-socials a.is-active {
  background: transparent;
  color: var(--color-accent);
  border-color: transparent;
}

.hero-socials a:hover {
  color: inherit;
  border-color: transparent;
  background: transparent;
}

.hero-socials a img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-socials a .icon-active {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.hero-socials a .icon-default {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-socials a:hover .icon-active,
.hero-socials a:focus-visible .icon-active {
  opacity: 0;
}

.hero-socials a:hover .icon-default,
.hero-socials a:focus-visible .icon-default {
  opacity: 1;
}

.hero-socials a:hover::after,
.hero-socials a:focus-visible::after {
  opacity: 1;
}

/* Right line */
.hero-right-line {
  width: 1px;
  flex: 1;
  background: #ffffff;
}

/* Desktop tweaks */
@media (min-width: 768px) {
  #hero {
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding-top: 0;
  }

  .hero-title {
    top: 49%;
    gap: 16px;
    max-width: 800px;
    width: min(860px, calc(100% - 160px));
  }

  .hero-subtitle {
    font-size: 32px;
    letter-spacing: 0.5px;
  }

  .hero-name {
    font-size: clamp(80px, 7.5vw, 110px);
    line-height: 0.92;
    letter-spacing: -1.5px;
  }

  .hero-buttons {
    gap: 24px;
    margin-top: 14px;
  }

  .hero-buttons .btn {
    min-height: 42px;
    padding: 8px 24px;
    font-size: 16px;
  }

  .hero-left-lateral {
    position: absolute;
    top: 90%;
    left: var(--hero-side-gap);
    transform: translateY(-50%);
    width: 30px;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 2;
  }

  .hero-right-lateral {
    position: absolute;
    top: 65%;
    right: var(--hero-side-gap);
    transform: translateY(-50%);
    width: 32px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 2;
  }

  .hero-email {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
  }

  .hero-left-line {
    width: 1px;
    flex: 1 1 auto;
    min-height: 330px;
    background: rgba(var(--color-accent-rgb), 0.72);
  }

  .hero-right-line {
    width: 1px;
    flex: 1 1 auto;
    min-height: 220px;
    background: #ffffff;
  }
}

@media (min-width: 1201px) {
  .hero-right-lateral {
    top: 66%;
    height: 420px;
    gap: 20px;
  }

  .hero-right-lateral .hero-social-email {
    display: none;
  }

  .hero-right-line {
    min-height: 240px;
    margin-top: 40px;
  }
}

@media (min-width: 1201px) and (min-height: 1400px) {
  .hero-right-lateral {
    top: calc(100% - 210px);
    height: 420px;
    transform: translateY(-50%);
  }
}

@media (min-width: 2200px) and (max-height: 1250px) {
  .hero-left-lateral {
    top: 86%;
  }

  .hero-right-lateral {
    top: 69%;
  }
}

