
/* =================================
   PREMIUM POLISHING SYSTEM
================================= */


/* 01. ACCESSIBILITY */

.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;
    z-index: 20000;
    padding: 12px 20px;
    background: #8B5CF6;
    color: white;
    border-radius: 8px;
}

.skip-link:focus {
    top: 15px;
}


/* 02. PREMIUM LOADING SCREEN */

.page-loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 15000;
    background: #08090D;
    align-items: center;
    justify-content: center;
}

.page-loader.is-loading {
    display: flex;
    animation: loader-safety 0.4s 3s forwards;
}

.page-loader.loader-exit {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.loader-content {
    width: min(80%, 280px);
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
}

.loader-logo span {
    color: #8B5CF6;
}

.loader-ring {
    width: 65px;
    height: 65px;
    margin: 0 auto 30px;
    border: 3px solid rgba(139, 92, 246, 0.12);
    border-top-color: #8B5CF6;
    border-right-color: #22D3EE;
    border-radius: 50%;
    animation: loader-spin 0.9s linear infinite;
}

.loader-content p {
    color: #94A3B8;
    font-family: var(--font-code);
    font-size: 10px;
    letter-spacing: 3px;
}

.loader-track {
    height: 3px;
    margin-top: 25px;
    border-radius: 10px;
    background: #27272A;
    overflow: hidden;
}

.loader-fill {
    width: 45%;
    height: 100%;
    background: var(--gradient);
    animation: loader-slide 1s ease-in-out infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loader-slide {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(320%);
    }
}

@keyframes loader-safety {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}


/* 03. SCROLL PROGRESS INDICATOR */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 2000;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--gradient);
    box-shadow: 0 0 12px #8B5CF6;
    pointer-events: none;
}


/* 04. MOUSE SPOTLIGHT */

#mouse-spotlight {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: radial-gradient(
        450px circle at var(--mouse-x, -500px)
        var(--mouse-y, -500px),
        rgba(139, 92, 246, 0.07),
        transparent 80%
    );
}


/* 05. 3D CARD TILT */

.tilt-enabled {
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
}

.tilt-enabled.is-tilting {
    transform:
        perspective(1000px)
        rotateX(var(--tilt-x, 0deg))
        rotateY(var(--tilt-y, 0deg))
        translateY(-4px);
}


/* 06. CARD SPOTLIGHT */

.bento-card,
.skill-card,
.project-card,
.certificate-card,
.github-repo-card,
.blog-card {
    position: relative;
    isolation: isolate;
}

.card-spotlight {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;

    background: radial-gradient(
        250px circle at var(--card-x, -300px)
        var(--card-y, -300px),
        rgba(139, 92, 246, 0.16),
        transparent 80%
    );

    opacity: 0;
    transition: opacity 0.3s;
}

.tilt-enabled:hover .card-spotlight {
    opacity: 1;
}


/* 07. FLOATING WHATSAPP BUTTON */

.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 25px;
    z-index: 950;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    background: #128C4A;
    color: white;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;

    font-size: 30px;

    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.25);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(37, 211, 102, 0.4);
}

.whatsapp-tooltip {
    position: absolute;
    right: 68px;

    padding: 9px 14px;
    background: #181821;
    border: 1px solid #27272A;
    border-radius: 8px;

    color: white;
    font-size: 12px;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus-visible .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}


/* 08. WHATSAPP CONTACT BUTTON */

.contact-submit {
    background: linear-gradient(
        135deg,
        #15803D,
        #128C4A
    );

    box-shadow: 0 5px 25px rgba(34, 197, 94, 0.15);
}

.contact-submit:hover {
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}


/* 09. GENERAL POLISH */

html {
    scroll-padding-top: 10px;
}

img {
    height: auto;
}

button:disabled {
    opacity: 0.6;
}

.form-group input,
.form-group textarea {
    cursor: text !important;
}


/* 10. MOBILE RESPONSIVENESS */

@media (max-width: 768px) {

    .whatsapp-float {
        right: 15px;
        bottom: 70px;
        width: 48px;
        height: 48px;
        font-size: 26px;
        border-radius: 14px;
    }

    #mouse-spotlight {
        display: none;
    }

    .whatsapp-tooltip {
        display: none;
    }

}


/* 11. TOUCH DEVICES */

@media (hover: none), (pointer: coarse) {

    #mouse-spotlight,
    .card-spotlight {
        display: none;
    }

    .tilt-enabled {
        transform: none !important;
    }

}


/* 12. REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .page-loader,
    #mouse-spotlight,
    .card-spotlight {
        display: none !important;
    }

    .tilt-enabled {
        transform: none !important;
    }

    .whatsapp-float:hover {
        transform: none;
    }

}
/* Hero name visibility fix */

.hero h1 span {
    color: #A78BFA;
    -webkit-text-fill-color: #A78BFA;
    background: none;
}

.gradient-text {
    color: #A78BFA;
    -webkit-text-fill-color: #A78BFA;
    background: none;
}