/* ===================================================================
   Ajeet Sethi Portfolio — styles.css
   Dark, playful sticker-collage aesthetic
   =================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

.font-serif { font-family: 'Playfair Display', serif; }

/* ---------- Custom Cursor ---------- */
/* NO global cursor:none — the cursor is always visible as a fallback.
   We hide it only on desktop with a media query once JS confirms movement. */
@media (pointer: fine) {
    .cursor-ready body { cursor: none; }
    .cursor-ready a,
    .cursor-ready button,
    .cursor-ready [role="button"],
    .cursor-ready .link-hover { cursor: none; }
}

.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: #a78bfa;
    border-radius: 50%;
    position: fixed;
    top: -40px;          /* hidden off-screen until first mouse event */
    left: -40px;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, opacity 0.2s ease;
    will-change: transform;
    opacity: 0;
}
.cursor-ready .custom-cursor { opacity: 1; }

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(167, 139, 250, 0.4);
    border-radius: 50%;
    position: fixed;
    top: -40px;
    left: -40px;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(.4,0,.2,1),
                height 0.3s cubic-bezier(.4,0,.2,1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                border-width 0.3s ease,
                border-style 0.3s ease,
                opacity 0.3s ease;
    will-change: transform;
    opacity: 0;
}
.cursor-ready .custom-cursor-follower { opacity: 1; }

/* Cursor states */
.custom-cursor-follower.hover-active {
    width: 56px;
    height: 56px;
    background-color: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.7);
}

/* Scope cursor for gaming sticker */
.custom-cursor.scope-mode {
    width: 2px;
    height: 2px;
    background: #ff4444;
    box-shadow: 0 0 6px #ff4444;
}
.custom-cursor-follower.scope-mode {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 68, 68, 0.6);
    background: transparent;
}
/* Crosshair lines drawn with pseudo-elements */
.custom-cursor-follower.scope-mode::before,
.custom-cursor-follower.scope-mode::after {
    content: '';
    position: absolute;
    background: rgba(255, 68, 68, 0.5);
}
.custom-cursor-follower.scope-mode::before {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}
.custom-cursor-follower.scope-mode::after {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}


/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f0f11; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a78bfa; }


/* ---------- Noise Overlay ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- Hero CTA Buttons ---------- */
.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 0.75rem;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    will-change: transform;
}


/* ---------- Sticker Base ---------- */
/*
   Each sticker uses a wrapper structure:
   .sticker-wrapper  (parallax transform applied here)
     └── .sticker     (hover transform applied here)
           └── img    (the actual image)
   This prevents transforms from fighting each other.
*/
.sticker {
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.35));
    transition: transform 0.4s cubic-bezier(.175,.885,.32,1.275),
                filter 0.3s ease;
    will-change: transform, filter;
}

/* Sticker peel effect on hover: lift + slight rotate + deeper shadow */
.sticker:hover {
    filter: drop-shadow(0 16px 35px rgba(0,0,0,0.5));
}
/* We do NOT set z-index on sticker hover — portrait must stay on top always */


/* ---------- Sticker: Motorcycle ---------- */
.bike-sticker .sticker-hover-target {
    transition: transform 0.3s cubic-bezier(.4,0,.2,1),
                filter 0.3s ease;
}
/* Taillight glow on hover */
.bike-sticker:hover .sticker-hover-target {
    filter: drop-shadow(0 0 12px rgba(255, 50, 30, 0.4));
}


/* ---------- Sticker: Gaming PC ---------- */
.gaming-sticker {
    position: relative;
}
.gaming-scope-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(167, 139, 250, 0.6);
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.25s ease;
    z-index: 10;
    box-shadow: 0 0 20px rgba(167,139,250,0.2), inset 0 0 30px rgba(0,0,0,0.3);
}
.gaming-sticker:hover .gaming-scope-lens { opacity: 1; }

.gaming-scope-lens .scope-inner {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 9px;
    color: rgba(167,139,250,0.7);
    text-align: center;
    line-height: 1.4;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(2px);
}


/* ---------- Spotify Sticker ---------- */
.spotify-sticker {
    background: #181818;
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.08);
    transition: transform 0.4s cubic-bezier(.175,.885,.32,1.275),
                box-shadow 0.3s ease;
}
.spotify-sticker:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}


/* ---------- Coffee Particles ---------- */
.coffee-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a78bfa;
    pointer-events: none;
    z-index: 100;
}


/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .sticker,
    .abstract-photo,
    .custom-cursor,
    .custom-cursor-follower {
        transition: none !important;
    }
}


/* ---------- Mobile ---------- */
@media (max-width: 1023px) {
    .custom-cursor,
    .custom-cursor-follower { display: none !important; }

    body { cursor: auto !important; }
}
