/* static/css/social-links.css */

/* Remove external link arrows from social icons */
.social-icons a .external-icon {
    display: none !important;
}

/* Social links container with proper spacing and edge protection */
.social-links {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    /* Add padding to prevent edge touching */
    padding: 0 1rem;
}

/* Base social icons container */
.social-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    /* Allow wrapping for very small screens */
    flex-wrap: wrap;
}

/* Individual social link styling - ACCESSIBILITY COMPLIANT */
.social-icons a {
    color: #94a3b8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Increased base size for better accessibility */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.social-icons a:hover,
.social-icons a:focus {
    color: #60a5fa;
    transform: translateY(-2px);
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

/* SVG icon styling - BETTER SIZING */
.social-icons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: all 0.3s ease;
}

/* Platform-specific visual size corrections using transform */
.social-icons a[href*="x.com"] svg,
.social-icons a[href*="twitter.com"] svg {
    transform: scale(0.75);
}

.social-icons a[href*="bsky.app"] svg {
    transform: scale(0.8);
}

.social-icons a[href*="github.com"] svg {
    transform: scale(1.0);
}

.social-icons a[href*="kaggle.com"] svg {
    transform: scale(1.0);
}

.social-icons a[href*="linkedin.com"] svg {
    transform: scale(1.0);
}

.social-icons a[href*="medium.com"] svg {
    transform: scale(1.0);
}

.social-icons a[href*="youtube.com"] svg {
    transform: scale(1.0);
}

/* IMPROVED MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .social-links {
        /* More padding on mobile to prevent edge touching */
        padding: 0 1.5rem;
    }
    
    .social-icons {
        /* Better gap for mobile - not too cramped */
        gap: 0.75rem;
        /* Enable wrapping for extreme cases */
        flex-wrap: wrap;
        /* Ensure proper centering even when wrapped */
        justify-content: center;
    }
    
    .social-icons a {
        /* Keep minimum 44px touch target - accessibility standard */
        width: 44px;
        height: 44px;
        /* Don't shrink the touch area */
        flex-shrink: 0;
    }
    
    .social-icons svg {
        /* Keep icons readable on mobile */
        width: 18px;
        height: 18px;
    }
    
    /* Platform-specific mobile adjustments */
    .social-icons a[href*="x.com"] svg,
    .social-icons a[href*="twitter.com"] svg {
        transform: scale(0.7);
    }

    .social-icons a[href*="bsky.app"] svg {
        transform: scale(0.75);
    }
}

/* EXTRA SMALL SCREENS - Handle gracefully */
@media (max-width: 480px) {
    .social-icons {
        /* Slightly tighter gap only for very small screens */
        gap: 0.5rem;
    }
    
    .social-links {
        /* Maximum edge protection */
        padding: 0 2rem;
    }
}

/* Platform-specific hover colors */
.social-icons a[href*="twitter.com"]:hover,
.social-icons a[href*="x.com"]:hover {
    color: #1d9bf0;
    background: rgba(29, 155, 240, 0.1);
    border-color: rgba(29, 155, 240, 0.3);
}

.social-icons a[href*="bsky.app"]:hover {
    color: #00a8e6;
    background: rgba(0, 168, 230, 0.1);
    border-color: rgba(0, 168, 230, 0.3);
}

.social-icons a[href*="medium.com"]:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
}

.social-icons a[href*="linkedin.com"]:hover {
    color: #0077b5;
    background: rgba(0, 119, 181, 0.1);
    border-color: rgba(0, 119, 181, 0.3);
}

.social-icons a[href*="github.com"]:hover {
    color: #333;
    background: rgba(51, 51, 51, 0.1);
    border-color: rgba(51, 51, 51, 0.3);
}

.social-icons a[href*="kaggle.com"]:hover {
    color: #20beff;
    background: rgba(32, 190, 255, 0.1);
    border-color: rgba(32, 190, 255, 0.3);
}

.social-icons a[href*="youtube.com"]:hover {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
}

/* DARK MODE STYLES */
.dark .social-icons a {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(71, 85, 105, 0.6);
    color: #cbd5e1;
}

.dark .social-icons a:hover,
.dark .social-icons a:focus {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

/* Dark mode platform-specific colors */
.dark .social-icons a[href*="twitter.com"]:hover,
.dark .social-icons a[href*="x.com"]:hover {
    color: #1d9bf0;
    background: rgba(29, 155, 240, 0.15);
    border-color: rgba(29, 155, 240, 0.4);
}

.dark .social-icons a[href*="bsky.app"]:hover {
    color: #00a8e6;
    background: rgba(0, 168, 230, 0.15);
    border-color: rgba(0, 168, 230, 0.4);
}

.dark .social-icons a[href*="medium.com"]:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dark .social-icons a[href*="linkedin.com"]:hover {
    color: #0077b5;
    background: rgba(0, 119, 181, 0.15);
    border-color: rgba(0, 119, 181, 0.4);
}

.dark .social-icons a[href*="github.com"]:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dark .social-icons a[href*="kaggle.com"]:hover {
    color: #20beff;
    background: rgba(32, 190, 255, 0.15);
    border-color: rgba(32, 190, 255, 0.4);
}

.dark .social-icons a[href*="youtube.com"]:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.4);
}

/* Focus accessibility enhancements */
.social-icons a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dark .social-icons a:focus {
    outline-color: #60a5fa;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .social-icons a {
        border-width: 2px;
    }
    
    .social-icons a:hover,
    .social-icons a:focus {
        border-width: 3px;
    }
    
    .dark .social-icons a {
        background: rgba(0, 0, 0, 0.9);
        border-color: #ffffff;
    }
    
    .dark .social-icons a:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .social-icons a,
    .social-icons svg {
        transition: none;
    }
    
    .social-icons a:hover {
        transform: none;
    }
}

/* Print styles - hide social links in print */
@media print {
    .social-links {
        display: none;
    }
}
