@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes particle-float {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    50% { transform: translate(var(--x), var(--y)); opacity: 0.5; }
}

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

.avatar-border {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4F46E5, #7C3AED, #EC4899, #4F46E5);
    background-size: 300% 300%;
    animation: rotate-border 3s linear infinite;
    z-index: -1;
}

.link-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    animation: fade-in 0.6s ease-out forwards;
    opacity: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.link-card:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.link-card:active {
    transform: scale(0.98);
}

.link-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

.link-card:hover .link-gradient {
    opacity: 0.25;
}

.link-content {
    position: relative;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.particles-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particles-container::before,
.particles-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    animation: particle-float 12s ease-in-out infinite;
}

.particles-container::before {
    background: rgba(79, 70, 229, 0.25);
    top: 10%;
    left: 10%;
    --x: 50px;
    --y: 100px;
}

.particles-container::after {
    background: rgba(124, 58, 237, 0.25);
    bottom: 10%;
    right: 10%;
    --x: -50px;
    --y: -100px;
    animation-delay: -6s;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
    .link-content {
        padding: 1.25rem;
    }
    
    .link-card:hover {
        transform: scale(1.02);
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
.link-card:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
}