@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

*{margin:0;padding:0;box-sizing:border-box}

body{
    background:#0b0b0d;
    color:#e5e5e5;
    font-family:Inter,system-ui,sans-serif;
    height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

/* container that should not exist */
[node-core]{
    text-align:center;
    width:100vw;
    padding:20px;
    opacity:0;
    animation:fade 1.4s ease forwards .3s;
}

/* identity */
core-id{
    display:block;
    font-size:4rem;
    letter-spacing:.25em;
    font-weight:600;
    position:relative;
}

/* split layers */
core-id::before,
core-id::after{
    content:attr(data-id);
    position:absolute;
    inset:0;
    overflow:hidden;
    opacity:0;
}

core-id::before{color:#8b0000}
core-id::after{color:#fff}

/* corruption state */
.glitch::before{
    animation:gTop .4s linear;
    opacity:.8;
}
.glitch::after{
    animation:gBot .4s linear;
    opacity:.6;
}

@keyframes gTop{
    0%{clip-path:inset(0 0 80% 0);transform:translate(-2px,-2px)}
    50%{clip-path:inset(0 0 20% 0);transform:translate(2px,0)}
    100%{clip-path:inset(0 0 80% 0);transform:none}
}
@keyframes gBot{
    0%{clip-path:inset(80% 0 0 0);transform:translate(2px,2px)}
    50%{clip-path:inset(20% 0 0 0);transform:translate(-2px,0)}
    100%{clip-path:inset(80% 0 0 0);transform:none}
}

/* divider */
x-divider{
    display:block;
    width:60px;
    height:2px;
    background:#8b0000;
    margin:22px auto;
    opacity:.7;
}

/* fragments */
[frag]{
    font-size:.95rem;
    line-height:1.6;
    color:#9a9a9a;
}

/* status */
status-node{
    display:block;
    margin-top:30px;
    font-size:.8rem;
    color:#555;
}
status-node::before{
    content:"● ";
    color:#8b0000;
}
body::before{
    content:"";
    position:fixed;
    inset:-50px;
    background:
        radial-gradient(
            600px circle at var(--mx,50%) var(--my,50%),
            rgba(139,0,0,0.06),
            transparent 60%
        );
    pointer-events:none;
    transition:background-position .15s linear;
}

core-id{
    transition: transform .15s ease-out;
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    background:
        url("/assets/bg.jpg") center/cover no-repeat;
    opacity:0.18;
    filter: blur(8px) contrast(1.2) saturate(.7);
    pointer-events:none;

    /* reveal mask */
    mask-image: radial-gradient(
        220px circle at var(--mx,50%) var(--my,50%),
        rgba(0,0,0,.85) 0%,
        rgba(0,0,0,.4) 40%,
        transparent 65%
    );
    -webkit-mask-image: radial-gradient(
        220px circle at var(--mx,50%) var(--my,50%),
        rgba(0,0,0,.85) 0%,
        rgba(0,0,0,.4) 40%,
        transparent 65%
    );

    transition: opacity .3s ease;
}

/* observer dormant */
body:not(.seen)::after{
    opacity:0;
}


.node[data-active="true"]{
    box-shadow:0 0 0 1px rgba(139,0,0,.25);
}
status-node {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

status-node .cycle {
    font-size: 0.7em;
    opacity: 0.45;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#node-input{
    background:transparent;
    border:1px solid rgba(255,255,255,0.08);
    color:#e5e5e5;
    font-family:inherit;
    padding:6px 8px;
    width:220px;

    opacity:.15;
    transition:
        opacity .4s ease,
        border-color .4s ease,
        box-shadow .4s ease;
}

#node-input.pulse{
    opacity:.35;
    border-color:rgba(139,0,0,.35);
}

#node-input.active{
    opacity:.85;
    border-color:#8b0000;
    box-shadow:0 0 0 1px rgba(139,0,0,.35);
}

#node-input:focus{
    outline:none;
}

@keyframes fadeIn{
    from{opacity:0;transform:translateY(4px)}
    to{opacity:1;transform:none}
}

@keyframes fade{to{opacity:1}}

#archive {
    position: relative;
    width: 80%;
    height: 180px;
    overflow: hidden;
    background: transparent;
    margin: auto;
}

.node {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 450px;
    padding: 16px;

    background: transparent;
}

.node::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.02) 0px,
        rgba(255,255,255,0.02) 1px,
        transparent 2px,
        transparent 4px
    );

    opacity: 0.15;
    mix-blend-mode: overlay;
}

.node.flicker {
    animation: tvFlicker 2.8s infinite;
}
.flicker-strong {
    animation-duration: 1.6s;
    filter: brightness(1.15);
    color: #8b0000;
}

@keyframes tvFlicker {
    0% {
        background-color: rgba(139, 0, 0, 0);
        box-shadow: none;
        filter: brightness(1);
    }

    5% {
        background-color: rgba(139, 0, 0, 0.04);
        filter: brightness(1.05);
    }

    12% {
        background-color: rgba(139, 0, 0, 0);
        filter: brightness(0.95);
    }

    18% {
        background-color: rgba(139, 0, 0, 0.07);
        filter: brightness(1.08);
    }

    25% {
        background-color: rgba(139, 0, 0, 0);
        filter: brightness(0.9);
    }

    33% {
        background-color: rgba(139, 0, 0, 0.03);
        box-shadow: inset 0 0 12px rgba(139, 0, 0, 0.25);
        filter: brightness(1.02);
    }

    41% {
        background-color: rgba(139, 0, 0, 0);
        filter: brightness(0.85);
    }

    52% {
        background-color: rgba(139, 0, 0, 0.09);
        filter: brightness(1.1);
    }

    60% {
        background-color: rgba(139, 0, 0, 0);
        filter: brightness(0.9);
    }

    73% {
        background-color: rgba(139, 0, 0, 0.05);
        filter: brightness(1.03);
    }

    100% {
        background-color: rgba(139, 0, 0, 0);
        box-shadow: none;
        filter: brightness(1);
    }
    
}

@media (max-width: 480px) { 
    #archive { 
        width: 100%; 
    } 
}







