/* 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 */
    --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%;
    /* Extend full width */
    display: flex;
    justify-content: center;
    /* Bring items to center */
    gap: 40rem;
    /* Increased spacing as requested, but kept within screen bounds */
    align-items: center;
    z-index: 10;
    pointer-events: none;
    /* Let background interaction pass */
}

.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.8em;
    overflow: hidden;
    position: relative;
    width: 260px;
    text-align: left;
    /* Reset to left for grouped layout */
    margin-top: 0.5rem;
    /* Visual alignment */
}

/* Individual status items */
.status-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align left */
    gap: 0.5rem;
    height: 1.8em;
    color: var(--teal-accent);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    position: absolute;
    left: 0;
    /* Align left inside container */
    top: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
}

.status-item svg {
    /* Ensure svg icon inside status item is sized correctly and visible */
    width: 24px;
    height: 24px;
    fill: var(--teal-accent);
    display: block;
}

/* Animation for Android (Item 1) */
.status-item:nth-child(1) {
    animation: cycleOne 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Animation for iPhone (Item 2) */
.status-item:nth-child(2) {
    animation: cycleTwo 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes cycleOne {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    /* Enter from bottom */
    10% {
        opacity: 1;
        transform: translateY(0);
    }

    /* Fully visible */
    45% {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stay visible */
    50% {
        opacity: 0;
        transform: translateY(-20px);
    }

    /* Exit to top */
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }

    /* Stay hidden */
}

@keyframes cycleTwo {

    0%,
    50% {
        opacity: 0;
        transform: translateY(20px);
    }

    /* Wait hidden at bottom */
    60% {
        opacity: 1;
        transform: translateY(0);
    }

    /* Enter and become visible */
    95% {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stay visible */
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }

    /* Exit to top */
}

/* --- 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: 1.75rem;
    /* Larger */
    color: var(--text-color);
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    /* Start width 0 */
    margin: 0 auto;
    /* Center block */
    animation:
        typing 4s steps(50, end) 0.5s forwards;
    /* No blink-caret animation */
}

/* 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);
    }
}

/* --- Keyframes --- */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .header {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        padding: 2rem;
        flex-direction: column;
        /* Stack logo and status on mobile */
        align-items: center;
        gap: 1.5rem;
    }

    .build-status-container {
        width: 100%;
        text-align: center;
        margin-top: 0;
        display: flex;
        justify-content: center;
    }

    .status-item {
        justify-content: center;
        /* Center align on mobile */
        position: absolute;
        width: 100%;
        left: 0;
    }

    .motto-container {
        font-size: 1.25rem;
        white-space: normal;
        text-align: center;
        animation: fadeIn 2s ease forwards;
        width: 100%;
        max-width: 400px;
        margin-top: 2rem;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}