body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f7f6f3;
    /* Dirty White / Off-White */
    color: #1e293b;
    overflow-x: hidden;
    position: relative;
}

/* --- ENHANCED BACKGROUND EFFECTS --- */

/* Interactive Spot Light Follower */
.cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.08), transparent 80%);
    transition: background 0.15s ease-out;
}

/* Ambient Glowing Background Orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: -3;
    pointer-events: none;
    will-change: transform;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: #38bdf8;
    top: -100px;
    left: -100px;
    animation: float-1 18s ease-in-out infinite alternate;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #818cf8;
    top: 35%;
    right: -150px;
    animation: float-2 22s ease-in-out infinite alternate;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #34d399;
    bottom: 5%;
    left: -100px;
    animation: float-3 20s ease-in-out infinite alternate;
}

@keyframes float-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(120px, 80px) scale(1.15);
    }
}

@keyframes float-2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-100px, 120px) scale(1.1);
    }
}

@keyframes float-3 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(80px, -100px) scale(1.2);
    }
}

/* Faint Tech Grid Pattern */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(203, 213, 225, 0.25) 0%, rgba(247, 246, 243, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* --- CARD & UI EFFECTS --- */

.cream-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.cream-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transition: left 0.8s ease;
    pointer-events: none;
}

.cream-card:hover::before {
    left: 150%;
}

.cream-card-hover:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-8px) scale(1.015) !important;
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.12), 0 8px 18px rgba(0, 0, 0, 0.08) !important;
}

.gradient-text {
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Blink Shiny Green Badge */
@keyframes shiny-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 12px 4px rgba(34, 197, 94, 0.6);
    }
}

.shiny-green-badge {
    animation: shiny-pulse 2s infinite;
}

/* Scroll Reveal Effect Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.skill-tag {
    background-color: #f1f5f9;
    color: #334155;
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}


.tech-tag {
    font-size: 11px;
    background-color: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

nav a {
    transition: 0.3s ease;
}

nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

button,
a {
    transition: all 0.3s ease;
}

a:active,
button:active {
    transform: scale(0.97);
}

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

::-webkit-scrollbar-track {
    background: #f7f6f3;
}

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

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

/* Chat Typing Indicator Dots */
.typing-dot {
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

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

    40% {
        transform: scale(1);
    }
}

/* Maximized state for chatbot window */
/* Maximized state: anchored at bottom-right, expanded dimensions */
#chat-window {
    /* Limit transition strictly to dimensions for a cleaner collapse */
    transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1),
        height 300ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#chat-window.maximized {
    width: 650px !important;
    max-width: 90vw !important;
    height: 80vh !important;
    max-height: 800px !important;
}

#chat-toggle-wrapper:hover #chat-tooltip {
    opacity: 1;
    transform: translateX(0);

}

/* Smooth accordion expansion transition */
details summary::-webkit-details-marker {
    display: none;
    /* Hide default browser arrow */
}

details[open] summary~div {
    animation: accordion-down 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes accordion-down {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

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