/* =========================================
   1. Modern Fonts & Forest Green Variables
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Light Mode - Forest Green Palette */
    --bg-body: #f0f4f1;        /* Soft, pale grayish-green background */
    --bg-card: #ffffff;        /* Pure white for the content card */
    --text-main: #3a4740;      /* Dark mossy grey for easy reading */
    --text-heading: #1a3324;   /* Deep forest green for headings */
    --accent-color: #2b7a4b;   /* Vibrant forest green for links/buttons */
    --accent-hover: #1e5735;   /* Darker green for hover effects */
    --active-text: #ffffff;    /* White text for the active menu pill */
    --border-color: #dce6e0;   /* Very subtle green-grey border */
    --shadow: 0 10px 40px rgba(26, 51, 36, 0.06); /* Soft green-tinted shadow */
}

body.dark-mode {
    /* Dark Mode - Deep Jungle Palette */
    --bg-body: #0d120f;        /* Almost black, deep jungle green */
    --bg-card: #141c17;        /* Slightly lighter dark green for the card */
    --text-main: #a9b8b0;      /* Soft light sage for reading */
    --text-heading: #e1e8e4;   /* Crisp pale green for headings */
    --accent-color: #5ebd85;   /* Bright mint/fern green for visibility */
    --accent-hover: #8de3b0;   /* Brighter mint on hover */
    --active-text: #0d120f;    /* Dark text for the active menu pill */
    --border-color: #243029;   /* Dark separator lines */
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4); /* Stronger shadow for dark mode */
}

/* =========================================
   2. Base Body Styles
   ========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif; /* Applied the new modern font */
    background-color: var(--bg-body); 
    color: var(--text-main);
    display: flex;
    flex-direction: column; 
    align-items: center; 
    line-height: 1.7; /* Slightly more breathing room for text */
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

h1, h2, h3 { 
    color: var(--text-heading);
    text-align: center; 
    font-weight: 600;
}

/* =========================================
   3. Header / Profile Area
   ========================================= */
.sidebar {
    width: 100%;
    max-width: 800px; 
    height: auto;
    background-color: transparent;
    padding: 50px 20px 20px;
    box-sizing: border-box;
    text-align: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 20px auto; 
    border: 4px solid var(--bg-card); /* Creates a clean rim */
    box-shadow: var(--shadow); /* Modern floating shadow */
    transition: all 0.4s ease;
}

.sidebar h2 {
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px; /* Tighter, more modern headline look */
}

.contact-info {
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-info p { margin: 0; }

/* Social Media Icons */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.social-icons a {
    color: var(--text-main);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* =========================================
   4. Modern Navigation & Toggles
   ========================================= */
.nav-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* Modern Pill Navigation */
.nav-links a {
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 30px; /* Makes them look like pills */
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-links a:hover { 
    color: var(--accent-color); 
    background-color: rgba(43, 122, 75, 0.1); /* Soft green hover background */
    text-decoration: none;
}

.nav-links a.active {
    background-color: var(--accent-color);
    color: var(--active-text);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.language-toggle {
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.language-toggle a { color: var(--text-main); }

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    margin-top: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.theme-toggle:hover { 
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* =========================================
   5. Main Content Area (The "Card")
   ========================================= */
.content {
    background-color: var(--bg-card);
    border-radius: 24px; /* Soft, modern rounded corners */
    box-shadow: var(--shadow); /* The floating effect */
    padding: 50px 60px; /* Lots of clean breathing room */
    margin-top: 20px;
    margin-bottom: 60px;
    max-width: 800px;
    width: 92%;
    box-sizing: border-box;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.home-intro, .research-intro { margin-bottom: 40px; }
.home-intro p, .research-intro p {
    margin-bottom: 18px;
    text-align: justify; 
}

/* =========================================
   6. Custom Components (Video & Lists)
   ========================================= */
.featured-media {
    width: 100%;
    margin-bottom: 50px;
}

.video-container {
    max-width: 750px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background-color: #000;
    border: none; /* Removed the hard border for a cleaner look */
}

.publications h2, .news-updates h2 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-top: 40px;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.news-updates ul {
    list-style-type: none;
    padding: 0;
    max-width: 750px;
    margin: 0 auto;
}

.news-updates li {
    margin-bottom: 15px;
    text-align: left;
    padding-left: 15px;
    border-left: 3px solid var(--accent-color); /* Adds a modern green accent line to news items */
}


/* =========================================
   7. News Carousel 
   ========================================= */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
    margin-top: 20px;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Makes the cards snap neatly into place */
    gap: 20px;
    padding: 15px 5px;
    scrollbar-width: none; /* Hides scrollbar in Firefox */
    scroll-behavior: smooth;
    width: 100%;
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Hides scrollbar in Chrome/Safari */
}

.news-card {
    flex: 0 0 280px; /* Each card is 280px wide */
    background-color: var(--bg-body); /* Uses the slightly darker background to stand out from the white card */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    scroll-snap-align: start; /* Snaps to the beginning of the card */
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px); /* Gentle lift on hover */
}

.news-card .year {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-card);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.news-card p {
    font-size: 0.95rem;
    margin: 0;
    text-align: left;
}

/* Next/Prev Buttons */
.carousel-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
    margin: 0 10px;
}

.carousel-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Hide buttons on mobile, where users prefer to swipe */
@media (max-width: 600px) {
    .carousel-btn {
        display: none;
    }
}

/* =========================================
   Featured GIF Style
   ========================================= */
.featured-gif-container {
    width: 100%;
    max-width: 650px; /* Keeps it from getting too huge on big screens */
    margin: 30px auto 40px auto;
    text-align: center;
}

.featured-gif {
    width: 100%;
    height: auto;
    border-radius: 16px; /* Modern rounded corners */
    box-shadow: var(--shadow); /* Uses the floating shadow we created earlier */
    display: block;
    border: 1px solid var(--border-color);
}

.gif-caption {
    font-size: 0.85rem;
    margin-top: 12px !important;
    opacity: 0.7; /* Makes the caption text slightly faded so it doesn't distract */
}

