/* ==========================================================================
   NACRE Lab page
   Colour system taken from the lab logo package (nacre-palette.css).
   This page deliberately departs from the site-wide iridescent palette:
   the nacre ocean-blue ramp is scoped to `body.lab-page` and overrides the
   shared tokens from main.css so the navbar and footer travel with it.
   ========================================================================== */

body.lab-page {
    /* --- nacre ramp, straight from the logo package --- */
    --nacre-navy: #07254F;
    --nacre-deep: #0E4F86;
    --nacre-ocean: #2583B6;
    --nacre-light: #65B8D4;
    --nacre-pale: #A8DBE6;
    --nacre-navy-ink: #0C2C5A;
    --nacre-navy-bg: #071A36;
    --nacre-paper: #F6F4F0;
    --nacre-ink: #1C1F24;

    /* --- overrides of the shared tokens in main.css --- */
    --primary-color: var(--nacre-deep);
    --secondary-color: var(--nacre-ocean);
    --text-color: var(--nacre-ink);
    --light-text: #5B6B7C;
    --background: var(--nacre-paper);
    --light-bg: #EDF3F7;
    --border-color: #D9E4EC;
    --hover-color: #E3EFF5;
    --gradient-dream: linear-gradient(120deg, var(--nacre-navy-ink) 0%, var(--nacre-ocean) 55%, var(--nacre-light) 100%);
    --gradient-pearl: linear-gradient(135deg, #FFFFFF 0%, #F4F8FB 50%, #EDF3F7 100%);
    --gradient-crystal: linear-gradient(150deg, #FFFFFF 0%, #FBFCFE 60%, #F4F9FC 100%);

    /* Type: an editorial serif for headings over the IBM Plex family for
       running text and labels, which already supplies the brand's mono. */
    --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

    background: var(--nacre-paper);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body.lab-page h1,
body.lab-page h2,
body.lab-page h3 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0;
}

body.lab-page .nav-logo {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.005em;
}

/* Navbar / footer tinting for this page only */
body.lab-page .navbar {
    background: rgba(246, 244, 240, 0.88);
    border-bottom: 1px solid var(--border-color);
}

body.lab-page .footer {
    background: var(--nacre-navy-bg);
    border-top: none;
    color: rgba(255, 255, 255, 0.7);
}

body.lab-page .footer p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

body.lab-page .footer-social a {
    background: linear-gradient(120deg, var(--nacre-pale) 0%, var(--nacre-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.lab-page main {
    max-width: 1140px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.lab-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background:
        radial-gradient(120% 140% at 88% 8%, #0F3D6B 0%, rgba(15, 61, 107, 0) 55%),
        linear-gradient(160deg, #0A2A52 0%, #071A36 100%);
    background-color: var(--nacre-navy-bg);
    padding: 3.5rem 3.5rem 3rem;
    color: #FFFFFF;
    box-shadow: 0 18px 50px rgba(7, 37, 79, 0.22);
}

/* Concentric nacre layers, echoing the mark, drifting behind the hero text */
.hero-rings {
    position: absolute;
    top: -14%;
    right: -6%;
    width: 460px;
    height: 460px;
    opacity: 0.5;
    pointer-events: none;
    animation: nacre-drift 26s ease-in-out infinite alternate;
}

.hero-rings circle,
.hero-rings path {
    fill: none;
    stroke-width: 1.25;
}

@keyframes nacre-drift {
    from { transform: translate3d(0, 0, 0) rotate(0deg); }
    to   { transform: translate3d(-18px, 14px, 0) rotate(8deg); }
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.hero-lockup {
    width: 100%;
    max-width: 430px;
    height: auto;
    display: block;
    margin-bottom: 1.75rem;
}

.hero-tagline {
    font-size: 2.3rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.005em;
    margin-bottom: 1.25rem;
    color: #FFFFFF;
}

.hero-tagline em {
    font-style: normal;
    color: var(--nacre-light);
}

.hero-lede {
    font-size: 1.08rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
    max-width: 68ch;
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

.lab-section {
    margin-top: 4.5rem;
}

.lab-section-head {
    margin-bottom: 2rem;
}

.lab-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--nacre-ocean);
    display: block;
    margin-bottom: 0.6rem;
}

.lab-section-head h2 {
    font-size: 2.05rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    color: var(--nacre-navy-ink);
    line-height: 1.25;
}

.lab-section-head p {
    margin-top: 0.85rem;
    max-width: 72ch;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* ==========================================================================
   Research directions
   ========================================================================== */

.research-areas {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.research-area {
    position: relative;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.research-area:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 38px rgba(7, 37, 79, 0.10);
    border-color: rgba(37, 131, 182, 0.35);
}

/* Accent bars step through the nacre ramp, seed to newest layer */
.area-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    transition: width 0.3s ease;
}

.research-area:hover .area-accent {
    width: 8px;
}

.accent-navy  { background: linear-gradient(180deg, #07254F 0%, #0B3A6F 100%); }
.accent-deep  { background: linear-gradient(180deg, #0E4F86 0%, #1668A0 100%); }
.accent-ocean { background: linear-gradient(180deg, #2583B6 0%, #3F9CC7 100%); }
.accent-light { background: linear-gradient(180deg, #65B8D4 0%, #A8DBE6 100%); }

.area-content {
    display: flex;
    gap: 2.5rem;
    padding: 2.25rem 2.5rem 2.25rem 3rem;
    align-items: flex-start;
}

.area-text {
    flex: 1;
    min-width: 0;
}

.area-index {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    color: var(--nacre-ocean);
    display: block;
    margin-bottom: 0.5rem;
}

.area-text h3 {
    font-size: 1.55rem;
    font-weight: 500;
    color: var(--nacre-navy-ink);
    margin-bottom: 0.9rem;
    line-height: 1.25;
}

.area-text p {
    font-size: 1.03rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.25rem;
}

.area-text a {
    color: var(--nacre-deep);
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 131, 182, 0.45);
    transition: all 0.2s ease;
}

.area-text a:hover {
    color: var(--nacre-ocean);
    border-bottom-color: var(--nacre-ocean);
}

.area-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--nacre-deep);
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    transition: all 0.2s ease;
}

.keyword:hover {
    background: var(--hover-color);
    border-color: rgba(37, 131, 182, 0.4);
    transform: translateY(-1px);
}

.area-figure {
    flex-shrink: 0;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.figure-img {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    box-shadow: 0 6px 18px rgba(7, 37, 79, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.figure-img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 26px rgba(7, 37, 79, 0.14);
}

.figure-caption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--light-text);
    text-align: center;
    font-style: italic;
    line-height: 1.45;
}

/* ==========================================================================
   Affiliation strip
   ========================================================================== */

.affiliation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
}

.affiliation-lab {
    height: 46px;
    width: auto;
}

.affiliation-kean {
    height: 52px;
    width: auto;
}

.affiliation .divider {
    width: 1px;
    height: 48px;
    background: var(--border-color);
}

.affiliation-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--light-text);
    max-width: 30ch;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
    .lab-hero {
        padding: 2.5rem 2rem;
    }

    .hero-tagline {
        font-size: 1.8rem;
    }

    .hero-rings {
        width: 340px;
        height: 340px;
        opacity: 0.32;
    }

    .area-content {
        flex-direction: column;
        padding: 2rem 2rem 2rem 2.5rem;
    }

    .area-figure {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .lab-section {
        margin-top: 3.5rem;
    }

    .lab-section-head h2 {
        font-size: 1.7rem;
    }

    .hero-lockup {
        max-width: 300px;
    }

    .affiliation {
        gap: 1.5rem;
    }

    .affiliation .divider {
        display: none;
    }

    .affiliation-text {
        text-align: center;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .lab-hero {
        padding: 2rem 1.25rem;
        border-radius: 1rem;
    }

    .hero-tagline {
        font-size: 1.55rem;
    }

    .hero-lede {
        font-size: 1rem;
    }

    .area-content {
        padding: 1.5rem 1.25rem 1.5rem 1.75rem;
    }

    .area-text h3 {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-rings {
        animation: none;
    }
}
