:root {
    --bg-primary: #ffffff;
    --text-primary: #1f1f1f;
    --text-secondary: #5f6368;
    --accent: #BA0C2F;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;

    --font-family: 'Source Serif 4', Georgia, Cambria, 'Times New Roman', Times, serif;

    /* Type scale (1rem = 16px). Change these to rescale the whole site. */
    --fs-xs: 0.75rem;      /* 12px - tags, fine print */
    --fs-sm: 0.875rem;     /* 14px - meta, subtitles, buttons, nav */
    --fs-base: 1rem;       /* 16px - body copy */
    --fs-md: 1.125rem;     /* 18px - lede, item titles */
    --fs-lg: 1.25rem;      /* 20px - section labels, h4 */
    --fs-xl: 1.5rem;       /* 24px - h3 */
    --fs-2xl: 2rem;        /* 32px - large headings */
    --fs-display-md: clamp(2rem, 4vw, 3rem);      /* h2 */
    --fs-display-lg: clamp(2.5rem, 5vw, 4.4rem);  /* h1 / hero */

    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --border-radius-pill: 100px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-size: var(--fs-display-lg);
    letter-spacing: normal;
    line-height: 1.1;
    font-weight: 400;
}

h2 {
    font-size: var(--fs-display-md);
    letter-spacing: normal;
    line-height: 1.15;
    font-weight: 400;
}

h3 {
    font-size: var(--fs-xl);
    font-weight: 400;
}

h4 {
    font-size: var(--fs-lg);
    font-weight: 400;
    line-height: 1.3;
}

p {
    font-size: var(--fs-md);
    color: var(--text-secondary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius-pill);
    font-weight: 500;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--text-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #000;
}

.btn-outline {
    border-color: var(--border-color);
    background-color: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--card-bg);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--border-color);
}

.logo {
    font-size: var(--fs-lg);
    letter-spacing: normal;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 32px;
    width: auto;
    margin-right: 12px;
    object-fit: contain;
}

/* Mascot that periodically fades out and back in */
.nav-mascot {
    height: 32px;
    width: auto;
    margin-left: 12px;
    align-self: center;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

.nav-mascot.is-hidden {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .nav-mascot {
        transition: none;
    }
}

/* Nav CTA in the theme red — the one action we most want visitors to take */
.nav-right .btn-outline {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-right .btn-outline:hover {
    background-color: rgba(186, 12, 47, 0.08);
}

.nav-center {
    display: flex;
    gap: 2rem;
}

.nav-center a {
    position: relative;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-center a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-center a:hover {
    color: var(--text-primary);
}

.nav-center a:hover::after,
.nav-center a.nav-active::after {
    transform: scaleX(1);
}

.nav-center a.nav-active,
.nav-mobile-menu a.nav-active {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 0.75rem;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: opacity 0.2s;
}

.nav-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem 1.5rem;
}

.nav-mobile-menu.open {
    display: flex;
}

.nav-mobile-menu a {
    padding: 0.75rem 0;
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* CTA in the mobile menu: same shape as the other links, set in italic */
.nav-mobile-menu a.nav-mobile-cta {
    font-style: italic;
}

.nav-mobile-menu a:last-child {
    border-bottom: none;
}

.nav-mobile-menu a:hover {
    color: var(--text-primary);
}

.hero {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.hero-1a {
    padding: 3rem 2rem;
}

.hero-1a-grid {
    display: grid;
    grid-template-columns: 6.25fr 5.75fr;
    gap: 4rem;
    align-items: center;
}

.hero-1a-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.hero-eyebrow {
    /* Not inline-flex: that would collapse the spaces around the <b> initials */
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--border-radius-pill);
    background: rgba(186, 12, 47, 0.08);
    color: var(--accent);
    font-weight: 400;
    font-size: var(--fs-base);
    letter-spacing: normal;
}

/* The letters that spell GAIM — carries the acronym without a separate gloss */
.hero-eyebrow b {
    font-weight: 700;
    font-size: var(--fs-md);
}

.hero-1a h1 {
    font-size: var(--fs-display-lg);
    line-height: 1.1;
    letter-spacing: normal;
    font-weight: 400;
    color: var(--text-primary);
}

.hero-lede {
    max-width: 34em;
    font-size: var(--fs-md);
    color: var(--text-secondary);
}

/* Closing thought of the lede — warms to the theme red on hover */
.hero-lede-em {
    font-style: italic;
    transition: color 0.2s ease;
}

.hero-lede-em:hover {
    color: var(--accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Shrinking a button sizes its box before the text wraps, leaving dead space
   inside. Let the row wrap instead so each button keeps its content width. */
.hero-actions .btn {
    flex-shrink: 0;
}

.hero-media {
    position: relative;
    height: 560px;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    background: var(--card-bg);
}

.hero-slides {
    display: flex;
    height: 100%;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
}

/* Blurred, zoomed copy of the photo fills the letterbox bars */
.hero-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(28px) brightness(0.85);
    transform: scale(1.15); /* hides the soft edges the blur creates */
    display: block;
}

/* The actual photo, never cropped */
.hero-slide-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(4px);
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease;
}

.hero-nav svg {
    width: 18px;
    height: 18px;
}

.hero-nav-prev { left: 12px; }
.hero-nav-next { right: 12px; }

.hero-media:hover .hero-nav,
.hero-nav:focus-visible {
    opacity: 1;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.98);
}

@media (hover: none) {
    .hero-nav { opacity: 1; }
}

.hero-media-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border-radius: var(--border-radius-pill);
    padding: 8px 16px;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-primary);
}

/* Section headings — a step below the hero h1, not small uppercase labels */
.research-label,
.partners-label {
    display: block;
    font-size: var(--fs-xl);
    font-weight: 400;
    color: var(--text-primary);
}

/* Explicit because the hero copy is now taller than the photo, so the centered
   grid no longer leaves slack under the buttons. The partners labels don't need
   this — .partners-block is a flex column with its own gap. */
.research-label {
    margin-top: 4rem;
}

.research-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 3rem;
}

.research-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: background 0.2s ease;
}

.research-card:hover {
    background: #f1f3f4;
}

.research-card p {
    font-size: var(--fs-base);
    color: var(--text-primary);
    line-height: 1.4;
}

.research-thumb {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    flex: none;
}

.research-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.research-arrow {
    color: var(--accent);
    font-weight: 600;
    margin-left: auto;
    font-size: var(--fs-md);
}

@media (max-width: 1024px) {
    .hero-1a-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-media {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .hero-1a {
        padding: 2rem 1rem;
    }

    .research-row {
        grid-template-columns: 1fr;
    }
}

section:not(.hero) {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.partners-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 0;
    align-items: stretch;
}

.partners-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.partners-sponsors {
    padding-right: 3rem;
}

.partners-collaborators {
    padding-left: 3rem;
    border-left: 1px solid var(--border-color);
}


.partners-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    flex: 1;
}

.sponsors-logos {
    justify-content: space-evenly;
}

.collaborators-logos {
    justify-content: center;
}

.partner-tile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-tile img {
    max-height: clamp(80px, 14vw, 120px);
    max-width: clamp(150px, 31vw, 170px);
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

.partner-tile.partner-tile-sm img {
    max-height: clamp(40px, 9vw, 70px);
    max-width: clamp(110px, 30vw, 215px);
}

@media (max-width: 768px) {
    .partners-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .partners-sponsors {
        padding-right: 0;
    }

    .partners-collaborators {
        padding-left: 0;
        padding-top: 3rem;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .sponsors-logos {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .sponsors-logos {
        grid-template-columns: 1fr;
    }
}

.carousel {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.meta {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.footer {
    background-color: var(--card-bg);
    padding: 6rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-top {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4ch;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    font-size: var(--fs-2xl);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-col h4 {
    margin-bottom: 0.5rem;
}

.link-col a {
    color: var(--text-secondary);
}

.link-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

/* Set smaller than the copyright line above it: disclosure, not a message.
   Needs its own size because the global `p` rule forces --fs-md here. */
.footer-note {
    margin-top: 0.5rem;
    font-size: var(--fs-sm);
    max-width: 14000ch;
}

.footer-note a {
    color: var(--accent);
}

.people-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.people-section h1 {
    margin-bottom: 0.5rem;
}

.people-divider {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 4rem 0 2.5rem;
}

.people-divider h2 {
    font-size: var(--fs-lg);
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-primary);
}

.people-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.pi-card {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    margin-top: 3rem;
}

.pi-card .person-photo {
    width: 280px;
    height: 320px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: var(--fs-sm);
}

.pi-card .person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pi-card .person-info {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.pi-card .person-info h3 {
    font-size: var(--fs-xl);
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.person-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.person-card .person-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: var(--fs-sm);
}

.person-card .person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.person-card .person-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.person-card .person-info h3 {
    font-size: var(--fs-md);
}

.avatar-initials {
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.past-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.past-member {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.past-member-name {
    align-self: flex-start;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

a.past-member-name:hover {
    color: var(--accent);
}

.past-member-position {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.person-role {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--accent);
}

.person-bio {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.person-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    align-items: center;
}

.person-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.person-links a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background: var(--card-bg);
}

.person-links a svg {
    width: 16px;
    height: 16px;
}

.icon-linkedin svg {
    fill: currentColor;
    stroke: none;
}

.news-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-list {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
}

.news-item {
    display: grid;
    grid-template-columns: 120px auto 1fr;
    align-items: baseline;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:first-child {
    border-top: 1px solid var(--border-color);
}

.news-date {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.news-tag {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--accent);
    background: rgba(232, 67, 26, 0.08);
    padding: 2px 8px;
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
}

.news-text {
    font-size: var(--fs-base);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Narrow screens: date + tag on one line, text stacked beneath at full width */
@media (max-width: 768px) {
    .news-item {
        grid-template-columns: auto 1fr;
        gap: 0.6rem 0.75rem;
    }

    /* Keeps the pill hugging its label instead of stretching across the 1fr column */
    .news-tag {
        justify-self: start;
    }

    .news-body {
        grid-column: 1 / -1;
    }
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.5rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--accent);
}

.news-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.news-read-more:hover .news-arrow {
    transform: translateX(5px);
}

.publications-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 50vh;
}

.pub-list {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
}

.pub-item {
    padding: 2rem 0;
}


.pub-title {
    font-size: var(--fs-md);
    margin-bottom: 0.75rem;
}

.pub-authors {
    font-size: var(--fs-base);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pub-venue {
    font-size: var(--fs-base);
    color: var(--text-secondary);
}

.pub-year-group {
    margin-bottom: 2.5rem;
}

.pub-year-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pub-year-divider span {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.pub-year-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    border-top: 1px solid var(--border-color);
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-small {
    padding: 8px 18px;
    font-size: var(--fs-sm);
}

.loading-text {
    color: var(--text-secondary);
    font-size: var(--fs-base);
    margin-top: 4rem;
}

.gallery-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-divider {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 4rem 0 2.5rem;
}

.gallery-divider h2 {
    font-size: var(--fs-lg);
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-primary);
}

.gallery-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.gallery-canvas {
    display: flex;
    gap: 3px;
    background: var(--card-bg);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    padding: 3px;
}

.gallery-single-slot {
    display: block;
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    padding: 3px;
}

.gallery-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 2;
}

.gallery-2row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.gallery-right {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.gallery-slot {
    border-radius: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    aspect-ratio: 4 / 3;
}

.gallery-slot-wide {
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--border-radius-xl) - 3px) 0 0 0;
}

.gallery-right .gallery-slot:first-child {
    border-radius: 0 calc(var(--border-radius-xl) - 3px) 0 0;
}

.gallery-2row .gallery-slot:first-child {
    border-radius: 0 0 0 calc(var(--border-radius-xl) - 3px);
}

.gallery-right .gallery-slot:last-child {
    border-radius: 0 0 calc(var(--border-radius-xl) - 3px) 0;
}

.gallery-right .gallery-slot {
    aspect-ratio: unset;
    flex: 1;
}

/* Single-row canvas: equal-width slots side by side */
.gallery-canvas > .gallery-slot {
    flex: 1;
}

.gallery-canvas > .gallery-slot:first-child {
    border-radius: calc(var(--border-radius-xl) - 3px) 0 0 calc(var(--border-radius-xl) - 3px);
}

.gallery-canvas > .gallery-slot:last-child {
    border-radius: 0 calc(var(--border-radius-xl) - 3px) calc(var(--border-radius-xl) - 3px) 0;
}

.gallery-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .gallery-canvas {
        flex-direction: column;
    }

    .gallery-right {
        flex-direction: row;
    }

    .gallery-right .gallery-slot {
        flex: 1;
        aspect-ratio: 1 / 1;
    }

    /* Stacked single-row canvas: round top and bottom instead of left and right */
    .gallery-canvas > .gallery-slot:first-child {
        border-radius: calc(var(--border-radius-xl) - 3px) calc(var(--border-radius-xl) - 3px) 0 0;
    }

    .gallery-canvas > .gallery-slot:last-child {
        border-radius: 0 0 calc(var(--border-radius-xl) - 3px) calc(var(--border-radius-xl) - 3px);
    }
}

@media (max-width: 768px) {
    .pi-card {
        flex-direction: column;
    }

    .pi-card .person-photo {
        width: 100%;
        height: 280px;
    }

    .pi-card .person-info {
        padding: 1.5rem;
    }

    .nav-center {
        display: none;
    }

    .nav-right .btn-outline {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero {
        padding: 1rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 3rem;
    }
}