/* monopole.boo v2 -- vaporwave ghost / cyberpunk neon / masonry haunt */

:root {
    --void: #0A0A0E;
    --void-deep: #050507;
    --bone: #E0E0F0;
    --plum: #2A1A3A;
    --hot-pink: #FF2080;
    --neon-cyan: #00F0FF;
    --neon-purple: #A020FF;

    --font-pixel: "Press Start 2P", "Courier New", monospace;
    --font-mono: "IBM Plex Mono", "Courier New", monospace;
    --font-display: "VT323", "Press Start 2P", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--void);
    color: var(--bone);
    font-family: var(--font-mono);
    font-size: clamp(13px, 0.9vw, 15px);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

body {
    position: relative;
    background:
        radial-gradient(ellipse at 80% -10%, rgba(255, 32, 128, 0.10), transparent 60%),
        radial-gradient(ellipse at 0% 110%, rgba(0, 240, 255, 0.08), transparent 55%),
        var(--void);
}

/* -- Overlays -- */
.scanline-overlay {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 9000;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.18) 0px,
        rgba(0, 0, 0, 0.18) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: multiply;
    animation: scanShift 8s linear infinite;
}
@keyframes scanShift {
    0%   { background-position-y: 0; }
    100% { background-position-y: 6px; }
}
.vignette-overlay {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 8500;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* -- Vaporwave breathing backdrop -- */
.vapor-backdrop {
    position: fixed; inset: -10%;
    pointer-events: none;
    z-index: -3;
    background: linear-gradient(
        135deg,
        rgba(255, 32, 128, 0.25) 0%,
        rgba(160, 32, 255, 0.20) 35%,
        rgba(0, 240, 255, 0.22) 70%,
        rgba(255, 32, 128, 0.20) 100%
    );
    background-size: 220% 220%;
    opacity: 0.18;
    animation: vaporBreath 22s ease-in-out infinite;
}
@keyframes vaporBreath {
    0%, 100% { background-position: 0% 50%; opacity: 0.16; }
    50%      { background-position: 100% 50%; opacity: 0.28; }
}

/* -- Geometric tessellation -- */
.geo-tessellation {
    position: fixed; inset: -10%;
    pointer-events: none;
    z-index: -2;
    animation: patternScroll 36s linear infinite;
}
.geo-tessellation svg { width: 120%; height: 120%; }
@keyframes patternScroll {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-96px, -110px); }
}

/* -- Parallax depth layers (neon orbs) -- */
.depth-layer {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    width: 100%; height: 100%;
    top: 0; left: 0;
    will-change: transform;
}
.depth-far {
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 32, 128, 0.08), transparent 14%),
        radial-gradient(circle at 80% 70%, rgba(0, 240, 255, 0.07), transparent 13%);
    filter: blur(2px);
}
.depth-mid {
    background:
        radial-gradient(circle at 70% 20%, rgba(160, 32, 255, 0.10), transparent 10%),
        radial-gradient(circle at 30% 85%, rgba(255, 32, 128, 0.09), transparent 11%);
    filter: blur(1px);
}
.depth-near {
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.06), transparent 8%);
}

/* -- Ghost sprites -- */
.ghost-swarm {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}
.ghost-sprite {
    position: absolute;
    width: 24px; height: 28px;
    image-rendering: pixelated;
    opacity: 0.55;
    will-change: transform;
}
.ghost-sprite svg { width: 100%; height: 100%; }
@keyframes ghostBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* -- Hero -- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 6vw;
    z-index: 1;
}
.hero-frame {
    width: 100%;
    max-width: 1200px;
    border: 1px solid rgba(255, 32, 128, 0.35);
    padding: clamp(20px, 4vh, 48px) clamp(16px, 4vw, 56px);
    background: linear-gradient(180deg, rgba(10,10,14,0.55), rgba(42,26,58,0.35));
    box-shadow:
        inset 0 0 60px rgba(160, 32, 255, 0.15),
        0 0 30px rgba(255, 32, 128, 0.10);
    position: relative;
}
.hero-frame::before,
.hero-frame::after {
    content: "";
    position: absolute;
    width: 18px; height: 18px;
    border: 2px solid var(--neon-cyan);
}
.hero-frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.hero-frame::after  { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.hud-line {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-display);
    color: var(--neon-cyan);
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hud-top { margin-bottom: clamp(28px, 5vh, 64px); border-bottom: 1px dashed rgba(0,240,255,0.25); padding-bottom: 10px; }
.hud-bot { margin-top: clamp(28px, 5vh, 64px); border-top: 1px dashed rgba(0,240,255,0.25); padding-top: 10px; }
.hud-cell { white-space: nowrap; }
.hud-strong { color: var(--hot-pink); font-style: normal; }
.hud-cell.blink {
    color: var(--hot-pink);
    animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.logotype {
    position: relative;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: clamp(20px, 3.6vw, 56px);
    line-height: 1.1;
    color: var(--bone);
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 12px rgba(255, 32, 128, 0.55),
        0 0 26px rgba(160, 32, 255, 0.35);
    user-select: none;
    cursor: default;
}
.glitch {
    display: block;
    position: absolute;
    top: 0; left: 0; width: 100%;
}
.glitch-main { position: relative; }
.glitch-r { color: var(--hot-pink); transform: translate(-2px, 0); mix-blend-mode: screen; opacity: 0.85; }
.glitch-b { color: var(--neon-cyan); transform: translate( 2px, 0); mix-blend-mode: screen; opacity: 0.85; }
.logotype.glitching .glitch-r { animation: glitchR 0.32s steps(4) forwards; }
.logotype.glitching .glitch-b { animation: glitchB 0.32s steps(4) forwards; }
.logotype.glitching .glitch-main { animation: glitchMain 0.32s steps(4) forwards; }
@keyframes glitchR {
    0%   { clip-path: inset(0 0 80% 0); transform: translate(-3px, -2px); }
    25%  { clip-path: inset(50% 0 20% 0); transform: translate(-5px,  1px); }
    50%  { clip-path: inset(20% 0 60% 0); transform: translate(-2px, -1px); }
    75%  { clip-path: inset(70% 0  5% 0); transform: translate(-4px,  2px); }
    100% { clip-path: inset(0 0 0 0);     transform: translate(-2px, 0); }
}
@keyframes glitchB {
    0%   { clip-path: inset(60% 0 10% 0); transform: translate( 4px,  2px); }
    25%  { clip-path: inset(10% 0 70% 0); transform: translate( 2px, -1px); }
    50%  { clip-path: inset(40% 0 30% 0); transform: translate( 5px,  1px); }
    75%  { clip-path: inset( 5% 0 80% 0); transform: translate( 3px, -2px); }
    100% { clip-path: inset(0 0 0 0);     transform: translate( 2px, 0); }
}
@keyframes glitchMain {
    0%, 100% { transform: translate(0, 0); }
    20%  { transform: translate(-1px, 1px); }
    40%  { transform: translate( 1px,-1px); }
    60%  { transform: translate(-1px,-1px); }
    80%  { transform: translate( 1px, 1px); }
}

.hero-tagline {
    margin: clamp(16px, 3vh, 28px) auto 0;
    text-align: center;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: clamp(12px, 1.05vw, 16px);
    letter-spacing: 0.06em;
    max-width: 720px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
}

/* -- Manifesto -- */
.manifesto {
    position: relative;
    padding: clamp(40px, 8vh, 96px) 6vw;
    border-top: 1px solid rgba(160, 32, 255, 0.25);
    border-bottom: 1px solid rgba(160, 32, 255, 0.25);
    background:
        linear-gradient(90deg, rgba(255,32,128,0.04), rgba(0,240,255,0.04));
}
.manifesto-text {
    max-width: 980px;
    margin: 0 auto;
    font-family: var(--font-mono);
    font-size: clamp(14px, 1.1vw, 18px);
    color: var(--bone);
    line-height: 1.9;
    letter-spacing: 0.02em;
}
.manifesto-tag {
    display: inline-block;
    color: var(--hot-pink);
    font-family: var(--font-display);
    font-size: 1.05em;
    letter-spacing: 0.1em;
    margin: 0 6px;
}

/* -- Gallery header -- */
.gallery-header {
    padding: clamp(48px, 8vh, 96px) 6vw clamp(24px, 4vh, 48px);
    text-align: left;
    max-width: 1400px;
    margin: 0 auto;
}
.gallery-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    color: var(--neon-cyan);
    font-size: 18px;
    letter-spacing: 0.14em;
    margin-bottom: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(0,240,255,0.5);
}
.gallery-heading {
    font-family: var(--font-pixel);
    font-weight: 400;
    color: var(--bone);
    font-size: clamp(18px, 2.4vw, 32px);
    line-height: 1.3;
    text-shadow: 0 0 10px rgba(255,32,128,0.45);
    margin-bottom: 12px;
}
.gallery-sub {
    color: rgba(224,224,240,0.72);
    font-size: clamp(13px, 0.95vw, 15px);
    max-width: 560px;
}

/* -- Masonry grid -- */
.masonry-gallery { position: relative; z-index: 1; }
.masonry-grid {
    column-count: 3;
    column-gap: 18px;
    padding: 0 6vw clamp(56px, 10vh, 120px);
    max-width: 1400px;
    margin: 0 auto;
}
@media (max-width: 960px) { .masonry-grid { column-count: 2; } }
@media (max-width: 600px) { .masonry-grid { column-count: 1; } }

.tile {
    break-inside: avoid;
    display: block;
    background: rgba(10, 10, 14, 0.78);
    border: 1px solid rgba(255, 32, 128, 0.35);
    padding: 22px 22px 18px;
    margin: 0 0 18px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    opacity: 0;
    transform: translateY(8px);
}
.tile.materialized {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}
.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 50%);
}
.tile-pink   { border-color: var(--hot-pink); box-shadow: 0 0 0 1px rgba(255,32,128,0.20), 0 0 24px rgba(255,32,128,0.12); }
.tile-cyan   { border-color: var(--neon-cyan); box-shadow: 0 0 0 1px rgba(0,240,255,0.20),  0 0 24px rgba(0,240,255,0.12); }
.tile-purple { border-color: var(--neon-purple); box-shadow: 0 0 0 1px rgba(160,32,255,0.22), 0 0 24px rgba(160,32,255,0.14); }

.tile-tall  { /* taller via more content -- masonry handles flow */ }
.tile-wide  { /* wide effect via image-rendering -- still column-based */ }

.tile:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px currentColor,
        0 0 32px rgba(255, 32, 128, 0.30),
        0 0 56px rgba(0, 240, 255, 0.18);
}
.tile.glitching::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg,
            rgba(255, 32, 128, 0.12) 0,
            rgba(255, 32, 128, 0.12) 2px,
            transparent 2px,
            transparent 6px);
    mix-blend-mode: screen;
    animation: tileGlitch 0.28s steps(3) forwards;
}
@keyframes tileGlitch {
    0%   { transform: translate(-3px, 0); opacity: 0.9; }
    33%  { transform: translate( 4px, 1px); opacity: 0.7; }
    66%  { transform: translate(-2px,-1px); opacity: 0.85; }
    100% { transform: translate(0,0); opacity: 0; }
}

.tile-label {
    display: inline-block;
    font-family: var(--font-display);
    color: var(--neon-cyan);
    font-size: 16px;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(0,240,255,0.4);
}
.tile-pink   .tile-label { color: var(--hot-pink); border-bottom-color: rgba(255,32,128,0.45); }
.tile-purple .tile-label { color: var(--neon-purple); border-bottom-color: rgba(160,32,255,0.45); }

.tile-title {
    font-family: var(--font-pixel);
    font-weight: 400;
    color: var(--bone);
    font-size: clamp(13px, 1.05vw, 17px);
    line-height: 1.45;
    margin: 6px 0 12px;
    text-shadow: 0 0 8px rgba(255,32,128,0.30);
}
.tile-cyan   .tile-title { text-shadow: 0 0 8px rgba(0,240,255,0.40); }
.tile-purple .tile-title { text-shadow: 0 0 8px rgba(160,32,255,0.40); }

.tile-body {
    color: rgba(224,224,240,0.85);
    font-size: clamp(12px, 0.9vw, 14px);
    line-height: 1.7;
    margin-bottom: 10px;
}
.tile-body code {
    background: rgba(160, 32, 255, 0.18);
    border: 1px solid rgba(160, 32, 255, 0.4);
    padding: 1px 6px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.tile-code {
    background: rgba(10,10,14,0.85);
    border-left: 2px solid var(--hot-pink);
    padding: 8px 12px;
    margin: 8px 0 12px;
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    font-size: 12.5px;
    overflow-x: auto;
}
.tile-meta {
    display: block;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dotted rgba(224,224,240,0.18);
    font-family: var(--font-display);
    color: rgba(224,224,240,0.55);
    font-size: 14px;
    letter-spacing: 0.08em;
}

/* -- Closing transmission -- */
.closing {
    text-align: center;
    padding: clamp(48px, 10vh, 120px) 6vw;
    border-top: 1px solid rgba(255,32,128,0.25);
}
.closing-line {
    font-family: var(--font-pixel);
    font-weight: 400;
    color: var(--bone);
    font-size: clamp(16px, 2.4vw, 32px);
    letter-spacing: 0.06em;
    text-shadow:
        0 0 14px rgba(0,240,255,0.55),
        0 0 28px rgba(160,32,255,0.40);
    position: relative;
    display: inline-block;
}
.closing-line::before,
.closing-line::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    overflow: hidden;
}
.closing-line::before {
    color: var(--hot-pink);
    transform: translate(-2px, 0);
    mix-blend-mode: screen;
    animation: closingR 2.6s steps(6) infinite;
}
.closing-line::after {
    color: var(--neon-cyan);
    transform: translate( 2px, 0);
    mix-blend-mode: screen;
    animation: closingB 2.6s steps(6) infinite reverse;
}
@keyframes closingR {
    0%, 90%, 100% { clip-path: inset(0 0 100% 0); }
    93%           { clip-path: inset(20% 0 60% 0); }
    96%           { clip-path: inset(60% 0 10% 0); }
}
@keyframes closingB {
    0%, 90%, 100% { clip-path: inset(0 0 100% 0); }
    93%           { clip-path: inset(50% 0 20% 0); }
    96%           { clip-path: inset(10% 0 70% 0); }
}
.closing-sub {
    margin-top: 16px;
    color: rgba(224,224,240,0.55);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* -- Footer -- */
.site-footer {
    padding: 28px 6vw 36px;
    border-top: 1px dashed rgba(0,240,255,0.25);
    background: rgba(10,10,14,0.85);
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    font-family: var(--font-display);
    color: var(--neon-cyan);
    font-size: 16px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}
.footer-cell { color: rgba(0,240,255,0.85); }
.footer-cell:nth-child(2) { color: rgba(255,32,128,0.85); }
.footer-cell:nth-child(3) { color: rgba(160,32,255,0.85); }
.footer-bar {
    margin-top: 14px;
    height: 4px;
    background: linear-gradient(90deg,
        var(--hot-pink),
        var(--neon-purple),
        var(--neon-cyan),
        var(--hot-pink));
    background-size: 200% 100%;
    animation: barFlow 6s linear infinite;
    opacity: 0.7;
}
@keyframes barFlow {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* -- Reduce motion -- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
