/* Portfolio Enhanced CSS - Shared Styles for All Pages */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.8));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 1));
}

/* Shader canvas background */
#shader-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

/* Typography fixes */
h2 {
    line-height: 1.2 !important;
    padding-bottom: 0.25rem;
}

/* Enhanced Glassmorphism effects */
.glass {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg,
        rgba(17, 25, 40, 0.85) 0%,
        rgba(17, 25, 40, 0.75) 50%,
        rgba(17, 25, 40, 0.65) 100%);
    border: none; /* Remove borders for cleaner appearance */
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-light {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.65) 100%);
    border: 1px solid rgba(209, 213, 219, 0.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Animated gradient backgrounds */
.animated-bg {
    background: linear-gradient(-45deg, #3b82f6, #1e3a8a, #2563eb, #1e40af);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse animation for interactive elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
        transform: scale(1.02);
    }
}

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

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textSlideUp 0.8s ease-out forwards;
}

@keyframes textSlideUp {
    to {
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.stagger-1 span { animation-delay: 0.1s; }
.stagger-2 span { animation-delay: 0.2s; }
.stagger-3 span { animation-delay: 0.3s; }
.stagger-4 span { animation-delay: 0.4s; }

/* Enhanced project cards */
.project-card {
    transition: box-shadow 0.2s ease;
}

.project-card:hover {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.12),
        0 3px 8px rgba(59, 130, 246, 0.1);
}

/* Parallax effect for background elements */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Modern button styles */
.btn-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transition: all 0.3s ease;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Skill tags animation */
.skill-tag {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Navigation enhancement */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: left 0.3s ease;
}

.nav-link:hover::after {
    left: 0;
}

/* Quote letter animation */
.quote-letter {
    opacity: 0;
    animation: fadeInLetter 0.8s ease-out forwards;
    display: inline;
}

@keyframes fadeInLetter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quote-container {
    animation: quoteFadeIn 0.5s ease-out;
}

@keyframes quoteFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page transition effects */
body {
    transform: translateY(20px);
    transition: transform 0.8s ease-out;
}

body.loaded {
    transform: translateY(0);
}

/* Enhanced focus states for accessibility */
.btn-modern:focus,
.project-card:focus,
.skill-tag:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Font Awesome icon styling */
.project-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.project-icon:hover {
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.2));
}

/* Profile image styling */
.profile-image {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.profile-image:hover {
    filter: drop-shadow(0 8px 16px rgba(59, 130, 246, 0.25));
}

/* Floating project icon styling */
.project-icon-float {
    backdrop-filter: blur(8px) saturate(180%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-icon-float:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px) saturate(200%);
}

/* Fix navigation occlusion on project pages */
.py-32 {
    padding-top: 10rem !important; /* Increase top padding to clear fixed nav */
}

/* Remove navigation border globally for cleaner appearance */
nav {
    border-bottom: none !important;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .project-card:hover {
        transform: translateY(-3px) scale(1.01);
    }

    .float-animation {
        animation-duration: 8s;
    }

    .project-card {
        transition: box-shadow 0.15s ease;
    }

    .skill-tag {
        zoom: 0.7;
    }

    h2 {
        font-size: 2rem !important; /* text-3xl instead of text-4xl */
    }

    h3 {
        font-size: 1.25rem !important; /* text-xl instead of text-2xl */
    }

    /* Reduce padding on glass containers for mobile */
    .glass {
        padding: 1.5rem !important; /* Reduced from p-12 (3rem) to smaller padding */
        border: none !important; /* Remove container outlines on mobile */
    }

    /* Remove navigation border on mobile */
    nav {
        border-bottom: none !important; /* Remove nav bottom border on mobile */
    }
}

/* Section fade transitions */
.section-fade-top {
    position: relative;
}

.section-fade-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom,
        rgba(239, 246, 255, 0.8) 0%,
        rgba(239, 246, 255, 0.4) 30%,
        rgba(239, 246, 255, 0.1) 60%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.section-fade-bottom {
    position: relative;
}

.section-fade-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top,
        rgba(239, 246, 255, 0.8) 0%,
        rgba(239, 246, 255, 0.4) 30%,
        rgba(239, 246, 255, 0.1) 60%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.dark .section-fade-top::before {
    background: linear-gradient(to bottom,
        rgba(17, 25, 40, 0.8) 0%,
        rgba(17, 25, 40, 0.4) 30%,
        rgba(17, 25, 40, 0.1) 60%,
        transparent 100%);
}

.dark .section-fade-bottom::after {
    background: linear-gradient(to top,
        rgba(17, 25, 40, 0.8) 0%,
        rgba(17, 25, 40, 0.4) 30%,
        rgba(17, 25, 40, 0.1) 60%,
        transparent 100%);
}

/* Enhanced section transitions for gradient backgrounds */
.section-transition-gradient {
    position: relative;
    overflow: hidden;
}

.section-transition-gradient::before,
.section-transition-gradient::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 2;
}

.section-transition-gradient::before {
    top: 0;
    background: linear-gradient(to bottom,
        rgba(17, 25, 40, 0.95) 0%,
        rgba(17, 25, 40, 0.8) 20%,
        rgba(17, 25, 40, 0.4) 50%,
        rgba(17, 25, 40, 0.1) 80%,
        transparent 100%);
}

.section-transition-gradient::after {
    bottom: 0;
    background: linear-gradient(to top,
        rgba(17, 25, 40, 0.95) 0%,
        rgba(17, 25, 40, 0.8) 20%,
        rgba(17, 25, 40, 0.4) 50%,
        rgba(17, 25, 40, 0.1) 80%,
        transparent 100%);
}

/* Dark mode gradient transitions */
.dark .section-transition-gradient::before {
    background: linear-gradient(to bottom,
        rgba(17, 25, 40, 0.95) 0%,
        rgba(17, 25, 40, 0.8) 20%,
        rgba(17, 25, 40, 0.4) 50%,
        rgba(17, 25, 40, 0.1) 80%,
        transparent 100%);
}

.dark .section-transition-gradient::after {
    background: linear-gradient(to top,
        rgba(17, 25, 40, 0.95) 0%,
        rgba(17, 25, 40, 0.8) 20%,
        rgba(17, 25, 40, 0.4) 50%,
        rgba(17, 25, 40, 0.1) 80%,
        transparent 100%);
}

/* Social media embed centering */
.twitter-tweet,
.reddit-embed-bq {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
}

.twitter-tweet iframe,
.reddit-embed-bq iframe {
    margin: 0 auto;
    display: block;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass {
        background-color: rgba(0, 0, 0, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }

    .glass-light {
        background-color: rgba(255, 255, 255, 0.9);
        border: 2px solid rgba(0, 0, 0, 0.8);
    }
}
