/* Publications Page Styles */
.publications-page {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 2rem 0;
    padding-top: 90px; /* Add top padding to account for fixed navbar (70px height + 20px extra) */
}

/* Header Section */
.publications-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.publications-header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 700;
}

.publications-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.research-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.research-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Type Selection */
.type-selection {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.type-selection h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.type-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.type-btn {
    padding: 1rem 2rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.type-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.type-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Year Selection */
.year-selection {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
    position: relative;
    min-height: 120px; /* Provide space for expanded circles */
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    width: 100%;
    max-width: 100vw; /* Ensure it doesn't exceed viewport */
}

/* Dynamic Connecting Line */
.connecting-line {
    position: absolute;
    top: 50%;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    z-index: 1;
    opacity: 0.6;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-50%);
}

.year-circle {
    width: 70px;
    height: 70px;
    min-width: 70px; /* Prevent shrinking */
    min-height: 70px; /* Prevent shrinking */
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 2;
    margin: 0 0.5rem; /* Base margin */
    flex-shrink: 0; /* Prevent flex shrinking */
    text-align: center;
    padding: 0.2rem;
}

/* Special styling for "All Years" circle */
.year-circle[data-year="all"] {
    width: 70px;
    min-width: 70px;
    font-size: 0.85rem;
    font-weight: 600;
}

.year-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.year-circle.active {
    transform: scale(1.4);
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    z-index: 3;
}

/* Reset all circles to close spacing first */
.year-selection.has-active .year-circle {
    margin: 0 0.25rem; /* Close spacing between all circles */
    transform: scale(0.8); /* Shrink non-active circles */
}

/* Active circle gets normal size and special margins */
.year-selection.has-active .year-circle.active {
    transform: scale(1.4); /* Active circle stays large */
    margin: 0 2rem; /* Large gap on both sides of active circle */
}

/* Override for non-active circles to ensure they stay small and close */
.year-selection.has-active .year-circle:not(.active) {
    margin: 0 0.25rem; /* Keep close spacing */
    transform: scale(0.8); /* Keep small */
    opacity: 1;
}

/* Publications Container */
.publications-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.publication-card {
    display: flex;
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.publication-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.publication-type {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.publication-year {
    font-size: 1.5rem;
    font-weight: 700;
}

.publication-details {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.publication-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.publication-authors {
    color: #666;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.publication-venue {
    color: #888;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-style: italic;
}

.publication-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.action-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid #667eea;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.action-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.no-publications {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    font-size: 1.1rem;
}

/* Legacy styles for backward compatibility */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.filter-btn {
    padding: 1rem 2rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .publications-header h1 {
        font-size: 2.5rem;
    }

    .type-buttons {
        flex-direction: column;
        align-items: center;
    }

    .type-btn {
        min-width: 200px;
    }

    .year-selection {
        flex-wrap: wrap;
        min-height: 140px; /* More space for wrapped circles */
    }
    
    .connecting-line {
        display: none; /* Hide connecting line on mobile */
    }

    .year-circle {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
        margin: 0.25rem; /* Smaller margins on mobile */
    }
    
    .year-circle.active {
        transform: scale(1.3); /* Slightly smaller scaling on mobile */
    }
    
    .year-selection.has-active .year-circle {
        margin: 0 0.15rem; /* Close spacing on mobile */
        transform: scale(0.85);
    }
    
    .year-selection.has-active .year-circle.active {
        transform: scale(1.3); /* Active circle scaling on mobile */
        margin: 0 1rem; /* Moderate gap around active circle on mobile */
    }
    
    .year-selection.has-active .year-circle:not(.active) {
        margin: 0 0.15rem; /* Keep close spacing for non-active */
        transform: scale(0.85);
    }

    .publication-card {
        flex-direction: column;
    }

    .publication-thumbnail {
        width: 100%;
        height: 100px;
    }

    .publication-details {
        padding: 1rem;
    }

    .publication-title {
        font-size: 1.1rem;
    }

    .publication-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

}

@media (max-width: 480px) {
    .publications-header h1 {
        font-size: 2rem;
    }

    .type-btn {
        min-width: 180px;
        padding: 0.8rem 1.5rem;
    }

    .year-circle {
        width: 50px;
        height: 50px;
        font-size: 0.8rem;
        margin: 0.2rem;
    }

    .year-circle.active {
        transform: scale(1.2); /* Even smaller scaling on very small screens */
    }
    
    .year-selection.has-active .year-circle {
        margin: 0 0.1rem; /* Very close spacing on small screens */
    }

    .year-selection.has-active .year-circle.active {
        transform: scale(1.2); /* Smaller scaling on very small screens */
        margin: 0 0.8rem; /* Gap around active circle on small screens */
    }

    .year-selection.has-active .year-circle:not(.active) {
        margin: 0 0.1rem; /* Keep very close spacing */
        transform: scale(0.8);
    }

    .publication-thumbnail {
        height: 80px;
    }

    .publication-type {
        font-size: 0.9rem;
    }

    .publication-year {
        font-size: 1.2rem;
    }

    .publication-title {
        font-size: 1rem;
    }

    .publication-authors,
    .publication-venue {
        font-size: 0.85rem;
    }

    .action-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

} 