/* Cambridge Biotech Club: people, conversation, and a shared curiosity. */
:root {
    --paper: #ffffff;
    --mist: #eef2fa;
    --ink: #18254c;
    --blue: #304bd4;
    --lilac: #dce2ff;
    --slate: #58647c;
    --line: #ccd4e5;
    --page-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 115px; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
.site-header, footer { flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 5vw, 4.5rem); letter-spacing: -0.055em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); letter-spacing: -0.04em; }
h3 { font-size: 1.5rem; letter-spacing: -0.025em; }
p { max-width: 70ch; }
a { color: var(--blue); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 200; padding: .6rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: .65rem max(24px, calc((100vw - var(--page-width)) / 2));
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; }
.brand-logo { width: 102px; }
.brand span { font-size: 1.15rem; font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
nav { display: flex; align-items: center; gap: .5rem; }
nav a { padding: .65rem 1rem; color: var(--ink); font-size: .95rem; text-decoration: none; border-radius: 6px; }
nav a:hover { background: var(--mist); }
nav a[aria-current="page"] { background: var(--lilac); color: var(--ink); }

.container { max-width: var(--page-width); margin: 0 auto; padding: 0 24px; }
.home-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 64px max(24px, calc((1440px - var(--page-width)) / 2));
    background: var(--mist);
}
.hero-copy h1 { margin-bottom: 1.5rem; }
.hero-copy p { font-size: 1.2rem; line-height: 1.6; max-width: 40ch; color: var(--slate); }
.hero-photo { width: 100%; height: 500px; object-fit: cover; border-radius: 100px 10px 10px 10px; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.button, .event a.rsvp-link {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    padding: .9rem 1.3rem;
    background: var(--blue);
    color: white;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}
.button:hover, .event a.rsvp-link:hover { background: #253ba8; }
.text-link { color: var(--ink); font-weight: 500; }

/* The next event is the primary action; the rest of the page stays quiet. */
#events {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 64px 0;
    scroll-margin-top: 20px;
}
#events h2 { padding-top: 2rem; }
#event-container { min-width: 0; }
.event { overflow-wrap: anywhere; }
#event-container .event {
    background: var(--lilac);
    border-radius: 12px;
    padding: 2rem 2.5rem;
}
.event p { margin: 0 0 1.1rem; }
.event p:last-child { margin-bottom: 0; }
.event p strong { font-weight: 600; }
#event-container .event > p > strong { display: block; font-size: .9rem; color: var(--slate); margin-bottom: .2rem; }
#event-container .event > p:first-child { font-size: 1.75rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
.event a { overflow-wrap: anywhere; }
.event a.rsvp-link { margin: .75rem 0; }
#event-container .event #countdown {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #bac5ed;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}
#event-container .event #countdown strong { display: inline; color: var(--ink); margin-right: .5rem; font-weight: 400; }
.event-loading-state { min-height: 330px; display: grid; place-content: center; justify-items: center; gap: 1rem; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid #bac5ed; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.about { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; padding: 56px 0; border-top: 1px solid var(--line); }
.about p { margin: 0; font-size: 1.2rem; line-height: 1.75; color: var(--slate); }
.gallery { padding: 40px 0 64px; }
.gallery h2 { margin-bottom: 2rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery-grid a { display: block; border-radius: 10px; overflow: hidden; }
.gallery-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-grid a:hover { outline: 3px solid var(--blue); outline-offset: 4px; }
.community-footer { display: grid; grid-template-columns: 1fr 1fr; padding: 48px 0 64px; gap: 64px; border-top: 1px solid var(--line); align-items: center; }
.member-count h2, .links h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.member-info .count { display: block; font-size: 4.5rem; line-height: 1.1; letter-spacing: -.055em; font-weight: 600; }
.member-info .date { display: block; color: var(--slate); font-size: .9rem; margin-top: .75rem; }
.logos { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.logos a { display: block; flex: 0 1 170px; min-width: 0; }
.linkedin-logo, .meetup-logo { width: 170px; height: auto; }
footer { padding: 28px 24px; color: var(--slate); background: var(--mist); font-size: .85rem; }
footer p { max-width: var(--page-width); margin: 0 auto; }

/* Supporting pages use a consistent heading column and readable text widths. */
.hero { max-width: var(--page-width); margin: 0 auto; padding: 64px 24px 48px; }
.hero h1 { margin-bottom: 1.5rem; }
.hero p { color: var(--slate); max-width: 68ch; margin-bottom: 0; }
.page-resources .events, .page-contact .events { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem 3rem; border-top: 1px solid var(--line); padding: 40px 0; }
.page-resources .events > h2, .page-contact .events > h2 { grid-column: 1; grid-row: 1; font-size: 2rem; }
.page-resources .events > h2 { color: var(--blue); font-size: 2.5rem; }
.page-resources .event, .page-contact .event { grid-column: 2; max-width: 70ch; }
.page-resources .event + .event { border-top: 1px solid var(--line); padding-top: 2rem; }
.page-resources ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.page-resources li { padding: .85rem 0; }
.page-resources li + li { border-top: 1px solid var(--mist); }
.page-resources li a { font-weight: 600; }
.page-contact .links { padding: 40px 0 64px; border-top: 1px solid var(--line); }
.page-contact .hero { padding-bottom: 32px; }
.calendar-section { padding: 64px 0; }
.calendar-section h1 { margin-bottom: 1.5rem; }
.calendar-intro { color: var(--slate); margin-bottom: 2rem; }
.calendar-container { height: 750px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.calendar-container iframe { display: block; width: 100%; height: 100%; }

/* The jobs page (D18): the menu's beta tag, the beta bar, the search and filters, and the list. The tag and the
   bar are blue, never lilac: lilac stays with the current tab (D3, D6). */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
nav a.has-beta { position: relative; }
.beta-tag { position: absolute; top: -.45rem; right: -.35rem; padding: .05rem .42rem; border-radius: 99px; background: var(--blue); color: var(--paper); font-size: .6rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.beta-bar { background: var(--blue); color: var(--paper); }
.beta-bar-inner { display: flex; align-items: flex-start; gap: .75rem; max-width: var(--page-width); margin: 0 auto; padding: .85rem 24px; }
.beta-bar svg { flex: none; width: 1.4rem; height: 1.4rem; margin-top: .05rem; }
.beta-bar p { max-width: none; margin: 0; font-size: 1rem; line-height: 1.5; }
.beta-bar a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .15em; white-space: nowrap; }
.beta-bar a:focus-visible { outline-color: var(--paper); }
.jobs-hero .hero-copy h1 { margin-bottom: 1.1rem; }
.jobs-hero .hero-copy p { max-width: 44ch; }
.jobs-search { position: relative; max-width: 30rem; margin-top: 1.75rem; }
.jobs-search svg { position: absolute; left: 1rem; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--slate); }
.jobs-search input { width: 100%; padding: .85rem 1rem .85rem 2.9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.jobs-search input::placeholder { color: var(--slate); opacity: 1; }
.jobs-search input:focus-visible, .filter-button:focus-visible, .filter-done:focus-visible, .check input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hero-copy .jobs-status, .hero-copy .jobs-paused { margin: .9rem 0 0; font-size: .95rem; }
.hero-copy .jobs-coverage { margin: .2rem 0 0; font-size: .95rem; }
.hero-copy .jobs-paused { color: var(--ink); font-weight: 600; }
.jobs-list { padding-bottom: 64px; }
/* The filters (D27): one button per filter, naming what's picked, opens a checklist under it. Blue marks a
   choice; lilac stays the member mark's and the current tab's. Corners match the search box. */
.jobs-filters { position: relative; margin: 48px 0 1.1rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.filter-button { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; min-height: 2.75rem; padding: 0 .8rem 0 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; white-space: nowrap; cursor: pointer; }
.filter-button:hover { border-color: var(--slate); }
.filter-button-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.filter-button .chev { flex: none; width: 1rem; height: 1rem; color: var(--slate); }
.filter-button.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); font-weight: 600; }
.filter-button.on .chev { color: var(--blue); }
.filter-button[aria-expanded="true"] .chev { transform: rotate(180deg); }
.filter-clear { margin-left: .4rem; white-space: nowrap; }
.filter-panel { position: absolute; top: calc(100% + .5rem); z-index: 10; width: 19rem; margin: 0; padding: .5rem 1rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 14px 34px rgba(24, 37, 76, .16); }
.filter-panel-foot { display: flex; justify-content: flex-end; margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.filter-done { min-height: 2.75rem; padding: 0 1.2rem; border: 0; border-radius: 8px; background: var(--blue); color: var(--paper); font: inherit; font-weight: 600; cursor: pointer; }
.check { display: grid; grid-template-columns: 1.25rem 1fr auto; align-items: center; gap: .75rem; min-height: 2.5rem; color: var(--ink); cursor: pointer; }
.check input { -webkit-appearance: none; appearance: none; width: 1.25rem; height: 1.25rem; margin: 0; border: 2px solid var(--slate); border-radius: 4px; background: var(--paper); cursor: pointer; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / .85rem no-repeat; }
.check input[type="radio"]:checked { border-width: 6px; background: var(--paper); }
.check-n { color: var(--slate); font-size: .9rem; font-variant-numeric: tabular-nums; }
.check.zero { color: var(--slate); }
.jobs-count { min-height: 1.5em; margin: 0 0 .75rem; color: var(--slate); font-size: .95rem; }
.jobs-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.job { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.5rem; align-items: baseline; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.job-title { color: var(--ink); font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; text-decoration: none; }
.job-title:hover { text-decoration: underline; }
.job-new { margin-left: .6rem; color: var(--blue); font-size: .85rem; font-weight: 600; }
.job-meta { display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; max-width: none; margin: .2rem 0 0; color: var(--slate); }
.job-co { color: var(--ink); font-weight: 500; }
.job-age { color: var(--slate); font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-button { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.jobs-more, .jobs-none { margin: 1.25rem 0 0; }
.jobs-gaps { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.jobs-gaps h2 { margin-bottom: .75rem; font-size: 1.6rem; letter-spacing: -.03em; }
.jobs-gaps h3 { margin: 2rem 0 .5rem; font-size: 1.2rem; }
.jobs-gaps p { color: var(--slate); }
.jobs-gaps summary { color: var(--blue); font-weight: 600; cursor: pointer; }
.jobs-gap-list { columns: 3 14rem; column-gap: 2rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.jobs-gap-list li { padding: .2rem 0; break-inside: avoid; }
/* The member mark (D3, D5): on the jobs page, lilac means a club member is hiring, and nothing else. */
.jobs-figure { position: relative; margin: 0; }
.member-banner { position: absolute; right: 1.25rem; bottom: 1.25rem; left: 1.25rem; display: flex; align-items: flex-start; gap: .7rem; margin: 0; padding: .9rem 1.1rem; border-radius: 10px; background: var(--lilac); color: var(--ink); line-height: 1.45; }
.member-banner .people-icon { flex: none; width: 22px; height: 22px; margin-top: .1rem; color: var(--blue); }
.member-banner strong { font-weight: 600; }
.member-banner a { font-weight: 600; white-space: nowrap; }
.member-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border-radius: 999px; background: var(--lilac); color: var(--ink); font-size: .85rem; font-weight: 600; }
.member-pill .people-icon { width: 15px; height: 15px; color: var(--blue); }
.member-key { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; max-width: none; margin: -.25rem 0 1rem; color: var(--slate); font-size: .92rem; }

@media (max-width: 1000px) {
    .home-hero { padding: 48px 32px; gap: 32px; }
    .hero-photo { height: 440px; }
    .brand { gap: .4rem; }
    .brand-logo { width: 82px; }
    .brand span { font-size: 1.05rem; }
    nav a { padding: .65rem .75rem; }
}
@media (max-width: 768px) {
    html { scroll-padding-top: 150px; }
    body { font-size: 16px; }
    .site-header { display: block; padding: 0 16px 8px; }
    .brand { width: fit-content; margin: 0 auto; gap: .75rem; }
    .brand-logo { width: 82px; }
    .brand span { font-size: 1.05rem; }
    /* One column per tab: four, or five with the Jobs tab (D18). */
    nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
    nav a { padding: .65rem .1rem; text-align: center; font-size: .875rem; }
    .home-hero { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; }
    .hero-copy h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); max-width: 16ch; margin-bottom: 1.1rem; }
    .hero-copy p { font-size: 1.05rem; }
    .hero-actions { margin-top: 1.5rem; gap: 1.25rem; }
    .button { padding: .8rem 1rem; }
    .hero-photo { height: 240px; border-top-left-radius: 60px; object-position: center 45%; }
    #events, .about { grid-template-columns: 1fr; gap: 1.25rem; padding: 36px 0; }
    #events h2 { padding-top: 0; margin-bottom: 0; }
    #event-container .event { padding: 1.5rem; }
    #event-container .event > p:first-child { font-size: 1.5rem; }
    .event a.rsvp-link { width: 100%; }
    .about h2 { margin-bottom: 0; }
    .about p { font-size: 1.05rem; }
    .gallery { padding: 24px 0 40px; }
    .gallery-grid { gap: 16px; }
    .community-footer { gap: 36px; padding: 32px 0 48px; grid-template-columns: 1fr; }
    .member-info .count { font-size: 3.75rem; }
    .logos { gap: 20px; flex-wrap: nowrap; }
    .logos a { flex: 0 1 140px; }
    .linkedin-logo, .meetup-logo { width: 100%; max-width: 140px; }
    #links { text-align: center; }
    #links .logos { justify-content: center; gap: 24px; margin-top: 1.5rem; }
    #links .logos a { flex: 1 1 0; max-width: 210px; }
    #links .linkedin-logo, #links .meetup-logo { width: 100%; max-width: none; }
    .hero { padding: 36px 24px; }
    .hero h1, .calendar-section h1 { font-size: 2.75rem; }
    .page-resources .events, .page-contact .events { grid-template-columns: 1fr; gap: 1.5rem; padding: 32px 0; }
    .page-resources .events > h2, .page-contact .events > h2 { grid-column: auto; grid-row: auto; font-size: 1.75rem; margin-bottom: 0; }
    .page-resources .events { border-top: 0; padding-top: 16px; gap: 28px; }
    .page-resources .events > h2 {
        background: var(--mist);
        border-radius: 8px;
        padding: 22px 24px;
        font-size: clamp(1.85rem, 6vw, 2.25rem);
        line-height: 1.15;
        letter-spacing: -.035em;
        text-wrap: initial;
    }
    .page-resources .event, .page-contact .event { grid-column: auto; }
    .calendar-section { padding: 36px 0; }
    .calendar-container { height: 600px; }
    .beta-tag { top: -.25rem; right: .1rem; }
    .beta-bar-inner { padding: .75rem 16px; }
    .beta-bar p { font-size: .95rem; }
    .member-banner { right: .75rem; bottom: .75rem; left: .75rem; padding: .75rem .9rem; font-size: .95rem; }
    .jobs-filters { margin-top: 32px; }
    .filter-panel { position: static; width: auto; margin-top: .6rem; box-shadow: none; }
    .job { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-actions { gap: 1rem; font-size: .9rem; }
    .container { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
