body {
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    margin: 0;
    background-color: white;
}

.homepage {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px 30px 0 30px;
}

/* Name and position */
.left-header {
    width: 500px;
    text-align: center;
}

.left-header h1 {
    color: #777;
    font-size: 32px;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.position {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Photo and information */
.about-section {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}

.photo-column {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.profile-photo {
    width: 225px;
    height: auto;
    display: block;
}

.about-text {
    position: static;
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
}

.about-text p {
    margin-top: 0;
    margin-bottom: 15px;
}

/* Navigation */
nav {
    position: absolute;
    top: 40px;
    right: 60px;
}

nav a {
    color: #777;
    text-decoration: none;
    margin-left: 15px;
    font-size: 18px;
}

nav a:hover {
    text-decoration: underline;
}

/* Research page */
.research-section {
    margin-top: 45px;
    max-width: 850px;
}

.research-section h2 {
    color: #777;
    font-size: 23px;
    font-weight: 500;
    margin-top: 45px;
    margin-bottom: 25px;
}

.paper {
    margin-bottom: 28px;
}

.paper-title {
    color: #555;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
}

a.paper-title:hover {
    text-decoration: underline;
}

.paper p {
    margin: 6px 0 0 0;
    line-height: 1.55;
}


/* ==================================================
   MOBILE VERSION
   ================================================== */

@media (max-width: 700px) {

    .homepage {
        margin: 0;
        padding: 25px 22px 40px 22px;
    }

    /* Navigation at top */
    nav {
        position: static;
        display: flex;
        justify-content: flex-end;
        gap: 18px;
        margin-bottom: 35px;
    }

    nav a {
        margin-left: 0;
        font-size: 16px;
    }

    /* Name and university */
    .left-header {
        width: 100%;
        text-align: center;
    }

    .left-header h1 {
        font-size: 27px;
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .position {
        font-size: 15px;
    }

    /* Stack photo and text vertically */
    .about-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 30px;
    }

    .photo-column {
        width: 100%;
        justify-content: center;
    }

    .profile-photo {
        width: 210px;
        max-width: 100%;
        height: auto;
    }

    /* Remove desktop absolute positioning */
    .about-text {
        position: static;
        width: 100%;
        margin-top: 30px;
        font-size: 16px;
        line-height: 1.6;
    }

    .about-text p {
        margin-top: 0;
        margin-bottom: 16px;
    }

    /* Prevent long email/links from overflowing */
    .about-text a {
        overflow-wrap: anywhere;
    }

    /* Research page */
    .research-section {
        margin-top: 35px;
        max-width: 100%;
    }

    .research-section h2 {
        font-size: 21px;
        margin-top: 35px;
        margin-bottom: 20px;
    }

    .paper-title {
        font-size: 16px;
    }

    .paper p {
        line-height: 1.5;
    }
}
