/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #ffffff;
}
::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Selection Color */
::selection {
    background: #111;
    color: #fff;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: #111;
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(17, 17, 17, 0.2);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* Hide default cursor only on desktop */
@media (min-width: 768px) {
    body {
        cursor: none;
    }
    a, button, .cursor-hover {
        cursor: none;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.loader-line {
    width: 0%;
    height: 2px;
    background: #111;
    transition: width 0.5s ease;
}

/* Utility for hiding elements before scroll reveal */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

/* Text Reveal Animation Class */
.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
}

/* Image Parallax Container */
.parallax-img-container {
    overflow: hidden;
}
.parallax-img {
    will-change: transform;
    transform: scale(1.2);
}

/* Magnetic Button Effect */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Glitch effect for tech feel on hover */
.glitch-hover:hover {
    animation: glitch-anim 0.3s infinite;
}

@keyframes glitch-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}
