/* =========================================================
   "Logomania": the logo repeated in a brick pattern as a very faint,
   slowly drifting page background. It sits behind everything and is
   only visible through sections that have no solid background.
   ========================================================= */
.logomania { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.logomania-layer {
    --tile-w: 260px;
    --tile-h: 420px;
    --tilt: -12deg;
    position: absolute; inset: -55%;
    background: url('../img/logomania-tile.png') 0 0 / var(--tile-w) var(--tile-h) repeat;
    rotate: var(--tilt);
    opacity: .08;
    will-change: translate, opacity;
    /* one drift cycle moves exactly one tile along the rotated x axis, so the loop has no visible jump:
       (260 * cos 12deg, -260 * sin 12deg) */
    animation: logomania-drift 110s linear infinite, logomania-breathe 14s ease-in-out infinite;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, rgba(0, 0, 0, .35) 100%);
    mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, rgba(0, 0, 0, .35) 100%);
}

@keyframes logomania-drift { from { translate: 0 0; } to { translate: 254.3px -54px; } }
@keyframes logomania-breathe { 0%, 100% { opacity: .065; } 50% { opacity: .1; } }

/* let the pattern show through the sections that used to paint solid white / light grey */
.contact-block { background: transparent; }
.port-row:nth-of-type(even) { background: rgba(245, 247, 251, .72); }

@media (max-width: 980px) {
    .logomania-layer { --tile-w: 200px; --tile-h: 323px; opacity: .08; animation-name: logomania-drift-sm, logomania-breathe; }
    @keyframes logomania-drift-sm { from { translate: 0 0; } to { translate: 195.6px -41.6px; } }
}

@media (prefers-reduced-motion: reduce) {
    .logomania-layer { animation: none; opacity: .08; }
}

@media print { .logomania { display: none; } }
