/* Research Hub Styles */

.research-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: var(--spacing-08) 0 var(--spacing-06);
    border-bottom: 1px solid var(--color-border);
}

.research-hero .hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.research-hero .hero-title {
    font-size: var(--text-display);
    font-weight: var(--font-weight-light);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-03);
}

.research-hero .hero-subtitle {
    font-size: var(--text-body-large);
    color: var(--color-text-secondary);
}

/* Filter Section */
.filter-section {
    padding: var(--spacing-05) 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 60px;
    z-index: 100;
}

.filter-controls {
    display: flex;
    gap: var(--spacing-04);
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: var(--spacing-03);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-secondary);
}

.search-input {
    width: 100%;
    padding: var(--spacing-02) var(--spacing-03) var(--spacing-02) calc(var(--spacing-03) + 28px);
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: var(--text-body);
    background: white;
    transition: all var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.filter-buttons {
    display: flex;
    gap: var(--spacing-02);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-02) var(--spacing-03);
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text-secondary);
    font-size: var(--text-body-small);
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: 0;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Papers Grid */
.papers-section {
    padding: var(--spacing-07) 0;
    background: var(--color-background-subtle);
}

.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--spacing-05);
}

/* Paper Card */
.paper-card {
    background: white;
    border: 1px solid var(--color-border);
    padding: var(--spacing-05);
    transition: all var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
}

.paper-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.paper-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.paper-card:hover::before {
    transform: scaleY(1);
}

/* Featured Paper */
.paper-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border: 2px solid var(--color-primary);
}

.featured-badge {
    position: absolute;
    top: var(--spacing-03);
    right: var(--spacing-03);
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-01) var(--spacing-02);
    font-size: var(--text-body-small);
    font-weight: var(--font-weight-medium);
}

/* Paper Header */
.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-03);
}

.paper-category {
    color: var(--color-primary);
    font-size: var(--text-body-small);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paper-date {
    color: var(--color-text-secondary);
    font-size: var(--text-body-small);
}

/* Paper Content */
.paper-title {
    font-size: var(--text-heading-03);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-03);
    line-height: 1.3;
}

.paper-description {
    color: var(--color-text-secondary);
    font-size: var(--text-body);
    line-height: 1.6;
    margin-bottom: var(--spacing-04);
    flex-grow: 1;
}

/* Paper Metrics */
.paper-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-03);
    padding: var(--spacing-03) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--spacing-03);
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: var(--text-heading-04);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-01);
}

.metric-label {
    display: block;
    font-size: var(--text-body-small);
    color: var(--color-text-secondary);
}

/* Paper Footer */
.paper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paper-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
}

.paper-link:hover {
    transform: translateX(4px);
}

.paper-link.primary {
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-02) var(--spacing-03);
}

.paper-link.primary:hover {
    background: var(--color-primary-dark);
}

.reading-time {
    color: var(--color-text-secondary);
    font-size: var(--text-body-small);
}

/* Stats Section */
.stats-section {
    padding: var(--spacing-07) 0;
    background: white;
    border-top: 1px solid var(--color-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-05);
}

.stat-card {
    text-align: center;
    padding: var(--spacing-04);
    border-left: 3px solid var(--color-primary);
    background: var(--color-background-subtle);
}

.stat-number {
    font-size: var(--text-display);
    font-weight: var(--font-weight-light);
    color: var(--color-primary);
    margin-bottom: var(--spacing-02);
}

.stat-label {
    font-size: var(--text-body);
    color: var(--color-text-secondary);
}

/* Hidden state for filtering */
.paper-card.hidden {
    display: none;
}

/* Animation for filter transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paper-card {
    animation: fadeIn 0.3s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .papers-grid {
        grid-template-columns: 1fr;
    }
    
    .paper-card.featured {
        grid-column: span 1;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}