@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Orbitron:wght@500;700&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    --blue: #0d4fa9;
    --navy: #083447;
    --green: #319348;
    --red: #cf2029;
    --magenta: #ad218a;
    --gold: #df9300;
    --ink: #22283f;
    --muted: #606b7b;
    --line: #e4e8ed;
    --bg: #fff;
    --max: 1500px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font: 16px/1.65 Inter, Arial, sans-serif
}

a {
    color: var(--blue)
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin: auto
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20
}

.header-inner {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 18px
}

.brand img {
    width: 105px;
    height: 105px;
    object-fit: contain
}

.brand span {
    display: flex;
    flex-direction: column
}

.brand strong {
    font: 700 42px Orbitron;
    color: var(--blue);
    letter-spacing: 2px
}

.brand small {
    font: 600 18px Rajdhani;
    color: var(--gold);
    max-width: 460px
}

.site-header nav {
    display: flex;
    gap: 22px
}

.site-header nav a {
    font: 600 16px Rajdhani;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none
}

.nav-toggle {
    display: none;
    border: 0;
    background: none;
    color: var(--blue);
    font-size: 30px
}

.hero {
    padding: 76px 0 52px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 55px;
    align-items: start
}

.eyebrow,
.tag {
    font: 700 13px Rajdhani;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--green)
}

h1,
h2,
h3 {
    line-height: 1.16
}

.hero h1,
.page-title h1,
.detail h1 {
    font: 600 clamp(24px, 3.2vw, 40px) Rajdhani;
    color: var(--magenta);
    text-transform: uppercase;
    margin: .25em 0
}

.lead {
    font-size: 18px;
    max-width: 68ch
}

.hero-card {
    align-self: start;
    margin-top: 0;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #08bde6, #7047ee, #ec2e9f, #f5b000) border-box;
    border: 4px solid transparent;
    box-shadow: 0 16px 35px #0b21451a
}

.hero-card img {
    width: 100%;
    display: block;
    border-radius: 9px
}

.btn,
.button,
form button {
    display: inline-block;
    border: 0;
    border-radius: 9px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #09b8dd, #3155db, #9c28b8);
    color: white;
    text-decoration: none;
    font: 700 15px Rajdhani;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer
}

.section {
    padding: 42px 0
}

.section h2 {
    font: 700 34px Rajdhani;
    color: var(--blue);
    border-bottom: 1px solid var(--line);
    padding-bottom: 7px
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 8px 18px #0b21450d;
    overflow: hidden
}

.card h3 {
    font: 700 23px Rajdhani;
    color: var(--blue);
    margin: 8px 0
}

.card h3 a {
    text-decoration: none
}

.card p {
    color: var(--muted)
}

.icon {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 26px
}

.industry {
    color: #c79b1b
}

.environment {
    color: var(--green)
}

.biometric {
    color: #5d158e
}

.project-card img {
    display: block;
    width: calc(100% + 44px);
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: contain;
    object-position: center;
    margin: -22px -22px 18px;
    padding: 6px;
    background: #fff;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px
}

.person {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    background: #fff
}

.person img,
.person-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px
}

.person-placeholder {
    display: grid;
    place-items: center;
    background: #eef2f7;
    color: var(--blue);
    font: 700 45px Orbitron
}

.person h3 {
    font: 700 20px Rajdhani;
    margin: 12px 0 0
}

.person p {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

/* Compact people cards on the homepage only. */
.home-people {
    padding-top: 30px;
    padding-bottom: 30px
}

.home-people .people-grid {
    grid-template-columns: repeat(6, minmax(0, 180px));
    justify-content: center;
    gap: 16px
}

.home-people .person {
    padding: 8px
}

.home-people .person img,
.home-people .person-placeholder {
    height: 170px;
    aspect-ratio: auto
}

.home-people .person h3 {
    font-size: 17px;
    margin-top: 8px
}

.home-people .person p {
    font-size: 13px
}

.page-title {
    padding: 62px 0 18px
}

.page-title p {
    font-size: 18px
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.filters a {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 5px 12px;
    text-decoration: none
}

.detail {
    padding: 60px 0;
    max-width: 900px
}

.detail-image {
    max-width: 100%;
    border-radius: 12px
}

.prose {
    font-size: 18px;
    margin: 28px 0
}

.publication-filter {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    gap: 10px
}

.publication-filter input,
.publication-filter select {
    padding: 11px;
    border: 1px solid #ccd3dc;
    border-radius: 7px
}

.publication-list h2 {
    margin-top: 40px
}

.publication-list article {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px
}

.link-list article,
.contact-card {
    width: min(var(--max), calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
    padding: 14px 0;
}

.contact-card h2 {
    margin-top: 0;
}

.contact-card p {
    margin: 12px 0;
    text-align: left;
}

.link-list h3 {
    margin: 0
}

.empty {
    padding: 30px;
    background: #f7f9fb;
    border-radius: 10px
}

footer {
    margin-top: 50px;
    border-top: 1px solid var(--line)
}

.footer-inner {
    min-height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 14px
}



/* Rich homepage introduction and image gallery. */
.home-intro p {
    margin: 0 0 1em
}

.home-intro p:last-child {
    margin-bottom: 0
}

.home-intro ul,
.home-intro ol {
    margin: .75em 0 1em;
    padding-left: 1.35em
}

.home-intro a {
    font-weight: 600;
    text-underline-offset: 3px
}

.home-intro-gallery {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0
}

.home-intro-gallery figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px #0b21450d
}

.home-intro-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 95%;
    margin: 24px auto;
}

.home-intro-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}

.home-intro-gallery figcaption {
    padding: 8px 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4
}

@media(max-width:900px) {
    .header-inner {
        min-height: 85px
    }

    .brand img {
        width: 75px;
        height: 75px
    }

    .brand strong {
        font-size: 28px
    }

    .brand small {
        font-size: 14px
    }

    .nav-toggle {
        display: block
    }

    .site-header nav {
        display: none;
        position: absolute;
        top: 85px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 18px 20px;
        border-bottom: 1px solid var(--line);
        flex-direction: column
    }

    .site-header nav.open {
        display: flex
    }

    .hero-grid {
        grid-template-columns: 1fr
    }

    .home-intro-gallery {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .cards {
        grid-template-columns: 1fr
    }

    .people-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .home-people .people-grid {
        grid-template-columns: repeat(2, minmax(0, 180px))
    }

    .publication-filter {
        grid-template-columns: 1fr
    }

    .publication-list article {
        display: block
    }

    .section-head {
        align-items: start;
        flex-direction: column
    }
}

@media(max-width:520px) {
    .container {
        width: min(100% - 28px, var(--max))
    }

    .brand small {
        display: none
    }

    .hero {
        padding-top: 40px
    }

    .people-grid {
        grid-template-columns: 1fr
    }

    .home-people .people-grid {
        grid-template-columns: minmax(0, 180px);
        justify-content: center
    }

    .home-people .person img,
    .home-people .person-placeholder {
        height: 170px
    }

    .hero h1,
    .page-title h1,
    .detail h1 {
        font-size: 30px
    }

    .section h2 {
        font-size: 28px
    }

    .home-intro-gallery {
        grid-template-columns: 1fr
    }
}

/* Homepage introduction uses the same full content width as the sections below. */
.home-hero .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.home-hero .hero-grid>div {
    width: 100%;
    min-width: 0;
}

.home-hero .lead {
    max-width: none;
    width: 100%;
}

.home-hero .home-intro {
    width: 100%;
}

/* Justify normal body text while preserving headings, labels and card metadata. */
.home-intro p,
.home-intro li,
.card p,
.page-title p,
.prose,
.contact-card p,
.link-list p,
.publication-list article>div {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* Keep short labels and people metadata naturally aligned. */
.person p,
.tag,
.eyebrow,
.subtitle,
figcaption {
    hyphens: manual;
}

/* Homepage research-area cards: 4 columns on wide screens, 2 on tablets. */
.home-hero+.container.section .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
    .home-hero+.container.section .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .home-hero+.container.section .cards {
        grid-template-columns: 1fr;
    }
}