/* Global Refsets & Variables */
:root {
    --bg-color: #0f172a;
    /* Slate 900 */
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --text-color: #f8fafc;
    --accent-color: #38bdf8;
    /* Sky 400 */
    --teal-accent: #2dd4bf;
    /* Teal 400 */
    --status-color: #6366F1;
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Courier Prime', monospace;
    /* Typewriter font */
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-color);
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent scrollbars from floating elements */
    position: relative;
    /* Center everything relative to the viewport first */
    align-items: center;
    justify-content: center;
}

/* Subtle background noise */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* --- Header Section --- */
.header {
    position: absolute;
    top: 2rem;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    z-index: 10;
    pointer-events: none;
}

.logo-wrapper {
    pointer-events: auto;
}

.logo {
    width: 250px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(45, 212, 191, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    /* Subtle pop on hover */
}

/* Rotating Build Status Container */
.build-status-container {
    pointer-events: auto;
    height: 1.9em;
    position: relative;
    width: 300px;
    text-align: left;
    margin-top: 0;
    overflow: hidden;
}

/* Individual status items */
.status-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    height: 1.9em;
    color: var(--status-color);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(100%);
    animation: statusCycle 6s ease-in-out infinite;
}

.status-item:nth-child(1) {
    animation-delay: 0s;
}

.status-item:nth-child(2) {
    animation-delay: 2s;
}

.status-item:nth-child(3) {
    animation-delay: 4s;
}

.status-icon {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

@keyframes statusCycle {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

    8% {
        opacity: 1;
        transform: translateY(0);
    }

    28% {
        opacity: 1;
        transform: translateY(0);
    }

    36% {
        opacity: 0;
        transform: translateY(-100%);
    }

    100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* --- Main Content (Centered) --- */
.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically centered */
    align-items: center;
    text-align: center;
    z-index: 5;
    /* Position slightly above absolute center */
    padding-bottom: 25vh;
    /* Push up to leave room for floating text below */
    position: relative;
    width: 100%;
    max-width: 90vw;
}

/* Typewriter Motto */
.motto-container {
    font-family: var(--font-mono);
    font-size: clamp(0.78rem, 2vw, 1.75rem);
    color: #c5d2d9;
    letter-spacing: 0.02em;
    line-height: 1.4;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.motto-line {
    display: block;
    color: #c5d2d9;
    white-space: nowrap;
    overflow: hidden;
    min-height: 1.45em;
}

.motto-line.is-typing::after {
    content: "_";
    display: inline-block;
    margin-left: 0.08em;
    color: #c5d2d9;
    animation: caretBlink 0.9s steps(1, end) infinite;
}

@keyframes caretBlink {
    0%,
    49% {
        opacity: 1;
    }

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

/* Color Classes for Motto */
.be {
    color: var(--accent-color);
    /* Sky Blue */
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.shera {
    color: #4f46e5;
    /* Indigo/Dark Blue that pops on dark bg */
    text-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

/* --- Floating Elements Animation --- */
#floating-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Full screen overlay */
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.float-word {
    position: absolute;
    bottom: -50px;
    /* Start below screen */
    color: rgba(255, 255, 255, 0.5);
    /* Slightly lower base opacity since they are larger */
    font-family: var(--font-main);
    font-weight: 300;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    /* Dark shadow for contrast */
    opacity: 0;
    padding: 0.5rem 1rem;
    /* Add padding as requested */
    border-radius: 8px;
    white-space: nowrap;
    will-change: transform, opacity;
    animation: flowUp 8s linear infinite;
    /* Faster base speed (was 12s) */
    /* Ensure text doesn't select/interfere */
    user-select: none;
    pointer-events: none;
}

/* Base Keyframe for upward movement + horizontal drift */
@keyframes flowUpLeft {
    0% {
        transform: translate(0, 0) scale(0.9);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translate(-2vw, -5vh) scale(1);
    }

    50% {
        opacity: 0.9;
        transform: translate(-8vw, -25vh);
        /* Drift Left */
    }

    85% {
        opacity: 0;
        transform: translate(-12vw, -45vh) scale(1.05);
        /* Fade out */
    }

    100% {
        opacity: 0;
        transform: translate(-15vw, -50vh);
    }
}

@keyframes flowUpRight {
    0% {
        transform: translate(0, 0) scale(0.9);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translate(2vw, -5vh) scale(1);
    }

    50% {
        opacity: 0.9;
        transform: translate(8vw, -25vh);
        /* Drift Right */
    }

    85% {
        opacity: 0;
        transform: translate(12vw, -45vh) scale(1.05);
        /* Fade out */
    }

    100% {
        opacity: 0;
        transform: translate(15vw, -50vh);
    }
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .header {
        padding: 1.25rem;
        top: 0.8rem;
        align-items: center;
    }

    .logo {
        width: min(40vw, 180px);
    }

    .build-status-container {
        margin-left: 1rem;
        width: 250px;
    }

    .status-item {
        justify-content: flex-end;
        font-size: 0.9rem;
    }

    .motto-container {
        font-size: clamp(0.8rem, 3vw, 1.4rem);
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .status-item {
        font-size: 0.78rem;
        letter-spacing: 0.01em;
    }

    .status-icon {
        width: 20px;
        height: 20px;
    }

    .build-status-container {
        width: 210px;
    }

    .motto-container {
        font-size: clamp(0.72rem, 3.4vw, 1.15rem);
    }
}
