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

/* Body styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #444;
    padding: 20px;
    margin: 0;
}

/* Header styles */
header {
    position: relative;
    text-align: center;
    color: #f4f4f4;
}

/* Banner styles */
.banner {
    background-image: url('images/banner.jpg'); /* Replace with your banner image path */
    background-size: cover;
    background-position: bottom 40% center; /* Align the bottom and center horizontally */
    color: #f4f4f4;
    padding: 200px 0; /* Adjust padding for mobile view */
    position: relative; /* Ensure banner is positioned relative to its container */
    display: flex; /* Use flexbox to center contents */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

/* Header title */
header h1 {
    font-size: 3em; /* Adjust font size for readability */
    color: #f4f4f4;
}

/* Contact icons and links */
.contact-summary {
    text-align: center;
    position: relative; /* Remove absolute positioning */
    width: 100%; /* Ensure it takes full width */
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* Stack items vertically on mobile */
    align-items: center; /* Center items horizontally */
    gap: 10px; /* Space between items */
}

.contact-list li {
    display: flex;
    align-items: center;
}

.contact-icon {
    width: 40px; /* Adjust size for mobile */
    height: 40px; /* Adjust size for mobile */
    margin-right: 10px; /* Space between icon and text */
}

.contact-list a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.contact-list a:hover {
    text-decoration: underline;
}

/* Main content styling */
main {
    padding: 0px;
}

/* Main content layout */
.content {
    display: flex;
    align-items: stretch; /* Ensure both containers stretch to the same height */
    gap: 30px; /* Space between text and CV picture */
}

/* Styling for container holding both text and image */
.container {
    display: flex;
    align-items: stretch; /* Ensure both text and image containers stretch to the same height */
}

/* Styling for text container */
.text-container {
    flex: 1; /* Takes up remaining space */
    display: flex;
    flex-direction: column; /* Ensure text content fills the height */
}

/* Styling for CV picture container */
.cv-picture-container {
    flex: 0 0 20%; /* Fixed width or adjust based on your layout */
    display: flex;
    align-items: center; /* Center the image vertically */
    justify-content: center; /* Center the image horizontally */
    overflow: hidden; /* Hide any overflow */
    margin-right: 10px; /* Adjust indent for mobile */
}

/* Ensure the image container fills the height of the text container */
.cv-picture {
    height: 100%; /* Ensure the container fills the height of the text container */
    width: auto; /* Maintain aspect ratio of the container */
    display: flex;
    align-items: center; /* Center the image vertically */
    justify-content: center; /* Center the image horizontally */
}

/* Scale the image proportionally to fit within the container */
.cv-picture img {
    max-width: 100%; /* Ensure the image does not exceed container width */
    max-height: 100%; /* Ensure the image does not exceed container height */
    height: auto; /* Maintain aspect ratio */
    width: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the image is fully visible without distortion */
}

.text ul {
    margin-left: 40px; /* Adjust indent for mobile */
    list-style: disc;
}

/* Section styles */
section {
    background-color: #fff;
    padding: 20px;
    border-radius: 0px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

section h2 {
    margin-bottom: 10px;
    color: #333;
}

/* CV Section Styles */
#cv {
    background-color: #fff; /* Background color of the section */
    padding: 20px; /* Padding around the section */
    border-radius: 8px; /* Rounded corners for the section */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Light shadow for a card effect */
    margin-top: 20px; /* Space above the section */
}

#cv h2 {
    margin-bottom: 15px; /* Space below the section title */
    color: #333; /* Color of the title */
}

.cv-subsection h3 {
    margin-bottom: 10px; /* Space below the subsection title */
    color: #444; /* Color of the subsection title */
}

.cv-subsection ul {
    list-style-type: none; /* Remove bullet points from the list */
    padding-left: 20px; /* Indent the list items */
    margin-left: 0; /* Remove default margin */
}

.cv-subsection ul li {
    margin-bottom: 15px; /* Space between list items */
    margin-top: 15px; /* Space between list items */
}

/* Media Queries for responsive design */
@media only screen and (max-width: 768px) {
    .banner {
        padding: 60px 0; /* Further reduce padding for very small screens */
        background-position: bottom 40% center; /* Align the bottom and center horizontally */
    }

    header h1 {
        font-size: 2em; /* Reduce font size for smaller screens */
    }

    .contact-summary {
        padding: 10px; /* Add padding for better spacing */
    }

    .contact-list {
        flex-direction: column; /* Stack contact items vertically */
        align-items: center; /* Center items horizontally */
    }

    .contact-list li {
        margin-bottom: 20px; /* Reduce space between items */
    }

    .content {
        flex-direction: column; /* Stack content vertically on small screens */
        align-items: center; /* Center items horizontally */
    }

    .text-container {
        order: 2; /* Move text to appear after the image */
        width: 100%; /* Full width for text */
    }

    .cv-picture-container {
        order: 1; /* Move image to appear before the text */
        width: 100%; /* Full width for CV picture on small screens */
        margin-bottom: 20px; /* Space between image and text */
    }

    .cv-picture img {
        max-width: 100%; /* Ensure image fits container */
        height: auto; /* Maintain aspect ratio */
    }
}

@media (min-width: 769px) { 
    .content {
    }

    .text {
    }

    .cv-picture {
    }
}

/* Publications Section Styles */
#publications {
    background-color: #fff; /* Background color of the section */
    padding: 20px; /* Padding around the section */
    border-radius: 8px; /* Rounded corners for the section */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Light shadow for a card effect */
    margin-top: 20px; /* Space above the section */
}

#publications h2 {
    margin-bottom: 15px; /* Space below the section title */
    color: #333; /* Color of the title */
}

/* Subsection styling within publications */
#publications .publications-subsection {
    margin-bottom: 20px; /* Space between different years sections */
}

#publications .publications-subsection > strong {
    display: block; /* Make the year a block element */
    font-size: 1.2em; /* Font size similar to CV section titles */
    margin-bottom: 10px; /* Space below the year */
    color: #444; /* Color of the year */
}

#publications .publications-subsection ul {
    list-style-type: none; /* Remove bullet points from the list */
    padding-left: 20px; /* Indent the publication list items */
    margin: 0; /* Remove default margin */
}

#publications .publications-subsection ul li {
    margin-bottom: 15px; /* Space between list items */
}

/* Funding Section Styles */
#funding {
    background-color: #fff; /* Background color of the section */
    padding: 20px; /* Padding around the section */
    border-radius: 8px; /* Rounded corners for the section */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Light shadow for a card effect */
    margin-top: 20px; /* Space above the section */
}

#funding h2 {
    margin-bottom: 15px; /* Space below the section title */
    color: #333; /* Color of the title */
}

/* Subsection styling within funding */
#funding .funding-subsection {
    margin-bottom: 20px; /* Space between different years sections */
}

#funding .funding-subsection > strong {
    display: block; /* Make the year a block element */
    font-size: 1.2em; /* Font size similar to CV section titles */
    margin-bottom: 10px; /* Space below the year */
    color: #444; /* Color of the year */
}

#funding .funding-subsection ul {
    list-style-type: none; /* Remove bullet points from the list */
    padding-left: 20px; /* Indent the grant details */
    margin: 0; /* Remove default margin */
}

#funding .funding-subsection ul li {
    margin-bottom: 20px; /* Space between different grant items */
}

#funding .grant-details {
    margin-bottom: 10px; /* Space between different grant details */
}

#funding .grant-details p {
    margin: 5px 0; /* Margin around paragraphs in grant details */
}

#funding .grant-details strong {
    display: block; /* Make labels for grant details block elements */
    font-weight: bold; /* Bold for labels */
    margin-bottom: 5px; /* Space below the labels */
}
