/* --- Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    scroll-behavior: smooth;
    background-image: url('Tarom.jpg'); /* SET YOUR BACKGROUND IMAGE URL */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-color: #f9f9f9;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    background-color: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 40px;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* --- NEW HEADER STYLES FOR PROFILE PICTURE --- */
header {
    background-color: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px auto 0;
    padding: 25px; /* Adjusted padding */
}

.header-layout {
    display: flex;
    align-items: center; /* Vertically align picture and text */
    justify-content: center; /* Center the group */
    gap: 30px; /* Space between picture and text */
}

.profile-picture img {
    width: 150px;
    height: 150px;
    border-radius: 0; /* This makes the image rectangular */
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    object-fit: cover; /* Prevents the image from being distorted */
}

.header-text {
    text-align: left; /* Align text to the left, next to the picture */
}
/* --- END OF NEW HEADER STYLES --- */


h1, h2 {
    font-weight: 400;
    color: #2c3e50;
    text-shadow: none;
}

h1 {
    font-size: 2.5em;
    margin-top: 0; /* Adjusted margin */
    margin-bottom: 0.2em;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid rgba(224, 224, 224, 0.7);
    padding-bottom: 10px;
    margin-top: 40px;
}

h3 { font-size: 1.4em; color: #34495e; margin-top: 30px; }
/* CHANGED: Set the default link color to the darker blue for better readability */
a { color: #1A5276; text-decoration: none; font-weight: bold; }
a:hover { text-decoration: underline; }
ul { list-style-type: none; padding-left: 0; }
li { margin-bottom: 15px; padding-left: 20px; position: relative; }
li::before { content: '•'; position: absolute; left: 0; color: #3498db; font-size: 1.2em; line-height: 1.1; }

.header-text p { margin: 5px 0; font-size: 1.1em; color: #555; }
.contact-info { margin-top: 10px; font-size: 1em; }
.contact-info a { margin: 0 5px; }

nav {
    background-color: rgba(52, 73, 94, 0.7);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav ul { display: flex; justify-content: center; margin: 0; padding: 0; }
nav li { margin: 0 10px; }
nav li::before { content: ''; }
/* This rule keeps the nav links white for contrast */
nav a { color: #ecf0f1; font-size: 1em; padding: 10px 0; font-weight: normal; text-shadow: none; }
nav a:hover { text-decoration: none; color: #bdc3c7; }

section { padding-bottom: 30px; }

section[id] {
    scroll-margin-top: 70px; 
}

#publications em { font-style: italic; color: #555; }

/* The specific rule for publications is no longer needed as the global 'a' rule handles it */

footer {
    text-align: center;
    padding: 20px 0;
    background-color: rgba(44, 62, 80, 0.75);
    color: #ecf0f1;
    font-size: 0.9em;
}

/* --- RESPONSIVE STYLES FOR MOBILE DEVICES --- */
@media (max-width: 768px) {
    /* Stack the profile picture on top of the text */
    .header-layout {
        flex-direction: column;
    }

    /* Center the text when it's stacked */
    .header-text {
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav li {
        margin: 8px 0;
    }
    h1 { font-size: 2em; }
    h2 { font-size: 1.6em; }
    main, header {
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }
}