/*
 * This is the new, cleaned-up and fully-functional styles.css file.
 * It combines all the correct rules into a single, cohesive file.
 */

/* Basic Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

#header h1 {
    margin-top: 0;
}

#container {
    max-width: 960px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Header */
#header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

/* Main Layout (using Flexbox) */
#main {
    flex: 1;
    padding: 0 20px;
}

#menu {
    border-right: 1px solid #ddd;
    padding-right: 20px;
    width: 250px;
}

/* Responsive Main Layout */
@media (min-width: 768px) {
    #container {
        flex-direction: row;
    }
}

/* Menu Navigation */
#menu h2 {
    margin-top: 20px;
    margin-bottom: 5px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    font-size: 1.1em;
}

#menu ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#menu ul li {
    margin-bottom: 5px;
}

#menu ul li a {
    text-decoration: none;
    color: #006699;
    font-size: 1em;
}

#menu ul li a:hover {
    text-decoration: underline;
}

/* Final, definitive solution for the personal data section */
.personal-data-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.personal-data-info {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 20px;
}

.personal-data-info img {
    width: 200px;
    height: auto;
}

.personal-data-info p {
    flex-grow: 1;
}

.geca-logo {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .personal-data-info {
        flex-direction: column;
        align-items: center;
    }

    .geca-logo {
        justify-content: center;
    }
}

/*
 * CSS FOR THE CURRICULUM VITAE TWO-COLUMN LAYOUT
 */
.two-column-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Provides space between columns */
}

/* This rule makes each section take up roughly half the width */
.two-column-layout > section {
    flex: 1 1 calc(50% - 10px); /* Adjusts for gap */
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
}

/*
 * When the screen is small, stack the columns on top of each other.
 */
@media (max-width: 767px) {
    .two-column-layout {
        flex-direction: column;
    }
}

/* CSS for Main Content */
#main address {
    margin-bottom: 20px;
    font-style: normal;
}

#main hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 30px 0;
}

#main section {
    margin-bottom: 30px;
}

/* H3 styles for both CV and Publications */
#main h3 {
    margin-top: 25px;
    font-size: 1.5em;
    margin-bottom: 10px;
}

#main h4 {
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 5px;
}

#main ul {
    list-style-type: disc;
    padding-left: 20px;
}

#main ul li {
    margin-bottom: 10px;
}

#main ul li a {
    word-wrap: break-word;
}

/* Specific styles for Publications List */
#main section.publications ul {
    list-style-type: none;
    padding-left: 0;
}

#main section.publications ul li {
    padding-left: 15px;
    text-indent: -15px;
    position: relative;
}

#main section.publications ul li:before {
    content: "\2022";
    color: #F90000;
    font-weight: bold;
    display: inline-block;
    width: 15px;
}

/* CSS for the Semblanza Page */
#main h2 {
    text-align: center;
}

/* CSS for the Wanda Page */
.wanda-links {
    list-style-type: none;
    padding: 0;
}

.wanda-links li {
    margin-bottom: 25px;
}

.wanda-links a {
    font-size: 2em;
    font-weight: bold;
    color: #000;
    text-decoration: none;
}

.wanda-links a:hover {
    color: #F90000;
    text-decoration: underline;
}

.wanda-links li:first-child a {
    color: #00FFFF;
}

#main figure {
    text-align: center;
    margin: 40px auto;
}

#main img:not(.profile-photo) {
    border: 1px solid #ddd;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    max-width: 100%;
    height: auto;
}