/* --- Global & Font Styles --- */
:root {
    /*
    Palette: "Slate & Sienna" (Warm, Earthy, Academic)
    */
    --primary-color: #3d5a80;   /* Slate Blue (for links) */
    --primary-dark: #29486b;    /* Dark Slate (for headings) */
    --accent-color: #c95e33;    /* Burnt Sienna (for buttons, highlights) */
    --accent-dark: #b0512c;     /* Darker Sienna (for hover) */
    --dark-color: #212529;      /* Dark Gray (for text) */
    --light-color: #fff;         /* Pure White (for text on dark) */
    
    /* New Background Structure */
    --bg-page: #f8f7f4;         /* Warm Stone (for the main body) */
    --bg-section: #ffffff;      /* Pure White (for sections/cards) */
    --border-light: #e9ecef;    /* Light Gray */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--bg-page);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
}

/* --- Layout Container --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Headings & Text --- */
h1, h2, h3 {
    margin-top: 0;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

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

/* --- Navigation Bar --- */
.navbar {
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: sticky; 
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}

.navbar-brand:hover {
    color: var(--dark-color);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--accent-color);
    font-weight: bold;
}

/* =================================
--- HEADER & BACKGROUND IMAGE ---
=================================
*/
.hero {
    position: relative; /* Needed for the overlay */
    text-align: center;
    padding: 5rem 1.5rem;
    overflow: hidden; /* Good practice */

    /* --- This is the new background image --- */
    /* Make sure you have an image named "background.jpg" in your folder */
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center center;
    color: var(--light-color); /* Makes all text in hero white */
}

/* --- This is the dark overlay for readability --- */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* 50% black overlay */
    z-index: 1; /* Sits below the content */
}

/* --- Styles for the content *inside* the header --- */
/* We must set z-index: 2 to make sure the content sits ON TOP of the overlay */
.hero .profile-photo {
    position: relative;
    z-index: 2;
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Makes the photo circular */
    object-fit: cover; 
    border: 3px solid var(--light-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    margin-bottom: 1rem;
}

.hero h1 {
    position: relative;
    z-index: 2;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--light-color); /* Explicitly set to white */
}

.hero .subtitle {
    position: relative;
    z-index: 2;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    font-weight: 300;
}
/* =================================
--- END OF HEADER STYLES ---
=================================
*/

/* --- General Section Styling --- */
.page-section {
    background: var(--bg-section);
    margin: 2rem 0;
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid var(--border-light);
}

/* --- Research Section --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.project-card {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    background: var(--bg-page);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.project-card h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

/* --- Publications Section --- */
.publications-list {
    list-style: none;
    padding-left: 0;
}

.publications-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent-color);
}

.publications-list li strong {
    color: var(--primary-dark);
}

/* --- CV Button --- */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-color);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out;
}

.cta-button:hover {
    text-decoration: none;
    color: var(--light-color);
    background-color: var(--accent-dark);
    transform: translateY(-3px); 
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* --- Contact Section --- */
.contact-links {
    list-style: none;
    padding-left: 0;
    font-size: 1.1rem;
}

.contact-links li {
    margin-bottom: 0.5rem;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    color: #888;
    font-size: 0.9rem;
}

/* --- ANIMATION CSS --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- OLD "About Me" STYLES (REMOVED) --- */
/* .about-container {
    REMOVED
}
.profile-photo {
    REMOVED
}
.about-text {
    REMOVED
} 
*/


/* --- Responsive Media Query --- */
/* For screens smaller than 600px, stack elements */
@media (max-width: 600px) {
    /* The old .about-container rules are gone.
    The .hero content (photo, h1, p) is already centered,
    so it will stack nicely on mobile by default.
    */

    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .nav-links li {
        margin-left: 0;
    }
}