/* Smooth Loading and Scroll Effects */

/* Universal page content fade-in - no flicker */
.page-content-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* REMOVED: will-change: opacity, transform; - causes scroll conflicts */
}

.page-content-fade.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* DISABLED: Anti-flicker styles causing scroll pause effect */
.page-content-fade.loaded * {
    /* DISABLED: backface-visibility: hidden; */
    /* DISABLED: -webkit-backface-visibility: hidden; */
    /* DISABLED: transform: translateZ(0); */
}

/* Enhanced card entrance animations - more noticeable */
.card-entrance {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.card-entrance.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Visible staggered delays */
.card-entrance:nth-child(1) { transition-delay: 0.1s; }
.card-entrance:nth-child(2) { transition-delay: 0.2s; }
.card-entrance:nth-child(3) { transition-delay: 0.3s; }
.card-entrance:nth-child(4) { transition-delay: 0.4s; }
.card-entrance:nth-child(5) { transition-delay: 0.5s; }
.card-entrance:nth-child(6) { transition-delay: 0.6s; }

/* Year Selection Dialog */
.year-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 150, 243, 0.1);
    backdrop-filter: blur(2px);
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 60px 20px 20px;
    overflow-y: auto;
}

.year-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.year-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s ease;
}

.year-dialog-overlay.active .year-dialog {
    transform: translateY(0) scale(1);
}

.year-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.year-dialog-header h5 {
    margin: 0;
    color: #2196f3;
    font-weight: 600;
}

.year-dialog-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.year-dialog-close:hover {
    background: #f8f9fa;
    color: #343a40;
}

.year-dialog-body {
    padding: 20px 24px 24px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.year-option {
    transition: all 0.2s ease;
}

.year-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .year-dialog-overlay {
        padding: 40px 15px 15px;
        align-items: flex-start;
    }
    
    .year-dialog {
        margin: 0;
        max-width: 100%;
        width: 100%;
        max-height: calc(100vh - 80px);
    }
    
    .year-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .year-dialog-header {
        padding: 16px 20px 12px;
    }
    
    .year-dialog-body {
        padding: 16px 20px 20px;
    }
}

/* Navigation bar - completely static, no animations */
.navbar,
.navbar-expand-lg,
nav.navbar {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.navbar-brand,
.logo-text {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Override any theme-based navbar styling */
[data-bs-theme="dark"] .navbar,
[data-bs-theme="light"] .navbar,
.dark-theme .navbar,
.light-theme .navbar {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Simplified scroll reveal - less intrusive */
.scroll-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth card hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2, #5ba0f2);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a90e2, #5ba0f2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* Fade-in for page sections */
.section-fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-fade.visible {
    opacity: 1;
}

/* Profile Link Styling */
.profile-link {
    padding: 8px 12px;
    border-radius: 25px;
    transition: all 0.2s ease;
    color: #333 !important;
}

.profile-link:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: #4a90e2 !important;
    transform: translateY(-1px);
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #5ba0f2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.profile-link:hover .profile-icon {
    transform: scale(1.05);
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-initial {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.profile-username {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    margin-left: 8px;
}

/* Dark theme adjustments */
[data-theme*="dark"] .profile-link {
    color: #f8f9fa !important;
}

[data-theme*="dark"] .profile-link:hover {
    color: #4a90e2 !important;
}

[data-theme*="dark"] .profile-username {
    color: #f8f9fa;
}