/* Base Styles */
body {
    font-family: var(--font-family);
    background: #000000;
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Mouse-Interactive Glow Background */
.glow-cursor {
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transition: top 0.15s ease-out;
    filter: blur(120px);
    top: 0;
}

.glow-cursor-left {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.6) 0%, rgba(6, 182, 212, 0.3) 40%, rgba(6, 182, 212, 0) 70%);
    left: -400px;
}

.glow-cursor-right {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.6) 0%, rgba(16, 185, 129, 0.3) 40%, rgba(16, 185, 129, 0) 70%);
    right: -400px;
}

/* Ensure content is above glow */
main,
section,
header,
footer {
    position: relative;
    z-index: 1;
}

/* Mobile responsive glow - CSS-only animated */
@media (max-width: 768px) {

    /* Hide JS-based glow on mobile */
    .glow-cursor {
        display: none !important;
    }

    /* Add CSS-only glow for mobile */
    body::before,
    body::after {
        content: '';
        position: fixed;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        filter: blur(100px);
        opacity: 0.4;
        z-index: 0;
        pointer-events: none;
    }

    body::before {
        background: radial-gradient(circle, rgba(6, 182, 212, 1) 0%, rgba(6, 182, 212, 0.6) 40%, rgba(6, 182, 212, 0) 70%);
        top: 10%;
        left: -200px;
        animation: float-mobile-1 20s ease-in-out infinite;
    }

    body::after {
        background: radial-gradient(circle, rgba(16, 185, 129, 1) 0%, rgba(16, 185, 129, 0.6) 40%, rgba(16, 185, 129, 0) 70%);
        bottom: 20%;
        right: -200px;
        animation: float-mobile-2 25s ease-in-out infinite;
    }
}

@keyframes float-mobile-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, 50px) scale(1.1);
    }

    50% {
        transform: translate(50px, -30px) scale(0.9);
    }

    75% {
        transform: translate(-20px, 40px) scale(1.05);
    }
}

@keyframes float-mobile-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-40px, -30px) scale(1.08);
    }

    50% {
        transform: translate(-30px, 40px) scale(0.95);
    }

    75% {
        transform: translate(30px, -40px) scale(1.03);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
}

/* Links */
a {
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

/* Selection */
::selection {
    background-color: var(--color-accent);
    color: #000000;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-hover);
}

/* =========================================================================
   MOBILE SAFETY NET & GLOBAL RESPONSIVE RESET 
   ========================================================================= */

html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, a, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive Media Default */
img, video, iframe {
    max-width: 100% !important;
    height: auto;
}

/* Fix Input Overflows on Mobile */
input, select, textarea, button {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Hamburger Nav Overflow Safety */
@media (max-width: 768px) {
    .nav__list {
        max-height: 85vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}