:root {
    /* Corner rounding for cards, tables, videos and the contact box */
    --card-radius: 12px;
}

header {
    font-family: "Titillium Web", sans-serif;
}

main {
    font-family: "Titillium Web", sans-serif;
    font-size: 18px;
    line-height: 1.6;
    margin: auto;

    a {
        color: #006a9e;
        font-weight: 600;
        text-decoration: none;
    }

    a:hover {
        color: #006a9e;
        text-decoration: underline;
    }
}

main h1,
main h2,
main h3 {
    line-height: 1.2;
}

main h1 {
    font-weight: 600;
    font-size: 36px;
    color: #0c2340;
}

.body {
    display: flex;
    flex-direction: column;
    padding: 20px;
    font-size: 18px;
    font-family: "Titillium Web", sans-serif;
    max-width: 960px;
    margin: auto;
}

.body p {
    max-width: 70ch;
}

/* Home page: center the text column so it lines up with the video */
.home .body p {
    margin-left: auto;
    margin-right: auto;
}

.home h2 {
    text-align: center;
}

/* Home page hero: text next to the interactive orbital viewer */
.hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    align-items: center;
    width: 90%;
    max-width: 960px;
    margin: 30px auto 10px;
}

.hero-text h1 {
    font-size: 40px;
    margin: 0 0 10px;
}

.hero-viewer {
    margin: 0;
}

.hero-canvas {
    aspect-ratio: 1;
    border-radius: var(--card-radius);
    background: radial-gradient(circle at 50% 45%, #ffffff 0%, #eef2f6 70%);
}

.hero-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
}

.hero-viewer figcaption {
    margin-top: 8px;
    text-align: center;
    font-size: 15px;
    color: #4a4a4a;
}

.hero-orbital-label {
    transition: opacity 0.4s ease;
}

.hero-orbital-label.fading {
    opacity: 0;
}

/* Never let images overflow the screen */
main img {
    max-width: 100%;
    height: auto;
}

.map {
    align-self: flex-start;
    border-radius: var(--card-radius);
}

/* Responsive 16:9 video embed, as wide as the text column */
.video {
    width: min(70ch, 100%);
    aspect-ratio: 16 / 9;
    margin: 20px 0 0;
    border-radius: var(--card-radius);
    overflow: hidden;
}

.home .video {
    margin: 20px auto 0;
}

/* Round the iframe itself too: Safari ignores the parent's clipping for embeds */
.video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--card-radius);
}

/* Same width as the home page text column and video */
.highlight {
    box-sizing: border-box;
    width: min(70ch, 90%);
    text-align: center;
    color: #ffffff;
    background-color: #007dba;
    padding: 4px 20px;
    font-size: 18px;
    font-family: "Titillium Web", sans-serif;
    margin: 10px auto;
    border-radius: var(--card-radius);

    p {
        font-size: 20px;
    }
}

/* Single header bar: lab name on the left, page links, GitHub icon on the right */
nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    background-color: #0c2340;
    border-bottom: 4px solid #f2a900;
    padding: 10px 20px;
    font-family: "Titillium Web", sans-serif;
    font-weight: 600;
}

nav a {
    color: rgb(255, 255, 255);
    padding: 2px 9px;
    text-decoration: none;
    font-size: 18px;
    display: inline-block;
}

nav .brand {
    margin-right: auto;
    padding: 0;
    font-size: 28px;
    font-weight: 300;
    white-space: nowrap;
}

nav .brand strong {
    font-weight: 600;
}

nav .brand:hover {
    background: none;
    color: #f2a900;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 2px;
}

nav a:hover {
    background-color: #006a9e;
    color: #ffffff;
}

nav a.active {
    color: #f2a900;
    box-shadow: inset 0 -3px 0 #f2a900;
}

nav a.active:hover {
    color: #ffffff;
}

nav .nav-github {
    padding: 4px 8px;
}

/* Wide screens: everything fits on one row, so keep the bar on screen while
   scrolling and slim it down once the page has scrolled */
@media (min-width: 1101px) {
    header {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    nav,
    nav .brand {
        transition: padding 0.2s ease, font-size 0.2s ease;
    }

    header.scrolled nav {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    header.scrolled nav .brand {
        font-size: 22px;
    }
}

/* Narrower screens: lab name and GitHub on the first row, page links below */
@media (max-width: 1100px) {
    .nav-links {
        order: 2;
        flex-basis: 100%;
        margin-left: -9px;
    }
}

.nav-github svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Push the footer to the bottom of the window on short pages */
body {
    margin: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex-grow: 1;
    width: 100%;
}

footer {
    margin-top: 40px;
    padding: 15px 20px;
    background-color: #0c2340;
    color: #ffffff;
    text-align: center;
    font-family: "Titillium Web", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

footer p {
    margin: 5px 0;
}

.people {
    display: flex;
    width: 90%;
    max-width: 960px;
    background-color: #f5f5f5;
    margin: 0 auto 25px;
    font-size: 18px;
    border: 1px solid #e3e3e3;
    border-radius: var(--card-radius);

    h1 {
        color: #000000;
        font-size: 30px;
        margin-bottom: 0px;
        margin-top: 0px;

    }

    h2 {
        font-size: 24px;
        margin-bottom: 0px;
        margin-top: 0px;
    }
}

.people_img {
    display: block;
    flex-basis: 20%;
    margin: auto;
    padding: 10px;
}

.people_img img {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
}

.people_info {
    display: block;
    flex-basis: 70%;
    padding: 10px;
}

.research {
    width: 90%;
    max-width: 960px;
    background-color: #f5f5f5;
    margin: 25px auto;
    display: flex;
    font-size: 18px;
    border: 1px solid #e3e3e3;
    border-radius: var(--card-radius);

    h1 {
        color: #000000;
        font-size: 30px;
    }

    h2 {
        font-size: 24px;
    }
}

.course {
    box-sizing: border-box;
    width: 90%;
    max-width: 960px;
    margin: 0 auto 25px;
    padding: 5px 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: var(--card-radius);
    font-size: 18px;

    h2 {
        font-size: 24px;
        margin: 15px 0 0;
    }
}

.course-level {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #4a4a4a;
}

.research_body {
    display: block;
    flex-basis: 70%;
    padding: 10px;
}

.research_sidebar {
    display: block;
    flex-basis: 30%;
    align-self: flex-start;
    margin: 20px 15px;
    padding: 0 0 0 15px;
    border-left: 3px solid #f2a900;
    font-size: 16px;
    color: #4a4a4a;
}

.titillium-web-extralight {
    font-family: "Titillium Web", sans-serif;
    font-weight: 200;
    font-style: normal;
}

.titillium-web-light {
    font-family: "Titillium Web", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.titillium-web-regular {
    font-family: "Titillium Web", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.titillium-web-semibold {
    font-family: "Titillium Web", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.titillium-web-bold {
    font-family: "Titillium Web", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.titillium-web-black {
    font-family: "Titillium Web", sans-serif;
    font-weight: 900;
    font-style: normal;
}

.titillium-web-extralight-italic {
    font-family: "Titillium Web", sans-serif;
    font-weight: 200;
    font-style: italic;
}

.titillium-web-light-italic {
    font-family: "Titillium Web", sans-serif;
    font-weight: 300;
    font-style: italic;
}

.titillium-web-regular-italic {
    font-family: "Titillium Web", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.titillium-web-semibold-italic {
    font-family: "Titillium Web", sans-serif;
    font-weight: 600;
    font-style: italic;
}

.titillium-web-bold-italic {
    font-family: "Titillium Web", sans-serif;
    font-weight: 700;
    font-style: italic;
}

.alumni-table {
    width: 90%;
    max-width: 960px;
    margin: auto;
    padding: 20px;
    /* Let the table scroll sideways when it is wider than the screen */
    overflow-x: auto;
}

.alumni-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: var(--card-radius);
    overflow: hidden;
    font-size: 18px;
    margin-bottom: 20px;
}

.alumni-table th {
    background-color: #f2a900;
    color: #000000;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.alumni-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

/* Keep "2019 - 2024" on one line */
.alumni-table td:nth-child(2) {
    white-space: nowrap;
}

.alumni-table tr:hover {
    background-color: #ececec;
}

.alumni-table .section-header {
    background-color: #0c2340;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 15px;
}

.alumni-table a {
    color: #006a9e;
    text-decoration: none;
}

.alumni-table a:hover {
    color: #006a9e;
    text-decoration: underline;
}

.links-cell {
    text-align: center;
    white-space: nowrap;
}

.links-cell a {
    display: inline-block;
    margin: 0 5px;
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.links-cell a:hover,
.links-cell a[title]:hover {
    transform: scale(1.2);
    color: #006a9e;
}

.links-cell a[title="Google Scholar"] {
    color: #4285F4;
}

.links-cell a[title="LinkedIn"] {
    color: #0077B5;
}

.links-cell a[title="Personal Website"] {
    color: #b58500;
}
.software-table-wrap {
    width: 90%;
    max-width: 960px;
    margin: 0 auto 30px;
}

.software-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: var(--card-radius);
    overflow: hidden;
    font-size: 18px;
}

.software-table th {
    background-color: #0c2340;
    color: #ffffff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.software-table td {
    padding: 12px;
    border-bottom: 1px solid #d6d6d6;
    vertical-align: middle;
}

.software-table tr:hover {
    background-color: #ececec;
}

.software-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.software-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.icon-vibemol {
    background-color: #007dba;
}

.icon-forte {
    background-color: #b58500;
}

.icon-forte2 {
    background-color: #5b4c9a;
}

.icon-qforte {
    background-color: #2b9348;
}

.icon-wickd {
    background-color: #bc4749;
}

@media (max-width: 800px) {
    .software-table {
        font-size: 16px;
    }

    .software-table th,
    .software-table td {
        padding: 10px;
    }
}

/* Stack card contents vertically on narrow screens */
@media (max-width: 700px) {
    .people,
    .research {
        flex-direction: column;
    }

    .people_img,
    .people_info,
    .research_body,
    .research_sidebar {
        flex-basis: auto;
    }

    nav {
        gap: 4px 8px;
        padding: 8px 12px;
    }

    nav .brand {
        font-size: 22px;
    }

    nav a {
        font-size: 16px;
        padding: 2px 6px;
    }

    .nav-links {
        margin-left: -6px;
    }

    .nav-github svg {
        width: 20px;
        height: 20px;
    }

    .body {
        padding: 5px 20px;
    }

    .alumni-table {
        padding: 20px 0;
    }

    .hero {
        grid-template-columns: 1fr;
        margin-top: 15px;
    }

    .hero-text h1 {
        font-size: 30px;
    }

    .hero-viewer {
        width: 100%;
        max-width: 340px;
        justify-self: center;
    }
}
