/* Hacker Theme - Research Page */

@keyframes glitch {
    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);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5),
                    0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8),
                    0 0 40px rgba(16, 185, 129, 0.5);
    }
}

@keyframes terminal-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.4),
                    0 0 20px rgba(0, 255, 65, 0.2);
    }
}

@keyframes scan-line {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.glitch {
    position: relative;
    animation: glitch 1s infinite;
}

.glitch::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-top 2s infinite linear alternate-reverse;
}

@keyframes glitch-top {
    2%, 64% {
        transform: translate(2px, -2px);
    }
    4%, 60% {
        transform: translate(-2px, 2px);
    }
    62% {
        transform: translate(13px, -1px) skew(-13deg);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.terminal-card {
    position: relative;
    overflow: hidden;
}

.terminal-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    animation: scan-line 3s linear infinite;
    pointer-events: none;
}

.terminal-glow {
    animation: terminal-glow 3s ease-in-out infinite;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0A0F0D;
}

::-webkit-scrollbar-thumb {
    background: #10B981;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Matrix rain effect canvas */
#matrix-bg {
    z-index: 0;
}

/* Hover effects */
.terminal-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.6) !important;
}

/* Responsive font sizing */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem !important;
    }
}

/* CRT screen effect */
body {
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.97;
    }
    5% {
        opacity: 0.99;
    }
    10% {
        opacity: 0.98;
    }
    15% {
        opacity: 1;
    }
    20% {
        opacity: 0.99;
    }
    25% {
        opacity: 0.97;
    }
    30% {
        opacity: 1;
    }
    35% {
        opacity: 0.98;
    }
    40% {
        opacity: 0.99;
    }
    45% {
        opacity: 1;
    }
    55% {
        opacity: 0.99;
    }
    60% {
        opacity: 0.98;
    }
    65% {
        opacity: 1;
    }
    80% {
        opacity: 0.99;
    }
    100% {
        opacity: 1;
    }
}

/* Green glow on links */
a:hover {
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}

/* Paper cards entrance animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Typing cursor effect */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1em;
    background: #10B981;
    margin-left: 5px;
    animation: blink 1s infinite;
}