/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Merriweather:wght@400;700&display=swap');

/* --- General Styles & Variables --- */
:root {
    --primary-bg: #FFFFFF;
    --text-color: #333;
    --header-font-color: #A98F78; /* A sophisticated beige/tan */
    --link-hover-color: #8a735d;
    --header-font: 'Merriweather', serif;
    --body-font: 'Lato', sans-serif;
}

body {
    font-family: var(--body-font);
    background-color: var(--primary-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px; /* Increased padding to move content "inside" */
}

/* Specific container for the data page to allow more width for the app */
.dash-app-page-container {
    max-width: 1400px;
}

/* --- Header & Navigation --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.site-title-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo and title text */
}

.site-logo {
    height: 120px; /* Adjust the size of your logo */
    width: auto;
    display: block; /* Helps prevent extra space below the image */
}

.site-title-group h1 {
    font-family: var(--header-font);
    font-weight: bold;
    color: #000; /* Set text color to black */
    margin: 0;
    font-size: 1.8em;
}

.site-title-group h1 a {
    color: inherit; /* Inherit color from parent h1 */
    text-decoration: none; /* Remove underline */
}

.site-title-group .tagline {
    margin: 5px 0 0;
    color: #777;
}

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

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--header-font-color);
}

/* --- Home Page Content --- */
.home-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}

.bio {
    flex: 2;
}

.bio h2 {
    font-family: var(--header-font);
    color: var(--header-font-color);
    border-bottom: 2px solid var(--header-font-color);
    padding-bottom: 10px;
    margin-top: 0;
}

.profile-photo {
    flex: 1;
    max-width: 300px;
}

.profile-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- CV Page --- */
.cv-container {
    text-align: center;
    margin-top: 40px;
}

.download-cv {
    display: inline-block;
    background-color: var(--header-font-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.download-cv:hover {
    background-color: var(--link-hover-color);
}

.cv-embed {
    width: 100%;
    height: 80vh; /* Use viewport height for responsiveness */
    border: 1px solid #ddd;
}

/* --- Generic Page Content --- */
.page-content {
    margin-top: 40px;
}

.page-content h1 {
    font-family: var(--header-font);
    color: var(--header-font-color);
}

/* --- Research Page --- */
.research-section h2 {
    font-family: var(--header-font);
    color: var(--text-color);
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-top: 50px; /* Space between sections */
}

.paper-item {
    margin-bottom: 40px; /* Space between each paper */
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.paper-item:last-child {
    border-bottom: none;
}

.paper-item .reference {
    font-size: 1.1em;
    line-height: 1.5;
    color: #444;
}

.paper-item .abstract {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 3px solid var(--header-font-color);
    color: #555;
}

.paper-links {
    margin-top: 15px;
}

/* --- Dash App Embed --- */
.dash-app-container {
    margin-top: 30px;
}

.dash-app-embed {
    width: 100%;
    height: 90vh; /* Use viewport height for better scaling */
    border: 1px solid #ddd;
    background-color: #f9f9f9; /* A light background while the app loads */
}

/* --- Data Page - Segregation Explanation --- */
#segregation-explanation {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

#segregation-explanation h2, #segregation-explanation h3 {
    font-family: var(--header-font);
    color: var(--text-color);
}

#segregation-explanation h2 {
    color: var(--header-font-color);
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

#segregation-explanation h3 {
    margin-top: 30px;
}

.equation {
    text-align: center;
    margin: 20px 0;
    overflow-x: auto; /* Allow horizontal scrolling for long equations on small screens */
    padding: 15px 5px;
}

/* --- Footer --- */
.site-footer {
    margin-top: 60px; /* Space above footer */
    padding: 40px 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 30px; /* Space between columns */
}

.footer-column {
    flex: 1;
    min-width: 250px; /* Ensure columns don't get too small */
}

.footer-column h3 {
    font-family: var(--header-font);
    color: var(--header-font-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.footer-column p, .footer-column ul {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 5px;
}

.footer-column a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--link-hover-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        padding: 20px; /* Reduce padding for smaller screens */
    }

    .site-title-group h1 {
        font-size: 1.5em; /* Adjust title size for mobile */
    }

    .site-header {
        flex-direction: column;
        text-align: center;
    }

    .site-title-group {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .main-nav ul {
        flex-direction: column;
        margin-top: 20px;
    }

    .main-nav li {
        margin: 10px 0;
    }

    .home-content {
        flex-direction: column;
        align-items: center;
    }

    .profile-photo {
        margin-top: 20px;
        max-width: 80%;
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- Utility Classes --- */
.disabled-link,
.disabled-link:hover {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    /* The pointer-events property is key to making it "un-clickable" */
    pointer-events: none;
    border-color: #ccc;
}