/* basic reset-ish stuff */
body {
    font-family: Georgia, 'Times New Roman', serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.5;
    color: #222;
}

a {
    color: #0645ad;
}

/* smooth scroll for the nav anchors, no JS needed */
html {
    scroll-behavior: smooth;
}

nav {
    margin-bottom: 30px;
    font-size: 14px;
}

nav a {
    margin-right: 10px;
    text-decoration: none;
}

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

header {
    margin-bottom: 40px;
}

header h1 {
    margin-bottom: 5px;
}

header p {
    margin: 4px 0;
    color: #444;
}

/* each section gets some breathing room, and a little anchor offset
   so the heading doesn't hide under the nav when jumped to */
section {
    margin-bottom: 50px;
    scroll-margin-top: 20px;
}

section h2 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

/* project/publication rows: thumbnail + text side by side.
   this is the flexbox version of the old table layout. */
.entry {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.entry img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.entry-text h3 {
    margin: 0 0 5px 0;
    font-size: 17px;
}

.entry-text p {
    margin: 0;
}

.entry-text .links {
    margin-top: 6px;
}

.entry-text .links a {
    text-decoration: none;
    margin-right: 8px;
}

.entry-text .links a::before {
    content: "[";
}

.entry-text .links a::after {
    content: "]";
}

.entry-text .links a:hover {
    text-decoration: underline;
}

.job {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.job-date {
    width: 130px;
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
    text-align: right;
}

.job-info {
    flex: 1;
}

.job-info h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
}

.job-info .company {
    font-weight: normal;
    color: #444;
}

.job-info ul {
    margin: 0;
    padding-left: 20px;
}

.job-info li {
    margin-bottom: 4px;
}

@media (max-width: 500px) {
    .job {
        flex-direction: column;
        gap: 4px;
    }

    .job-date {
        width: auto;
    }
}

/* stack image above text on narrow screens */
@media (max-width: 500px) {
    .entry {
        flex-direction: column;
    }

    .entry img {
        width: 100%;
        height: auto;
    }
}
