#preloader {
    position: fixed;
    inset: 0;

    z-index: 99999;

    background: #000;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        opacity .9s ease,
        visibility .9s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    width: min(420px, 84vw);

    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-text {
    margin-bottom: 24px;

    font-size: clamp(.9rem, 1.5vw, 1rem);

    letter-spacing: .26em;

    text-transform: lowercase;

    background:
        linear-gradient(90deg,
            #00f0ff,
            #00a2ff,
            #7a5cff,
            #ff00aa,
            #ff4fd8,
            #00f0ff);

    background-size: 300% 300%;

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;

    animation:
        gradientFlow 6s linear infinite,
        loaderAppear 1s ease forwards;

    opacity: 0;
    transform: translateY(12px);
}

/* material style progress */

.progress {
    position: relative;

    width: 100%;
    height: 5px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, .06);
}

.progress-bar {
    position: absolute;
    inset: 0 auto 0 0;

    width: 0%;

    border-radius: inherit;

    background:
        linear-gradient(90deg,
            #00f0ff,
            #00a2ff,
            #7a5cff,
            #ff00aa,
            #ff4fd8);

    background-size: 300% 300%;

    box-shadow:
        0 0 12px rgba(0, 240, 255, .35),
        0 0 18px rgba(255, 0, 170, .22);

    transition:
        width .25s cubic-bezier(.4, 0, .2, 1);

    animation:
        gradientFlow 5s linear infinite;
}

/* =========================================
   TERMINAL LOGS
========================================= */

.terminal {
    position: relative;

    width: 100%;

    margin-top: 22px;

    padding: 14px 16px;

    border-radius: 16px;

    background:
        rgba(255, 255, 255, .025);

    border:
        1px solid rgba(255, 255, 255, .06);

    overflow: hidden;

    max-height: 140px;

    backdrop-filter: blur(10px);
}

.terminal::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(transparent,
            rgba(255, 255, 255, .015));

    pointer-events: none;
}

.terminal-line {
    position: relative;

    font-family:
        Consolas,
        monospace;

    font-size: .7rem;

    line-height: 1.55;

    letter-spacing: .03em;

    color:
        rgba(255, 255, 255, .78);

    opacity: 0;

    transform:
        translateY(6px);

    filter:
        blur(4px);

    animation:
        terminalReveal .55s ease forwards;
}

/* stagger */

.terminal-line:nth-child(1) {
    animation-delay: .15s;
}

.terminal-line:nth-child(2) {
    animation-delay: .35s;
}

.terminal-line:nth-child(3) {
    animation-delay: .55s;
}

.terminal-line:nth-child(4) {
    animation-delay: .75s;
}

.terminal-line:nth-child(5) {
    animation-delay: .95s;
}

.terminal-line:nth-child(6) {
    animation-delay: 1.15s;
}

.terminal-line:nth-child(7) {
    animation-delay: 1.35s;
}

.terminal-line:nth-child(8) {
    animation-delay: 1.55s;
}

.terminal-line:nth-child(9) {
    animation-delay: 1.75s;
}

.terminal-line:nth-child(10) {
    animation-delay: 1.95s;
}

/* cursor */

.terminal::after {
    content: "_";

    position: absolute;

    right: 16px;
    bottom: 10px;

    color:
        rgba(255, 255, 255, .75);

    font-family:
        Consolas,
        monospace;

    animation:
        terminalCursor .8s infinite;
}

/* animations */

@keyframes terminalReveal {

    0% {
        opacity: 0;

        transform:
            translateY(6px);

        filter:
            blur(4px);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0);

        filter:
            blur(0);
    }
}

@keyframes terminalCursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* mobile */

@media (max-width:640px) {

    .terminal {
        margin-top: 18px;

        padding: 12px 13px;

        max-height: 120px;
    }

    .terminal-line {
        font-size: .62rem;
    }
}

/* ================= GALLERY ================= */

.gallery-title {
    color: #fff;
    margin-top: 30px;
    letter-spacing: .3em;
}

.gallery {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    width: min(600px, 90vw);
}

.g-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
}

.g-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
    transition: .25s;
}

.g-item::after {
    content: "🔍";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    background: rgba(0, 0, 0, .4);
    transition: .25s;
}

.g-item:hover img {
    filter: brightness(.6);
}

.g-item:hover::after {
    opacity: 1;
}

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.modal.open {
    display: flex;
}

.modal-box {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.modal-box img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
}

.close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}