:root {
    /* Academic Blue Palette */
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-primary: #3b82f6;
    /* More solid academic blue */
    --color-primary-dark: #1e40af;
    --color-accent: #f59e0b;
    /* Golden accent */
    --color-glass: rgba(15, 23, 42, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --gradient-text: linear-gradient(to right, #60a5fa, #fbbf24);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1440px;
    --header-height: 80px;
    --top-bar-height: 40px;
}

/* Light Mode (Academic / Paper Feel) */
body.light-mode {
    --color-bg: #ffffff;
    --color-bg-alt: #f1f5f9;
    --color-text: #1e293b;
    --color-text-muted: #475569;
    --color-primary: #1e40af;
    --color-primary-dark: #1e3a8a;
    --color-accent: #d97706;
    --color-glass: rgba(255, 255, 255, 0.85);
    --color-glass-border: rgba(0, 0, 0, 0.05);

    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    --gradient-text: linear-gradient(to right, #1e40af, #d97706);
}

/* Header Controls & Theme Toggle */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-glass-border);
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--color-primary);
    color: #fff;
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 15px var(--color-primary);
}

/* Show/Hide Icons based on Theme */
body .icon-sun {
    display: block;
}

body .icon-moon {
    display: none;
}

body.light-mode .icon-sun {
    display: none;
}

body.light-mode .icon-moon {
    display: block;
    color: var(--color-text);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle academic pattern background */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 L20 10 L20 20 L10 20 Z' fill='none' stroke='rgba(255,255,255,0.01)' stroke-width='1'/%3E%3C/svg%3E");
}

body.light-mode {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 L20 10 L20 20 L10 20 Z' fill='none' stroke='rgba(0,0,0,0.01)' stroke-width='1'/%3E%3C/svg%3E");
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: 1.75rem;
}

.gradient-text {
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass {
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(56, 189, 248, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.23);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #ffffff;
}

/* Force high contrast on Hero Section */
.hero-section .btn-primary,
.hero-section .btn-outline {
    color: #ffffff !important;
}

.hero-section .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.site-header {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 9999;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-glass-border);
    transition: all 0.3s ease;
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-bar-height);
    background: var(--color-bg-alt);
    z-index: 10000;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-glass-border);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-contacts,
.top-socials {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.top-contacts a:hover,
.top-socials a:hover {
    color: var(--color-primary);
}

/* Semi-transparent override if desired, using variable */
.site-header.scrolled {
    background: var(--color-glass);
    /* Ideally we want a stronger opacity on scroll. 
       Let's define a new var for scrolled header or just use high opacity color-glass.
       For now, let's use a specialized background color logic.
    */
    background: var(--color-bg-alt);
    /* More solid background on scroll */
    opacity: 0.95;
    backdrop-filter: blur(12px);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide header logo on homepage top */
.home .site-header:not(.scrolled) .logo {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
}

.logo a,
.logo .custom-logo-link {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
}

.site-logo,
.custom-logo {
    height: auto;
    max-height: calc(var(--header-height) - 10px);
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-text {
        display: none;
        /* Hide text on mobile to save space */
    }

    .site-logo,
    .custom-logo {
        max-height: calc(var(--header-height) - 20px);
    }
}

/* Multi-level Navigation */
.main-navigation ul {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    padding: 20px 0;
    /* Vertical hit area */
}

.main-navigation a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
    color: var(--color-primary);
}

/* Sub-menus (Dropdowns) */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg-alt);
    min-width: 220px;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.main-navigation li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul li {
    padding: 0;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-navigation ul ul a:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* 3rd Level Cascading */
.main-navigation ul ul ul {
    top: 0;
    left: 100%;
    transform: translateX(10px);
}

.main-navigation ul ul li:hover>ul {
    transform: translateX(0);
}

@media (max-width: 1024px) {
    .site-header {
        top: 0;
        /* No top bar on mobile or combined */
    }

    .top-bar {
        display: none;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .main-navigation {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-bg);
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        display: flex;
        overflow-y: auto;
    }

    .main-navigation.is-open {
        transform: translateX(0);
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: flex-end;
        /* Align items to the right */
        gap: 1.5rem;
        width: 100%;
    }

    .main-navigation li {
        padding: 0;
        width: 100%;
        text-align: right;
    }

    /* Sub-menus on Mobile */
    .main-navigation ul ul {
        position: absolute;
        right: 100%;
        /* Open to the left */
        top: auto;
        bottom: auto;
        min-width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-10px);
        margin-right: 15px;
        z-index: 1001;
        background: var(--color-bg-alt);
        border: 1px solid var(--color-glass-border);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .main-navigation li.sub-menu-open>ul {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .main-navigation ul ul li {
        text-align: left;
        /* Keep text left-aligned inside sub-menus or right? Let's stick to right for consistency if requested */
        text-align: right;
    }

    .menu-toggle {
        display: flex;
        /* Visible on mobile */
    }
}

/* Footer */
.site-footer {
    background: var(--color-bg-alt);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--color-glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-meta {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-glass-border);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Inner Page Spacing & Styling */
.generic-content {
    /* Push content down below fixed header + extra space */
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 4rem;
    min-height: 80vh;
}

.generic-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.generic-content h1::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--color-primary);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.content-body {
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 3rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

/* Feature Sections (Zig-Zag) */
.features-section {
    padding: 6rem 0;
    position: relative;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 8rem;
}

/* Alternate direction */
.feature-row:nth-child(even) {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 1;
}

.feature-image {
    flex: 1;
    position: relative;
}

.feature-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease;
    border: 1px solid var(--color-glass-border);
}

.feature-row:hover .feature-image img {
    transform: scale(1.02);
}

.feature-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.hall-of-fame .feature-content {
    order: 2;
}

.hall-of-fame .feature-image {
    order: 1;
}

.glass-carousel {
    position: relative;
    padding: 1rem;
    background: var(--color-glass);
    border-radius: 30px;
    border: 1px solid var(--color-glass-border);
}

.feature-list {
    list-style: none;
    /* Removed default bullets */
}

.feature-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.feature-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .feature-row {
        flex-direction: column !important;
        /* Stack vertically on mobile */
        gap: 2rem;
        margin-bottom: 4rem;
    }

    .feature-image {
        width: 100%;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Ensure it's in the flow */
    background-color: #0f172a !important;
    background-size: cover;
    background-position: center;
    padding: var(--header-height) 1.5rem 5rem;
    z-index: 5;
    /* Base layer for sections */
    overflow: hidden;
    /* Contain background elements */
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        /* Substantial initial height */
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 4rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center content vertically on mobile too */
    }
}

.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 100;
    /* High z-index to stay above sections */
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    /* Ensure space from header if centered */
}

.hero-large-logo {
    height: 180px;
    width: auto;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
    display: block !important;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 768px) {
    .hero-large-logo {
        height: 120px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-large-logo {
        height: 90px;
    }
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    font-family: var(--font-heading);
    opacity: 1 !important;
    visibility: visible !important;
    display: block;
    white-space: normal;
    /* Allow wrap if needed but keep in line as much as possible */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
    .hero-title {
        white-space: nowrap;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #ffffff !important;
    /* Full white for maximum contrast */
    margin-bottom: 3.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 600px) {
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 !important;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #fbbf24);
    /* More vibrant gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #60a5fa;
    /* Fallback */
}

/* Background Blobs for specific "cool" effect */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.5;
    animation: blob-float 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #4f46e5;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #0ea5e9;
    animation-delay: -5s;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -50px) scale(1.1);
    }
}

/* Stats Section Removed */

.stat-card {
    padding: 2.5rem;
    text-align: center;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
}

/* Quick Links */
.quick-links-section {
    padding: 6rem 0;
    /* More space */
    margin-top: 0;
    position: relative;
    z-index: 10;
    /* Lower than hero to stay below if they overlap */
    background: var(--color-bg);
    /* Use base background */
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1023px) {
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .quick-links-grid {
        grid-template-columns: 1fr !important;
    }
}

.link-card {
    padding: 1.5rem 1rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.link-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    background: var(--color-bg-alt);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.link-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.link-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.link-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Events Section Redesign */
.events-section {
    padding: 8rem 0;
    position: relative;
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('../images/events-bg.png');
    background-size: cover;
    background-attachment: fixed;
    border-top: 1px solid var(--color-glass-border);
    border-bottom: 1px solid var(--color-glass-border);
}

body.light-mode .events-section {
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../images/events-bg.png');
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.event-card {
    display: flex;
    gap: 2rem;
    padding: 2.5rem;
    border-radius: 24px;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .event-card {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.event-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.event-date {
    background: var(--color-primary);
    color: #fff;
    padding: 1.5rem 1rem;
    border-radius: 18px;
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.event-date .day {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
}

.event-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 5px;
    letter-spacing: 0.1em;
}

.event-info {
    flex: 1;
}

.event-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.6rem;
    color: var(--color-text);
    font-family: var(--font-heading);
}

.event-info p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.event-time {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-accent);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
        gap: 1.5rem;
    }

    .event-date {
        min-width: auto;
        width: 100%;
        flex-direction: row;
        gap: 10px;
        padding: 0.75rem;
    }
}

/* News Bento Grid */
.news-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 400px);
    gap: 1.5rem;
}

.news-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Feature the first item */
.news-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.news-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-bg {
    transform: scale(1.05);
    /* Zoom effect */
}

.news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
}

.news-date {
    display: block;
    color: var(--color-accent);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.5rem;
    margin: 0;
    color: #fff;
}

.news-card:nth-child(1) .news-title {
    font-size: 2.5rem;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .news-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .news-card:nth-child(1) {
        grid-column: span 1;
        grid-row: auto;
        min-height: 400px;
        /* Keep it big */
    }

    .news-card {
        min-height: 300px;
    }
}

/* --- New Animations & Interactions --- */

/* Scroll Reveal Base State */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays if needed */
.feature-row:nth-child(2) {
    transition-delay: 0.2s;
}

.feature-row:nth-child(3) {
    transition-delay: 0.4s;
}

/* Blob Animation Refinement */
.blob {
    will-change: transform;
    transition: transform 0.1s linear;
    /* For scroll parallax */
}

/* 3D Tilt Effect on Cards (Subtle) */
.stat-card,
.news-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.15);
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Hero Title Dynamic Effect */
.gradient-text {
    background-size: 200% auto;
    animation: gradient-flow 5s linear infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Button Pulse */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease-out;
}

.btn-primary:active::after {
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

/* Mobile Menu Animation */
.main-navigation {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Feature Image Decoration */
.feature-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--color-primary);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    transition: transform 0.4s ease;
}

.feature-row:hover .feature-image::before {
    transform: translate(10px, 10px);
    opacity: 0.6;
}

.feature-row:nth-child(even) .feature-image::before {
    left: -20px;
    right: 20px;
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 4rem;
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: var(--color-text-muted);
    font-size: 2rem;
    padding: 1rem;
    display: inline-block;
}

.scroll-indicator a:hover {
    color: var(--color-primary);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- Hero Customization Styles --- */

/* Specific selectors to avoid targeting the section itself */
section.hero-section video.hero-bg-video,
section.hero-section .hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    background-color: #000;
}

.hero-bg-image {
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    /* Overlay to make text readable */
    z-index: 1;
    backdrop-filter: blur(2px);
}

/* Make sure blobs are behind everything if used */
.blob {
    z-index: 0;
}

/* Hero content z-index is handled in the main section above */

/* Mobile Optimization */
@media (max-width: 768px) {

    /* Disable Video on Mobile to save data.
       We specifically target the video element, NOT the section class.
    */
    video.hero-bg-video {
        display: none !important;
    }
}

/* Specific Mobile Tweaks for*/
@media (max-width: 480px) {
    .tg-chat-box {
        width: 300px;
        right: -10px;
        /* Offset for container padding if any, or just alignment */
    }
}

/* --- Seasonal / Snow Effect --- */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: -1;
    /* Behind all content */
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    user-select: none;
    pointer-events: none;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.5;
}

/* Dark mode snow is white, Light mode snow is slightly blueish */
body.light-mode .snowflake {
    color: #a5f3fc;
    /* Cyan 200 */
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

@keyframes snowfall {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* --- New Page Layouts (Contacts, Library, Archive) --- */

/* Archive & General Grid Enhancements */
.archive-description {
    margin: 1rem auto 3rem;
    max-width: 700px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

.pagination .page-numbers {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    transition: all 0.3s ease;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--color-primary);
    color: white;
}

/* Contacts Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info-boxes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 16px;
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
}

.info-card p,
.info-card a {
    font-size: 1rem;
    color: var(--color-text);
}

.socials-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
}

.social-btn {
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Library Layout */
.library-shelf {
    padding: 0;
    margin-bottom: 2rem;
    border-radius: 20px;
    overflow: hidden;
}

.shelf-header {
    background: var(--color-primary);
    padding: 1rem 2rem;
    color: white;
}

.shelf-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.shelf-body {
    padding: 2rem;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Mobile Optimization */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
        /* Smaller title */
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .stats-section {
        padding: 3rem 0;
        /* Less padding */
    }

    .feature-list li {
        font-size: 1rem;
        padding-left: 1.5rem;
    }

    /* Hide decorative blobs on mobile to simplify render */
    .blob {
        opacity: 0.3;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: #3b82f6;
    border: none;
    color: #fff;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #1e40af;
}

/* Footer Social Icons */
.social-icon {
    color: var(--color-text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.social-icon:hover {
    color: var(--color-accent);
    transform: translateY(-3px);
    opacity: 1;
}

.social-icon img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.social-icon:hover img {
    filter: brightness(0) invert(1) drop-shadow(0 0 5px var(--color-accent));
}