:root {
    --navbar-background: #24b0ab;
    --navbar-active: #24b0ab;
    --navbar-hover: #1e7c87;
    --navbar-text: #111111;
    --link: #1e7c87;
    --link-hover: #136a72;
}

/* Links in page content (not the navbar or the footer icons) */

.page a {
    color: var(--link);
}

.page a:hover,
.page a:focus {
    color: var(--link-hover);
}

/* Navigation bar */

.site-navbar {
    background-color: var(--navbar-background);
    background-image: none;
    border: none;
}

.site-navbar .navbar-brand,
.site-navbar .navbar-nav > li > a {
    color: var(--navbar-text);
}

.site-navbar .navbar-brand:hover,
.site-navbar .navbar-brand:focus,
.site-navbar .navbar-nav > li > a:hover,
.site-navbar .navbar-nav > li > a:focus {
    color: var(--navbar-text);
    background-color: var(--navbar-hover);
}

/* Active tab: same colour as the bar, so it does not stand out. */
.site-navbar .navbar-nav > .active > a {
    color: var(--navbar-text);
    background-color: var(--navbar-active);
}

/* Needs its own rule: Bootstrap's .navbar-inverse .navbar-nav > .active > a:hover
   is more specific than the general hover rule and would otherwise win. */
.site-navbar .navbar-nav > .active > a:hover,
.site-navbar .navbar-nav > .active > a:focus {
    color: var(--navbar-text);
    background-color: var(--navbar-hover);
}

/* Mobile menu button */

.site-navbar .navbar-toggle {
    border-color: var(--navbar-text);
}

.site-navbar .navbar-toggle .icon-bar {
    background-color: var(--navbar-text);
}

.site-navbar .navbar-toggle:hover,
.site-navbar .navbar-toggle:focus {
    background-color: var(--navbar-hover);
}

/* Page frame: sticky footer via a flex column body */

html {
    height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
}

/* Applies to any element with class="page", including div and main. */
.page {
    flex: 1 0 auto;
    width: 100%;
    padding-top: 60px;
}

footer {
    flex: 0 0 auto;
    width: 100%;
    margin-top: auto;
    padding: 20px 0;
    background: #f8f9fa;
    border-top: 2px solid #ccc;
}

@media (min-width: 768px) {
    .container {
        width: 768px;
    }
}

img {
    max-width: 100%;
    vertical-align: middle;
}

/* Headings */

h1, h2, h3, h4 {
    margin-top: 20px;
}

/* Page title: the h1 on each subpage. */
.page-title {
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: 700;
}

/* Section headings within a page. */
.year-separator {
    margin-top: 30px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    overflow: hidden;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 2px solid #eee;
}

/* Home page */

.header-text {
    text-align: center;
    margin-bottom: 30px;
}

.header-text h1 {
    font-size: 24px;
    font-weight: 700;
}

.main-content p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
    text-align: justify;
}

.profile-pic {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 4px;
}

/* Introductory paragraph above a section (talks, teaching). */
.page-intro {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
    text-align: justify;
}

/* Footer profile icons */

.profile-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 15px;
}

.profile-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.profile-links a:hover {
    opacity: 0.75;
    transform: translateY(-2px);
    text-decoration: none;
}

.profile-links a:focus {
    outline: 2px solid #333;
    outline-offset: 4px;
}

.orcid-icon {
    color: #a6ce39;
}

.arxiv-icon {
    color: #b31b1b;
}

.linkedin-icon {
    color: #0a66c2;
}

.scholar-icon {
    color: #4285f4;
}

/* Research page: preprint and publication lists */

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

.paper-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Dated two-column lists (teaching page, talks page) */

.course-list,
.dated-list {
    margin-top: 25px;
    padding-left: 0;
    list-style: none;
}

.course-list li,
.dated-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.course-term,
.dated-list-term {
    flex: 0 0 105px;
    color: #666;
}

/* CV page */

.cv-download {
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.6;
}

.cv-download i {
    margin-right: 4px;
}

.cv-entry {
    margin-bottom: 25px;
}

.cv-entry-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    line-height: 1.5;
}

.cv-entry-title {
    font-weight: 700;
}

.cv-entry-institution {
    font-style: italic;
}

.cv-entry-meta {
    color: #666;
    white-space: nowrap;
}

.cv-details {
    margin-top: 5px;
    margin-bottom: 0;
    padding-left: 20px;
    list-style-type: square;
}

.cv-details li {
    line-height: 1.5;
}

/* Narrow screens: stack the two-column rows */

@media (max-width: 767px) {
    .course-list li,
    .dated-list li {
        display: block;
        margin-bottom: 15px;
    }

    .course-term,
    .dated-list-term {
        display: block;
    }

    .cv-entry-line {
        display: block;
    }

    .cv-entry-meta {
        display: block;
        white-space: normal;
    }
}
