/* Custom CSS Styles */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
body:not(.using-mouse) *:focus {
    outline: 2px solid #197fe6;
    outline-offset: 2px;
}

body.using-mouse *:focus {
    outline: none;
}

/* Loading Screen Animation */
#loading-screen {
    animation: fadeOut 0.5s ease-out 0.8s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Ripple Effect for Buttons */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 600ms ease-out;
    background-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Custom Cursor (Optional - currently disabled) */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #197fe6;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(25, 127, 230, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

/* Section Reveal Animation */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Glass Effect */
.glass-panel-enhanced {
    background: rgba(26, 38, 50, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #197fe6 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated Gradient Background */
.animated-gradient {
    background: linear-gradient(-45deg, #111921, #1a2632, #197fe6, #0f5bb5);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Glowing Border Effect */
.glow-border {
    position: relative;
    border: 1px solid transparent;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(45deg, #197fe6, #667eea, #f093fb);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-border:hover::before {
    opacity: 1;
}

/* Timeline Connector Animation */
.timeline-line {
    position: relative;
    overflow: hidden;
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, #197fe6, #667eea);
    animation: timeline-grow 2s ease-out forwards;
}

@keyframes timeline-grow {
    to {
        height: 100%;
    }
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(25, 127, 230, 0.15);
}

/* Text Selection */
::selection {
    background-color: rgba(25, 127, 230, 0.3);
    color: white;
}

::-moz-selection {
    background-color: rgba(25, 127, 230, 0.3);
    color: white;
}

/* Link Underline Animation */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #197fe6;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* Skill Bar Glow Effect */
.skill-progress {
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3));
    border-radius: inherit;
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    header, footer, .no-print, #back-to-top {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass-panel {
        background: white;
        border: 1px solid #ddd;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .animate-bounce,
    .animate-ping,
    .animate-pulse {
        animation: none;
    }
    
    /* Optimize touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    /* Already in dark mode, but can add additional enhancements */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass-panel {
        border: 2px solid white;
    }
    
    button, a {
        border: 2px solid currentColor;
    }
}

/* WebP Support Fallbacks */
.no-webp .bg-image-webp {
    background-image: url('fallback.jpg') !important;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #1a2632 25%, #293038 50%, #1a2632 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: rgba(26, 38, 50, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Accessibility - Skip to Main Content */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem;
    background-color: #197fe6;
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 0;
    top: 0;
}

/* Utilities */
.text-balance {
    text-wrap: balance;
}

.transition-all-slow {
    transition: all 0.6s ease;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}
