/* =========================================
   General
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #333;
    background: #f6f7f8;
}

body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 3rem 4rem;

    background: #fff;
    min-height: 100vh;

    line-height: 1.55;
}

/* =========================================
   Navigation
   ========================================= */

header {
    background: #003E61;
    border-bottom: 4px solid #DFE6EC;

    position: sticky;
    top: 0;
    z-index: 1000;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

nav {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
}

header nav a {
    display: block;
    padding: 0.9rem 1.2rem;

    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

header nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}


/* Group containing h2 + its h3 entries */

.nav-group {
    position: relative;
}


/* Dropdown with h3 headings */

.nav-dropdown {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;

    min-width: 220px;

    background: #003E61;

    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* Show dropdown on hover */

.nav-group:hover .nav-dropdown {
    display: block;
}


/* h3 entries are slightly smaller */

header nav .nav-dropdown a {
    padding: 0.7rem 1.2rem;

    color: #fff;
    font-size: 0.9rem;
    font-weight: 400;

    white-space: nowrap;
}

header nav .nav-dropdown a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* Indicator for navigation entries with dropdowns */
header nav .nav-group > a::after {
    content: "▾";
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.75em;
    opacity: 0.8;
    transition: transform 0.15s ease;
}

/* Rotate arrow while dropdown is open */
header nav .nav-group:hover > a::after,
header nav .nav-group:focus-within > a::after {
    transform: rotate(180deg);
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 120px;
    flex: 0 0 120px;

    padding: 0.55rem 0.5rem;
}

.nav-logo img {
    display: block;

    width: 120px;
    height: 30px;

    object-fit: contain;
}

header nav .nav-logo:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* =========================================
   Headings
   ========================================= */

h1,
h2,
h3 {
    color: #012e5c;
    line-height: 1.25;
}

h1 {
    margin: 0 0 2.5rem;
    padding-bottom: 0.75rem;

    font-size: 2rem;

    border-bottom: 3px solid #003E61;
}

h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;

    font-size: 1.5rem;
}

h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;

    font-size: 1.15rem;
}


/* =========================================
   Links
   ========================================= */

body a {
    color: #006b9f;
    text-decoration: none;
}

body a:hover {
    color: #003E61;
    text-decoration: underline;
}

/*
 * Navbar links are deliberately defined
 * more specifically so the general link
 * styling above does not override them.
 */
header nav a,
header nav a:hover {
    color: #fff;
}


/* =========================================
   Tables
   ========================================= */

/*
 * Most table formatting is generated inline,
 * so we deliberately don't override colors,
 * borders, etc. here.
 */

table {
    margin: 0.75rem 0 2.5rem;

    max-width: 100%;
    font-size: 0.95rem;
}

/* Slightly soften the generated event boxes */
td > div {
    border-radius: 3px;
}


/* =========================================
   Text
   ========================================= */

p,
ul,
ol {
    max-width: 75ch;
    margin: 0.75rem 0 1.25rem;
}


/* =========================================
   Code
   ========================================= */

code {
    padding: 0.1em 0.35em;

    border-radius: 3px;
    background: #eef1f3;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.9em;
}

/* =========================================
   Mobile / small screens
   ========================================= */

@media (max-width: 800px) {

    body {
        width: 100%;
        max-width: none;

        margin: 0;
        padding: 0 1rem 3rem;

        overflow-x: hidden;
    }


    /* =====================================
       Navigation
       ===================================== */

    header {
        margin-left: -1rem;
        margin-right: -1rem;

        position: sticky;
        top: 0;

        overflow: visible;
    }

    nav {
        display: flex;
        align-items: center;

        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    header nav > a,
    header nav .nav-group > a {
        flex: 0 0 auto;

        padding: 0.75rem 0.8rem;

        font-size: 0.85rem;
        white-space: nowrap;
    }


    /* Logo */

    .nav-logo {
        width: auto;
        flex: 0 0 auto;

        padding: 0.45rem 0.7rem;
    }

    .nav-logo img {
        width: 100px;
        height: 25px;
    }


    /* =====================================
       Dropdowns
       ===================================== */

    .nav-dropdown {
        min-width: 180px;
    }

    header nav .nav-dropdown a {
        padding: 0.65rem 0.9rem;

        font-size: 0.85rem;
    }


    /* =====================================
       Headings
       ===================================== */

    h1 {
        margin-top: 1.5rem;
        margin-bottom: 2rem;

        font-size: 1.5rem;

        overflow-wrap: break-word;
    }

    h2 {
        margin-top: 2rem;
        font-size: 1.3rem;
    }

    h3 {
        margin-top: 1.5rem;
        font-size: 1.1rem;
    }


    /* =====================================
       Tables
       ===================================== */

    table {
        font-size: 0.8rem;

        /*
         * Don't force the generated timetable
         * into the viewport.
         */
        max-width: none;
    }
}

.table-scroll {
    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
}

.table-scroll table {
    max-width: none;
}

/* =========================================
   Team
   ========================================= */

.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

    max-width: 600px;
    gap: 1.25rem;

    margin: 1rem 0 2.5rem;
}

.team-member {
    overflow: hidden;

    background: #f6f7f8;
    border: 1px solid #DFE6EC;
    border-radius: 5px;
}

.team-member img {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    object-fit: cover;
    /*object-position: center top;*/
    object-position: center 5%;
}

.team-member-info {
    padding: 0.8rem 1rem;
}

.team-member-info strong,
.team-member-info span {
    display: block;
}

.team-member-info strong {
    color: #012e5c;
}

.team-member-info span {
    margin-top: 0.15rem;

    color: #666;
    font-size: 0.9rem;
}
