:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --transition: all 0.3s ease;

    /* AQI Gradients */
    --gradient-2025: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2024: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --gradient-2023: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --gradient-2022: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

body.dark-mode {
    --primary-color: #ecf0f1;
    --text-color: #ddd;
    /* Softer white for text */
    --bg-color: #121212;
    /* Darker bg */
    --card-bg: #1e1e1e;
}

body.dark-mode .theme-toggle {
    color: #f1c40f;
}

body.dark-mode .navbar {
    background: #1e1e1e;
    color: #fff;
    border-bottom: 1px solid #333;
}

body.dark-mode .btn {
    background: #34495e;
    color: #ecf0f1;
    border-color: #34495e;
}

body.dark-mode .year-item {
    color: #aaa;
}

body.dark-mode .year-item:hover,
body.dark-mode .year-item.active {
    background-color: #333;
    color: #fff;
}

body.dark-mode .section-title {
    color: #fff;
}

body.dark-mode .speaker-title {
    color: #b0b0b0;
}

body.dark-mode .speaker-card {
    background: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode p,
body.dark-mode .hero-date {
    color: #ccc;
}

/* Adjust video icon/text in dark mode */
body.dark-mode .video-wrapper div {
    background: #333 !important;
    color: #aaa !important;
}

/* Theme Toggle Button */
body.dark-mode .theme-toggle {
    color: #f1c40f;
    /* Yellow sun for dark mode */
}

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

body {
    font-family: 'Prompt', 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

/* Navbar Flex Update */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Ensure absolute positioning works inside */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-logo-img {
    height: 40px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
    padding: 10px;
    transition: transform 0.3s;

    /* Position Top Right */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.theme-toggle:hover {
    transform: translateY(-50%) rotate(15deg);
}

/* Ensure menu doesn't overlap button */
.year-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    margin-right: 40px;
    /* Space for the button */
}

/* Mobile Hamburger Icon */
.mobile-menu-icon {
    display: none;
    /* Hidden on desktop */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
}

.mobile-menu-icon span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s;
}

body.dark-mode .mobile-menu-icon span {
    background-color: #fff;
}

/* Hamburger Animation */
.mobile-menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.year-item {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: #666;
}

.year-item:hover {
    background-color: #eee;
    color: var(--primary-color);
}

.year-item.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Sections */
section {
    padding: 60px 0;
}

/* Hero Section */
.hero-section {
    color: #fff;
    text-align: center;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 80px;
    /* Adjust spacing from bottom */
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Above particles */
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-date {
    font-size: 1.2rem;
    opacity: 1;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Video & Poster */
.media-section {
    text-align: center;
    background: var(--card-bg);
    transition: var(--transition);
}

.section-light {
    background: var(--card-bg);
    transition: var(--transition);
}

.section-alt {
    background: #f4f4f4;
    transition: var(--transition);
}

body.dark-mode .section-alt {
    background: #252525;
}

.video-container {
    max-width: 800px;
    margin: 0 auto 40px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.poster-container img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Speakers */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
}

.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.speaker-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.speaker-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.speaker-info {
    padding: 20px;
}

.speaker-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.speaker-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.speaker-topic {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.speaker-actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn:hover {
    background: #f0f0f0;
    color: #333;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #34495e;
    color: #fff;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
    display: block;
    /* Remove bottom space */
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

/* Mobile */

@media (max-width: 768px) {
    .nav-container {
        /* Keep row for Logo + Toggle + Hamburger */
        padding: 0 15px;
    }

    .year-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);

        display: none;
        /* Hidden by default */
        margin-right: 0;
        gap: 15px;
    }

    .year-menu.active {
        display: flex;
        /* Show when active */
    }

    /* Adjust positions for mobile */
    .theme-toggle {
        right: 60px;
        /* Move left of the hamburger */
    }

    .mobile-menu-icon {
        display: flex;
        /* Show hamburger */
        z-index: 1001;
    }

    /* Dark Mode Menu */
    body.dark-mode .year-menu {
        background: #1e1e1e;
        border-bottom: 1px solid #333;
    }

    .hero-title {
        font-size: 2rem;
    }
}