@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

/*
Layout modelled on Kyle Jamieson's homepage (cs.princeton.edu/~kylej):
1000px white page, photo left of the name, small uppercase menu,
pale publication boxes.
Colours: University of Glasgow brand palette (University Blue, Cobalt),
publication boxes matched to master_new.css.
*/

/* ---------- Tokens ---------- */

:root {
    /* brand */
    --uog-blue: #003865;            /* University Blue: headings, hover */
    --uog-cobalt: #0075b0;          /* Cobalt: links */

    /* neutrals */
    --bg: #fff;
    --ink: #000;
    --muted: #585858;               /* secondary text, menu */
    --faint: #888;                  /* footer */
    --line: #dbdbdb;                /* rules */

    /* boxes (publications, tables) */
    --box-bg: #eff6fd;
    --box-edge: rgba(88, 158, 233, 0.72);
    --box-edge-hover: #074b92;
    --box-title: #172c3d;
    --box-venue: #273846;

    /* type */
    --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
    --geo: "Jost", "Futura", "Century Gothic", Arial, sans-serif;

    /* layout */
    --page-width: 1000px;
    --gutter: 15px;
}

/* ---------- Base ---------- */

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.35 var(--sans);
}

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

a:hover,
a:focus {
    color: var(--uog-blue);
    text-decoration: underline;
}

p {
    margin: 0 0 13px;
}

/* ---------- Page ---------- */

#outer-container {
    width: calc(var(--page-width) + 2px);
    margin: 0 auto;
}

#head {
    width: var(--page-width);
    height: 5px;
    margin: 0 auto;
}

#page {
    width: var(--page-width);
    min-height: 100%;
    margin: 0 auto;
    padding: 0;
    background: var(--bg);
    border: solid var(--bg);
    border-width: 0 1px;
}

/* ---------- Header: photo left, name beside it ---------- */

#header {
    position: relative;
    background: var(--bg);
}

#header::after {
    content: "";
    display: block;
    clear: both;
}

#boweichen {
    float: left;
    height: 240px;
    width: auto;
    padding: var(--gutter);
    margin: 0;
}

#title {
    margin: 0 var(--gutter);
    padding: 50px 0 30px;
    overflow: hidden;               /* keeps the text beside the floated photo */
    color: var(--uog-blue);
    font-family: var(--geo);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
}

#title span {
    display: block;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: normal;
}

#title a {
    color: var(--uog-cobalt);
}

#title a:hover {
    color: var(--uog-blue);
}

/* header without a photo: tighten the space around the name */
#header:not(:has(#boweichen)) #title {
    padding: 30px 0 0;
}

#header:not(:has(#boweichen)) #title br {
    display: none;
}

#header:not(:has(#boweichen)) #title span.address:first-of-type {
    margin-top: 12px;
}

#header:not(:has(#boweichen)) #title span.contact-line {
    margin-top: 0px;
}

#header:not(:has(#boweichen)) #bmenu-container {
    padding-top: 22px;
}

/* ---------- Menu ---------- */

#bmenu-container {
    clear: both;
    padding: 20px 0;
}

.bmenu {
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.bmenu li {
    display: inline-block;
    margin: 0;
    padding: 0 0 0 10px;
    font-family: var(--geo);
    font-size: 13.5px;
}

.bmenu li a {
    display: block;
    padding: 4px 5px;
    border-bottom: 5px solid transparent;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bmenu li a:hover,
.bmenu li a:focus {
    border-bottom-color: var(--uog-blue);
    color: var(--uog-blue);
    text-decoration: none;
}

/* ---------- Body ---------- */

#body {
    margin: 0 var(--gutter);
    padding: 0 0 10px;
    background: var(--bg);
}

h1,
h2,
h3,
h4 {
    color: var(--uog-blue);
    font-family: var(--geo);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

h1 {
    margin: 35px 0 10px;
    font-size: 15px;
}

h2 {
    margin: 25px 0 4px;
    font-size: 14px;
}

#body section:first-child h1 {
    margin-top: var(--gutter);
}

#body ul,
#body ol {
    margin: 6px 0 14px 22px;
    padding: 0;
}

/* ---------- Publications ---------- */

#body .pubs {
    margin-bottom: 18px;
}

#body .pubs .pub {
    margin: var(--gutter) 0;
    padding: 7px;
    border-left: 2px solid var(--box-bg);
    border-radius: 6px;
    background: var(--box-bg);
    line-height: 1.22;
}

#body .pubs .pub:hover {
    border-left-color: var(--box-edge-hover);
}

.title {
    color: var(--box-title);
    font-weight: 750;
    line-height: 1.15;
}

#body .pubs .pub .authors,
#body .pubs .pub .venue {
    margin-top: 2px;
    line-height: 1.2;
}

#body .pubs .pub .authors {
    color: var(--muted);
}

#body .pubs .pub .venue {
    color: var(--box-venue);
}

#body .pubs .pub a.pdflink {
    float: right;
    padding-left: 11px;
    vertical-align: top;
    transform: translateY(25%);
}

#body .pubs .pub a.pdflink img {
    width: auto;
    height: 15px;
    vertical-align: top;
}

/* ---------- Tables ---------- */

table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
    background: var(--box-bg);
}

td {
    padding: 6px 5px;
    vertical-align: top;
}

/* ---------- Footer ---------- */

#site-credits {
    width: var(--page-width);
    margin: 0 auto 30px;
    padding: 0px 10px;
    color: var(--faint);
    font-size: 12px;
    text-align: center;
}

#site-credits a {
    color: var(--faint);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1020px) {
    #outer-container,
    #head,
    #page,
    #site-credits {
        width: 100%;
    }

    #page {
        border-width: 0;
    }
}

@media (max-width: 760px) {
    #body .pubs .pub {
        padding: 9px 14px;
    }
}

@media (max-width: 640px) {
    #boweichen {
        float: none;
        display: block;
        width: 60%;
        max-width: 240px;
        height: auto;
        padding: var(--gutter) var(--gutter) 0;
    }

    #title {
        padding: 20px 0 10px;
    }
}
