/* Behavioral Neuroscience Lab – public site
   Design rules (19 Nov 2026 revision):
   - Header & footer: navy #092952, white text
   - Main area: plain white, text in navy #092952
   - Single fixed header: lab logo + name on the left, links on the right
*/
:root {
    --navy: #092952;
    --navy-2: #0f3a70;
    --navy-soft: rgba(9, 41, 82, .08);
    --white: #ffffff;
    --muted: #666666;          /* e-mail / phone colour of the previous site */
    --icon: rgba(102, 102, 102, .6);
    --line: rgba(9, 41, 82, .14);
    --header-h: 84px;
    --container: 1180px;
    --font-text: "Quicksand", "Segoe UI", Arial, sans-serif;
    --font-head: "Poppins", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-text);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--header-h);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.3; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: var(--navy); padding: 8px 14px; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid #4da3ff; outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------ header */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    height: var(--header-h);
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.header-inner {
    height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--white); text-decoration: none; min-width: 0; }
.brand-logo { height: 60px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 19px; letter-spacing: .4px; text-transform: uppercase; }
.brand-sub { font-family: var(--font-head); font-weight: 400; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .9; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 2px; }
.site-nav li { position: relative; }
.site-nav a {
    display: block; color: var(--white); text-decoration: none;
    font-family: var(--font-head); font-weight: 500; font-size: 14.5px; letter-spacing: .6px; text-transform: uppercase;
    padding: 10px 13px; border-radius: 4px; white-space: nowrap;
}
.site-nav > ul > li > a { border-bottom: 2px solid transparent; border-radius: 0; }
.site-nav > ul > li > a:hover, .site-nav > ul > li.active > a { border-bottom-color: var(--white); }
.site-nav .sub {
    position: absolute; top: 100%; left: 0; min-width: 210px;
    background: var(--navy); padding: 8px 0; box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.site-nav .sub a { text-transform: none; font-size: 15px; padding: 9px 18px; border-radius: 0; }
.site-nav .sub a:hover, .site-nav .sub li.active a { background: rgba(255, 255, 255, .12); }
.site-nav li.has-sub:hover > .sub, .site-nav li.has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub-toggle { display: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 26px; height: 2px; background: var(--white); margin: 6px 0; transition: .2s; }
.nav-open .nav-toggle .bar:nth-child(2) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle .bar:nth-child(3) { opacity: 0; }
.nav-open .nav-toggle .bar:nth-child(4) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1100px) {
    .site-nav a { padding: 10px 9px; font-size: 13.5px; }
    .brand-name { font-size: 17px; }
}
@media (max-width: 960px) {
    :root { --header-h: 72px; }
    .brand-logo { height: 50px; }
    .nav-toggle { display: block; }
    .site-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
        background: var(--navy); overflow-y: auto; padding: 8px 0 24px;
        transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
    }
    .nav-open .site-nav { transform: none; visibility: visible; }
    .nav-open { overflow: hidden; }
    .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav > ul > li { border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .site-nav a { padding: 15px 24px; font-size: 15px; }
    .site-nav > ul > li > a { border-bottom: 0; }
    .site-nav > ul > li.active > a { background: rgba(255, 255, 255, .08); }
    .site-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; padding: 0 0 8px; background: transparent; }
    .site-nav li.open > .sub { display: block; }
    .site-nav .sub a { padding: 11px 40px; }
    .sub-toggle {
        display: block; position: absolute; right: 8px; top: 6px; width: 44px; height: 40px;
        background: none; border: 0; cursor: pointer; color: #fff;
    }
    .sub-toggle::before { content: ""; display: block; margin: auto; width: 10px; height: 10px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); transition: .2s; }
    .site-nav li.open > .sub-toggle::before { transform: rotate(-135deg); }
}
@media (max-width: 480px) {
    .header-inner { padding: 0 14px; }
    .brand { gap: 10px; }
    .brand-logo { height: 44px; }
    .brand-name { font-size: 14px; letter-spacing: .2px; }
    .brand-sub { font-size: 11.5px; letter-spacing: 1px; }
}

/* ------------------------------------------------------------ banner */
/* taller than before, but capped by the screen height so the page text still starts near the top */
/* same height on every page (home, people, research …) */
.page-banner { height: clamp(300px, min(30vw, 48vh), 460px); overflow: hidden; background: var(--navy); }
.page-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 768px) { .page-banner { height: 220px; } }

/* ------------------------------------------------------------ content */
.content { padding: 44px 0 20px; }
.content > :first-child { margin-top: 0; }
.content p { margin: 0 0 1.1em; text-align: justify; }
@media (max-width: 600px) {
    .content p { text-align: left; }
    .content { padding-top: 28px; }
    .home-intro > h2:first-child { font-size: 22px; }
    .container { padding: 0 16px; }
}
.content h2 { font-size: 26px; font-weight: 600; margin: 1.6em 0 .6em; }
.content h3 { font-size: 21px; font-weight: 600; margin: 1.5em 0 .5em; }
.content h4 { font-size: 18px; margin: 1.3em 0 .4em; }
.content a { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; word-break: break-word; }
.content a:hover { text-decoration-thickness: 2px; }
.content ul, .content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.content li { margin-bottom: .35em; }
.content img { display: block; margin: 22px auto; border-radius: 4px; }
/* figure + caption: the caption sits right under the image */
.content figure { margin: 26px 0 30px; }
.content figure img { margin: 0 auto; }
.content figcaption { font-size: 15px; line-height: 1.6; text-align: justify; margin-top: 10px; }
@media (max-width: 600px) { .content figcaption { text-align: left; } }
.content table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; }
.content td, .content th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.content blockquote { margin: 1.2em 0; padding: .4em 1.2em; border-left: 3px solid var(--navy); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* image followed by its caption paragraph on research page */
.content--research img + p, .content--research p:has(> img) + p { font-size: 15px; }

.home-intro { padding-top: 40px; }
.home-intro > p:first-child, .home-intro > h2:first-child, .home-intro > h1:first-child {
    font-family: var(--font-head); font-size: 26px; font-weight: 600; text-align: left; margin-bottom: .8em; line-height: 1.3;
}
.home-photo { margin: 18px 0 0; }
.home-photo img { width: 100%; display: block; border-radius: 4px; }
.home-photo figcaption { text-align: center; font-size: 15px; margin-top: 8px; }
.home-funders { margin: 26px 0 8px; padding: 10px 0; }
.home-funders img { display: block; width: 100%; max-width: 1000px; margin: 0 auto; }

/* ------------------------------------------------------------ buttons */
.btn {
    display: inline-block; background: var(--navy); color: var(--white) !important; text-decoration: none !important;
    font-family: var(--font-head); font-weight: 500; font-size: 14px; letter-spacing: .6px; text-transform: uppercase;
    padding: 11px 22px; border-radius: 4px; border: 0; cursor: pointer;
}
.btn:hover { background: var(--navy-2); }

/* ------------------------------------------------------------ news */
.section-title { font-size: 28px; font-weight: 600; margin: 0 0 22px; padding-bottom: 10px; border-bottom: 2px solid var(--navy); }
.home-news { padding: 40px 0 10px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-grid--list { padding: 44px 0 10px; }
.news-card { display: flex; }
.news-card-link {
    display: flex; flex-direction: column; width: 100%;
    color: var(--navy); text-decoration: none; background: #fff;
    border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.news-card-link:hover { box-shadow: 0 10px 24px rgba(9, 41, 82, .14); transform: translateY(-2px); }
.news-card-img { aspect-ratio: 16 / 9; background: var(--navy-soft); overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.news-card-body time { font-size: 14px; font-weight: 600; opacity: .8; }
.news-card-body h3 { font-size: 18px; font-weight: 600; margin: 6px 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.news-card-body p { font-size: 15px; margin: 0; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.all-news { text-align: center; margin: 30px 0 10px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

.news-article { max-width: 900px; margin: 0 auto; }
.news-title { font-size: 32px; font-weight: 600; margin: 0 0 6px; }
.news-date { font-weight: 600; opacity: .8; margin-bottom: 18px !important; }
.news-summary { font-weight: 700; font-size: 18px; }
.news-image img { width: 100%; margin: 0; }
.more-news { border-top: 0; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 34px 0 10px; }
.pager a, .pager span { min-width: 40px; padding: 8px 12px; text-align: center; border: 1px solid var(--navy); border-radius: 4px; text-decoration: none; color: var(--navy); font-weight: 600; }
.pager span[aria-current] { background: var(--navy); color: #fff; }
.pager a:hover { background: var(--navy-soft); }

/* ------------------------------------------------------------ people */
.people-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 26px; padding: 44px 0 10px; }
.person { display: flex; flex-direction: column; }
.person-photo { aspect-ratio: 1 / 1; overflow: hidden; background: var(--navy-soft); border-radius: 4px; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.person-info { padding: 12px 2px 0; }
.person-name { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.person-position { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.person-details { font-size: 14.5px; margin: 0 0 8px; line-height: 1.5; }
.person-contact { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 2px solid rgba(108, 120, 134, .1); }
.person-contact a {
    display: flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none;
    font-family: var(--font-text); font-size: 13px; font-weight: 600; word-break: break-all;
}
.person-contact a:hover { text-decoration: underline; }
.person-contact svg { width: 14px; height: 14px; flex: none; color: var(--icon); }
.people-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 40px 0 10px; }
@media (max-width: 1024px) { .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }
@media (max-width: 380px) { .people-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 44px 0 10px; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 900 / 530; object-fit: cover; display: block; border-radius: 4px; }
.gallery-item figcaption { text-align: center; font-weight: 600; margin-top: 8px; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; }
.lightbox p { color: #fff; margin: 12px 0 0; font-weight: 600; }
.lightbox button { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 38px; cursor: pointer; line-height: 1; }

/* ------------------------------------------------------------ contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.contact-card { border: 0; background: none; padding: 0; }
.contact-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 18px; border-radius: 4px; }
.contact-content h3 { font-size: 22px; margin: 0 0 10px; }
.contact-content p { margin: 0 0 4px; text-align: left; }
.contact-content .person-name { font-weight: 700; font-size: 18px; }
.contact-info { margin-top: 14px; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

.not-found { text-align: center; padding: 80px 0; }

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--navy); color: var(--white); margin-top: 60px; }
.footer-inner {
    max-width: 1400px; margin: 0 auto; padding: 34px 24px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.footer-copy { font-size: 15px; line-height: 1.6; }
.footer-address { font-style: normal; text-align: center; font-size: 15px; line-height: 1.6; }
.footer-logo { justify-self: end; }
.footer-logo img { height: 96px; width: auto; display: block; }
@media (max-width: 760px) {
    .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .footer-address { order: -1; }
    .footer-logo { justify-self: center; order: -2; }
    .footer-logo img { height: 80px; }
}

@media print {
    .site-header, .site-footer, .page-banner, .nav-toggle { display: none; }
    body { padding-top: 0; }
}
