/* ==========================================================================
   AIR Lab site styles
   Loaded after css/bootstrap.min.css (Bootstrap 3) on the main pages.
   Colors are taken from the AIR logo.
   ========================================================================== */

:root {
    --air-blue: #1479b8;
    --air-blue-dark: #0d5a8a;
    --air-green: #6aa84f;
    --air-ink: #1f2933;
    --air-muted: #5f6b76;
    --air-line: #e3e8ee;
    --air-bg-soft: #f5f8fb;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--air-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: inherit;
    font-weight: 600;
    color: var(--air-ink);
    line-height: 1.25;
}
h2 { font-size: 26px; margin: 0 0 18px; }
h3 { font-size: 19px; margin: 0 0 8px; }

a { color: var(--air-blue); }
a:hover, a:focus { color: var(--air-blue-dark); }

/* Offset in-page anchors so the sticky header doesn't cover them */
[id] { scroll-margin-top: 76px; }

/* Site chrome links are never underlined, even on pages that carry their own
   link styles (e.g. Word exports with a:link { text-decoration: underline }) */
.site-brand a, .site-nav a, .page-title .crumb, .jump-nav a, .site-footer a { text-decoration: none; }

/* ---------- Header: logo band + colored menu bar ---------- */

.site-brand {
    background: #fff;
    padding: 14px 0;
}
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    color: var(--air-ink);
}
.brand-link:hover, .brand-link:focus { text-decoration: none; color: var(--air-ink); }
.brand-link img {
    height: 92px;
    width: auto;
}
.brand-name {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--air-blue);
}
.brand-sub {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    color: var(--air-muted);
}

/* Only the menu bar sticks to the top while scrolling */
.site-nav.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0;
    min-height: 56px;
    border: 0;
    border-radius: 0;
    background: var(--air-blue-dark);
    box-shadow: 0 2px 10px rgba(10, 40, 70, 0.18);
}
.site-nav .navbar-nav > li > a {
    padding: 17px 22px 14px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    border-bottom: 4px solid transparent;
}
.site-nav .navbar-nav > li:first-child > a { margin-left: -22px; }
.site-nav .navbar-nav > li > a:hover,
.site-nav .navbar-nav > li > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}
.site-nav .navbar-nav > li.active > a,
.site-nav .navbar-nav > li.active > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-bottom-color: #8fd16a;
}
.site-nav .navbar-header { display: none; }
.site-nav .navbar-collapse { border: 0; box-shadow: none; }

@media (max-width: 767px) {
    .site-brand { padding: 10px 0; }
    .brand-link { gap: 14px; }
    .brand-link img { height: 60px; }
    .brand-name { font-size: 18px; }
    .brand-sub { font-size: 13px; }

    .site-nav .navbar-header { display: block; }
    .site-nav .navbar-toggle {
        float: left;
        margin: 8px 0;
        padding: 9px 12px;
        border: 0;
        color: #fff;
        font-size: 17px;
        font-weight: 700;
        line-height: 22px;
    }
    .site-nav .navbar-toggle:hover,
    .site-nav .navbar-toggle:focus { background: rgba(255, 255, 255, 0.12); }
    .site-nav .navbar-toggle .icon-bar {
        display: inline-block;
        width: 20px;
        vertical-align: middle;
        background: #fff;
    }
    .site-nav .navbar-toggle .icon-bar + .icon-bar { margin-top: 0; }
    .site-nav .navbar-toggle .bars {
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        margin-right: 8px;
        vertical-align: middle;
    }
    .site-nav .navbar-nav { margin: 0 -15px; }
    .site-nav .navbar-nav > li:first-child > a { margin-left: 0; }
    .site-nav .navbar-nav > li > a {
        padding: 12px 18px;
        border-bottom: 0;
        border-left: 4px solid transparent;
    }
    .site-nav .navbar-nav > li.active > a { border-left-color: #8fd16a; }
}

/* ---------- Page title band (inner pages) ---------- */

.page-title {
    background: linear-gradient(120deg, var(--air-blue-dark), var(--air-blue) 60%, #2a93c9);
    color: #fff;
    padding: 44px 0 38px;
}
.page-title h1 {
    color: #fff;
    font-size: 36px;
    margin: 0;
}
.page-title p {
    margin: 8px 0 0;
    font-size: 17px;
    opacity: 0.92;
    max-width: 760px;
}

/* Individual project pages: back link and author line in the title band */
.page-title .crumb {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 600;
}
.page-title .crumb:hover, .page-title .crumb:focus { color: #fff; }
.page-title .authors { font-size: 18px; opacity: 1; }
.page-title .authors a { color: #fff; text-decoration: underline; }

/* In-page jump links under the title band */
.jump-nav {
    background: var(--air-bg-soft);
    border-bottom: 1px solid var(--air-line);
    padding: 12px 0;
    font-size: 15px;
}
.jump-nav a {
    display: inline-block;
    margin: 3px 6px 3px 0;
    padding: 4px 14px;
    border: 1px solid var(--air-line);
    border-radius: 999px;
    background: #fff;
    color: var(--air-ink);
    text-decoration: none;
}
.jump-nav a:hover { border-color: var(--air-blue); color: var(--air-blue); }

/* ---------- Generic sections ---------- */

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--air-line); }
.section-soft { background: var(--air-bg-soft); }
.section-title { margin-bottom: 26px; }
.section-title:after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 12px;
    background: var(--air-green);
    border-radius: 2px;
}
.lead-text { font-size: 18px; color: #33404d; }

/* ---------- Home: carousel ---------- */

/* Each slide shows the whole photo (no cropping); a blurred, enlarged copy
   of the same photo fills the space beside it. */
.hero.carousel { background: #111; overflow: hidden; }
.hero .item {
    height: clamp(260px, 48vw, 680px);
    overflow: hidden;
}
.hero .item .hero-bg {
    position: absolute;
    inset: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    object-fit: cover;
    filter: blur(28px) brightness(0.6);
}
.hero .item .hero-img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.hero .carousel-caption {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 70px 0 34px;
    text-align: left;
    text-shadow: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}
.hero .carousel-caption p {
    margin: 0;
    font-size: 19px;
    font-weight: 500;
}
.hero .carousel-indicators { bottom: 6px; }
.hero .carousel-control { width: 8%; background-image: none !important; }
.hero .carousel-control .chev {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    margin-top: -36px;
    font-size: 64px;
    line-height: 64px;
}
@media (max-width: 767px) {
    .hero .carousel-caption { padding: 40px 0 38px; }
    .hero .carousel-caption p { font-size: 15px; }
}

/* ---------- Home: research areas ---------- */

.areas { margin-top: 30px; }
.area {
    display: block;
    height: 100%;
    margin-bottom: 24px;
    padding: 22px 22px 18px;
    border: 1px solid var(--air-line);
    border-top: 3px solid var(--air-blue);
    border-radius: 6px;
    background: #fff;
    color: var(--air-ink);
    transition: box-shadow .15s ease, transform .15s ease;
}
.area:hover, .area:focus {
    text-decoration: none;
    color: var(--air-ink);
    box-shadow: 0 6px 20px rgba(15, 30, 45, 0.08);
    transform: translateY(-2px);
}
.area h3 { color: var(--air-blue); }
.area p { margin: 0; color: var(--air-muted); font-size: 15px; }
.row-eq { display: flex; flex-wrap: wrap; }
.row-eq > [class*="col-"] { display: flex; flex-direction: column; }

/* ---------- Home: news ---------- */

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.news-list li {
    display: flex;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--air-line);
}
.news-list li:last-child { border-bottom: 0; }
.news-date {
    flex: 0 0 72px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--air-blue);
}
.news-more summary {
    margin-top: 14px;
    cursor: pointer;
    font-weight: 600;
    color: var(--air-blue);
}
.news-more[open] summary { margin-bottom: 6px; }

.side-card {
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--air-line);
    border-radius: 6px;
    background: var(--air-bg-soft);
}
.side-card h3 { margin-bottom: 12px; }
.side-card p { font-size: 15px; }
.side-card ul { padding-left: 18px; margin: 0; font-size: 15px; }

/* ---------- Home: sponsors ---------- */

.sponsors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px 44px;
    margin-top: 28px;
}
.sponsors img {
    height: 52px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* ---------- People ---------- */

.member {
    display: flex;
    gap: 28px;
    padding: 26px 0;
    border-bottom: 1px solid var(--air-line);
}
.member:last-child { border-bottom: 0; }
.member-photo {
    flex: 0 0 140px;
    width: 140px;
    height: 175px;
    object-fit: cover;
    object-position: center 25%;
    border-radius: 8px;
    background: var(--air-bg-soft);
}
.member h3 { margin-bottom: 2px; }
.member-role {
    margin-bottom: 10px;
    color: #44792e; /* darker than --air-green for readable small text */
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.member p { margin-bottom: 8px; }
.member-links a {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 12px;
    border: 1px solid var(--air-blue);
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
}
.member-links a:hover { background: var(--air-blue); color: #fff; }
@media (max-width: 600px) {
    .member { flex-direction: column; gap: 14px; }
}

.alumni h3 {
    margin-top: 28px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--air-line);
}
.alumni ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2 340px;
    column-gap: 40px;
    font-size: 15px;
}
.alumni li { padding: 4px 0; break-inside: avoid; }

/* ---------- Projects ---------- */

.project-group { margin-bottom: 44px; }
.project-group > h3 {
    margin: 32px 0 16px;
    color: var(--air-muted);
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
/* Projects in each category: 3 columns on desktop, 2 on tablets, 1 on phones */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 991px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }
.project {
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
    border: 1px solid var(--air-line);
    border-radius: 8px;
    background: #fff;
    transition: box-shadow .15s ease;
}
.project:hover { box-shadow: 0 6px 20px rgba(15, 30, 45, 0.08); }
.project-thumb {
    display: block;
    width: 100%;
    height: 190px;
    margin-bottom: 16px;
    object-fit: contain;
}
.project h4 { margin: 0 0 8px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.project p { margin: 0; color: #3b4752; font-size: 15px; }

.grant-list { list-style: none; padding: 0; }
.grant-list li {
    padding: 14px 18px;
    margin-bottom: 10px;
    border-left: 3px solid var(--air-green);
    background: var(--air-bg-soft);
    border-radius: 0 6px 6px 0;
}
.grant-list .grant-no { display: block; font-size: 14px; color: var(--air-muted); }

/* ---------- Individual project pages (projects/*.html) ---------- */

.project-page { padding: 36px 0 56px; }
.project-page > .container > .row { margin-left: 0; margin-right: 0; }
/* The rule that used to sit under the old in-page title is no longer needed */
.project-page > .container > .row > hr:first-child,
.project-page > .container > hr:first-child { display: none; }
.project-page h1 { font-size: 28px; margin: 34px 0 14px; }
.project-page h2 {
    font-size: 23px;
    margin: 38px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--air-line);
    display: flow-root; /* keeps the underline beside, not behind, floated images */
}
.project-page h3 { font-size: 19px; margin: 26px 0 10px; }
.project-page h4 { font-size: 17px; margin: 20px 0 8px; }
.project-page p, .project-page li { max-width: 900px; }
.project-page img, .project-page video, .project-page iframe, .project-page table { max-width: 100%; }
.project-page img { height: auto; }
.project-page audio { max-width: 100%; vertical-align: middle; }
.project-page table td, .project-page table th { vertical-align: top; }
.project-page .table { background: #fff; }

/* Human-Computer Collaborative Music Making page */
.project-page .fundingInfo { margin-bottom: 10px; }
.project-page .fundingInfo b::after { content: " "; white-space: pre; }
.project-page .fundingInfo .logo { float: right; max-width: 400px; margin: 0 0 16px 24px; }
.project-page .showcaseContainer { display: flex; flex-wrap: wrap; gap: 20px; text-align: center; }
.project-page .showcaseContainer > a {
    width: 230px;
    padding: 18px;
    border: 1px solid var(--air-line);
    border-radius: 8px;
    color: var(--air-ink);
}
.project-page .showcaseContainer > a:hover { text-decoration: none; box-shadow: 0 6px 20px rgba(15, 30, 45, 0.1); }

/* Older sound-example pages: tables of audio links */
.legacy-page table[border] { margin: 12px 0 20px; border-collapse: collapse; }
.legacy-page table[border] th, .legacy-page table[border] td { padding: 4px 10px; border: 1px solid #c9d3dc; }
.legacy-page table[border] th { background: var(--air-bg-soft); }

/* Sub-navigation of multi-page project sites (e.g. Sound Search) */
.jump-nav a.active { background: var(--air-blue); border-color: var(--air-blue); color: #fff; }
.vroom-page figure.pull-right { margin: 0 0 16px 24px; }
/* These pages were written for Bootstrap 2, where col-sm-* had no effect; keep them full width */
.vroom-page [class*="col-sm-"] { float: none; width: auto; padding-left: 0; padding-right: 0; }

/* Audio + score examples (e.g. projects/model0.html) */
.project-page .example { margin: 0 0 28px; }
.project-page .example p { margin-bottom: 6px; }
.project-page .example audio { display: block; width: 100%; max-width: 480px; margin-bottom: 10px; }
.project-page .example embed { display: block; border: 1px solid var(--air-line); border-radius: 6px; }

/* Old spacing helpers still used inside project pages */
.project-page .top1 { margin-top: 10px; }
.project-page .top3 { margin-top: 30px; }

/* ---------- Publications ---------- */

.pubs h2 { margin-top: 48px; }
.pubs h2:first-child { margin-top: 0; }
.pubs p {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--air-line);
    font-size: 15.5px;
}
.pubs p.pub-note {
    border: 0;
    padding: 0 0 6px;
    color: var(--air-muted);
    font-size: 14px;
}
.pubs strong { color: var(--air-ink); font-weight: 600; }
.pub-link {
    display: inline-block;
    margin: 2px 2px 0 0;
    padding: 0 9px;
    border: 1px solid #c9d8e5;
    border-radius: 4px;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    vertical-align: 1px;
}
.pub-link:hover, .pub-link:focus {
    background: var(--air-blue);
    border-color: var(--air-blue);
    color: #fff;
    text-decoration: none;
}
.award {
    display: inline-block;
    padding: 0 8px;
    border-radius: 4px;
    background: #fff4e0;
    color: #a14d00;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
}

/* ---------- Resources ---------- */

.resource { padding: 18px 0; border-bottom: 1px solid var(--air-line); }
.resource:last-child { border-bottom: 0; }
.resource p { margin-bottom: 6px; }
.refs { font-size: 14px; color: var(--air-muted); }
.media-list { list-style: none; padding: 0; margin: 0; }
.media-list li {
    display: flex;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--air-line);
}
.media-list .news-date { flex-basis: 96px; }

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 0;
    padding: 44px 0 26px;
    background: #16222e;
    color: #c4ccd4;
    font-size: 15px;
}
.site-footer a { color: #fff; }
.site-footer h4 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.site-footer .footer-logo {
    height: 52px;
    width: auto;
    margin-bottom: 14px;
    /* UR logo is dark-on-transparent; invert to white for the dark footer */
    filter: brightness(0) invert(1);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 2px 0; }
.site-footer .copyright {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    color: #8a96a3;
}
