/* --- Global Variables & Reset --- */
:root {
    /* Color Palette - Professional Academic (Inspired by GAP Lab / CUHK style) */
    --primary: #4a148c;       /* Deep Purple (Academic/Regal) */
    --primary-dark: #38006b;  /* Darker Purple for hover/active */
    --secondary: #00838f;     /* Teal/Cyan for accents (Modern contrast) */
    --accent: #ffb74d;        /* Muted Gold/Orange for highlights (CUHK-like) */
    
    --text-dark: #2c3e50;     /* Dark Slate Grey for main text */
    --text-light: #546e7a;    /* Blue-Grey for secondary text */
    --text-muted: #90a4ae;    /* Muted text for dates/meta */
    
    --bg-body: #f5f7fa;       /* Very light grey/blue background */
    --bg-white: #ffffff;      /* Pure white for cards/sections */
    --bg-light: #e1f5fe;      /* Very light accent background */

    /* Spacing & Layout */
    --container-width: 1400px; /* Increased from 1140px for wider modern academic look */
    --header-height: 80px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 1px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.08), 0 6px 6px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-body);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75em;
    line-height: 1.2;
}

/* Custom Ampersand for serif headers */
.amp {
    font-family: inherit;
    font-style: normal;
    font-weight: inherit;
}

a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
.navbar {
    background-color: var(--bg-white);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 48px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 0;
    position: relative;
    font-family: 'Inter', sans-serif; /* Keep nav sans-serif */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--bg-white) 50%, #f3e5f5 100%);
    padding: 100px 0;
    text-align: left; /* Academic Left align */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    color: var(--secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    margin-bottom: 24px;
}

.hero-content .description {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent text wrapping */
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 6px rgba(74, 20, 140, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 20, 140, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: rgba(74, 20, 140, 0.05);
    transform: translateY(-2px);
}

/* --- Standard Section Styles --- */
.section {
    padding: 100px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.section-title {
    font-size: 2.2rem;
    text-align: left;
    margin-bottom: 50px;
    position: relative;
    padding-left: 20px;
    border-left: 5px solid var(--secondary);
}

.bg-light {
    background-color: #fcfcfc;
}

/* --- News Section (List View similar to GAP) --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
}

.news-item {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid #eee;
    transition: var(--transition-fast);
    align-items: center;
}

.news-item:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow-sm);
}

.news-item .date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 80px;
    background-color: rgba(0, 131, 143, 0.05); /* Light teal bg */
    border-radius: var(--radius-sm);
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.2;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.news-item .date .month { font-size: 1.2rem; text-transform: uppercase; }
.news-item .date .year { font-size: 0.9rem; font-weight: 400; opacity: 0.8; }

.news-item p {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.05rem;
    flex: 1;
}
.news-item p strong { color: var(--primary); }

/* --- Research Areas (Grid) --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 24px;
}

.text-link {
    font-weight: 600;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.text-link:hover {
    gap: 8px; /* Arrow moves slightly */
}

/* --- Team Section --- */
.team-category { margin-bottom: 60px; }
.category-title {
    font-size: 1.6rem;
    color: var(--text-light);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

/* PI Card */
.pi-grid { display: flex; justify-content: center; margin-bottom: 60px; }
.pi-card {
    display: flex;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.pi-img {
    width: 300px; /* Reduced specific width */
    flex-shrink: 0;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    min-height: 300px;
}
/* If using placeholder div */
.pi-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
    font-size: 3rem;
}

.pi-info {
    padding: 40px;
    flex-grow: 1;
}

.pi-info h4 { font-size: 2rem; margin-bottom: 8px; color: var(--primary); }
.pi-info .role { font-size: 1.1rem; color: var(--secondary); margin-bottom: 20px; font-weight: 600; display: block; }
.pi-info p { color: var(--text-light); margin-bottom: 20px; }

.socials a {
    display: inline-flex;
    width: 36px; height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    margin-right: 10px;
    transition: all 0.2s;
}
.socials a:hover {
    background: var(--primary);
    color: white;
}

/* Grid for Students */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.member-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition-fast);
    border: 1px solid transparent;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0,0,0,0.05);
}

.member-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background-color: #eee;
    margin: 0 auto 16px;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 1px #eee;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #e0e0e0; font-size: 2rem; color: white; }

.member-card h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif; /* Clean name */
    color: var(--text-dark);
}
.member-card .role {
    font-size: 0.85rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
}
.member-card p { font-size: 0.9rem; color: var(--text-light); }

.alumni-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.alumni-card { padding: 16px; background: #fafafa; }
.alumni-card h4 { font-size: 1rem; }

/* --- Publications (GAP Style List) --- */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 0; /* Connected list look */
}

.pub-item {
    padding: 24px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.pub-item:last-child { border-bottom: none; }

.conf-tag {
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 4px;
    background: #e3f2fd;
    color: #1565c0;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Conference Colors per field if needed */
.tag-nsdi { background: #e8f5e9; color: #2e7d32; }
.tag-sigcomm { background: #e3f2fd; color: #1565c0; }
.tag-tvcg { background: #f3e5f5; color: #7b1fa2; }
.tag-vr { background: #fff3e0; color: #ef6c00; }

.pub-content { flex-grow: 1; }

.pub-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 6px;
    line-height: 1.4;
}

.pub-title:hover { color: var(--secondary); }

.pub-authors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.pub-authors strong {
    color: var(--primary);
    font-weight: 600;
}

.pub-links a {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 12px;
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.pub-links a:hover {
    color: var(--secondary);
    border-color: var(--secondary);
    background: rgba(0, 131, 143, 0.05);
}

/* --- Footer --- */
footer {
    background-color: var(--text-dark); /* Dark Slate */
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h2 { color: white; margin-bottom: 10px; font-family: 'Inter', sans-serif; }
.footer-links h4 { color: white; font-size: 1.1rem; margin-bottom: 16px; font-family: 'Inter', sans-serif; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--secondary); }
.footer-links a { color: inherit; }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container { padding: 0 15px; }
    .nav-links { display: none; } /* Add mobile menu logic later if needed */
    
    .hero-content h1 { font-size: 2.5rem; }
    .pi-card { flex-direction: column; }
    .pi-img { width: 100%; min-height: 250px; }
    .footer-content { flex-direction: column; }
}

/* --- Additional Classes to support HTML --- */
.avatar-placeholder { display: flex; }

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid #eee;
    overflow: hidden;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0,0,0,0.05);
}

.card-thumb {
    height: 180px;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-size: 1.3rem;
    margin: 10px 0 10px;
    color: var(--text-dark);
}

.project-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg-light);
    color: var(--secondary);
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
    font-size: 0.95rem;
}
.btn-project:hover { color: var(--secondary); }


/* --- Additional Tags for Full Pubs --- */
.tag-journal { background: #e8f5e9; color: #2e7d32; }
.tag-conf { background: #e3f2fd; color: #1565c0; }
.tag-top { background: #fff8e1; color: #f57f17; }


/* --- News Carousel Layout --- */
.news-split-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr; /* Carousel wider */
    gap: 40px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .news-split-layout { grid-template-columns: 1fr; }
}

.carousel-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
    aspect-ratio: 16/9;
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 30px 20px 20px;
    color: white;
    z-index: 10;
}

.slide-caption h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-caption p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 20;
}
.carousel-btn:hover { background: rgba(255,255,255,0.4); }
.prev-btn { left: 15px; }
.next-btn { right: 15px; }

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: 0.3s;
}
.indicator.active { background: white; transform: scale(1.2); }


/* --- Carousel Updates --- */
.news-split-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr; /* Carousel significantly wider now */
    gap: 40px;
    align-items: flex-start;
}

.carousel-container {
    aspect-ratio: 16/10; /* Slightly taller for better impact */
    border: 1px solid rgba(0,0,0,0.1);
}

.slide-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    padding: 40px 30px 25px;
}
.slide-caption h3 { font-size: 1.8rem; }

.news-list-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}

/* Custom Scrollbar for news list */
.news-list-container::-webkit-scrollbar { width: 6px; }
.news-list-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.news-list-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.news-list-container::-webkit-scrollbar-thumb:hover { background: #bbb; }


/* --- Wide Carousel Mode --- */
.section-wide-news .container {
    max-width: 1400px; /* Expand container width specifically for this section */
}

.news-split-layout {
    grid-template-columns: 70% 30%; /* Make carousel much larger (70%) */
    gap: 30px;
}

.carousel-container {
    aspect-ratio: 16/9; /* Standard breakdown */
    height: 600px; /* Fixed styling to ensure it's tall/big */
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* Deep shadow for pop */
}

.carousel-slide img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.news-list-container {
    height: 600px; /* Match carousel height */
    overflow-y: auto;
    padding-right: 15px;
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

/* Ensure mobile stacks properly */
@media (max-width: 1024px) {
    .news-split-layout { grid-template-columns: 1fr; }
    .carousel-container { height: auto; aspect-ratio: 16/9; }
    .news-list-container { height: auto; max-height: 500px; }
}


/* --- Wide News Layout (Full Width Carousel) --- */
.section-wide-news {
    padding: 60px 0;
    background: var(--bg-white);
}

.section-wide-news .container {
    max-width: 1400px; /* Expand past normal limits (1140px) */
    padding: 0 40px; /* Generous padding */
}

/* Update Split Layout for Bigger Impact */
.news-split-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Carousel takes 66% width */
    gap: 40px;
    height: 700px; /* Fixed Large Height */
    align-items: stretch;
}

.carousel-container {
    height: 100%;
    aspect-ratio: auto; /* Let height control */
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); /* Deep shadow */
    border: none;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Center the image */
}

.news-list-container {
    height: 100%;
    overflow-y: auto;
    padding-right: 20px;
    border-left: 1px solid #eee;
    padding-left: 30px;
    max-height: none; /* Let grid control height */
}

/* Mobile Adaptations */
@media (max-width: 1200px) {
    .section-wide-news .container { padding: 0 20px; }
    .news-split-layout { height: 600px; gap: 20px; }
}
@media (max-width: 992px) {
    .news-split-layout { 
        grid-template-columns: 1fr; 
        height: auto; 
        display: block;
    }
    .carousel-container { height: 400px; margin-bottom: 30px; }
    .news-list-container { height: auto; border: none; padding: 0; }
}


/* --- Wide News Layout (Clean Fix) --- */
.section-wide-news .container {
    max-width: 1400px; /* Force breakout */
    padding: 0 40px;
}

.news-split-layout {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important; /* 66% width */
    gap: 40px;
    align-items: stretch;
    height: 600px; /* Fixed large height */
}

.carousel-container {
    height: 100% !important;
    aspect-ratio: auto !important;
}

.news-list-container {
    height: 100% !important;
    overflow-y: auto;
}

/* Restore mobile */
@media (max-width: 992px) {
    .news-split-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        display: block !important;
    }
    .carousel-container { height: 400px !important; margin-bottom: 20px; }
    .news-list-container { height: auto !important; max-height: 400px; }
    .section-wide-news .container { max-width: 100%; padding: 0 20px; }
}


/* --- Wide News Layout (Clean Fix) --- */
.section-wide-news .container {
    max-width: 1400px; /* Force breakout */
    padding: 0 40px;
}

.news-split-layout {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important; /* 66% width */
    gap: 40px;
    align-items: stretch;
    height: 600px; /* Fixed large height */
}

.carousel-container {
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 12px;
    overflow: hidden;
}

.carousel-slide {
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.news-list-container {
    height: 100% !important;
    overflow-y: auto;
    padding-right: 10px;
}

/* Restore mobile */
@media (max-width: 992px) {
    .news-split-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        display: block !important;
    }
    .carousel-container { height: 400px !important; margin-bottom: 20px; }
    .news-list-container { height: auto !important; max-height: 400px; }
    .section-wide-news .container { max-width: 100%; padding: 0 20px; }
}


/* --- Aggressive Layout Override for Side-by-Side News --- */
.section-wide-news {
    max-width: 100vw !important; /* Full browser viewport width */
    width: 100% !important;
    padding: 60px 0;
    overflow-x: hidden;
    position: relative;
    left: 0;
    box-sizing: border-box;
    background-color: #f8f9fa; /* Slight background distinction */
}

/* Widen the container */
.section-wide-news .container {
    max-width: 95% !important; /* Use 95% of the screen width */
    width: 95% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}

/* Force grid layout */
.news-split-layout {
    display: grid !important;
    grid-template-columns: 7fr 3fr !important; /* 70% Carousel, 30% News List */
    gap: 30px !important;
    height: 600px !important; /* Fixed height for consistency */
    align-items: stretch !important; /* Both columns same height */
}

/* Left side: Carousel */
.carousel-container {
    width: 100% !important;
    height: 100% !important; /* Fill the grid cell */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex; /* Ensure slides fill it */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #ffffff; /* Dark background for images */
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    flex: 0 0 100%; /* Don't shrink */
    position: relative;
}

.carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* OR cover? 'contain' keeps text readable. Users usually prefer cover for 'filling'. I'll stick to 'contain' with black bg for academic posters/slides, OR 'cover' if they are photos. The user said 'morphe' which is likely a diagram. Let's use 'contain' with background #fff or black. Wait, user said 'scale to same size' -> imply they want them to FILL the box. 'cover' cuts off content. 'contain' leaves bars. I will use 'cover' but centering it, as it looks 'fullest'. Actually, for scientific figures 'contain' is safer, but 'cover' looks better. I'll use `object-fit: fill` (distorts) or `cover`. I will use `cover` and `object-position: center`. */
    object-fit: cover !important; 
    object-position: center;
}
/* If images are diagrams, cover might crop important text. I'll utilize a special class if needed, but for now cover is the best 'unifying' force. */

/* Right side: News List */
.news-list-container {
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto; /* Scrollable */
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling for news list */
/* .news-list-container::-webkit-scrollbar {
    width: 16px;
} */
.news-list-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 24px;
}

/* Responsive adjust for mobile */
@media (max-width: 992px) {
    .news-split-layout {
        grid-template-columns: 1fr !important; /* Stack vertically on small screens */
        height: auto !important;
    }
    .carousel-container {
        height: 400px !important;
    }
    .news-list-container {
        height: 600px !important;
    }
}


/* --- Research Interests Section --- */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.research-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.research-card h3 {
    margin: 15px 0 10px;
    color: var(--primary);
    font-size: 1.25rem;
}

.research-card .icon-box {
    width: 60px;
    height: 60px;
    background: rgba(37, 117, 252, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.research-list {
    margin-top: 15px;
    padding-left: 20px;
    text-align: left;
    list-style-type: disc; /* Use bullets */
    color: #555;
    font-size: 0.95rem;
    flex-grow: 1; /* Push to bottom if needed, expands card */
}

.research-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}


/* --- FIX: Carousel Image Sizing --- */
.carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Ensure full image is visible */
    background: #fff; /* Black background for letterboxing */
    object-position: center;
}


/* --- Adjust Carousel Height --- */
.news-split-layout {
    height: 500px !important; /* Reduced from 600px to be less overwhelming */
}


/* --- MOBILE NAVIGATION FIX --- */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        text-align: center;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .navbar {
        position: relative; /* Ensure dropdown positions correctly */
    }
}


/* --- 1:1 REPLICA LAYOUT (Reference Style) --- */
/* Reset Section Padding */
.section-wide-news {
    padding: 60px 0;
    background: #fff; /* Clean white background */
}

/* Layout Grid - Adjust Ratio closer to reference (approx 60% Left, 40% Right) */
.news-split-layout {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important; /* Image is large, but text needs width */
    gap: 50px !important;
    height: auto !important; /* Let content define height, but align top */
    align-items: start !important;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- LEFT: Carousel --- */
.carousel-container {
    width: 100% !important;
    aspect-ratio: 20 / 12 !important; /* Ultrawide banner style like reference */
    height: auto !important;
    border-radius: 0 !important; /* Sharp or slight radius */
    box-shadow: none !important;
    background: transparent !important;
}

.carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Keep full image visible */
    background: #f5f5f5; /* Light grey bg instead of black for cleaner look */
}

/* --- RIGHT: News List (Clean Text Style) --- */
.news-list-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important; /* No scrollbar inside, let page scroll or clip */
    height: auto !important;
}

/* Header Styling similar to Reference */
.news-header-ref {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    border-bottom: none;
}

.news-header-ref h2 {
    font-size: 3.5rem; /* Large 'News' title */
    font-weight: 500;
    color: #000;
    margin: 0;
    line-height: 1;
}

.news-header-ref a.more-link {
    font-size: 1rem;
    color: #000;
    font-weight: 600;
    text-decoration: none;
}
.news-header-ref a.more-link:hover { text-decoration: underline; }

/* List Item Styling - The 'List' Look */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Spacing between rows */
}

.news-item-ref {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #111;
    border-bottom: 1px solid #eee; /* Optional separator */
    padding-bottom: 15px;
}

.news-item-ref:last-child { border-bottom: none; }

.news-text, .news-content-wrapper {
    flex: 1;
    padding-right: 20px;
}

/* Highlight styles (e.g. conference names) */
.news-highlight {
    color: #e67e22; /* Orange color from reference */
    font-weight: 500;
    /* font-weight: normal; Reference looks normal/regular weight, just colored */
}

.news-date-ref {
    color: #999;
    font-weight: 300;
    white-space: nowrap;
    font-size: 1.0rem;
    margin-left: auto; /* Push to right */
}


/* --- ENHANCED NEWS STYLING --- */
.news-item-ref {
    transition: all 0.2s ease-in-out;
    padding: 15px 10px; /* Add side padding for hover bg */
    border-radius: 8px; /* Soft corners on hover */
    border-bottom: 1px solid #f0f0f0;
}

.news-item-ref:hover {
    background-color: #fafafa; /* Very subtle grey on hover */
    transform: translateX(5px); /* Slight movement */
    border-bottom-color: transparent; /* Hide border on hover */
}

.news-content-wrapper {
    font-weight: 400;
    color: #2c3e50;
}

.news-content-wrapper strong {
    color: #000;
    font-weight: 600;
}

/* Date Styling Upgrade */
.news-date-ref {
    font-feature-settings: 'tnum'; /* Tabular nums for alignment */
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    color: #95a5a6;
    font-size: 0.95rem;
    margin-left: 30px; /* Ensure gap between text and date */
}

.news-item-ref:hover .news-date-ref {
    color: var(--primary); /* Highlight date on hover */
}

/* Highlight Tag styling */
span[style*='color: #e67e22'] {
    background: rgba(230, 126, 34, 0.08); /* Minimal pill bg */
    padding: 2px 6px;
    border-radius: 4px;
    /* Keep text color as inline style or override here if needed */
}


/* --- ENHANCED NEWS STYLING --- */
.news-item-ref {
    transition: all 0.2s ease-in-out;
    padding: 15px 10px; /* Add side padding for hover bg */
    border-radius: 8px; /* Soft corners on hover */
    border-bottom: 1px solid #f0f0f0;
}

.news-item-ref:hover {
    background-color: #fafafa; /* Very subtle grey on hover */
    transform: translateX(5px); /* Slight movement */
    border-bottom-color: transparent; /* Hide border on hover */
}

.news-content-wrapper {
    font-weight: 400;
    color: #2c3e50;
}

.news-content-wrapper strong {
    color: #000;
    font-weight: 600;
}

/* Date Styling Upgrade */
.news-date-ref {
    font-feature-settings: 'tnum'; /* Tabular nums for alignment */
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    color: #95a5a6;
    font-size: 0.95rem;
    margin-left: 30px; /* Ensure gap between text and date */
}

.news-item-ref:hover .news-date-ref {
    color: var(--primary); /* Highlight date on hover */
}

/* Highlight Tag styling */
span[style*='color: #e67e22'] {
    background: rgba(230, 126, 34, 0.08); /* Minimal pill bg */
    padding: 2px 6px;
    border-radius: 4px;
    /* Keep text color as inline style or override here if needed */
}


/* --- ENHANCED NEWS STYLING --- */
.news-item-ref {
    transition: all 0.2s ease-in-out;
    padding: 15px 10px; /* Add side padding for hover bg */
    border-radius: 8px; /* Soft corners on hover */
    border-bottom: 1px solid #f0f0f0;
}

.news-item-ref:hover {
    background-color: #fafafa; /* Very subtle grey on hover */
    transform: translateX(5px); /* Slight movement */
    border-bottom-color: transparent; /* Hide border on hover */
}

.news-content-wrapper {
    font-weight: 400;
    color: #2c3e50;
}

.news-content-wrapper strong {
    color: #000;
    font-weight: 600;
}

/* Date Styling Upgrade */
.news-date-ref {
    font-feature-settings: 'tnum'; /* Tabular nums for alignment */
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    color: #95a5a6;
    font-size: 0.95rem;
    margin-left: 30px; /* Ensure gap between text and date */
}

.news-item-ref:hover .news-date-ref {
    color: var(--primary); /* Highlight date on hover */
}

/* Highlight Tag styling */
span[style*='color: #e67e22'] {
    background: rgba(230, 126, 34, 0.08); /* Minimal pill bg */
    padding: 2px 6px;
    border-radius: 4px;
    /* Keep text color as inline style or override here if needed */
}


/* --- AUTO-ADAPTIVE IMAGE CLASS --- */
.adaptive-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Ensure the WHOLE image is visible */
    object-position: center;
    background: #fff; /* White background to blend if image is smaller */
}


/* --- USER UPDATE: BRIGHTNESS & CAPTIONS --- */
.carousel-slide img { filter: none !important; }

.carousel-slide {
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.slide-caption-below {
    width: 100%;
    padding: 15px 0;
    text-align: center;
    background: transparent;
    color: #000;
}

.slide-caption-below h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: #000;
}


/* FIX: Adjust image height for caption */
.carousel-slide img.adaptive-img {
    height: auto !important;
    flex: 1;
    max-height: 90%;
}


/* ENSURE TITLE VISIBILITY */
.slide-caption-below {
    padding: 10px;
    background: #fff;
    width: 100%;
    text-align: center;
    font-family: 'Inter', sans-serif;
}
.slide-caption-below h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #333;
}


/* Tweaks for Long Titles */
.slide-caption-below h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    max-width: 90%;
    margin: 0 auto;
}


/* --- REFINED NEWS TYPOGRAPHY (Modern Academic) --- */
.news-list-ref {
    gap: 0 !important; /* Managed by items */
    border-top: 1px solid #eaeaea;
}

.news-item-ref {
    padding: 24px 0 !important;
    border-bottom: 1px solid #eaeaea !important;
    align-items: center !important;
    transition: all 0.2s ease;
    border-radius: 0 !important;
    margin: 0 !important;
}

.news-item-ref:hover {
    background-color: transparent !important;
    transform: translateX(10px);
}

.news-content-wrapper {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.6;
}

.news-content-wrapper strong {
    color: #222;
    font-weight: 600;
}

.news-date-ref {
    font-family: 'Inter', sans-serif;
    font-feature-settings: 'tnum';
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    color: #888 !important;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 20px !important;
}

/* Conference Badges */
.conf-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-left: 4px;
}

.conf-pill.tier-a {
    background-color: rgba(230, 126, 34, 0.1);
    color: #d35400;
}

.more-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 16px;
    border: 1px solid rgba(74, 20, 140, 0.2);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.more-link-modern:hover {
    background-color: var(--primary);
    color: white;
}


/* --- HERO LAYOUT UPDATE (Left Text, Right Space - Wider) --- */
.hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px; /* Increased gap */
    min-height: 450px;
}

.hero-text {
    flex: 5;
    max-width: 800px; /* Increased from 650px */
    z-index: 2;
}

.hero-visual {
    flex: 4;
    height: 400px; /* Increased height */
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

/* Update old selectors to new class name */
.hero-text h1 {
    font-size: 3.8rem; /* Slightly larger title */
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.hero-text .subtitle {
    font-size: 1.6rem;
    color: var(--secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    margin-bottom: 28px;
}

.hero-text .description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 750px; /* Increased from 600px */
    margin-bottom: 36px;
    line-height: 1.8;
}

@media (max-width: 992px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .hero-visual {
        width: 100%;
        height: auto;
        min-height: 200px;
    }
}


/* --- JOIN US / DETAILED DIRECTIONS --- */
.research-details {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.detail-group {
    margin-bottom: 40px;
}

.detail-group h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-list {
    list-style: none;
    padding-left: 0;
}

.detail-list li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
    color: var(--text-dark);
    line-height: 1.6;
}

.detail-list li::before {
    content: '';
    color: var(--secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Join Us Section */
.join-us-section {
    background: #f8f9fa;
    padding: 60px 0;
    margin-top: 60px;
    border-radius: var(--radius-md);
    border: 1px solid #eee;
}

.join-content {
    max-width: 1000px; /* Widen the container */
    margin: 0 auto;
}

.join-header {
    text-align: center;
    margin-bottom: 30px;
}

.join-header h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
}

.join-announcement {
    background: rgba(37, 117, 252, 0.05);
    border-left: 4px solid var(--secondary);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.join-announcement h4 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.req-toggle-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.req-toggle-btn:hover {
    background: var(--primary);
    color: white;
}

.requirements-panel {
    display: none; /* Hidden by default */
    margin-top: 30px;
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
    animation: fadeIn 0.5s ease;
}

.requirements-panel h4 {
    color: var(--primary);
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.requirements-panel ul {
    list-style: disc;
    padding-left: 20px;
    color: #555;
}

.requirements-panel li {
    margin-bottom: 8px;
}

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

