/* ============================================================
   ULTRA PREMIUM 2026 AI ENGINEER AESTHETICS
   ============================================================ */

/* --- 1. Custom Magic Cursor --- */
body {
    cursor: none;
    /* Hide default cursor */
}

.magic-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--first-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.magic-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(var(--first-hue), var(--sat), var(--lig), 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, transform 0.1s ease-out;
    box-shadow: 0 0 15px rgba(var(--first-hue), 80%, 60%, 0.2);
}

.magic-cursor.hover {
    width: 12px;
    height: 12px;
    background-color: #fff;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--first-color);
}

.magic-cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: var(--first-color);
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
}

/* --- 2. Interactive Neural Background --- */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    /* Let clicks pass through to elements */
}

.home__container,
.about__container,
.skills__container,
.services__container,
.contact__container {
    position: relative;
    z-index: 2;
    /* Ensure content is above particles */
}

/* --- 3. Glassmorphism 2.0 (Premium Cards) --- */
.about__box,
.services__card,
.ai-tool-card,
.skill__icon-card,
.contact__card,
.contact__content form {
    background: rgba(20, 25, 40, 0.4) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

/* Inner glow effect on hover */
.about__box:hover,
.services__card:hover,
.ai-tool-card:hover,
.skill__icon-card:hover,
.contact__card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    border-color: rgba(var(--first-hue), 80%, 60%, 0.4) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(var(--first-hue), 80%, 60%, 0.1) !important;
}

/* Add a subtle top highlight to cards */
.about__box::before,
.services__card::before,
.ai-tool-card::before,
.contact__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    z-index: 1;
}

/* --- 4. Magnetic Buttons & Neon Glows --- */
body .button {
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(var(--first-hue), 80%, 60%, 0.8) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 15px rgba(var(--first-hue), 80%, 60%, 0.4);
    color: #fff !important;
    /* Force white text for contrast */
}

body .button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
    z-index: -1;
    pointer-events: none;
}

body .button:hover::after {
    opacity: 1;
    transform: scale(1);
}

body .button--ghost {
    background: transparent !important;
    border: 1px solid var(--first-color) !important;
    box-shadow: none;
    color: #fff !important;
    /* Force white text for contrast */
}

body .button--ghost:hover {
    background: rgba(var(--first-hue), 80%, 60%, 0.1) !important;
    box-shadow: 0 0 20px rgba(var(--first-hue), 80%, 60%, 0.2) !important;
}

/* --- 5. Terminal Typing Effect Styles --- */
.terminal-text {
    font-family: 'Fira Code', monospace;
    color: #4ade80;
    /* Matrix green or theme color */
    font-size: var(--small-font-size);
    display: inline-block;
    min-height: 1.5em;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: #4ade80;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
    margin-left: 4px;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- 6. Breathing Hero Portrait Glow --- */
.home__handle {
    position: relative;
    z-index: 1;
}

/* --- 7. Premium Contact Form Redesign --- */
.contact__content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
}

.contact__form {
    padding: 2rem;
    border-radius: 1.5rem;
}

.contact__form-div {
    position: relative;
    margin-bottom: 2rem;
    height: auto;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

body .contact__form-input {
    position: relative;
    width: 100%;
    background: rgba(20, 25, 40, 0.4) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem;
    padding: 1.5rem 1.25rem 0.5rem 1.25rem !important;
    /* Extra top padding for floating label */
    color: #fff !important;
    /* Force white text for readability against dark glass */
    font-size: var(--normal-font-size);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    font-family: var(--body-font) !important;
}

body .contact__form-label {
    position: absolute;
    top: 0.5rem;
    left: 1.25rem;
    font-size: var(--smaller-font-size) !important;
    color: #fff !important;
    font-weight: 600;
    transition: 0.3s;
    pointer-events: none;
    z-index: 10;
}

body .contact__form-input::placeholder {
    color: transparent !important;
    /* Hide placeholder so label feels floating */
}

/* Focus states for premium glow */
body .contact__form-input:focus {
    border-color: var(--first-color) !important;
    box-shadow: 0 0 15px rgba(var(--first-hue), var(--sat), var(--lig), 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    background: rgba(20, 25, 40, 0.6) !important;
    color: #fff !important;
    /* Ensure focused text stays readable */
}

.home__handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(var(--first-hue), 80%, 60%, 0.4) 0%, transparent 70%);
    z-index: -1;
    animation: pulseGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* Light theme overrides for glassmorphism */
body.light-theme .about__box,
body.light-theme .services__card,
body.light-theme .ai-tool-card,
body.light-theme .skill__icon-card,
body.light-theme .contact__card,
body.light-theme .contact__form-input {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1) !important;
    color: var(--title-color) !important;
    /* Use dark text for light inputs */
}

body.light-theme .contact__button,
body.light-theme .contact__form-label {
    color: var(--title-color) !important;
    /* Ensure labels and links inside cards are dark and readable */
}

body.light-theme .contact__form-input:focus {
    border-color: var(--first-color) !important;
    box-shadow: 0 0 15px rgba(var(--first-hue), var(--sat), var(--lig), 0.2), inset 0 2px 4px rgba(31, 38, 135, 0.05) !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

body.light-theme .button {
    color: #fff;
}

body.light-theme .terminal-text {
    text-shadow: none;
    color: var(--first-color);
}

body.light-theme .terminal-cursor {
    background-color: var(--first-color);
    box-shadow: none;
}

/* Ensure particles are visible but subtle in light mode */
body.light-theme #particles-js {
    opacity: 0.6;
}