/* General page styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333; /* Dark grey text */
    line-height: 1.6; /* Better readability */
}

/* HEADER STYLES */
.header-container {
    display: flex;
    align-items: center;
    position: relative;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.header-img {
    margin-right: auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px; /* Slight rounding looks more professional */
}

.header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 2.5em;
    white-space: nowrap;
}

/* MAIN CONTENT STYLES */
.main-content {
    max-width: 800px;
    margin: 40px auto;
/*    text-align: center; */
    padding: 0 20px;
}

h2 {
    display: block; /* Ensures it takes full width to allow centering */
    text-align: center; /* Forces the title to the middle */
    margin-top: 50px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-transform: uppercase;
    font-size: 1.4em;
    letter-spacing: 1px;
}

p {
    text-align: left;      /* Aligns text to the left (easier to read) */
    font-size: 1.15rem;    /* Increases font size (approx 18px) */
    line-height: 1.7;      /* Adds more space between lines */
    color: #444;           /* Slightly softer black */
    margin-bottom: 20px;   /* Space between paragraphs */
}

.bio-text p {
    text-align: justify;
}

.publication-item {
    margin-bottom: 30px;
}

/* Links styling */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 800px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .header-img {
        margin-right: 0;
        margin-bottom: 20px;
        width: 200px; /* Force smaller image on phone */
    }
    .header-title {
        position: static;
        transform: none;
        font-size: 2em;
    }
}

/* TEACHING TABLE STYLES */
.teaching-table {
    width: 100%;
    border-collapse: collapse; /* Removes gap between cell borders */
    margin-top: 10px;
}

.teaching-table td {
    vertical-align: top; /* Ensures text starts at the top of the cell */
    padding-bottom: 25px; /* Adds space between rows */
    font-size: 1.15rem;   /* Matches your bio font size */
    line-height: 1.5;
}

.year-col {
    width: 140px; /* Fixed width for the date column */
    font-weight: bold;
    color: #666; /* Slightly lighter color for dates */
    padding-right: 15px;
    text-align: left; /* Ensures dates align left */
}

.details-col {
    text-align: left; /* Ensures details align left */
}

/* Mobile: Stack the date on top of the course name on small screens */
@media (max-width: 600px) {
    .teaching-table td {
        display: block;
        width: 100%;
        padding-bottom: 5px;
    }
    .details-col {
        padding-bottom: 30px; /* Extra space after the full entry */
    }
}
