/*
 * Shared homepage section marker: node dot, label and a circuit trace that runs
 * to the right and lands on the top edge of the card below, near its right end.
 * The trace length is the section spacing; --trace (set per section) is its colour.
 */
.home-section-label {
  position: relative;
  margin: 0;
  /* Trace height; the head and corner below are built for exactly 110px. */
  padding: 0 0 110px 22px;
  color: #96929f;
  font: 700 12px/1.5 var(--home-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-section-label::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--trace, #29e0ff);
  box-shadow: 0 0 14px var(--trace, #29e0ff);
}

.home-section-label::after {
  content: none;
}

.home-trace {
  position: absolute;
  inset: 18px 0 0;
  /* Above the following card, so the end point sits on its edge. */
  z-index: 1;
  color: var(--trace, #29e0ff);
  pointer-events: none;
}

.home-trace svg {
  position: absolute;
  overflow: visible;
}

.home-trace__head {
  top: 0;
  left: 0;
}

.home-trace__corner {
  top: 70px;
  right: 24px;
}

.home-trace__run {
  position: absolute;
  top: 69.25px;
  left: 110px;
  right: 64px;
  height: 1.5px;
  overflow: hidden;
  background: color-mix(in srgb, currentColor 45%, transparent);
}

.home-trace__run::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 90px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  transform: translateX(-100px);
  animation: home-trace-pulse 6s ease-in-out infinite;
}

.home-trace--socials .home-trace__run::after { animation-delay: -2s; }
.home-trace--contact .home-trace__run::after { animation-delay: -4s; }
.home-trace--about .home-trace__run::after { animation-delay: -1s; }
.home-trace--gaming .home-trace__run::after { animation-delay: -3s; }

.home-trace__line {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .45;
}

.home-trace__branch {
  stroke-dasharray: 3 4;
  opacity: .3;
}

.home-trace__pad {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: .5;
}

.home-trace__end {
  fill: currentColor;
  filter: drop-shadow(0 0 5px currentColor);
}

/* Projects: the tabs sit between label and card, so the drop continues past them. */
.home-projects .home-trace__end {
  display: none;
}

.home-project-tabs::before,
.home-project-tabs::after {
  content: '';
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.home-project-tabs::before {
  top: 0;
  bottom: -22px;
  right: 37.25px;
  width: 1.5px;
  background: color-mix(in srgb, var(--trace, #29e0ff) 45%, transparent);
}

.home-project-tabs::after {
  bottom: -25.5px;
  right: 34.5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--trace, #29e0ff);
  box-shadow: 0 0 5px var(--trace, #29e0ff);
}

@keyframes home-trace-pulse {
  0% { transform: translateX(-100px); opacity: 0; }
  10% { opacity: 1; }
  75% { opacity: 1; }
  90%, 100% { transform: translateX(calc(100vw)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-trace__run::after { display: none; }
}
