/* =====================================================================
   HOME PAGE HEADER  -  /home-header.css
   A few thin lines drifting slowly behind my name, like wind or water.
   Very light, so the name always reads first. Home page only.
   ===================================================================== */

header.has-clock { position: relative; isolation: isolate; }
header.has-clock > h1,
header.has-clock > h2 { position: relative; z-index: 1; }

.hl-bg {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    width: 100%;
    height: calc(100% - 1rem);      /* stops at the thin line under the header */
    overflow: hidden;
    pointer-events: none;
    /* fade out at both ends and a little behind the text */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 12%, rgba(0, 0, 0, 0.55) 40%, #000 70%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 12%, rgba(0, 0, 0, 0.55) 40%, #000 70%, transparent 100%);
    animation: hl-fade 2.4s ease 0.4s both;
}
@keyframes hl-fade { from { opacity: 0; } to { opacity: 1; } }

.hl {
    fill: none;
    stroke: #b9b1a3;
    stroke-width: 0.8;
    vector-effect: non-scaling-stroke;
    opacity: 0.6;
}
.hl.red { stroke: #8a2b1d; opacity: 0.32; }

/* each line slides sideways forever (one wave length, then it repeats) */
.hl-x { animation: hl-x 60s linear infinite; }
.l2 .hl-x { animation-duration: 75s; }
.l3 .hl-x { animation-duration: 52s; animation-direction: reverse; }
.l4 .hl-x { animation-duration: 90s; }
.l5 .hl-x { animation-duration: 68s; animation-direction: reverse; }
.l6 .hl-x { animation-duration: 82s; }
@keyframes hl-x { from { transform: translateX(0); } to { transform: translateX(-600px); } }

/* and rises and falls a little, each at its own pace */
.hl-y { animation: hl-y 13s ease-in-out infinite alternate; }
.hl-y.l2 { animation-duration: 17s; animation-delay: -5s; }
.hl-y.l3 { animation-duration: 11s; animation-delay: -3s; }
.hl-y.l4 { animation-duration: 19s; animation-delay: -8s; }
.hl-y.l5 { animation-duration: 15s; animation-delay: -2s; }
.hl-y.l6 { animation-duration: 21s; animation-delay: -11s; }
@keyframes hl-y { from { transform: translateY(-4px); } to { transform: translateY(4px); } }

@media (max-width: 760px) {
    .hl { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
    .hl-bg, .hl-x, .hl-y { animation: none; }
}
