/* --- 1. Base Styles & Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Using Merriweather for headings/serif, Roboto for body/sans-serif */
    font-family: 'Roboto', sans-serif;
    line-height: 1.65;
    color: #333; /* Dark Charcoal */
    background-color: #fcfcfc; /* Soft Off-White */
    margin: 0;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: auto;
    padding: 0;
}

/* --- 2. Header & Navigation --- */
header {
    background: #0D47A1; /* Deep Navy Blue */
    color: white;
    padding: 1.2em 0;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

header h1 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.8em;
}

header a {
    color: white; /* Make the H1 link white */
    text-decoration: none;
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin-left: 25px;
}

nav a {
    color: #E3F2FD; /* Very light blue */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.3s;
}

nav a:hover,
nav a.active { /* Highlight active page */
    color: #FFF;
    border-bottom: 2px solid #FFF;
    padding-bottom: 2px;
}

/* --- 3. Main Content Sections --- */
main {
    padding: 20px 0 40px 0;
    min-height: 80vh; /* Ensures footer is low on short pages */
}

h2 {
    font-family: 'Merriweather', serif;
    color: #1A237E; /* Darker academic blue */
    font-size: 1.8em;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #E0E0E0;
}

/* About Section Specifics (index.html) */
.about-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.profile-photo {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border: 1px solid #ccc;
    overflow: hidden;
    background-color: #f4f4f4;
}

.profile-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.bio {
    flex-grow: 1;
    font-weight: 300;
}

/* CV Download (cv.html) */
.download-link {
    margin: 25px 0;
}

.download-link a {
    background: #D84315; /* Academic Orange/Red for call-to-action */
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: inline-block;
}

.download-link a:hover {
    background: #BF360C;
}

/* Publications (publications.html) */
#publications-list ul {
    list-style-type: none;
    padding-left: 0;
}

#publications-list li {
    margin-bottom: 20px;
    padding-left: 1.5em;
    text-indent: -1.5em;
}

#publications-list li::before {
    content: "\2022";
    color: #1A237E;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
}

.open-access-link {
    color: #388E3C;
    font-weight: 500;
    margin-left: 10px;
    text-decoration: none;
    border-bottom: 1px dashed #388E3C;
}

/* Links (publications.html) */
.external-links {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.external-links ul {
    list-style: none;
    padding: 0;
}

.external-links li {
    margin-bottom: 12px;
}

.external-links a {
    display: inline-block;
    background: #BBDEFB;
    color: #0D47A1;
    padding: 5px 12px;
    text-decoration: none;
    border-radius: 3px;
    margin-left: 15px;
    font-weight: 400;
}

/* Contact Form (contact.html) */
.contact-form-container {
    padding: 20px;
    background: #f4f4f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.contact-form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1A237E;
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
}

.contact-form-container textarea {
    resize: vertical;
    height: 150px;
}

.contact-form-container button {
    background: #0D47A1;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form-container button:hover {
    background: #093478;
}

/* --- 4. Footer --- */
footer {
    background: #212121; /* Dark Gray */
    color: #BDBDBD;
    text-align: center;
    padding: 15px 0;
    font-size: 0.85em;
}

/* --- 5. Responsiveness --- */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
    }
    .profile-photo {
        margin-bottom: 15px;
    }
    header .container {
        flex-direction: column;
    }
    header h1 {
        margin-bottom: 15px;
    }
    nav ul li {
        margin: 0 10px;
    }
}
