/* ==========================================================================
   TUI Animations & ASCII Art Components
   ========================================================================== */

/* --- Keyframe Definitions --- */
@keyframes revealArt {
    to {
        height: 138px;
    }
}

@keyframes fadeInBorder {
    to {
        border-color: var(--border) !important;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 3px var(--green);
    }

    50% {
        text-shadow: 0 0 10px var(--green);
    }
}

@keyframes jitter {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(5px, -5px);
    }

    50% {
        transform: translate(-5px, 5px);
    }

    75% {
        transform: translate(5px, 5px);
    }
}

@keyframes jitter1 {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(3px, -3px);
    }

    20% {
        transform: translate(-4px, 4px);
    }

    30% {
        transform: translate(5px, -5px);
    }

    40% {
        transform: translate(-5px, 5px);
    }

    50% {
        transform: translate(4px, 4px);
    }

    60% {
        transform: translate(-3px, -3px);
    }

    70% {
        transform: translate(5px, 2px);
    }

    80% {
        transform: translate(-4px, -5px);
    }

    90% {
        transform: translate(2px, 5px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* --- Splash Screen Specific ASCII Styles --- */
.splash-screen .ascii-art {
    color: var(--muted) !important;
    background-color: var(--background) !important;
    border-color: transparent !important;
    height: 0;
    overflow: hidden;
    animation: revealArt 0.8s steps(15, end) forwards, fadeInBorder 0.2s ease-in 0.6s forwards;
}

/* --- Splash Screen Layout --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    padding: 1rem;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: var(--background);
    z-index: 9999;
    animation: fadeOut 0.1s ease-out 1s forwards;
}

.splash-screen .container,
.splash-screen header,
.splash-screen .tui-panel,
.splash-screen .tui-panel-header {
    background-color: transparent !important;
    color: transparent !important;
    border-color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.splash-screen header {
    visibility: hidden;
}

/* --- Main Hero ASCII Art --- */
.ascii-art {
    font-family: 'Fira Code', monospace;
    white-space: pre;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.0;
    text-align: left;
    padding: 1rem;
    border: 1px solid var(--border);
    background-color: var(--background);
    border-radius: 4px;
    overflow-x: auto;
    flex-shrink: 0;
    overflow-wrap: normal;
    word-break: normal;
    transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.ascii-art:hover {
    animation: glow 1.5s ease-in-out forwards, jitter 0.5s infinite;
    animation-delay: 0s, 1.5s;
    animation-fill-mode: forwards, none;
}

/* --- Portfolio ASCII Art --- */
.portfolio-ascii-art {
    color: var(--muted);
    font-family: 'Fira Code', monospace;
    line-height: 1.2;
    text-align: center;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 1rem;
    white-space: pre;
    overflow: hidden;
    font-size: 1.9vw;
    transition: color 0.5s ease-in-out;
}

.portfolio-ascii-art:hover {
    color: var(--green);
    animation: jitter1 0.5s infinite;
}