:root {
    --text: #222;
    --muted: #666;
    --link: #2457a6;
    --border: #ddd;
    --background: #fff;
    --max-width: 1000px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);

    font-family:
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            Helvetica,
            Arial,
            sans-serif;

    font-size: 16px;
    line-height: 1.6;
}

main {
    max-width: var(--max-width);
    margin: 70px auto;
    padding: 0 24px;
}


/* Header */

header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 30px;
    margin-bottom: 50px;
}

.intro {
    flex: 1;
}

.intro p {
    margin-bottom: 20px;
}

h1 {
    margin: 0 0 5px;

    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 18px;
}

.profile-photo {
    width: 300px;
    height: 400px;
    border-radius: 4px;
    object-fit: cover;
}


/* General text */

p {
    margin: 0 0 14px;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* Sections */

section {
    margin-bottom: 42px;
}

h2 {
    margin-bottom: 15px;
    padding-bottom: 5px;

    border-bottom: 1px solid var(--border);

    font-size: 1.25rem;
    font-weight: 600;
}

h3 {
    margin: 22px 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.teaching-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
}

.teaching-list li {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 7px;
}

.term {
    color: var(--muted);
    white-space: nowrap;
}

/* Lists */

ul {
    padding-left: 22px;
}

li {
    margin-bottom: 10px;
}


/* Publications */

.publication {
    margin-bottom: 20px;
}

.publication-title {
    font-weight: 600;
}

.publication-authors {
    color: var(--muted);
}

.publication-links {
    margin-top: 3px;
    font-size: 0.95rem;
}

.publication-links a {
    margin-right: 10px;
}

/* Footer */

footer {
    margin-top: 60px;
    padding-top: 15px;

    border-top: 1px solid var(--border);

    color: var(--muted);
    font-size: 0.9rem;
}

#travel-map {
    width: 100%;
    margin-top: 20px;

    background: #ffffff;
    border-radius: 6px;

    overflow: hidden;
}

#travel-map svg {
    display: block;
    width: 100%;
    height: auto;
}


/* Countries you have NOT visited */

.country {
    fill: #d9d7d1;
    stroke: #ffffff;
    stroke-width: 0.6px;

    transition:
            fill 0.15s ease,
            opacity 0.15s ease;
}


/* Countries you HAVE visited */

.country.visited {
    fill: #3673b9;
}


/* Hover */

.country.hovered {
    fill: #555;
}


/* Country-name tooltip */

#map-tooltip {
    position: absolute;
    pointer-events: none;

    padding: 5px 9px;

    background: rgba(30, 30, 30, 0.9);
    color: white;

    border-radius: 4px;

    font-size: 14px;

    opacity: 0;

    transition: opacity 0.1s ease;

    z-index: 1000;
}

/* Mobile */

@media (max-width: 500px) {
    main {
        margin-top: 40px;
    }

    header {
        flex-direction: column-reverse;
        align-items: center;
        gap: 1.5rem;
    }

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

    .intro {
        width: 100%;
    }
}

.photos-page {
    max-width: 1100px;
    margin: 70px auto;
    padding: 0 24px;
}

.photos-intro {
    color: var(--muted);
    margin-bottom: 30px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.photo-grid figure {
    margin: 0;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;

    display: block;
    border-radius: 4px;
}

.photo-grid figcaption {
    margin-top: 7px;

    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
}