/* =================================
   RESEARCH PAGE STYLES
   Version: 2.5 (Variables Updated)
================================= */

/* --- HERO SECTION --- */
.research-hero {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
    background-color: var(--fluent-bg); /* Variable Usage */
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    box-sizing: border-box;
}

.research-hero-content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding-top: 80px; /* Offset for fixed header */
    animation: heroFadeIn 1s ease-out forwards;
}

.research-hero h1 {
    font-family: 'Raleway', sans-serif;
    font-size: 80px; /* Larger for impact */
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
    color: #ffffff; /* Force White */
    line-height: 1.1;
}

.research-hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255,255,255,0.8); /* High contrast grey/white */
    max-width: 800px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 24px;
    animation: bounce 2s infinite;
}

/* --- FILTER SECTION --- */
.research-filter-section {
    padding: 25px 5%;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 80px; /* Below the fixed header */
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
}

.filter-container::-webkit-scrollbar {
    display: none;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.filter-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 8px;
}

.filter-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background-color: var(--fluent-bg);
    border-color: var(--fluent-bg);
    color: #fff;
}

/* --- LIST SECTION --- */
.research-list-section {
    padding: 100px 5%;
    min-height: 100vh;
    background-color: #ffffff; 
}

.publications-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 40px;
}

.pub-card {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.pub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(var(--fluent-blue-rgb), 0.12);
    border-color: rgba(var(--fluent-blue-rgb), 0.3);
}

.pub-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pub-tag {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 10px;
    border-radius: 4px;
}

.tag-bci { background-color: rgba(66, 133, 245, 0.1); color: var(--fluent-blue); } 
.tag-clinical { background-color: rgba(52, 167, 84, 0.1); color: var(--fluent-green); } 
.tag-hardware { background-color: rgba(251, 188, 4, 0.15); color: #d4a000; /* Darker yellow for text contrast */ } 
.tag-ai { background-color: rgba(217, 119, 87, 0.1); color: var(--fluent-orange); }

.pub-date {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #999;
}

.pub-title {
    font-family: 'Raleway', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    margin: 0 0 15px 0;
}

.pub-authors {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #555;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.pub-journal {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888;
    font-weight: 600;
    margin: 0 0 25px 0;
    font-style: italic;
}

.pub-summary {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
    padding-top: 20px;
    border-top: 1px solid #f5f5f5;
}

.pub-links {
    margin-top: auto;
}

.pub-link-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #111;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.pub-link-btn .arrow {
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.pub-link-btn:hover {
    color: var(--fluent-blue);
    border-bottom-color: var(--fluent-blue);
}

.pub-link-btn:hover .arrow {
    transform: translateX(4px);
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

/* --- MOBILE --- */
@media (max-width: 900px) {
    .research-hero { padding: 140px 5% 80px; min-height: auto; }
    .research-hero h1 { font-size: 42px; word-wrap: break-word; hyphens: manual; }
    .research-hero-sub { font-size: 18px; }
    .publications-grid { grid-template-columns: 1fr; }
    
    .filter-container { 
        justify-content: flex-start; 
        padding-bottom: 10px; 
        margin-right: -5%; 
        padding-right: 5%;
    }
    .filter-group { 
        flex-wrap: nowrap; 
        white-space: nowrap; 
    }
    .pub-card { padding: 30px; }
}