:root {
    --primary-color: #1A237E; /* Darker, more sophisticated blue */
    --secondary-color: #64B5F6; /* Lighter blue for accents */
    --accent-color: #FFC107; /* Kept gold, slightly adjusted */
    --accent-hover: #FFA000; /* Darker gold for hover */
    --background-color: #FDFEFE; /* Very light grey, almost white */
    --light-bg-color: #FFFFFF;
    --neutral-accent-color: #E0E0E0; /* Light grey for borders, subtle backgrounds */
    --text-color: #212121; /* Dark grey for body text */
    --text-light: #5F6368; /* Lighter grey for secondary text */
    --text-lighter: #757575; /* Even lighter for less important text */
    --border-color: var(--neutral-accent-color);
    --section-padding: 90px 0; /* Increased padding */
    --transition: all 0.3s ease-in-out;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
    --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.12); /* Softer hover shadow */
    --border-radius: 8px; /* Slightly reduced for modern feel */
    --font-body: 'Montserrat', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-size-base: 17px; /* Base font size */
    --line-height-base: 1.7; /* Increased line height for readability */
}

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

body {
    font-family: var(--font-body);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 0.75em;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; } /* Section titles */
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1.2em;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.3); /* Accent color glow */
}
*:focus { /* Fallback for older browsers or elements not matching :focus-visible */
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}


.container {
    width: 90%; /* Increased width for more whitespace */
    max-width: 1280px; /* Increased max-width */
    margin: 0 auto;
    padding: 0 15px; /* Added horizontal padding */
}

.btn {
    display: inline-block;
    padding: 14px 28px; /* Increased padding */
    background-color: var(--primary-color);
    color: white;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px; /* Slightly increased spacing */
    font-size: 0.9rem; /* Relative font size */
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start from outside */
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transition: left 0.35s ease-in-out; /* Changed transition property */
    z-index: -1;
}

.btn:hover, .btn:focus {
    color: var(--primary-color) !important; /* Ensure text color changes on hover */
    transform: translateY(-3px); /* Enhanced hover effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color); /* Show border on hover */
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn:hover::before {
    left: 0; /* Slide in from left */
}

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

.btn-outline::before {
    background-color: var(--primary-color);
}

.btn-outline:hover, .btn-outline:focus {
    color: white !important; /* Ensure text color changes on hover */
    border-color: var(--primary-color);
}

.section-title {
    font-size: 2.4rem; /* Adjusted size */
    margin-bottom: 50px; /* Increased margin */
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 20px; /* Increased padding */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px; /* Increased width */
    height: 5px; /* Increased height */
    background-color: var(--accent-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    max-width: 850px; /* Increased max-width */
    margin: -30px auto 50px; /* Adjusted margins */
    color: var(--text-light);
    font-size: 1.1rem; /* Relative font size */
    line-height: 1.8;
}

/* Header Styles */
header {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly more transparent */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); /* Softer shadow */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease-in-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.97); /* Slightly less transparent when scrolled */
    box-shadow: 0 3px 25px rgba(0, 0, 0, 0.1); /* Slightly stronger shadow when scrolled */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0; /* Adjusted padding */
    transition: padding 0.3s ease-in-out;
}

.scrolled .header-container {
    padding: 12px 0; /* Reduced padding when scrolled */
}

.logo {
    font-size: 1.6rem; /* Relative font size */
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px; /* Adjusted gap */
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03); /* Slightly more pronounced hover */
}

.logo img {
    height: 45px; /* Slightly larger logo */
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(7deg) scale(1.05); /* Enhanced hover for image */
}

.header-logo { /* Added for CNRS logo */
    height: 40px; /* Adjust size as needed */
    width: auto;
    vertical-align: middle; /* Align with text */
    margin-right: 8px; /* Space between logo and name */
    /* No extra hover effects needed, inherits from .logo */
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center; /* Vertically align items */
}

.nav-links li {
    margin-left: 35px; /* Increased spacing */
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem; /* Relative font size */
    position: relative;
    padding: 8px 4px; /* Added more padding for touch targets */
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; /* Adjusted position */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px; /* Thicker underline */
    background-color: var(--accent-color);
    transition: width 0.35s ease-in-out;
    border-radius: 1px;
}

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

.nav-links a:hover,
.nav-links a:focus {
    color: var(--primary-color);
}
.nav-links a.active-link { /* Style for active page link */
    color: var(--primary-color);
    font-weight: 700;
}
.nav-links a.active-link::after {
    width: 100%;
    background-color: var(--primary-color);
}


.hamburger {
    display: none; /* Will be shown by media query */
    cursor: pointer;
    padding: 10px;
    background: transparent;
    border: none;
    z-index: 1002;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

/* Responsive Styles */

    
@media (max-width: 991px) {
    .hamburger {
        display: block; /* Show hamburger on smaller screens */
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--light-bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 1001;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        padding: 12px 30px;
        border-bottom: 1px solid var(--neutral-accent-color);
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0;
        width: 100%;
    }

    .nav-links a::after {
        display: none;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin: -20px auto 30px;
    }

    .header-container {
        padding: 12px 0;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo img {
        height: 35px;
    }
}

/* Mobile adjustments for About section */
@media (max-width: 768px) { /* Added a new breakpoint for smaller mobiles */
    .profile-content {
        flex-direction: column; /* Stack image and info vertically */
        align-items: center;
    }

    .profile-image {
        margin-bottom: 30px; /* Add space below image */
    }

    .profile-info {
        text-align: center; /* Center text in profile info */
    }

    .profile-details {
        text-align: left; /* Keep list items left-aligned */
        margin-top: 20px;
    }

    .profile-details li {
        margin-bottom: 15px; /* Add space between list items */
        display: flex; /* Use flexbox for alignment */
        align-items: flex-start; /* Align items to the top */
        text-align: left; /* Ensure text is left-aligned */
        word-break: break-word; /* Allow long words to break */
    }

    .profile-details li i {
        margin-right: 10px; /* Space between icon and text */
    }

    .expertise-tags {
        justify-content: center; /* Center tags on mobile */
    }

    .profile-metrics {
        justify-content: center; /* Center metrics on mobile */
        flex-wrap: wrap; /* Allow metrics to wrap */
        gap: 20px; /* Add gap between metrics */
    }

    .metric {
        min-width: unset; /* Remove min-width constraint */
    }
}

/* Mobile adjustments for Research section */
@media (max-width: 768px) {
    .research-grid {
        grid-template-columns: 1fr; /* Stack research cards vertically */
        gap: 40px; /* Add space between stacked cards */
    }

    .research-card {
        flex-direction: column; /* Stack image and content */
        align-items: center;
    }

    .research-card-img {
        margin-bottom: 20px; /* Space below image */
    }

    .research-card-content {
        text-align: center; /* Center text in research card */
    }

    .research-card-content .btn {
        margin-top: 20px; /* Space above button */
    }
}

/* General mobile font size adjustments */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.1rem; }
    body { font-size: 16px; }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .hero-position { font-size: 1rem; }
    .hero-description { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1rem; }
}

/* Further adjustments for very small screens */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-position { font-size: 0.9rem; }
    .hero-description { font-size: 0.9rem; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.9rem; }
    .hero-btns {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px; /* Reduce gap */
    }
    .hero-btns .btn {
        width: 100%; /* Make buttons full width */
        text-align: center;
    }
}

.hamburger i {
    font-size: 1.8rem; /* Larger icon */
    transition: transform 0.3s ease;
}

.hamburger.active i {
    transform: rotate(90deg); /* Example: rotate icon when active */
}


/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh; /* Use min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px; /* Account for fixed header */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind content */
}

/* Removed .background-slide and .background-slide::before as video is primary */

.hero-content {
    position: relative;
    z-index: 2; /* Ensure content is above overlay */
    max-width: 900px; /* Increased max-width */
    color: white;
    text-align: center;
    padding: 40px 20px; /* Added more padding */
    animation: fadeUp 1.2s ease-out 0.3s backwards; /* Delayed animation */
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px); /* Increased initial offset */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.6rem; /* Larger, more impactful title */
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--secondary-color); /* Light blue for modern contrast */
    text-shadow: 0 2px 10px rgba(0,0,0,0.6); /* Slightly stronger shadow for new color */
}

.hero-subtitle { /* This class was not in HTML, but good for future use */
    font-size: 1.5rem;
    margin-bottom: 35px;
    font-weight: 400; /* Lighter weight for subtitle */
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-position {
    font-size: 1.3rem; /* Adjusted size */
    margin-bottom: 15px; /* Reduced margin as title is main focus */
    color: var(--accent-color);
    font-weight: 700; /* Bolder */
    text-transform: uppercase;
    letter-spacing: 1px;
}


.hero-description {
    font-size: 1.15rem; /* Adjusted size */
    margin-bottom: 45px; /* Increased margin */
    max-width: 750px; /* Increased max-width */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7; /* Improved readability */
    color: rgba(255,255,255,0.95); /* High contrast */
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    font-family: var(--font-heading);
    font-weight: 700;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 25px; /* Increased gap */
    flex-wrap: wrap;
}
.hero-btns .btn {
    padding: 16px 32px; /* Larger buttons in hero */
    font-size: 1rem;
}


.hero-scroll {
    position: absolute;
    bottom: 40px; /* Increased distance from bottom */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    font-size: 1.8rem; /* Larger icon */
    animation: bounce 2.5s infinite; /* Slower bounce */
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.hero-scroll:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-15px) translateX(-50%); /* Increased bounce height */
    }
    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}


.hero-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Video behind overlay */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26, 35, 126, 0.6) 0%, rgba(26, 35, 126, 0.85) 100%); /* Adjusted gradient for better text contrast */
    z-index: 1; /* Overlay above video, content above overlay */
}

/* About Section */
.about {
    padding: var(--section-padding);
    background-color: var(--light-bg-color);
}

/* .about-content is generic, specific styling for profile section below */

.about-intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* Center intro text */
    margin-bottom: 40px;
}


/* Utility Text Styles */
.text-primary {
    color: var(--primary-color);
    font-weight: 700; /* Bolder */
}

/* Removed .text-drag and .text-heat as they are too specific for global CSS */

/* Removed .benefit-cards and .benefit-card as they are not in the current HTML structure */
/* If cards are needed elsewhere, they should be styled specifically or with a more generic card system */

/* Styles for the new HDR Vision Section */
.hdr-vision-section {
    padding: var(--section-padding);
    background-color: var(--background-color); /* Slightly different from pure white */
}

.hdr-intro-text p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.5em;
}

/* Mobile Responsiveness Fixes */


.hdr-key-achievements,
.future-directions {
    margin-top: 40px;
    margin-bottom: 30px;
}

.hdr-key-achievements h3,
.future-directions h4 { /* Target h3 in achievements and h4 in future directions */
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
}
.future-directions h4 {
    font-size: 1.4rem; /* Slightly smaller for sub-section */
}


.hdr-key-achievements ul,
.future-directions ul {
    list-style: none;
    padding-left: 0;
}

.hdr-key-achievements ul li,
.future-directions ul li {
    position: relative;
    padding-left: 35px; /* Space for icon */
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.7;
}

.hdr-key-achievements ul li i.fa-fw,
.future-directions ul li i.fa-fw { /* Assuming FontAwesome icons */
    position: absolute;
    left: 0;
    top: 4px; /* Adjust for vertical alignment */
    color: var(--accent-color);
    font-size: 1.2rem;
    width: 25px; /* Ensure fixed width for alignment */
    text-align: center;
}

.profile-section {
    display: flex;
    flex-direction: column; /* Stack items vertically on small screens */
    gap: 30px; /* Reduced gap */
    margin-top: 50px; /* Increased margin */
}

.profile-content {
    display: flex;
    flex-direction: column; /* Stack on small screens */
    gap: 35px; /* Adjusted gap */
    align-items: center; /* Center items when stacked */
}

.profile-image {
    flex-basis: 280px; /* Adjusted size */
    flex-shrink: 0;
    max-width: 280px; /* Ensure it doesn't grow too large */
}

.profile-image img {
    width: 100%;
    border-radius: 50%; /* Circular image */
    box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* Softer shadow */
    border: 6px solid var(--light-bg-color); /* Border to lift image */
}

.profile-info {
    flex-grow: 1;
    text-align: center; /* Center text when stacked */
}

.profile-info h3 {
    font-size: 1.8rem; /* Adjusted size */
    margin-bottom: 25px;
    color: var(--primary-color);
}

.profile-details {
    list-style: none;
    padding: 0;
    margin-bottom: 35px; /* Increased margin */
}

.profile-details li {
    margin-bottom: 15px; /* Increased spacing */
    display: flex;
    align-items: center;
    justify-content: center; /* Center items for text-align:center */
    font-size: 1rem; /* Relative font size */
    color: var(--text-light);
}

.profile-details li i {
    margin-right: 15px; /* Increased spacing */
    color: var(--primary-color);
    width: 22px; /* For alignment */
    text-align: center;
    font-size: 1.1rem;
}
.profile-details li strong {
    color: var(--text-color); /* Darker text for strong elements */
}


.expertise-areas {
    margin-bottom: 35px; /* Increased margin */
}

.expertise-areas h4 {
    font-size: 1.5rem; /* Adjusted size */
    margin-bottom: 20px;
    color: var(--primary-color);
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* Increased gap */
    justify-content: center; /* Center tags */
}

.expertise-tags span {
    background-color: var(--accent-color);
    color: var(--primary-color); /* Good contrast */
    padding: 10px 18px; /* Increased padding */
    border-radius: 25px; /* More rounded */
    font-size: 0.9rem; /* Relative font size */
    font-weight: 600; /* Bolder */
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.expertise-tags span:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px) scale(1.03); /* Enhanced hover */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


.profile-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* Slightly larger minmax */
    gap: 25px; /* Increased gap */
    margin-top: 25px; /* Adjusted margin */
    padding-top: 25px; /* Adjusted padding */
    border-top: 1px solid var(--border-color);
}

.metric {
    text-align: center;
    padding: 20px; /* Increased padding */
    background-color: var(--background-color); /* Use main bg for subtle difference */
    border-radius: var(--border-radius);
    border: 1px solid var(--neutral-accent-color); /* Subtle border */
}

.metric-number {
    display: block;
    font-size: 2rem; /* Larger numbers */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px; /* Increased margin */
}

.metric-label {
    font-size: 0.9rem; /* Relative font size */
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Foldable Section General Styles */
.foldable-section {
    padding: var(--section-padding);
    border-bottom: 1px solid var(--border-color);
    position: relative; /* For potential absolute positioned elements inside */
}
.foldable-section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* Adjusted margin */
    cursor: pointer; /* Make entire header clickable to toggle */
}

.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}
.section-header .section-title::after {
    left: 0;
    transform: translateX(0);
    width: 70px; /* Adjusted width */
}


.section-toggle-button {
    background: transparent; /* Ensure transparent background */
    border: none;
    color: var(--primary-color);
    font-size: 1.8rem; /* Adjusted size */
    cursor: pointer;
    padding: 12px; /* Increased padding for touch */
    line-height: 1;
    transition: transform 0.35s ease-in-out;
    margin-left: 20px; /* Space from title */
}

.section-toggle-button:hover, .section-toggle-button:focus {
    color: var(--accent-color);
}

/* Icon change handled by JS by toggling fa-plus/fa-minus on the <i> element */
.foldable-section.expanded .section-toggle-button i.fa-plus::before {
    content: "\f068"; /* FontAwesome minus icon */
}
.foldable-section:not(.expanded) .section-toggle-button i.fa-minus::before {
    content: "\f067"; /* FontAwesome plus icon */
}
.foldable-section.expanded .section-toggle-button {
     transform: rotate(360deg); /* Rotate on expand for visual cue, if desired */
}


.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), /* Smoother transition */
                padding-top 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                padding-bottom 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.5s ease-in-out; /* Added opacity transition */
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0; /* Start hidden */
    visibility: hidden; /* Ensure it's not focusable when collapsed */
}

#research-motivation .section-content {
    text-align: center; /* Center align text in Research Motivation section */
}

.foldable-section.expanded .section-content {
    max-height: 7000px; /* Increased max-height */
    padding-top: 30px; /* Increased padding */
    padding-bottom: 30px; /* Increased padding */
    opacity: 1; /* Fade in */
    visibility: visible;
}

#research-motivation .section-content {
    text-align: center; /* Center align text in Research Motivation section */
}


/* Experience Timeline Section */
.experience-section {
    background-color: var(--background-color);
}

.timeline-container.revised-timeline {
    position: relative;
    max-width: 950px; /* Increased max-width */
    margin: 50px auto 0; /* Adjusted margins */
    padding: 30px 0; /* Increased padding */
}

.timeline-container.revised-timeline::before {
    content: '';
    position: absolute;
    left: 24px; /* Adjusted for larger marker */
    top: 10px; /* Start below first marker */
    bottom: 10px; /* End above last marker */
    width: 5px; /* Thicker line */
    background-color: var(--neutral-accent-color);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px; /* Increased spacing */
    padding-left: 70px; /* Increased padding for marker and logo */
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 10px; /* Adjusted position */
    top: 5px; /* Align with text better */
    width: 30px; /* Larger marker */
    height: 30px; /* Larger marker */
    border-radius: 50%;
    background-color: var(--light-bg-color);
    border: 5px solid var(--primary-color); /* Thicker border */
    z-index: 1;
    box-shadow: 0 0 0 5px var(--background-color); /* Create a "cutout" effect */
}
.timeline-item.education .timeline-marker {
    border-color: var(--secondary-color);
}


.timeline-card {
    background-color: var(--light-bg-color);
    padding: 30px; /* Increased padding */
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    border-left: 6px solid var(--primary-color); /* Thicker border */
}
.timeline-item.education .timeline-card {
    border-left-color: var(--secondary-color);
}

.timeline-card:hover {
    transform: translateY(-6px) translateX(6px); /* Enhanced hover */
    box-shadow: var(--card-shadow-hover);
}

.timeline-institution-logo {
    position: absolute;
    top: 25px; /* Adjusted position */
    right: 25px; /* Adjusted position */
    max-height: 55px; /* Slightly larger */
    max-width: 110px; /* Slightly larger */
    opacity: 0.6; /* Slightly less opaque */
    transition: opacity 0.3s ease;
}
.timeline-card:hover .timeline-institution-logo {
    opacity: 0.85;
}


.timeline-date {
    font-size: 0.95rem; /* Relative font size */
    color: var(--text-lighter);
    margin-bottom: 10px; /* Increased margin */
    font-weight: 700; /* Bolder */
    letter-spacing: 0.5px;
}

.timeline-title {
    font-size: 1.5rem; /* Adjusted size */
    margin-bottom: 8px; /* Increased margin */
    color: var(--primary-color);
}

.timeline-institution {
    font-size: 1.05rem; /* Relative font size */
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 18px; /* Increased margin */
}

.timeline-details {
    list-style-type: none; /* Remove default list style */
    padding-left: 0;
    margin-bottom: 25px; /* Increased margin */
    font-size: 1rem; /* Relative font size */
}
.timeline-details li {
    margin-bottom: 10px; /* Increased spacing */
    line-height: 1.7; /* Improved readability */
    padding-left: 25px; /* Space for custom bullet */
    position: relative;
}
.timeline-details li::before { /* Custom bullet */
    content: "\f105"; /* FontAwesome angle-right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--accent-color);
    font-size: 0.9em;
}

.timeline-card p.timeline-details {
    padding-left: 0;
    list-style: none;
    font-size: 1rem;
    line-height: 1.7;
}


.timeline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Increased gap */
    margin-top: 20px; /* Increased margin */
}

.timeline-badges span {
    background-color: var(--neutral-accent-color);
    color: var(--text-color); /* Darker text for better contrast */
    padding: 8px 15px; /* Increased padding */
    border-radius: 20px; /* More rounded */
    font-size: 0.85rem; /* Relative font size */
    font-weight: 600; /* Bolder */
}

.experience-cta {
    text-align: center;
    margin-top: 60px; /* Increased margin */
}


/* Research Section */
.research {
    background-color: var(--light-bg-color);
}
.research-intro p {
    text-align: center;
    max-width: 850px; /* Increased max-width */
    margin: 0 auto 50px auto; /* Adjusted margins */
    font-size: 1.1rem; /* Relative font size */
    line-height: 1.8;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger minmax */
    gap: 35px; /* Increased gap */
    margin-bottom: 50px; /* Increased margin */
}

.research-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color); /* Subtle border */
}

.research-card:hover {
    transform: translateY(-10px); /* Enhanced hover */
    box-shadow: var(--card-shadow-hover);
}

.research-card-img {
    width: 100%;
    height: 240px; /* Increased height */
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}
.research-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1); /* Smoother zoom */
}
.research-card:hover .research-card-img img {
    transform: scale(1.08); /* Slightly more zoom */
}

.research-card-content {
    padding: 30px; /* Increased padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.research-card-content h3 {
    font-size: 1.4rem; /* Adjusted size */
    margin-bottom: 18px; /* Increased margin */
}
.research-card-content p {
    font-size: 1rem; /* Relative font size */
    margin-bottom: 25px; /* Increased margin */
    flex-grow: 1;
    line-height: 1.7;
}
.research-card-content .btn-outline {
    align-self: flex-start;
    margin-top: auto;
    padding: 12px 24px; /* Standard button padding */
}

.research-cta {
    text-align: center;
    margin-top: 40px; /* Increased margin */
}


/* Projects Section */
.projects {
    background-color: var(--background-color);
}
.projects-intro p {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* Larger minmax */
    gap: 35px;
    margin-bottom: 50px;
}

.project-card {
    background-color: var(--light-bg-color);
    padding: 35px; /* Increased padding */
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-left: 6px solid var(--secondary-color);
    display: flex; /* For flex properties */
    flex-direction: column; /* Stack content vertically */
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-left-color: var(--accent-color);
}

.project-header {
    margin-bottom: 18px; /* Increased margin */
}
.project-header h3 {
    font-size: 1.5rem; /* Adjusted size */
    margin-bottom: 8px;
    color: var(--primary-color);
}
.project-period {
    font-size: 0.9rem; /* Relative font size */
    color: var(--text-lighter);
    font-weight: 700; /* Bolder */
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-focus {
    font-size: 1rem; /* Relative font size */
    margin-bottom: 25px; /* Increased margin */
    line-height: 1.7;
    flex-grow: 1; /* Allow focus to take available space */
}

.project-meta {
    font-size: 0.95rem; /* Relative font size */
    color: var(--text-light);
    margin-top: auto; /* Push meta to bottom */
    padding-top: 15px;
    border-top: 1px solid var(--neutral-accent-color);
}
.project-meta span {
    display: flex; /* Align icon and text */
    align-items: center;
    margin-bottom: 10px;
}
.project-meta i {
    margin-right: 10px; /* Increased spacing */
    color: var(--primary-color);
    width: 20px; /* Fixed width */
    text-align: center;
    font-size: 1.1rem;
}

.projects-action {
    text-align: center;
    margin-top: 40px;
}


/* Advanced Methodologies Section */
.methodologies {
    background-color: var(--light-bg-color);
}
.section-intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 60px !important; /* Increased margin */
}


.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjusted minmax */
    gap: 40px; /* Increased gap */
}

.methodology-item {
    text-align: center;
    padding: 35px; /* Increased padding */
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color); /* Subtle border */
}
.methodology-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-color); /* Highlight border on hover */
}

.methodology-icon {
    font-size: 3rem; /* Larger icons */
    color: var(--primary-color);
    margin-bottom: 25px; /* Increased margin */
    line-height: 1;
    display: inline-block; /* Allows transform */
    transition: transform 0.35s ease, color 0.35s ease;
}
.methodology-item:hover .methodology-icon {
    transform: scale(1.15) rotate(8deg); /* Enhanced hover */
    color: var(--accent-color);
}


.methodology-title {
    font-size: 1.4rem; /* Adjusted size */
    margin-bottom: 18px; /* Increased margin */
    color: var(--primary-color);
}
.methodology-item p {
    font-size: 1rem; /* Relative font size */
    line-height: 1.7;
    color: var(--text-light);
}


/* Publications Section */
.publications {
    background-color: var(--background-color);
}
.publication-intro p {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.publication-list {
    margin-bottom: 50px; /* Increased margin */
}

.publication-item {
    background-color: var(--light-bg-color);
    padding: 30px; /* Increased padding */
    margin-bottom: 30px; /* Increased spacing */
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-left: 6px solid var(--primary-color); /* Thicker border */
}
.publication-item:hover {
    transform: translateY(-6px); /* Enhanced hover */
    box-shadow: var(--card-shadow-hover);
    border-left-color: var(--accent-color);
}

.publication-item h3 {
    font-size: 1.25rem; /* Adjusted size */
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-weight: 700; /* Bolder */
    color: var(--primary-color);
}
.publication-authors {
    font-size: 0.95rem; /* Relative font size */
    color: var(--text-light);
    margin-bottom: 10px;
    font-style: italic;
    line-height: 1.6;
}
.publication-journal {
    font-size: 0.95rem;
    color: var(--text-lighter);
    margin-bottom: 18px; /* Increased margin */
    font-weight: 600;
}
.publication-links a {
    margin-right: 18px; /* Increased spacing */
    font-size: 0.9rem;
    font-weight: 700; /* Bolder */
    text-transform: uppercase;
    letter-spacing: 0.8px; /* Increased spacing */
    color: var(--primary-color);
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.publication-links a:hover {
    color: var(--accent-color);
    padding-left: 4px;
}
.publication-links a i {
    margin-right: 6px; /* Adjusted spacing */
    font-size: 0.9em; /* Relative to link font size */
}

.publication-action {
    text-align: center;
    margin-top: 40px;
}


/* Contact Section */
.contact {
    background-color: var(--light-bg-color);
}
.contact-intro p {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px; /* Increased gap */
    background-color: white;
    padding: 50px; /* Increased padding */
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.contact-info {
    flex: 1;
    min-width: 320px; /* Adjusted min-width */
}
.contact-info h3 {
    font-size: 1.6rem; /* Adjusted size */
    margin-bottom: 30px; /* Increased margin */
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px; /* Increased spacing */
    font-size: 1.05rem; /* Relative font size */
}
.contact-icon {
    font-size: 1.6rem; /* Adjusted size */
    color: var(--primary-color);
    margin-right: 25px; /* Increased spacing */
    width: 35px; /* Fixed width */
    text-align: center;
    margin-top: 5px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}
.contact-detail div:last-child { /* Target the text content block */
    flex-grow: 1;
}
.contact-detail h4 {
    font-size: 1.15rem; /* Adjusted size */
    margin-bottom: 8px; /* Increased margin */
    font-family: var(--font-body);
    font-weight: 700; /* Bolder */
    color: var(--text-color);
}
.contact-detail p, .contact-detail a {
    margin-bottom: 0;
    color: var(--text-light);
    line-height: 1.6;
}
.contact-detail a {
    word-break: break-all; /* Prevent long emails/links from breaking layout */
}
.contact-detail a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}


.contact-profiles {
    flex: 1;
    min-width: 320px;
}
.contact-profiles h3 {
    font-size: 1.6rem;
    margin-bottom: 30px;
}
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Increased gap */
}
.social-link {
    font-size: 2rem; /* Larger icons */
    color: var(--text-light); /* Subtler initial color */
    transition: var(--transition);
    padding: 10px;
}
.social-link:hover, .social-link:focus {
    color: var(--primary-color); /* Darken on hover */
    transform: scale(1.2) translateY(-4px); /* Enhanced hover */
}
.social-link i.fa-linkedin:hover { color: #0077B5; }
.social-link i.fa-google-scholar:hover { color: #4285F4; } /* Using fas fa-graduation-cap */
.social-link i.fa-researchgate:hover { color: #00CCBB; }
/* Add more specific hover colors if desired */


/* Institute Logos Section */
.institutes {
    padding: 70px 0; /* Adjusted padding */
    background-color: var(--background-color);
}
.institutes-title {
    text-align: center;
    font-size: 1.6rem; /* Adjusted size */
    margin-bottom: 40px; /* Increased margin */
    color: var(--text-light);
    font-family: var(--font-body);
    font-weight: 600;
}
.institute-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 60px; /* Increased gap */
}
.institute-logos-container img {
    max-height: 65px; /* Adjusted size */
    max-width: 200px; /* Adjusted size */
    opacity: 0.7; /* Subtler initial opacity */
    transition: var(--transition);
    filter: grayscale(50%); /* Slightly desaturated */
}
.institute-logos-container a:hover img, .institute-logos-container a:focus img {
    opacity: 1;
    transform: scale(1.08); /* Enhanced hover */
    filter: grayscale(0%); /* Full color on hover */
}


/* Footer */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.9); /* Brighter text */
    padding: 70px 0 40px; /* Adjusted padding */
    font-size: 0.95rem; /* Relative font size */
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Larger minmax */
    gap: 45px; /* Increased gap */
    margin-bottom: 50px; /* Increased margin */
}
.footer-container > div p {
    color: rgba(255, 255, 255, 0.8); /* Brighter text */
    line-height: 1.8; /* Improved readability */
    margin-bottom: 12px; /* Increased margin */
}
.footer-logo { /* If you add a logo/name here */
    font-size: 1.6rem; /* Adjusted size */
    font-weight: 700;
    color: white;
    margin-bottom: 18px; /* Increased margin */
    font-family: var(--font-heading);
}

.footer-links h4 {
    font-size: 1.15rem; /* Adjusted size */
    color: white;
    margin-bottom: 25px; /* Increased margin */
    font-family: var(--font-body);
    font-weight: 700; /* Bolder */
    text-transform: uppercase;
    letter-spacing: 0.8px; /* Increased spacing */
    position: relative;
    padding-bottom: 8px;
}
.footer-links h4::after { /* Underline for footer headings */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}
.footer-links li {
    margin-bottom: 15px; /* Increased spacing */
}
.footer-links a {
    color: rgba(255, 255, 255, 0.85); /* Brighter text */
    transition: var(--transition);
    display: inline-block; /* Allows padding and transform */
}
.footer-links a:hover, .footer-links a:focus {
    color: var(--accent-color);
    padding-left: 8px; /* Increased indent */
    transform: translateX(3px);
}
.footer-links a i {
    margin-right: 10px; /* Increased spacing */
    width: 18px; /* Fixed width */
    font-size: 1em; /* Relative to link */
}

.copyright, .footer-credits { /* Combined for simplicity */
    text-align: center;
    padding-top: 35px; /* Increased padding */
    border-top: 1px solid rgba(255, 255, 255, 0.25); /* More visible border */
    font-size: 0.9rem; /* Relative font size */
    color: rgba(255, 255, 255, 0.75); /* Brighter text */
}
.copyright p, .footer-credits p {
    margin-bottom: 8px; /* Increased margin */
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* Responsive Design */





/* Print Styles */
@media print {
    body {
        font-family: 'Times New Roman', Times, serif; /* Serif font for print */
        font-size: 11pt; /* Common print size */
        color: #000000;
        background-color: #ffffff;
    }
    :root { /* Override CSS variables for print */
        --primary-color: #000000;
        --accent-color: #333333;
        --text-color: #000000;
        --text-light: #333333;
        --border-color: #cccccc;
    }

    header, .hero-scroll, .hamburger, .section-toggle-button, .btn, .institute-logos-container, footer, .hero-background, .hero-overlay, .timeline-marker, .timeline-institution-logo {
        display: none !important;
    }
    main { margin-top: 0 !important; }

    .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 1cm; /* Margins for printing */
    }
    .hero {
        height: auto;
        padding: 1cm 0;
        text-align: left;
    }
    .hero-content {
        color: #000000;
        text-align: left;
        padding: 0;
    }
    .hero-title, .hero-position, .hero-description {
        color: #000000 !important;
        text-shadow: none;
    }
    .hero-title { font-size: 20pt; }
    .hero-position { font-size: 14pt; }
    .hero-description { font-size: 11pt; }


    section, .foldable-section {
        padding: 0.5cm 0;
        border: none;
        page-break-inside: avoid;
    }
    .section-content {
        max-height: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0 !important;
    }
    .section-title {
        font-size: 16pt;
        text-align: left;
        margin-bottom: 0.5cm;
        padding-bottom: 0;
    }
    .section-title::after { display: none; }

    a {
        color: #000000;
        text-decoration: underline;
    }
    a[href^="http"]::after, a[href^="mailto"]::after {
        content: " [" attr(href) "]";
        font-size: 9pt;
        font-weight: normal;
        color: #555555;
    }
    img {
        max-width: 100% !important;
        height: auto;
        page-break-inside: avoid;
        border: 1px solid #ccc; /* Add border to images for print */
    }
    .profile-image img { border-radius: 0; border: 1px solid #ccc; }

    .timeline-card, .research-card, .project-card, .methodology-item, .publication-item, .contact-container {
        box-shadow: none;
        border: 1px solid #cccccc;
        page-break-inside: avoid;
        margin-bottom: 0.5cm;
        padding: 0.5cm;
    }
    .timeline-container.revised-timeline::before { display: none; }
    .timeline-item { padding-left: 0; margin-bottom: 0.5cm; }

    ul, ol { padding-left: 1cm; } /* Indent lists */
    li { margin-bottom: 0.2cm; }
    .timeline-details li::before { display: none; } /* Remove custom bullets for print */
    .expertise-tags span, .timeline-badges span {
        border: 1px solid #ccc;
@media (max-width: 767px) {
    :root {
        --section-padding: 60px 0; /* Reduced padding for tablets and large phones */
    }

    .hero-btns {
        flex-direction: column; /* Stack buttons on smaller screens */
        gap: 15px; /* Reduced gap */
    }

    .hero-btns .btn {
        width: 80%; /* Make buttons wider */
        max-width: 300px; /* Max width for stacked buttons */
        margin: 0 auto; /* Center stacked buttons */
    }

    .profile-content {
        flex-direction: column; /* Ensure profile content stacks */
        align-items: center;
    }

    .profile-image {
        margin-bottom: 20px; /* Add space below image when stacked */
    }

    .profile-info {
        text-align: center; /* Center profile info text */
    }

    .profile-details li {
        justify-content: center; /* Center list items */
    }

    .expertise-tags {
        justify-content: center; /* Center expertise tags */
    }

    .profile-metrics {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Adjust grid for smaller screens */
        gap: 15px;
    }

    .timeline-container.revised-timeline::before {
        left: 14px; /* Adjust timeline line position */
    }

    .timeline-marker {
        left: 0; /* Adjust timeline marker position */
        width: 20px;
        height: 20px;
        border-width: 3px;
        box-shadow: 0 0 0 3px var(--background-color);
    }

    .timeline-item {
        padding-left: 40px; /* Adjust padding for smaller marker */
        margin-bottom: 40px;
    }

    .timeline-card {
        padding: 20px; /* Reduced padding */
    }

    .timeline-institution-logo {
        max-height: 40px; /* Smaller logos */
        max-width: 80px;
        top: 15px;
        right: 15px;
    }

    .research-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjust grid for smaller screens */
        gap: 25px;
    }

    .research-card-img {
        height: 200px; /* Reduced image height */
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjust grid for smaller screens */
        gap: 25px;
    }

    .contact-container {
        flex-direction: column; /* Stack contact info and profiles */
        padding: 30px; /* Reduced padding */
        gap: 30px;
    }

    .contact-info,
    .contact-profiles {
        min-width: auto; /* Remove min-width constraint */
    }

    .contact-detail {
        flex-direction: column; /* Stack icon and text */
        align-items: center;
        text-align: center;
    }

    .contact-icon {
        margin-right: 0;
        margin-bottom: 10px; /* Add space below icon */
    }

    .social-links {
        justify-content: center; /* Center social links */
    }

    .institute-logos-container {
        gap: 30px; /* Reduced gap */
    }

    .institute-logos-container img {
        max-height: 50px; /* Reduced logo size */
        max-width: 150px;
    }

    .footer-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust grid for smaller screens */
        gap: 30px;
    }
}

@media (max-width: 575px) {
    :root {
        --section-padding: 40px 0; /* Further reduced padding for small phones */
    }

    h1 { font-size: 2.2rem; } /* Smaller main heading */
    h2 { font-size: 1.8rem; } /* Smaller section titles */
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.1rem; }

    .hero-title {
        font-size: 2.5rem; /* Smaller hero title */
        letter-spacing: 1px;
    }

    .hero-position {
        font-size: 1.1rem; /* Smaller hero position */
    }

    .hero-description {
        font-size: 1rem; /* Smaller hero description */
    }

    .hero-btns .btn {
        width: 90%; /* Make buttons wider on very small screens */
    }

    .section-title {
        font-size: 1.8rem; /* Smaller section titles */
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    .section-title::after {
        width: 70px; /* Smaller underline */
        height: 4px;
    }

    .section-subtitle {
        font-size: 0.95rem; /* Smaller subtitle */
        margin: -15px auto 20px;
    }

    .profile-image {
        max-width: 200px; /* Smaller profile image */
    }

    .profile-info h3 {
        font-size: 1.4rem; /* Smaller profile heading */
    }

    .profile-details li {
        font-size: 0.95rem; /* Smaller profile details text */
    }

    .expertise-tags span {
        padding: 8px 15px; /* Reduced tag padding */
        font-size: 0.8rem;
    }

    .profile-metrics {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Further adjust grid */
        gap: 10px;
    }
    .metric-number {
        font-size: 1.6rem; /* Smaller metric numbers */
    }
    .metric-label {
        font-size: 0.8rem; /* Smaller metric labels */
    }

    .timeline-item {
        padding-left: 30px; /* Further adjust timeline padding */
        margin-bottom: 30px;
    }
    .timeline-marker {
        width: 16px; /* Smaller marker */
        height: 16px;
        border-width: 2px;
        box-shadow: 0 0 0 2px var(--background-color);
    }
    .timeline-card {
        padding: 15px; /* Further reduced padding */
    }
    .timeline-date {
        font-size: 0.85rem; /* Smaller date */
    }
    .timeline-title {
        font-size: 1.3rem; /* Smaller timeline title */
    }
    .timeline-institution {
        font-size: 0.95rem; /* Smaller institution text */
    }
    .timeline-details li {
        font-size: 0.9rem; /* Smaller timeline details */
        padding-left: 20px;
    }
    .timeline-details li::before {
        font-size: 0.8em;
    }
    .timeline-badges span {
        padding: 6px 12px; /* Further reduced badge padding */
        font-size: 0.8rem;
    }

    .research-grid {
        grid-template-columns: 1fr; /* Stack research cards */
        gap: 20px;
    }
    .research-card-img {
        height: 180px; /* Further reduced image height */
    }
    .research-card-content {
        padding: 20px; /* Reduced padding */
    }
    .research-card-content h3 {
        font-size: 1.3rem; /* Smaller research card title */
    }
    .research-card-content p {
        font-size: 0.95rem; /* Smaller research card text */
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Stack project cards */
        gap: 20px;
    }
    .project-card {
        padding: 20px; /* Reduced padding */
    }
    .project-header h3 {
        font-size: 1.4rem; /* Smaller project title */
    }
    .project-focus {
        font-size: 0.95rem; /* Smaller project focus text */
    }
    .project-meta {
        font-size: 0.9rem; /* Smaller project meta text */
    }

    .methodology-grid {
        grid-template-columns: 1fr; /* Stack methodology items */
        gap: 20px;
    }
    .methodology-item {
        padding: 20px; /* Reduced padding */
    }
    .methodology-icon {
        font-size: 2.5rem; /* Smaller icons */
        margin-bottom: 15px;
    }
    .methodology-title {
        font-size: 1.3rem; /* Smaller methodology title */
    }
    .methodology-item p {
        font-size: 0.95rem; /* Smaller methodology text */
    }

    .publication-item {
        padding: 20px; /* Reduced padding */
        margin-bottom: 20px;
    }
    .publication-item h3 {
        font-size: 1.1rem; /* Smaller publication title */
    }
    .publication-authors,
    .publication-journal {
        font-size: 0.9rem; /* Smaller publication text */
    }
    .publication-links a {
        font-size: 0.85rem; /* Smaller link text */
        margin-right: 10px;
    }

    .contact-container {
        padding: 20px; /* Further reduced padding */
        gap: 20px;
    }
    .contact-info h3,
    .contact-profiles h3 {
        font-size: 1.4rem; /* Smaller contact headings */
        margin-bottom: 20px;
    }
    .contact-detail {
        font-size: 1rem; /* Smaller contact detail text */
        margin-bottom: 20px;
    }
    .contact-icon {
        font-size: 1.4rem; /* Smaller contact icons */
        width: 30px;
    }
    .contact-detail h4 {
        font-size: 1.05rem; /* Smaller contact detail title */
    }
    .social-links {
        gap: 15px; /* Reduced gap */
    }
    .social-link {
        font-size: 1.8rem; /* Smaller social icons */
    }

    .institutes {
        padding: 40px 0; /* Reduced padding */
    }
    .institutes-title {
        font-size: 1.4rem; /* Smaller title */
        margin-bottom: 30px;
    }
    .institute-logos-container {
        gap: 20px; /* Reduced gap */
    }
    .institute-logos-container img {
        max-height: 40px; /* Further reduced logo size */
        max-width: 120px;
    }

    footer {
        padding: 40px 0 20px; /* Reduced padding */
        font-size: 0.9rem;
    }
    .footer-container {
        grid-template-columns: 1fr; /* Stack footer columns */
        gap: 20px;
        margin-bottom: 30px;
    }
    .footer-links h4 {
        font-size: 1.05rem; /* Smaller footer link titles */
        margin-bottom: 15px;
    }
    .footer-links li {
        margin-bottom: 10px;
    }
    .footer-links a {
        font-size: 0.9rem; /* Smaller footer links */
    }
    .copyright, .footer-credits {
        padding-top: 20px; /* Reduced padding */
        font-size: 0.85rem;
    }
}
        padding: 2px 5px;
        background-color: #eee;
        color: #000;
    }
}
/* Research Motivation Section */
.research-motivation-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.research-motivation-section h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.research-motivation-section p {
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 850px;
    margin: 0 auto 20px auto;
    text-align: justify;
}

.motivation-images {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.motivation-images figure {
    text-align: center;
    max-width: 45%; /* Adjust as needed */
    min-width: 280px; /* Ensure images are not too small */
}

.motivation-images img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 10px;
}

.motivation-images figcaption {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}


/* Image Carousel Styles */
.carousel-container,
.carousel-wrapper {
    height: 350px;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: auto;
    background-color: #f8f8f8;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover,
.carousel-prev:focus,
.carousel-next:focus {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0; /* Reset button padding */
}

.carousel-dot.active {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(0,0,0,0.4);
}

/* Aix-Marseille University Logo in Footer */
.institute-logos-container .institute-logo { /* More specific selector if needed */
    max-height: 55px; /* Adjust size as needed */
    opacity: 0.85;
    transition: opacity var(--transition);
}

.institute-logos-container .institute-logo:hover {
    opacity: 1;
}

/* Responsive adjustments for motivation images if needed */
@media (max-width: 768px) {
    .motivation-images figure {
        max-width: 80%; /* Allow figures to take more width on smaller screens */
    }
}

@media (max-width: 480px) {
    .motivation-images figure {
        max-width: 100%; /* Full width on very small screens */
    }
    .research-motivation-section p {
        text-align: left;
    }
}
/* Carousel styles within research cards */
.research-card .carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow card */
    margin: 0 auto;
    overflow: hidden; /* Hide slides that are not active */
    border-radius: var(--border-radius); /* Match card border radius */
}

.research-card .carousel-slide {
    display: none; /* Hidden by default */
    width: 100%;
    text-align: center; /* Center image if it's smaller than container */
}

.research-card .carousel-slide.active {
    display: block; /* Show active slide */
    animation: carouselFadeIn 0.7s ease-in-out;
}

@keyframes carouselFadeIn {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

.research-card .carousel-slide img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 300px; /* Max height for consistency in cards */
    object-fit: contain; /* Ensure full image visibility, might letterbox */
    display: block;
    border-radius: var(--border-radius); /* Match container */
}

#drht-carousel .carousel-slide img {
    object-fit: contain; /* Ensure entire image is visible, preserve aspect ratio */
    /* Inherits width: 100%, height: auto, max-height: 300px, display: block, border-radius from the general .research-card .carousel-slide img rule */
}

.research-card .carousel-prev,
.research-card .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    font-size: 1.2rem;
    line-height: 1; /* Ensure icon is centered */
}

.research-card .carousel-prev:hover,
.research-card .carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.research-card .carousel-prev {
    left: 10px;
}

.research-card .carousel-next {
    right: 10px;
}

.research-card .carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.research-card .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding: 0; /* Reset button padding */
}

.research-card .carousel-dot.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
    border-color: rgba(0,0,0,0.4);
}

/* Ensure existing general carousel styles don't conflict too much or adapt them */
/* The .carousel-container, .carousel-slide, .carousel-prev, .carousel-next, .carousel-dots, .carousel-dot classes are used by carousel.js */
/* We might need to adjust if there are very specific global styles for these. */

/* Making sure the research card image area accommodates the carousel */
.research-card-img {
    height: 300px; /* Set a fixed height for the image/carousel area in cards */
    overflow: hidden; /* Ensure nothing spills out */
    background-color: #f0f0f0; /* Placeholder bg for loading */
    display: flex; /* To center content if needed */
    align-items: center;
    justify-content: center;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}
/* Machine Learning Carousel Specific Styles */
#ml-carousel {
    position: relative; /* Needed for absolute positioning of nav/dots */
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: var(--neutral-accent-color); /* Consistent background */
    min-height: 250px; /* Adjust as needed, ensures space for images */
    /* If you want a fixed aspect ratio, uncomment below */
    /* aspect-ratio: 16 / 9; */
}

#ml-carousel .carousel-slide {
    display: none; /* Hidden by default */
    width: 100%;
    height: 100%; /* Slide takes full height of its container */
    align-items: center; /* For vertical centering of the image */
    justify-content: center; /* For horizontal centering of the image */
    position: absolute; /* Position slides on top of each other */
    top: 0;
    left: 0;
    animation: carouselFadeIn 0.7s ease-in-out; /* Re-use existing fade animation */
}

#ml-carousel .carousel-slide.active {
    display: flex; /* Show active slide and use flex for centering */
    z-index: 1; /* Ensure active slide is on top */
}

#ml-carousel .carousel-slide img {
    display: block;
    max-width: 100%;   /* Fit within the width of the slide */
    max-height: 100%;  /* Fit within the height of the slide */
    width: auto;       /* Maintain aspect ratio */
    height: auto;      /* Maintain aspect ratio */
    object-fit: contain; /* Key property: scales image down to fit, preserving aspect ratio */
    margin: auto;      /* Centers the image if it's smaller than the slide dimensions */
    border-radius: var(--border-radius); /* Optional: if images themselves should be rounded */
}

/* Ensure nav buttons and dots from generic carousel styles are well-positioned */
/* If they need adjustment for #ml-carousel, add specific rules here: */
/*
#ml-carousel .carousel-prev,
#ml-carousel .carousel-next {
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

#ml-carousel .carousel-dots {
    bottom: 15px;
    z-index: 2;
}
*/
/* Utility class for rotating elements 90 degrees clockwise */
.rotate-90-cw {
    transform: rotate(90deg);
    transform-origin: center center; /* Explicitly set origin for clarity */
}
/* Section Heading Block (replaces page-header for content titles) */
.section-heading-block {
    padding: 60px 0 40px; /* Adjust padding as needed */
    text-align: center;
    background-color: var(--background-color); /* Or transparent if preferred */
}

.section-heading-block .page-title {
    color: var(--primary-color); /* Use theme's primary text color */
    font-size: 2.5rem; /* Adjust size as needed, smaller than hero */
    text-shadow: none; /* Remove text shadow if any was inherited */
    margin-bottom: 15px;
}

.section-heading-block .page-subtitle {
    color: var(--text-light); /* Use theme's lighter text color */
    font-size: 1.1rem; /* Adjust size as needed */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none; /* Remove text shadow if any was inherited */
    margin-bottom: 0;
}
/* Page-specific header backgrounds */
/* These will now inherit common properties from .page-header */
.projects-header {
    background-image: url('images/background/back1.jpg');
}

.publications-header {
    background-image: url('images/background/back2.jpg');
}

.research-header {
    background-image: url('images/background/back3.jpg');
}

.resume-header {
    background-image: url('images/background/back4.jpg');
}

.teams-header {
    background-image: url('images/background/back5.jpg');
}

/* Page Header Styles */
.page-header {
    min-height: 40vh; /* Or a suitable height, e.g., 300px, 400px */
    padding: 80px 20px; /* Adjust padding as needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white; /* Default text color for headers */
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 1;
}

.page-header .container { /* Ensure content is above overlay */
    position: relative;
    z-index: 2;
}

.page-header .page-title {
    color: white; /* Ensure title is white against dark overlay/bg */
    font-size: 3rem; /* Example size */
    margin-bottom: 0.5em;
}

.page-header .page-subtitle {
    color: rgba(255, 255, 255, 0.9); /* Lighter white for subtitle */
    font-size: 1.25rem; /* Example size */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Specific Page Header Backgrounds are now handled by single class selectors above */
/* e.g. .publications-header will apply to <header class="page-header publications-header"> */
/* ==========================================================================
   Resume Page Styles
   ========================================================================== */

/* Ensure the main site header is accounted for if it's fixed */
.resume-page-content {
    padding-top: 100px; /* Adjust based on actual fixed header height */
    padding-bottom: 60px;
}

/* Resume Page Title Banner (from inline, slightly adjusted) */
.resume-page-title-banner {
    /* background-color: var(--primary-color); Replaced with image */
    background-image: url('images/background/back4.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: white;
    padding: 70px 20px; /* Increased padding */
    text-align: center;
    margin-top: 70px; /* Default, assuming header height from original style.css */
    position: relative; /* Needed for the overlay */
    z-index: 1; /* Ensure content is above background */
}

.resume-page-title-banner::before { /* Added overlay for readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: -1; /* Place overlay behind content */
}


.resume-page-title-banner .container { /* Ensure content is above overlay */
     position: relative;
     z-index: 2;
}

.resume-page-title-banner .page-title {
    font-size: 3.2rem; /* Adjusted for consistency */
    margin-bottom: 15px;
    color: white; /* Ensure color override if h1 has different color */
    font-family: var(--font-heading);
}

.resume-page-title-banner .page-subtitle {
    font-size: 1.3rem; /* Adjusted for consistency */
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255,255,255,0.9); /* Ensure color override */
    font-family: var(--font-body);
}

/* Resume Sub-sections (from inline, enhanced) */
.resume-page-content .resume-sub-section {
    margin-bottom: 50px; /* Increased spacing */
    padding: 30px; /* Increased padding */
    background-color: var(--light-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.resume-page-content .resume-sub-section:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
}

.resume-page-content .resume-sub-section h2 {
    font-size: 2rem; /* Adjusted for hierarchy */
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-color);
    font-family: var(--font-heading);
}

.resume-page-content .resume-sub-section h3 {
    font-size: 1.5rem; /* Adjusted for hierarchy */
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.resume-page-content .resume-sub-section h4 {
    font-size: 1.2rem; /* Adjusted for hierarchy */
    color: var(--text-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 700; /* Bolder */
    font-family: var(--font-heading);
}

.resume-page-content .resume-sub-section p,
.resume-page-content .resume-sub-section li {
    margin-bottom: 10px;
    line-height: var(--line-height-base);
    color: var(--text-light);
    font-family: var(--font-body);
}

.resume-page-content .resume-sub-section ul {
    list-style-type: disc; /* Default disc, can be customized */
    padding-left: 20px; /* Standard padding for lists */
    margin-top: 10px;
}
.resume-page-content .resume-sub-section ul li {
    margin-bottom: 8px;
}

/* Specific item styling within sections */
.resume-page-content .experience-item,
.resume-page-content .education-item,
.resume-page-content .project-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.resume-page-content .experience-item:last-child,
.resume-page-content .education-item:last-child,
.resume-page-content .project-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.resume-page-content .experience-item h3,
.resume-page-content .education-item h3,
.resume-page-content .project-item h3 {
    margin-top: 0; /* First h3 in an item */
}

.resume-page-content .experience-item p strong,
.resume-page-content .education-item p strong,
.resume-page-content .project-item p strong {
    color: var(--text-color);
    font-weight: 600;
}

.resume-page-content .experience-item p em, /* Dates */
.resume-page-content .education-item p em {
    color: var(--text-lighter);
    font-style: italic;
    display: block;
    margin-bottom: 8px;
}


/* Contact Information Section */
.resume-page-content .contact-links p {
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.resume-page-content .contact-links strong {
    display: inline-block;
    min-width: 100px; /* Align values */
}
.resume-page-content .contact-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.resume-page-content .contact-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Skills Section */
.resume-page-content .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 30px; /* Increased gap */
    margin-top: 20px;
}

.resume-page-content .skills-grid > div { /* Skill category block */
    padding: 20px;
    background-color: #f9f9f9; /* Slightly different background for skill blocks */
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.resume-page-content .skills-grid h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.resume-page-content .skills-grid ul {
    padding-left: 0;
    list-style-type: none; /* Remove default bullets */
}

.resume-page-content .skills-grid ul li {
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
    color: var(--text-light);
}

/* Removed ::before rule causing rendering issues in skills list */
/* Publications & Presentations Section */
.resume-page-content #publications ul li,
.resume-page-content #presentations ul li {
    margin-bottom: 20px;
    padding-left: 0; /* Override general ul li if needed */
}

.resume-page-content #publications ul li strong, /* Title */
.resume-page-content #presentations ul li strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.resume-page-content #publications ul li em, /* Authors */
.resume-page-content #presentations ul li em {
    display: block;
    font-style: italic;
    color: var(--text-lighter);
    margin-bottom: 3px;
}

/* Awards Section */
.resume-page-content #awards-honors ul {
    list-style-type: none;
    padding-left: 0;
}
.resume-page-content #awards-honors ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.resume-page-content #awards-honors ul li::before {
    content: '\\f005'; /* FontAwesome star icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--accent-color);
}


/* Accessibility: Focus states (already good in global, ensure they apply) */
.resume-page-content a:focus-visible,
.resume-page-content button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb, 255,193,7), 0.3); /* Ensure --accent-color-rgb is defined or use direct rgba */
}

/* Responsive Adjustments for Resume Page */



/* Print-specific styles for the resume */
@media print {
    body {
        font-size: 10pt; /* Adjust base font size for print */
        color: #000;
        background-color: #fff;
    }

    header#site-header,
    footer#site-footer,
    .hamburger,
    .hero-scroll {
        display: none !important; /* Hide non-essential elements for print */
    }

    .resume-page-content {
        padding-top: 20px !important; /* Remove padding meant for screen header */
        padding-bottom: 20px !important;
    }

    .resume-page-title-banner {
        background-color: #fff !important;
        color: #000 !important;
        padding: 20px 0 !important;
        text-align: left; /* More traditional for print */
        margin-top: 0 !important;
        border-bottom: 2px solid #ccc;
    }

    .resume-page-title-banner .page-title {
        font-size: 22pt !important;
        color: #000 !important;
        margin-bottom: 5px;
    }

    .resume-page-title-banner .page-subtitle {
        font-size: 12pt !important;
        color: #333 !important;
        opacity: 1 !important;
    }

    .resume-page-content .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .resume-page-content .resume-sub-section {
        margin-bottom: 20px !important;
        padding: 15px 0 !important; /* Reduce padding for print */
        background-color: #fff !important;
        border: none !important; /* Remove borders for print */
        box-shadow: none !important; /* Remove shadows for print */
        page-break-inside: avoid; /* Try to keep sections from breaking across pages */
    }
    .resume-page-content .resume-sub-section:hover { /* Disable hover effects for print */
        box-shadow: none !important;
        transform: none !important;
    }


    .resume-page-content .resume-sub-section h2 {
        font-size: 16pt !important;
        color: #000 !important;
        margin-bottom: 10px !important;
        padding-bottom: 5px !important;
        border-bottom: 1px solid #666 !important;
    }

    .resume-page-content .resume-sub-section h3 {
        font-size: 13pt !important;
        color: #000 !important;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .resume-page-content .resume-sub-section h4 {
        font-size: 11pt !important;
        color: #000 !important;
        margin-top: 8px;
        margin-bottom: 4px;
    }

    .resume-page-content .resume-sub-section p,
    .resume-page-content .resume-sub-section li {
        font-size: 10pt !important;
        line-height: 1.4 !important;
        color: #000 !important;
        margin-bottom: 5px;
    }

    .resume-page-content .resume-sub-section ul {
        padding-left: 15px !important; /* Adjust list indent for print */
        margin-top: 5px;
    }
    .resume-page-content .resume-sub-section ul li::before {
        color: #333 !important; /* Muted icon color for print */
    }


    .resume-page-content .contact-links a {
        color: #000 !important;
        text-decoration: none !important; /* No underlines for print unless essential */
    }
    .resume-page-content .contact-links a[href^="http"]::after,
    .resume-page-content .contact-links a[href^="mailto"]::after {
        content: " (" attr(href) ")"; /* Show full URLs for print */
        font-size: 9pt;
        font-weight: normal;
        color: #555;
    }
    .resume-page-content .contact-links p strong {
        color: #000 !important;
    }


    .resume-page-content .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Two columns for skills in print */
        gap: 15px !important;
    }
    .resume-page-content .skills-grid > div {
        padding: 10px !important;
        background-color: #f8f8f8 !important; /* Light background for skill blocks in print */
        border: 1px solid #ddd !important;
    }
    .resume-page-content .skills-grid h4 {
        border-bottom-color: #999 !important;
    }
    .resume-page-content .skills-grid ul li::before {
        content: "- "; /* Simpler bullet for print */
        font-family: var(--font-body); /* Reset font family */
        font-weight: normal;
        color: #000;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    a[href^="http"]::after, a[href^="mailto"]::after {
        /* content: " [" attr(href) "]"; */ /* Optionally show all links, might be too much */
        /* font-size: 9pt; */
    }
}
/* --- Resume Page Specific Styles --- */

/* Recommendation 1: Work Experience Scannability */
#work-experience .experience-item {
    margin-bottom: 2.5em; /* Add space between job entries */
    padding-bottom: 1.5em; /* Optional: Add padding if border is desired */
    border-bottom: 1px solid var(--border-color); /* Optional: Subtle separator */
}
#work-experience .experience-item:last-child {
    margin-bottom: 0; /* Remove margin from the last item */
    border-bottom: none; /* Remove border from the last item */
}

/* Recommendation 2: Contact Info Alignment (Using Grid) */
.contact-details {
    display: grid;
    grid-template-columns: max-content 1fr; /* Label column sized to content, value takes rest */
    gap: 0.5em 1.5em; /* Row gap, Column gap */
    align-items: baseline; /* Align items based on their text baseline */
    margin-top: 1.5em;
}
.contact-details dt {
    font-weight: 600; /* Make labels bold */
    color: var(--text-color);
    grid-column: 1; /* Explicitly place in first column */
}
.contact-details dd {
    grid-column: 2; /* Explicitly place in second column */
    margin-left: 0; /* Reset default dl margin */
    color: var(--text-light);
}
.contact-details dd a {
    color: var(--primary-color); /* Ensure links are styled correctly */
}
.contact-details dd a:hover {
    color: var(--accent-color);
}


/* Recommendation 3: Standardize List Item Styles */
.resume-sub-section ul { /* Target ULs within resume sections */
    list-style-type: disc; /* Use standard disc bullets */
    padding-left: 25px; /* Ensure proper indentation */
    margin-bottom: 1em;
}
.resume-sub-section ul li {
    margin-bottom: 0.6em; /* Consistent spacing between list items */
    line-height: 1.6; /* Ensure good line spacing */
    color: var(--text-light); /* Consistent text color */
}
/* Reset specific list styles if needed, e.g., for skills grid */
#skills .skills-grid ul {
    list-style-type: none; /* Skills grid might not need bullets */
    padding-left: 0;
}
#skills .skills-grid ul li {
    margin-bottom: 0.4em;
}


/* Background Image for the main content area */
body {
    background-image: linear-gradient(rgba(253, 254, 254, 0.85), rgba(253, 254, 254, 0.95)), url('images/background/back4.jpg'); /* Subtle white overlay + image */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed; /* Keep background fixed during scroll */
}

/* Adjust main content area if needed to ensure readability over background */
.resume-page-content .container {
    background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent white background for content area */
    padding: 30px 40px; /* Add padding inside the container */
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    margin-top: 30px; /* Space below title banner */
    margin-bottom: 30px; /* Space above footer */
}

/* Ensure header/footer have solid background if needed */
#site-header, #site-footer {
    /* Assuming existing styles handle background, adjust if needed */
    /* background-color: var(--light-bg-color); */ /* Example: Ensure solid footer */
}

/* Adjust banner background if it clashes */
.resume-page-title-banner {
    background-color: rgba(26, 35, 126, 0.3); /* Lighter overlay */
    color: var(--accent-color);
}
.resume-page-title-banner::before {
    background-color: rgba(0, 0, 0, 0.18); /* Lighter overlay for better image visibility */
}
.resume-page-title-banner .page-title,
.resume-page-title-banner .page-subtitle {
    color: var(--accent-color) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.12); /* Subtle shadow for readability */
}
.resume-page-title-banner h1,
.resume-page-title-banner p {
    color: white; /* Ensure text is white */
}
/* Styles for institution logos in resume */
.institution-logo {
  height: 2em; /* Increased height, scales with font size */
  width: auto; /* Maintain aspect ratio */
  margin-left: 5px;
  margin-right: 5px;
  vertical-align: middle; /* Align nicely with text */
}

/* Styles for profile link buttons */
.profile-button {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--primary-color); /* Use primary color */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px; /* Add some space to the left */
    transition: background-color 0.3s ease;
    font-size: 0.9em; /* Slightly smaller font size */
    vertical-align: middle; /* Align with surrounding text/icons */
}

.profile-button:hover, .profile-button:focus {
    background-color: var(--accent-color); /* Use accent color on hover */
    color: var(--primary-color); /* Change text color on hover for contrast */
    text-decoration: none;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: var(--text-lighter);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}


/* Next/Previous Navigation */
.page-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    background-color: rgba(26, 35, 126, 0.05);
    color: var(--primary-color);
}

.nav-link.prev {
    margin-right: auto;
}

.nav-link.next {
    margin-left: auto;
    text-align: right;
}

.nav-link i {
    font-size: 1.2rem;
    margin: 0 10px;
}

.nav-link .nav-label {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
}

.nav-link .nav-title {
    font-weight: 600;
    color: var(--primary-color);
}
