/* ===================================================
   1. Global Styles & Academic Typography
   =================================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    color: #2b2b2b;
    background-color: #fcfbf9; /* Warm off-white academic background */
    margin: 0;
    padding: 0;
}

/* Centered Reading Width Container */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem 1.5rem;
}

/* Headings use classic serif typography */
h1, h2 {
    font-family: 'Charis SIL', Georgia, serif;
    color: #111111;
    font-weight: 700;
}

h1 {
    font-size: 2.1rem;
    margin: 0 0 0.25rem 0;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

hr {
    border: none;
    border-top: 1px solid #e2ded8;
    margin: 2.5rem 0;
}

a {
    color: #005580;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===================================================
   2. Header & Profile Layout
   =================================================== */
.profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-photo img {
    width: 170px;
    height: 170px;
    border-radius: 6px;
    object-fit: cover;
    object-position: top center; /* Focuses frame on face/portrait */
    border: 1px solid #e0deda;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.profile-bio {
    flex: 1;
}

.subtitle {
    font-size: 1rem;
    color: #666666;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.bio-text {
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
    color: #333333;
}

.contact-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===================================================
   3. Content Entries (Education, Research, Projects)
   =================================================== */
.section {
    padding: 0.25rem 0;
}

.entry {
    margin-bottom: 1.75rem;
}

.entry:last-child {
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    font-size: 1rem;
    color: #111111;
}

.entry-date {
    font-size: 0.85rem;
    color: #777777;
    font-weight: 400;
}

.entry-sub {
    font-size: 0.9rem;
    color: #555555;
    font-style: italic;
    margin-top: 0.15rem;
}

.entry-details {
    font-size: 0.95rem;
    margin: 0.4rem 0 0.5rem 0;
    color: #333333;
}

footer {
    text-align: center;
    padding: 3rem 1.5rem 2rem 1.5rem;
    font-size: 0.82rem;
    color: #888888;
}

/* ===================================================
   4. Mobile Responsiveness
   =================================================== */
@media (max-width: 600px) {
    .container {
        padding-top: 2rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-photo img {
        width: 150px;
        height: 150px;
    }

    .contact-links {
        justify-content: center;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .entry-date {
        margin-top: 0.1rem;
    }
}

/* ===================================================
   5. Navigation Bar
   =================================================== */
.navbar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e2ded8;
    padding-bottom: 1rem;
}

.navbar a {
    font-weight: 600;
    color: #777777;
    transition: all 0.2s ease;
}

.navbar a:hover, .navbar a.active {
    color: #005580; /* Consistent with your link color */
    text-decoration: none;
    border-bottom: 2px solid #005580;
    padding-bottom: 0.85rem;
}

/* ===================================================
   6. Modern Entry Cards & Transitions
   =================================================== */
.entry {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #f0efeb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Adjust header spacing inside cards */
.entry-header {
    margin-bottom: 0.25rem;
}

.entry-details {
    margin-bottom: 0; 
}