/* Site theme: the 96-well assay plate.
   Wells (circles with a thin rim) are the recurring motif: the homepage plate,
   card and tile markers, the current-page nav pill, and the portrait rims on
   /people. Red marks a "hit": the current page, hover, or a filled well.

   Loaded after each page's own <style> block, so rules here win ties with
   the page-level styles they restyle. */

:root {
    --pl-ink: #000;
    --pl-paper: #fff;
    --pl-bench: #f2f3f1;
    --pl-red: #c0392b;
    --pl-rule: rgba(0, 0, 0, 0.14);
}

body {
    font-size: 16.5px;
    color: #2b2b2b;
    background: var(--pl-paper);
}
h1, h2, h3, h4, h5 {
    letter-spacing: -0.01em;
}

/* Nav: white bar, logo home link, page links as pills */
.site-nav {
    background: var(--pl-paper);
    border-bottom: 1px solid var(--pl-ink);
}
.site-nav .nav-item {
    margin-right: 0.4rem;
}
.site-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    color: var(--pl-ink);
    border: 1px solid var(--pl-rule);
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible {
    background: var(--pl-ink);
    border-color: var(--pl-ink);
    color: var(--pl-paper);
}
/* current page: a filled well */
.site-nav .nav-link[aria-current="page"] {
    border-color: var(--pl-ink);
}
.site-nav .nav-link[aria-current="page"]::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--pl-red);
}
/* Below lg the links don't fit beside the logo: logo on its own row, links scroll sideways */
@media (max-width: 991.98px) {
    .site-nav .container-fluid {
        flex-wrap: wrap;
    }
    .site-nav .navbar-collapse {
        flex-basis: 100%;
        margin-top: 0.5rem;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .site-nav .navbar-nav {
        margin-left: 0 !important;
        padding-bottom: 0.25rem;
    }
}

/* Homepage hero: the interactive plate (/js/plate-hero.js) fills the right side */
.hero-split {
    position: relative;
    isolation: isolate;
    background: var(--pl-paper);
    border-bottom: 1px solid var(--pl-ink);
}
.plate-hero-canvas {
    position: absolute;
    inset: 0;
    z-index: -1;
    -webkit-mask-image: linear-gradient(90deg, transparent 46%, #000 76%);
    mask-image: linear-gradient(90deg, transparent 46%, #000 76%);
}
/* On narrow screens the copy spans the full width, so the plate only shows faintly behind it */
@media (max-width: 991.98px) {
    .plate-hero-canvas {
        opacity: 0.35;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000);
        mask-image: linear-gradient(90deg, transparent, #000);
    }
}

/* Sections */
.section-light {
    background-color: var(--pl-bench);
    border-bottom: 1px solid var(--pl-rule);
}
.section-white {
    background: var(--pl-paper);
}
/* hr.* to outrank Bootstrap's hr:not([size]) { height: 1px } */
hr.section-divider {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    /* a row of three wells: the hr is the middle one, shadows draw its neighbours */
    box-shadow: -21px 0 0 var(--pl-red), 21px 0 0 var(--pl-red);
}

/* Cards read as labelled plate columns: thin outline, header is a row label with a well */
.card.shadow-sm,
.resource-card {
    border: 1px solid var(--pl-rule) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
.card.shadow-sm:hover,
.resource-card:hover {
    border-color: var(--pl-ink) !important;
    transform: none;
}
.section-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--pl-ink);
    text-align: left;
    padding: 1.1rem 1.5rem 0;
    border-radius: 0;
}
.section-card-header::before {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--pl-ink);
}
.card:hover .section-card-header::before {
    background: var(--pl-red);
    box-shadow: none;
}
.section-card-header h3 {
    color: var(--pl-ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-openadmet {
    font-weight: 500;
}
.badge {
    border-radius: 999px;
}

/* Footer: the dark plate */
footer.bg-dark {
    position: relative;
    isolation: isolate;
    background: var(--pl-ink) !important;
}
footer.bg-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("/images/texture-plate-dark.svg") 0 0 / 264px 176px;
    -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
    mask-image: linear-gradient(90deg, transparent 30%, #000);
}

/* Funders and supporters (About page): plate-column tiles with a well marker */
.funder {
    border: 1px solid var(--pl-rule);
    border-radius: 6px;
    padding: 1.4rem 1.5rem 1.5rem;
}
a.funder:hover,
a.funder:focus-visible {
    border-color: var(--pl-ink);
}
.funder::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-bottom: 0.4rem;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--pl-ink);
    transition: background-color 0.15s ease;
}
a.funder:hover::before,
a.funder:focus-visible::before {
    background: var(--pl-red);
    box-shadow: none;
}
/* Supporter tiles are name-only and not links, so they skip the well marker */
.row-supporters .funder {
    padding: 1rem 0.75rem;
}
.row-supporters .funder::before {
    display: none;
}

/* People page: open grid of portraits set in plate wells */
.people .card {
    border: 0;
    background: transparent;
}
.people .card-body {
    padding: 0.5rem;
}
.people h3.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem;
}
.people h3.card-title::before {
    content: "";
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--pl-red);
}
.people .subsection-divider {
    width: 100%;
    height: 1px;
    border-radius: 0;
    background: var(--pl-rule);
}
/* the well: a thin rim offset from the portrait, red when you point at it */
.people .circular-image {
    position: relative;
    border-radius: 50%;
}
.people .circular-image img {
    outline: 1px solid var(--pl-rule);
    outline-offset: 6px;
    transition: outline-color 0.15s ease, outline-offset 0.15s ease;
}
.people a.circular-image:hover img,
.people a.circular-image:focus-visible img {
    outline: 2px solid var(--pl-red);
    outline-offset: 4px;
}
.people .circular-image:focus-visible {
    outline: none;
}
/* "LinkedIn" cue, since nothing else says the portrait is a link */
.people a.circular-image::after {
    content: "LinkedIn";
    position: absolute;
    left: 50%;
    bottom: 10px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--pl-ink);
    color: var(--pl-paper);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.people a.circular-image:hover::after,
.people a.circular-image:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}
.people .name {
    margin-top: 1rem;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #555;
}
.people .name strong {
    display: inline-block;
    margin-bottom: 0.15rem;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--pl-ink);
}

@media (prefers-reduced-motion: reduce) {
    .site-nav .nav-link,
    .funder::before,
    .people .circular-image img,
    .people .circular-image::after {
        transition: none;
    }
}
