/* dnkta.eth - Cypherpunk Aesthetics */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar - cyber green */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #39ff14;
}

/* Selection colors */
::selection {
    background: rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

/* Scanline overlay */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.3;
}

/* Grid background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch:hover::before {
    animation: glitch-1 0.3s infinite;
    color: #ff0040;
    z-index: -1;
    opacity: 0.8;
}

.glitch:hover::after {
    animation: glitch-2 0.3s infinite;
    color: #00ffff;
    z-index: -2;
    opacity: 0.8;
}

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

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

/* Glitch hover for nav */
.glitch-hover:hover {
    animation: glitch-text 0.3s ease;
}

@keyframes glitch-text {
    0%, 100% { text-shadow: none; }
    25% { text-shadow: -2px 0 #ff0040, 2px 0 #00ffff; }
    50% { text-shadow: 2px 0 #ff0040, -2px 0 #00ffff; }
    75% { text-shadow: -1px 0 #ff0040, 1px 0 #00ffff; }
}

/* Typing effect cursor */
.typing-effect::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* CRT flicker (subtle) */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

body {
    animation: flicker 0.15s infinite;
}

/* Glow pulse for PFP */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.4),
                    0 0 40px rgba(0, 255, 65, 0.2),
                    0 0 60px rgba(0, 255, 65, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.6),
                    0 0 60px rgba(0, 255, 65, 0.4),
                    0 0 90px rgba(0, 255, 65, 0.2);
    }
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileMenu.open {
    max-height: 300px;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .scanline-overlay,
    body {
        animation: none !important;
    }
}

/* Terminal cursor blink */
@keyframes cursor-blink {
    0%, 50% { border-color: #00ff41; }
    51%, 100% { border-color: transparent; }
}

/* Hover glow for cards */
.card-glow:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.15);
}

/* Matrix rain effect (optional - applied to hero) */
.matrix-bg {
    background:
        radial-gradient(ellipse at center, transparent 0%, #080808 70%),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 255, 65, 0.03) 2px,
            rgba(0, 255, 65, 0.03) 4px
        );
}

/* Print styles */
@media print {
    .scanline-overlay,
    .grid-bg,
    nav {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        animation: none !important;
    }

    section {
        page-break-inside: avoid;
    }

    .text-cyber-green {
        color: black !important;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 380px) {
    h1 {
        font-size: 2.5rem !important;
    }
}
