/* style.css */

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

html {
    scroll-padding-top: 6rem;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 243, 255, 0.6);
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(10, 15, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-card {
    background: linear-gradient(145deg, rgba(20, 25, 40, 0.5), rgba(10, 10, 15, 0.8));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mouse Glow Follower */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.12) 0%, rgba(188, 19, 254, 0.04) 40%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: screen;
    transition: width 0.15s, height 0.15s;
}

#cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: #00f3ff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px #00f3ff, 0 0 20px #00f3ff;
    transition: transform 0.05s;
}

/* Clip Paths for Cyberpunk aesthetics */
.cyber-clip {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.cyber-button {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* Smooth Hover Effect (Replaced Glitch) */
.cyber-glitch-hover {
    transition: all 0.4s ease-out;
}
.cyber-glitch-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(188, 19, 254, 0.3);
    border-color: rgba(188, 19, 254, 0.5);
}

/* Text Glows */
.hover-glow-text:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(0, 243, 255, 0.8);
}

/* Project Image Hover */
.project-img-container img {
    transform-origin: center center;
}

/* Grid Background Pattern */
.bg-grid-pattern {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(0, 243, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
}

/* Best-effort image download deterrents */
img.no-download {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
    #cursor-glow {
        width: 220px;
        height: 220px;
        opacity: 0.55;
    }

    #cursor-dot {
        width: 10px;
        height: 10px;
        opacity: 0.95;
    }

    body {
        cursor: auto;
    }

    #hero {
        min-height: auto;
        padding-top: 7rem;
        padding-bottom: 4rem;
    }

    #hero .hero-content {
        text-align: left;
    }

    #hero h1 {
        font-size: clamp(2.25rem, 10vw, 4rem);
        line-height: 1.05;
    }

    #hero p,
    #about p,
    #contact p {
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .glass-panel,
    .glass-card {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    nav .max-w-7xl {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    section {
        scroll-margin-top: 6rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        overflow-x: hidden;
    }

    nav .max-w-7xl {
        gap: 1rem;
    }

    nav a.font-cyber {
        font-size: 0.95rem;
        letter-spacing: 0.08em;
    }

    #hero {
        padding-top: 6.25rem;
        padding-bottom: 3rem;
    }

    #hero .hero-content {
        gap: 1.25rem;
    }

    #hero h1 {
        font-size: clamp(2rem, 12vw, 3.25rem);
    }

    #hero .h-10 {
        height: auto;
        min-height: 2.5rem;
    }

    #hero .hero-item,
    #about p,
    #contact p,
    #projects p,
    #skills li,
    #education p {
        font-size: 0.95rem;
    }

    .glass-panel,
    .glass-card {
        padding: 1rem;
    }

    #projects .glass-panel {
        padding: 1rem;
    }

    #projects img,
    #about img {
        height: auto;
        max-height: 240px;
    }

    #contact h2,
    #education h2,
    #skills h2,
    #projects h2,
    #about h2 {
        font-size: clamp(1.9rem, 8vw, 2.75rem);
    }

    .cyber-button {
        font-size: 0.7rem;
        padding: 0.8rem 1rem;
    }

    section {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Hamburger Menu */
#hamburger-btn {
    background: rgba(10, 15, 30, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

#hamburger-btn:hover {
    background: rgba(10, 15, 30, 0.5);
}

.hamburger-active .hamburger-line:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.hamburger-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-line:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

#mobile-menu {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mobile-menu.open {
    pointer-events: auto;
    opacity: 1;
}

#mobile-menu .menu-panel {
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.open .menu-panel {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link:last-of-type {
    border-bottom: none !important;
}

/* AI Assistant */
#ai-chat-btn {
    cursor: pointer;
}

#ai-chat-window.open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) translateY(0) !important;
}

#ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}

#ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 10px;
}

#ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 243, 255, 0.5);
}

.typing-dot {
    animation: typingBounce 1.4s ease-in-out infinite;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    #ai-chat-window {
        width: calc(100vw - 2rem) !important;
        max-width: 320px !important;
    }
}

footer .font-mono {
    font-size: 0.65rem;
}

@media (max-width: 400px) {
    footer .font-mono.text-xs {
        font-size: 0.6rem;
    }
}
