/* ========================================
   DISCOVERIES - Micro-interactions & Easter Eggs
   ======================================== */

/* ========================================
   CUSTOM CURSOR
   ======================================== */

@media (pointer: fine) {
    body {
        cursor: none;
    }

    a, button, .work-card, .arch-box, .terminal-panel {
        cursor: none;
    }
}

.custom-cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    mix-blend-mode: difference;
}

.cursor-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, opacity 0.2s;
}

.cursor-ring {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.custom-cursor.cursor-hover .cursor-dot {
    width: 10px;
    height: 10px;
    opacity: 0.8;
}

.custom-cursor.cursor-hover .cursor-ring {
    width: 50px;
    height: 50px;
    border-color: rgba(255, 255, 255, 0.8);
}

.custom-cursor.cursor-click .cursor-dot {
    width: 4px;
    height: 4px;
}

.custom-cursor.cursor-click .cursor-ring {
    width: 30px;
    height: 30px;
}

/* Hide on touch devices */
@media (pointer: coarse) {
    .custom-cursor {
        display: none;
    }
}

/* ========================================
   KONAMI GLITCH EFFECT
   ======================================== */

@keyframes konamiGlitch {
    0% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translate(2px, -2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(2px, 2px);
        filter: hue-rotate(360deg);
    }
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
}

.konami-badge .badge-icon {
    color: #FFD700;
    font-size: 14px;
}

/* ========================================
   TERMINAL ENHANCEMENTS
   ======================================== */

.terminal-hint {
    animation: pulse-hint 2s ease-in-out infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.terminal-panel:hover .terminal-hint {
    opacity: 1;
    animation: none;
}

/* Terminal additional colors */
.terminal-output .error {
    color: #ff6b6b;
}

.terminal-output .secondary {
    color: #888;
}

/* ========================================
   WORK CARD ENHANCEMENTS
   ======================================== */

.work-card .work-icon {
    transition: transform 0.4s ease;
}

.work-card:hover .work-icon {
    animation: icon-float 2s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.work-card .work-platform {
    transform: translateY(5px);
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.work-card:hover .work-platform {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   LINK HOVER EFFECTS
   ======================================== */

.contact-email {
    position: relative;
    overflow: hidden;
}

.contact-email::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transition: left 0.3s ease;
    z-index: -1;
}

.contact-email:hover::before {
    left: 0;
}

.contact-arrow {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-email:hover .contact-arrow {
    transform: translateX(8px);
}

/* ========================================
   SCROLL PROGRESS
   ======================================== */

.scroll-progress {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .custom-cursor,
    .scroll-progress {
        display: none;
    }

    .work-card,
    .contact-email,
    .hero-name,
    .hero-title {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }

    .work-card:hover {
        transform: none !important;
    }

    .terminal-hint {
        animation: none;
    }
}

/* ========================================
   ARCHITECTURE BOX HOVER
   ======================================== */

.source-box,
.dest-box {
    cursor: pointer;
}

.source-box:hover,
.dest-box:hover {
    filter: drop-shadow(0 4px 8px rgba(30, 58, 47, 0.2));
}
