/* Base Colors & Variables */
:root {
    /* Default to Light/Blue Theme */
    --bg-color: #ffffff;
    /* White */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.6);
    --accent-blue: #3b82f6;
    /* Blue 500 (Bright) */
    --accent-ocean: #0ea5e9;
    /* Sky 500 (Ocean) */
}

/* Dark Mode Overrides (Optional/Legacy support) */
html.dark {
    --bg-color: #0f172a;
    /* Slate 900 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.3s ease;
    font-family: 'Inter', sans-serif;
    /* Setup font in HTML */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* New Liquid/Blurry Icon */
.liquid-icon {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-ocean));
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Loading Screen Animation */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #ffffff, #e0f2fe);
    /* White to Light Blue */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Fast Blurry Stationaries */
.stationary-item {
    position: absolute;
    font-size: 5rem;
    opacity: 0;
    filter: blur(8px);
    animation: fast-blur-fly 3s linear infinite;
}

@keyframes fast-blur-fly {
    0% {
        transform: translateY(120vh) scale(0.8) rotate(0deg);
        filter: blur(10px);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
        filter: blur(4px);
    }

    50% {
        filter: blur(0px);
        /* Moment of clarity */
        transform: translateY(0vh) scale(1.2) rotate(10deg);
    }

    80% {
        opacity: 0.8;
        filter: blur(4px);
    }

    100% {
        transform: translateY(-120vh) scale(1.5) rotate(20deg);
        filter: blur(10px);
        opacity: 0;
    }
}

.loading-text {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #2563eb, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 10;
    position: relative;
    letter-spacing: -0.05em;
    animation: pulse-text 2s infinite ease-in-out;
}

@keyframes pulse-text {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Light / "Liquid Glass" Theme */
html.light {
    --bg-color: #f3f4f6;
    /* Gray 100 */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --card-bg: rgba(255, 255, 255, 0.6);
    /* Translucent White */
    --card-border: rgba(255, 255, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.3s ease;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Liquid Glass Effect for Keys/Icons */
.liquid-icon {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

/* Loading Screen Animation */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

.floating-item {
    position: absolute;
    font-size: 3rem;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.item-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

/* Calendar */
.item-2 {
    top: 70%;
    left: 80%;
    animation-delay: 1s;
}

/* Pencil */
.item-3 {
    top: 15%;
    left: 75%;
    animation-delay: 0.5s;
}

/* Phone */
.item-4 {
    top: 80%;
    left: 15%;
    animation-delay: 1.5s;
}

/* Mail */

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.liquid-center {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1) 60%, rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
    animation: pulse-liquid 3s infinite;
}

@keyframes pulse-liquid {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}