html {
    position: relative;
    min-height: 100%;
}

:root {
    --sky: #4f95c4;
    --brick: #b9582f;
}

body {
    font-family: 'Helvetica', sans-serif;
    font-size: 1.1rem;
    margin: 0;
    padding: 1rem 1.5rem 0;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 3rem; /* Space for the footer */
    hyphens: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

footer {
    background: white;
    position: absolute;
    height: 3rem;
    padding-left: 3%;
    padding-right: 3%;
    width: 94%;
    bottom: 0;
    left: 0;
    font-size: 0.8rem;
    z-index: 1000;
}

main {
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: left;
}

a,
.email {
    color: var(--brick);
    font-weight: normal;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

li {
    padding: 0.25rem 0;
}

/* Layout: text and portrait side by side */
.container {
    display: flex;
    flex-direction: row;
}

.text-block {
    flex: 1;
    min-width: 0;
    padding-right: 2.5rem;
}

.name-line {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.text-block > p {
    margin: 0 0 1rem;
}

.text-block > p.contact-email {
    margin-bottom: 0.25rem;
}

.image-block {
    flex: 0 0 28%;
    width: 100%;
}

.image-block img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Screens up to 600px wide: stack the layout */
@media (max-width: 600px) {
    .container {
        flex-direction: column;
    }

    /* Mobile order: name, photo, then everything else */
    .text-block {
        display: contents;
    }

    .name-line {
        order: -2;
    }

    .image-block {
        flex: auto;
        order: -1;
        max-width: 280px;
        margin: 0 auto 1rem;
    }

    footer {
        font-size: 0.75rem;
    }
}

/* Research list */
.research li {
    margin-bottom: 1.2rem;
}

.research li p {
    margin: 0.4rem 0 0;
}

.name {
    font-size: 2rem;
    font-weight: bold;
}

.coauthors {
    font-weight: normal;
    color: #8a8a8a;
}

.coauthors a {
    color: #dcae9a;
}

/* Contact links */
.icon-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
}

.icon-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.icon-links svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.icon-links span {
    font-size: 0.9rem;
}

.icon-links a:hover {
    color: var(--sky);
}

.contact-email .email {
    color: inherit;
    text-decoration: none;
}
