/* ==========================================
   BASE
   ========================================== */

body {
    background-color: white;
    color: black;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: auto;
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 30px;
    width: 800px;
}

h1 {
    margin-bottom: 4px;
}

h3 {
    margin-top: 4px;
    margin-bottom: 12px;
    font-weight: normal;
    color: #444;
}

hr {
    background-color: #666;
    height: 1px;
    border: none;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.5;
    width: 800px;
}

/* ==========================================
   LINKS
   ========================================== */

a:link, a:visited {
    color: #7a6249;
    text-decoration: none;
}

/*
#55779c  ·  hover #35506e   (current, dusty blue)
#6b8cae  ·  hover #47617d   (lighter)

#5a6b80  ·  hover #36414f

#8a6a52  ·  hover #634a38

color: #606060; color: #909090;
*/

a:hover, a:active {
    color: #584634;
    text-decoration: none;
}

/* ==========================================
   LAYOUT
   ========================================== */

.row {
    overflow: hidden;
}

.row:after {
    clear: both;
    content: "";
    display: table;
}

.column {
    float: left;
}

.left {
    width: 520px;
}

.right {
    width: 280px;
}

.section {
    padding-bottom: 16px;
}

.section > *:last-child {
    margin-bottom: 0;
}

.section.compact {
    padding-bottom: 10px;
}

/* ==========================================
   PROFILE PHOTO + LINKS
   ========================================== */

img {
    display: block;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.profile-photo {
    width: 240px;
    margin-left: auto;
    margin-right: 0;
    margin-top: 0;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.profile-links {
    margin-top: 12px;
    width: 240px;          /* matches .profile-photo width */
    margin-left: auto;     /* so it sits flush under the photo */
    margin-right: 0;
    text-align: center;    /* centers the icons w.r.t. the photo */
    line-height: 1;
}

.profile-links a {
    display: inline-block;
    font-size: 18px;
    color: #7a6249;
    margin: 0 7px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.profile-links a:hover {
    color: #584634;
    transform: translateY(-2px);
}

/* Email as text under the photo, in a distinct face */
.profile-email {
    width: 240px;
    margin-left: auto;
    margin-right: 0;
    margin-top: 10px;
    text-align: center;
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    letter-spacing: 0.2px;
}

.profile-email a { color: #7a6249; }
.profile-email a:hover { color: #584634; }

/* ==========================================
   LISTS / PUBLICATIONS
   ========================================== */

li:not(:last-child) {
    margin-bottom: 8px;
}

ul.b {
    list-style-type: square;
    padding-left: 20px;
}

/* Publication entries with thumbnail */
.pub {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 26px;
}

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

.pub-thumb {
    flex: 0 0 190px;
    width: 190px;
}

.pub-thumb img {
    width: 190px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.pub-body {
    flex: 1;
    min-width: 0;
}

.pub-title {
    font-weight: bold;
}

.pub-venue {
    font-style: italic;
}

.pub-links a {
    padding-right: 8px;
}

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

@media screen and (max-width: 768px) {
    body {
        padding-left: 20px;
        padding-right: 20px;
        width: auto;
        max-width: 100%;
        overflow-x: hidden;
    }

    .row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .column {
        float: none !important;
        width: 100% !important;
        height: auto;
    }

    .left {
        display: contents;
    }

    .left > h1  { order: 1; width: 100%; }
    .left > h3  { order: 2; width: 100%; }
    .left > p   { order: 3; width: 100%; }

    .right {
        order: 4;
        width: 100% !important;
        text-align: center;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .profile-photo {
        margin: 0 auto !important;
        display: block !important;
    }

    .profile-email {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .profile-links {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    /* Stack publication thumbnails above text on mobile */
    .pub {
        flex-direction: column;
        gap: 10px;
    }

    .pub-thumb,
    .pub-thumb img {
        flex: none;
        width: 100%;
        max-width: 320px;
    }

    hr {
        width: 100%;
        max-width: 100%;
    }

    h1, h3, p, a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        white-space: normal;
    }
}
