@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* ── Colour Palette ── */
  --c-bg:           #f8fafc;        /* page background */
  --c-surface:      #ffffff;        /* card / panel surface */
  --c-border:       #e2e8f0;        /* dividers, card edges */
  --c-border-hover: rgba(65,90,119,0.25);
  --c-text:         #0f172a;        /* primary text */
  --c-text-2:       #334155;        /* secondary headings */
  --c-muted:        #475569;        /* body copy */
  --c-faint:        #94a3b8;        /* labels, captions */
  --c-brand:        #415A77;        /* primary brand */
  --c-brand-dark:   #1B263B;        /* dark brand */
  --c-brand-deeper: #0D1B2A;        /* hero backgrounds */
  --c-brand-light:  rgba(65,90,119,0.08);  /* chip backgrounds */
  --c-brand-mid:    #778DA9;        /* gradient midpoint */
  --c-accent-line:  #E0E1DD;        /* dividers, active pill bg */

  /* ── Spacing Scale ── */
  --sp-section:     clamp(2.5rem, 5vw, 4.5rem);
  --sp-section-x:   clamp(1rem, 4vw, 1.5rem);
  --sp-card:        clamp(1.125rem, 2vw, 1.625rem);
  --sp-hero-pt:     clamp(1.5rem, 3vw, 2.25rem);    /* body padding-top handles nav; this is extra breathing room */

  /* ── Radius ── */
  --r-sm:    0.5rem;
  --r-md:    0.875rem;
  --r-lg:    1.25rem;
  --r-xl:    1.75rem;
  --r-pill:  9999px;

  /* ── Shadow Scale ── */
  --sh-xs:   0 1px 2px rgba(15,23,42,0.05);
  --sh-sm:   0 2px 8px rgba(15,23,42,0.07), 0 1px 3px rgba(15,23,42,0.04);
  --sh-md:   0 4px 16px rgba(15,23,42,0.09), 0 2px 6px rgba(15,23,42,0.05);
  --sh-lg:   0 8px 32px rgba(15,23,42,0.11), 0 4px 12px rgba(15,23,42,0.06);
  --sh-brand: 0 6px 20px rgba(65,90,119,0.25);

  /* ── Transition ── */
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:  160ms var(--ease);
  --t-base:  240ms var(--ease);
  --t-slow:  380ms var(--ease);

  /* ── Typography Scale (Outfit) ── */
  --fs-hero:  clamp(2.25rem, 5.5vw, 4rem);
  --fs-h2:    clamp(1.625rem, 3vw, 2.375rem);
  --fs-h3:    clamp(1.125rem, 1.8vw, 1.375rem);
  --fs-body:  clamp(0.9375rem, 1.1vw, 1.0625rem);
  --fs-ui:    0.875rem;
  --fs-label: 0.6875rem;
  --lh-body:  1.72;

  /* ── Z-Index ── */
  --z-nav:    100;
  --z-modal:  200;
  --z-toast:  300;
}

/* ============================================
   DESIGN SYSTEM — BVM CoEDM
   Brand: sky-blue (#0284c7 core)
   Font: Outfit
   ============================================ */

/* === Base Reset === */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    scroll-behavior: smooth;
    overflow-x: clip; /* 'clip' prevents horizontal overflow WITHOUT creating a new scroll container — 'hidden' breaks position:sticky */
    width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    background-color: #f8fafc;
    color: #1e293b;
    padding-top: 0;
    min-width: 320px;
    overflow-x: hidden;
    width: 100%;
}

/* Main content padding for fixed header on all pages except index */
body:not(.home-page) main {
    padding-top: 6.0rem;
}
@media (max-width: 768px) {
    body:not(.home-page) main {
        padding-top: 5.25rem;
    }
}

/* Body copy text — justify in all prose/content areas for a clean, editorial look */
body p,
li,
.prose p,
.partner-card p,
.partner-desc,
.internship-abstract p,
#internships-container p,
.team-card p,
.mv-card p,
.project-card p,
.modal-body p {
    text-align: justify;
    hyphens: auto;
}

/* Never justify headings, labels, UI elements, or centered content */
h1, h2, h3, h4, h5, h6,
.text-center,
.text-center *,
.text-center p,
.text-center li,
#hero-body,
.page-hero,
.page-hero p,
.page-hero__subtitle,
.section-eyebrow,
.brand-badge,
.partner-collab-badge,
.filter-tab,
button, a,
label, span {
    text-align: unset;
}


/* === Typography Scale === */
.text-xxs  { font-size: 0.625rem; line-height: 1rem; }
.text-2xs  { font-size: 0.7rem;   line-height: 1.1rem; }
.text-3xs  { font-size: 0.6rem;   line-height: 0.9rem; }

/* === Brand Gradient Text === */
.text-gradient {
    display: inline-block;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #1B263B 0%, #415A77 50%, #778DA9 100%);
}

/* === Glassmorphism === */
.glass-panel {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 40px 0 rgba(31, 38, 135, 0.09);
}

.glass-panel-dark {
    background: rgba(13, 27, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* === Hover Card Lift === */
.hover-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.1);
}

.hover-glow { transition: all 0.3s ease; }
.hover-glow:hover {
    box-shadow: 0 0 18px rgba(65, 90, 119, 0.35);
    border-color: rgba(65, 90, 119, 0.55);
}

/* ============================================
   NAVIGATION — Public Header
   ============================================ */
.public-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

/* Nav link base */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}
.nav-link:hover {
    color: #415A77;
    background-color: #E0E1DD;
}

/* Active nav link pill indicator */
.nav-link-active {
    color: #415A77 !important;
    background-color: #E0E1DD !important;
}
.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: linear-gradient(90deg, #778DA9, #415A77);
    border-radius: 9999px;
}

/* Mobile nav links */
.nav-link-mobile {
    display: block;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #475569;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}
.nav-link-mobile:hover,
.nav-link-mobile.nav-link-active {
    color: #415A77;
    background-color: #E0E1DD;
}

/* ============================================
    PAGE HERO — Unified Section Header
    ============================================ */
.page-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #E0E1DD 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 2.25rem 1.5rem 2.25rem;
    text-align: center;
}
@media (max-width: 640px) {
    .page-hero { padding: 1.75rem 1rem 1.75rem; }
}

.page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: rgba(65, 90, 119, 0.08);
    border: 1px solid rgba(65, 90, 119, 0.2);
    color: #415A77;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.page-hero__title {
    font-size: clamp(1.875rem, 5vw, 3rem);
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.page-hero__subtitle {
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
    color: #64748b;
    max-width: 42rem;
    margin: 0 auto 2rem;
    line-height: 1.65;
    font-weight: 500;
}

/* ============================================
   BRAND BADGES / PILLS
   ============================================ */
.brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background-color: #E0E1DD;
    color: #415A77;
    border: 1px solid #cbd5e1;
}

/* ============================================
   SECTION LABEL
   ============================================ */
.section-eyebrow {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #415A77;
    margin-bottom: 0.5rem;
    display: block;
}

/* ============================================
   CARDS
   ============================================ */
.card-surface {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    transition: box-shadow var(--t-slow), transform var(--t-slow), border-color var(--t-slow);
}
.card-surface:hover {
    box-shadow: 0 12px 40px rgba(65,90,119,0.18), var(--sh-md);
    transform: translateY(-4px);
    border-color: var(--c-brand-mid);
}

/* ============================================
   TABLES
   ============================================ */
.custom-table { border-collapse: separate; border-spacing: 0; }
.custom-table th {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.custom-table td { border-bottom: 1px solid #f1f5f9; }

/* ============================================
   ADMIN SIDEBAR NAV LABELS
   ============================================ */
.nav-group-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #94a3b8;
    padding-left: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.375rem;
    display: block;
}

/* Search input focus — full definition is in the SEARCH BAR section below */

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

/* Smooth page transitions */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ============================================
   COLLAPSED ADMIN SIDEBAR STYLES
   ============================================ */
#admin-sidebar {
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#admin-sidebar.sidebar-collapsed {
    width: 5rem !important; /* w-20 equivalent */
}

#admin-sidebar .sidebar-text {
    opacity: 1;
    max-width: 200px;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
}

#admin-sidebar.sidebar-collapsed .sidebar-text {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

#admin-sidebar.sidebar-collapsed .nav-group-label {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.2s ease, height 0.2s ease;
}

#admin-sidebar nav {
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-sidebar.sidebar-collapsed nav {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

#admin-sidebar a {
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), justify-content 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-sidebar.sidebar-collapsed a {
    justify-content: center;
    padding: 0.75rem 0 !important;
}

#admin-sidebar a svg {
    transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-sidebar.sidebar-collapsed a svg {
    margin-right: 0 !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* ============================================
   INTERACTIVE PREMIUM SELECT DROPDOWNS & LISTS
   ============================================ */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.9em;
    padding-right: 2.25rem !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
select:hover {
    border-color: #415A77;
    background-color: #f8fafc;
    transform: translateY(-0.5px);
    box-shadow: 0 4px 12px -2px rgba(13, 27, 42, 0.05);
}
select:focus {
    outline: none;
    border-color: #415A77;
    box-shadow: 0 0 0 3px rgba(65, 90, 119, 0.15);
    background-color: #ffffff;
}

/* Custom Select Container */
.custom-select-container {
    position: relative;
    display: inline-block;
    width: auto;
    min-width: 140px;
    vertical-align: middle;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.custom-select-trigger:hover {
    border-color: #415A77;
    background-color: #f8fafc;
    transform: translateY(-0.5px);
    box-shadow: 0 4px 12px -2px rgba(13, 27, 42, 0.05);
}

.custom-select-trigger.open {
    border-color: #415A77;
    box-shadow: 0 0 0 3px rgba(65, 90, 119, 0.15);
    background-color: #ffffff;
}

.custom-select-trigger::after {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #475569;
    border-bottom: 2px solid #475569;
    transform: rotate(45deg);
    margin-left: 0.75rem;
    transition: transform 0.22s ease;
}

.custom-select-trigger.open::after {
    transform: rotate(-135deg);
}

/* Options dropdown list overlay */
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    min-width: 100%;
    max-height: 280px;
    overflow-y: auto;
}

.custom-select-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.custom-select-option:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.custom-select-option.selected {
    background-color: #1B263B;
    color: #ffffff;
}

/* Custom search popover lists (Admin panel student/mentor search dropdowns) */
#student_dropdown, #mentor_dropdown {
    scrollbar-width: thin;
    animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Custom checklists inside series configure tables */
.max-h-28 label {
    transition: all 0.15s ease;
}
.max-h-28 label:hover {
    background-color: #f1f5f9 !important;
    transform: translateX(1px);
}

/* ============================================
   GLOBAL MOBILE RESPONSIVE OVERRIDES
   ============================================ */
@media (max-width: 768px) {
    /* Allow custom selects to fit fully inside small widths */
    .custom-select-container {
        width: 100% !important;
    }
    
    /* Ensure tables inside overflow container do not break layout */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    /* Responsive modal improvements */
    .modal-prog-dot {
        width: 8px;
        height: 8px;
    }
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: var(--z-nav);
  width: calc(100% - 2.5rem);
  max-width: 1400px;
  height: 4.75rem;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--r-xl);
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
  transition: all var(--t-base);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 8px 30px -8px rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.12);
  top: 0.75rem;
}

.header-inner {
  max-width: 100%; margin: 0 auto;
  height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.header-logo {
  display: flex; align-items: center; gap: 0.85rem;
  text-decoration: none; flex-shrink: 0;
}
.header-logo img { width: 3.25rem; height: 3.25rem; object-fit: contain; }
.header-logo-text {
  line-height: 1.2;
}
.header-logo-text .text-gradient {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
}
.header-logo-text span:not(.text-gradient) {
  display: block; font-size: 0.75rem; font-weight: 400; color: var(--c-muted);
}

.header-nav {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-link {
  padding: 0.45rem 0.75rem; border-radius: var(--r-md);
  font-size: 0.95rem; font-weight: 550; color: var(--c-muted);
  text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover          { color: var(--c-brand-dark); background: var(--c-accent-line); }
.nav-link.nav-link-active {
  color: var(--c-brand-dark); background: var(--c-accent-line); font-weight: 700;
}
.nav-cta-btn {
  margin-left: 0.5rem;
  padding: 0.55rem 1.15rem;
  background: var(--c-brand); color: #fff !important;
  border-radius: var(--r-md);
  font-size: 0.95rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.nav-cta-btn:hover {
  background: var(--c-brand-dark);
  box-shadow: var(--sh-brand);
  transform: translateY(-1px);
}
.mobile-toggle {
  display: none; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: var(--r-md);
  border: 1px solid var(--c-border); background: none; cursor: pointer;
  color: var(--c-text); transition: background var(--t-fast);
}
.mobile-toggle:hover { background: var(--c-brand-light); }
.mobile-drawer {
  background: rgba(255,255,255,0.98);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  border-top: 1px solid var(--c-border);
  padding: 0 var(--sp-section-x);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-drawer.open {
  padding: 1rem var(--sp-section-x) 1.5rem;
  max-height: 500px;
  opacity: 1;
}
.nav-link-mobile {
  display: block; padding: 0.65rem 0.875rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500; color: var(--c-muted);
  text-decoration: none; margin-bottom: 0.25rem;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link-mobile:hover { color: var(--c-brand-dark); background: var(--c-accent-line); }

@media (max-width: 768px) {
  .header-nav    { display: none; }
  .mobile-toggle { display: flex; }
  .site-header {
    height: 4.25rem;
    top: 0.5rem;
    width: calc(100% - 1.5rem);
    border-radius: var(--r-lg);
  }
  .site-header.scrolled {
    top: 0.5rem;
  }
  .header-logo img {
    width: 2.75rem;
    height: 2.75rem;
  }
  .header-logo-text .text-gradient {
    font-size: 1.05rem;
  }
  .header-logo-text span:not(.text-gradient) {
    font-size: 0.7rem;
  }
  .header-mobile-logos {
    display: flex !important;
  }
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--c-brand-deeper);
  color: rgba(255,255,255,0.55);
}
.footer-inner {
  max-width: 1800px; margin: 0 auto;
  padding: clamp(1.25rem, 2vw, 2rem) 1.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-brand {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 0.875rem;
}
.footer-brand img { opacity: 0.9; width: 2.25rem; height: 2.25rem; }
.footer-brand span {
  font-size: 1.25rem; font-weight: 850; color: #fff;
}
.footer-tagline {
  font-size: 0.95rem; line-height: 1.6; color: rgba(255,255,255,0.6);
  max-width: 42ch;
}
.footer-heading {
  font-size: 0.825rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.5);
  margin-bottom: 0.875rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  font-size: 0.95rem; color: rgba(255,255,255,0.68); text-decoration: none;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: #fff; }
.footer-address {
  font-size: 0.95rem; line-height: 1.7; color: rgba(255,255,255,0.65);
  font-style: normal;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1800px; margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.825rem; color: rgba(255,255,255,0.45);
}
@media (max-width: 768px) {
  .footer-inner { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem 1rem; 
    padding: 1.25rem 1rem; 
  }
  .footer-inner > div:first-child {
    grid-column: span 2;
  }
  .footer-bottom { flex-direction: column; text-align: center; padding: 0.875rem; }
}

/* ================================================================
   SEARCH BAR & FIELD
   ================================================================ */
.search-bar-wrap {
  display: flex; gap: 0.875rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 2rem;
}
.search-field {
  flex: 1; min-width: 280px; position: relative;
}
.search-icon {
  position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%);
  width: 1.25rem; height: 1.25rem; color: var(--c-faint); pointer-events: none;
  display: block;
}
.search-input {
  width: 100%; height: 2.75rem;
  padding: 0 2.5rem 0 2.75rem;
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  font-family: 'Outfit', sans-serif; font-size: var(--fs-ui);
  background: var(--c-surface); color: var(--c-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-input:focus {
  outline: none; border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(65,90,119,0.12);
}
.search-clear {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--c-faint); font-size: 1.125rem; line-height: 1;
  transition: color var(--t-fast); padding: 0.125rem 0.25rem;
}
.search-clear:hover { color: var(--c-text); }

/* ================================================================
   LAYOUT — PAGE HERO (inner pages)
   ================================================================ */
.page-hero {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 2.25rem var(--sp-section-x) 2rem;
}
.page-hero.has-scroll-down {
  position: relative;
  padding-bottom: 3.75rem;
}
.page-hero-inner       { max-width: 1200px; margin: 0 auto; }
.page-hero__title      { font-size: var(--fs-hero); font-weight: 900; color: var(--c-text);
                          letter-spacing: -0.02em; line-height: 1.1; margin: 0.5rem 0 0.75rem; }
.page-hero__subtitle   { font-size: var(--fs-body); color: var(--c-muted); max-width: 52ch;
                          line-height: var(--lh-body); }
.breadcrumb            { display: flex; align-items: center; gap: 0.375rem;
                          font-size: 0.8125rem; color: var(--c-faint); margin-bottom: 0.75rem; }
.breadcrumb a          { color: var(--c-brand); text-decoration: none; }
.breadcrumb a:hover    { text-decoration: underline; }

/* ================================================================
   SECTION SKELETON
   ================================================================ */
.skeleton-card {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--r-lg);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-card { animation: none; background: #f1f5f9; }
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state            { text-align: center; padding: 4rem 2rem; }
.empty-state-icon       { font-size: 2.5rem; margin-bottom: 1rem; }
.empty-state h3         { font-size: var(--fs-h3); font-weight: 700;
                           color: var(--c-text-2); margin-bottom: 0.5rem; }
.empty-state p          { font-size: var(--fs-ui); color: var(--c-muted); margin-bottom: 1.5rem; }

/* ================================================================
   TOAST
   ================================================================ */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: var(--z-toast);
  padding: 0.75rem 1.5rem; border-radius: var(--r-pill);
  font-size: var(--fs-ui); font-weight: 600; color: #fff;
  opacity: 0; transition: all var(--t-base); white-space: nowrap;
  box-shadow: var(--sh-lg); pointer-events: none;
}
.toast.visible          { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-error            { background: var(--c-brand-dark); }
.toast-success          { background: #166534; }

/* ================================================================
   TEAM TABS / FILTER TABS
   ================================================================ */
.team-tabs              { display: flex; border-bottom: 2px solid var(--c-border); margin-bottom: 2.5rem; }
.team-tab               { padding: 0.75rem 1.5rem; font-size: var(--fs-ui); font-weight: 600;
                           color: var(--c-muted); border: none; background: none; cursor: pointer;
                           border-bottom: 2px solid transparent; margin-bottom: -2px;
                           transition: color var(--t-fast), border-color var(--t-fast); }
.team-tab:hover         { color: var(--c-brand-dark); }
.team-tab.active        { color: var(--c-brand-dark); border-bottom-color: var(--c-brand); font-weight: 700; }
.filter-tab-group       { display: inline-flex; gap: 0.25rem; background: var(--c-bg);
                           border: 1px solid var(--c-border); border-radius: var(--r-pill); padding: 0.25rem; }
.filter-tab             { padding: 0.4rem 1rem; border-radius: var(--r-pill);
                           font-size: var(--fs-ui); font-weight: 600; color: var(--c-muted);
                           border: none; background: none; cursor: pointer;
                           transition: background var(--t-fast), color var(--t-fast); }
.filter-tab.active      { background: var(--c-brand); color: #fff; }
.filter-tab:not(.active):hover { background: var(--c-accent-line); color: var(--c-brand-dark); }

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.reveal { opacity: 0; transform: translateY(24px);
          transition: opacity 750ms var(--ease), transform 750ms var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ================================================================
   SKIP LINK (accessibility)
   ================================================================ */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: calc(var(--z-nav) + 10);
  background: var(--c-brand); color: #fff; padding: 0.625rem 1.25rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--fs-ui); font-weight: 700; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; outline: 2px solid #fff; outline-offset: 2px; }

/* ================================================================
   BACK TO TOP BUTTON (global — all pages)
   ================================================================ */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #415A77, #1B263B);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(65,90,119,0.35);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover   { transform: translateY(-2px); }

@media (max-width: 640px) {
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* ================================================================
   SCROLL DOWN INDICATOR (homepage hero bottom)
   ================================================================ */
.scroll-down-indicator {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}
.scroll-down-indicator:hover {
  color: #415A77;
}
.scroll-down-indicator svg {
  animation: bounce-arrow 1.6s infinite ease-in-out;
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

.page-scroll-down {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  transition: opacity 0.3s ease;
}

#project-detail-modal .modal-scroll-down {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  transition: opacity 0.3s ease;
}


/* ================================================================
   MISSION / VISION CARDS (homepage about section)
   ================================================================ */
.mv-card                { background: var(--c-bg); border: 1px solid var(--c-border);
                           border-radius: var(--r-lg); padding: var(--sp-card);
                           position: relative; overflow: hidden;
                           transition: box-shadow var(--t-base), transform var(--t-base); }
.mv-card::before        { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
                           background: linear-gradient(90deg, var(--c-brand-mid), var(--c-brand)); }
.mv-card:hover          { box-shadow: var(--sh-md); transform: translateY(-3px); }
.mv-card h3             { font-size: var(--fs-h3); font-weight: 800; color: var(--c-text); margin-bottom: 0.875rem; }
.mv-card p              { font-size: var(--fs-body); color: var(--c-muted); line-height: var(--lh-body); }

/* ================================================================
   PARTNER LAYOUT — 2-column CSS grid, height-only expansion
   ================================================================ */

/* Container: always 2-column grid on desktop */
#partners-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start; /* rows don't stretch to match each other */
}

/* Card: always fills its grid cell, never changes width */
.partner-card {
  width: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  box-shadow: var(--sh-xs);
  text-align: left;
  transition: box-shadow var(--t-base), border-color var(--t-base);
}

/* Expanded: highlight border only — width stays the same */
.partner-card.expanded-card {
  border-color: var(--c-brand-mid);
  box-shadow: var(--sh-md);
}

/* Logo wrapper */
.partner-logo-wrapper {
  width: 7rem;
  min-width: 7rem;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #e8edf2;
  padding: 0.75rem;
  flex-shrink: 0;
}
.partner-logo-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(0.1);
  transition: filter var(--t-base);
}
.partner-card:hover .partner-logo-img { filter: grayscale(0); }

/* Info section */
.partner-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.partner-info-top { flex: 1; }

.partner-header-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.partner-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--c-text);
  line-height: 1.2;
}
.partner-collab-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--c-brand-light);
  color: var(--c-brand);
  border: 1px solid var(--c-accent-line);
  white-space: nowrap;
}

/* Description clip + expand — JS sets inline max-height directly */
.partner-desc-wrapper {
  overflow: hidden;
  max-height: 5.4em;  /* collapsed ~3 lines */
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.partner-desc {
  font-size: 0.9375rem;
  color: var(--c-muted);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.partner-read-more-btn {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--t-fast);
}
.partner-read-more-btn:hover { color: var(--c-brand-dark); text-decoration: underline; }

.partner-website-wrap { margin-top: 1rem; }
.partner-website-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-brand);
  text-decoration: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.partner-website-btn:hover { border-color: var(--c-brand); background: var(--c-brand-light); }

@media (min-width: 1024px) {
  .partner-card:hover { box-shadow: var(--sh-md); border-color: var(--c-brand-mid); }
}

/* Tablet (640–1023px): still 2-column grid, tighter gap */
@media (max-width: 1023px) and (min-width: 640px) {
  #partners-container { gap: 1rem; }
  .partner-logo-wrapper { width: 6rem; min-width: 6rem; height: 4.75rem; }
}

/* Mobile (<640px): single column, card stacks logo above text */
@media (max-width: 639px) {
  #partners-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .partner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    gap: 1rem;
  }
  .partner-logo-wrapper {
    width: 5.5rem;
    min-width: 5.5rem;
    height: 4rem;         /* reduced from 4.5rem to prevent tall portrait logos from overflowing */
    max-height: 4rem;
  }
  .partner-logo-img {
    max-height: 3.25rem;  /* cap displayed height so portrait logos don't crop */
    object-fit: contain;
  }
  .partner-name { font-size: 1.05rem; }
  .partner-desc { font-size: 0.875rem; }
}

/* Homepage Partner Grid - Center columns when they do not fill the full container */
#home-partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

/* Homepage Partner Logo Tile - logo-only, grid-aligned, centered, hover animations */
.home-partner-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  height: 6.5rem;
  min-height: 6.5rem;
  width: calc(50% - 0.5rem); /* 2 columns on mobile S/M/L */
  max-width: 13.5rem;
  box-shadow: var(--sh-xs);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

@media (min-width: 640px) {
  .home-partner-tile {
    width: 13.5rem; /* fixed width on tablet/desktop to center properly */
  }
}

.home-partner-tile:hover {
  transform: translateY(-3px);
  border-color: var(--c-brand-mid);
  box-shadow: var(--sh-md);
}

.home-partner-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(0.15);
  transition: filter var(--t-base);
}

.home-partner-tile:hover img {
  filter: grayscale(0);
}

/* Universal focus ring override */
:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ================================================================
   CAROUSEL (homepage hero)
   ================================================================ */
.carousel-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 1rem;
  z-index: 30;
  /* Minimum 44×44px tap target (WCAG 2.5.5) */
  width: 2.75rem; height: 2.75rem;
  min-width: 44px; min-height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-arrow-btn:hover {
  background: rgba(255,255,255,0.32);
  transform: translateY(-50%) scale(1.08);
}
.carousel-arrow-btn.carousel-arrow-right { left: auto; right: 1rem; }

.carousel-dots-strip {
  position: absolute;
  bottom: 6.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ================================================================
   COHORT COLLAPSIBLE SECTIONS & TABLES (internships page)
   ================================================================ */
.cohort-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--c-surface);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--c-border);
  transition: background-color var(--t-fast);
}
.cohort-header:hover {
  background-color: var(--c-brand-light);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
}
.custom-table th {
  background: var(--c-bg);
  color: var(--c-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.875rem 1rem;
  border-bottom: 2px solid var(--c-border);
}
.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-2);
  vertical-align: middle;
}
.custom-table tbody tr:last-child td {
  border-bottom: none;
}

/* ╔══════════════════════════════════════════════════════════╗
   ║  ADMIN PANEL OVERRIDES                                   ║
   ╚══════════════════════════════════════════════════════════╝ */

/* Remove top padding on all admin pages */
body.flex.h-screen {
  padding-top: 0 !important;
}

/* Admin Dashboard Appealing Cards */
.admin-dash-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
  text-decoration: none;
}

.admin-dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--card-accent, var(--c-brand));
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.admin-dash-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
  border-color: var(--card-accent-hover, var(--c-brand-mid));
}

.admin-dash-card .card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg-light);
  color: var(--card-color);
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.admin-dash-card:hover .card-icon-box {
  transform: scale(1.08) rotate(3deg);
  background: var(--card-color);
  color: #ffffff;
  box-shadow: 0 6px 16px var(--card-shadow-color);
}

.admin-dash-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.admin-dash-card:hover h3 {
  color: var(--card-color);
}

.admin-dash-card p {
  font-size: 0.825rem;
  color: #64748b;
  line-height: 1.5;
}

.admin-dash-card .card-link {
  font-size: 0.725rem;
  font-weight: 850;
  color: var(--card-color);
  display: flex;
  align-items: center;
  margin-top: 1.25rem;
  transition: all 0.2s ease;
}

.admin-dash-card:hover .card-link {
  transform: translateX(4px);
}

/* Premium Modal Animations */
.person-modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.person-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.person-modal-card {
  transform: scale(0.95) translateY(12px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.38s ease;
}
.person-modal-backdrop.open .person-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Projects Detail Modal spring animation is defined in projects.html <style> block
   with per-card stagger delays set by JS (animation-delay on each .proj-card).
   The keyframe card-fade-in lives there to avoid fighting CSS load order. */

/* Global hover scale refinements for a extra premium spring feel */
.hover-card, .mv-card, .partner-card, .admin-dash-card {
  transition: box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ── Skeleton Card Shimmer Animation ── */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.skeleton-card {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
}

/* ================================================================
   TEAM CARDS — Mobile reflow at 480px
   FOOTER — 1-column layout at 480px
   ================================================================ */
/* ================================================================
   TEAM CARDS — Responsive scaling
   Keep flex-row (photo left, text right) at ALL sizes.
   Just shrink the photo column at smaller viewports so text always fits.
   ================================================================ */

/* Tablet (≤1024px): slightly wider photo column and reduced padding */
@media (max-width: 1024px) {
  .team-card-photo { width: 9rem !important; min-width: 9rem !important; }
  .team-card .p-5 { padding: 1.125rem !important; }
}

/* Small tablet / large phone (≤640px): optimized image and tighter padding */
@media (max-width: 640px) {
  .team-card-photo { width: 7.5rem !important; min-width: 7.5rem !important; }
  .team-card .p-5 { padding: 0.75rem !important; }
  .team-card .text-lg  { font-size: 0.95rem !important; }
  .team-card .text-xs  { font-size: 0.75rem !important; }
}

/* Revert any previous flex-col overrides — keep flex-row always */
@media (max-width: 900px) {
  .team-card { flex-direction: row !important; }
  /* Single-column grid so each card has full width */
  #faculty-grid,
  #researchers-grid { grid-template-columns: 1fr !important; }
}

/* Very narrow mobile screens (Mobile S, ≤375px): slightly scale down to fit comfortably */
@media (max-width: 375px) {
  .team-card-photo { width: 6.5rem !important; min-width: 6.5rem !important; }
  .team-card .p-5 { padding: 0.5rem !important; }
  .team-card .text-lg  { font-size: 0.9rem !important; }
}

/* ================================================================
   FOOTER — 1-column layout at 480px
   ================================================================ */
@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1rem 0.875rem;
  }
  .footer-inner > div:first-child {
    grid-column: 1;
  }
}

/* ================================================================
   PERSON MODAL — Avatar constraint on narrow screens (≤400px)
   ================================================================ */
@media (max-width: 400px) {
  .person-modal-card .avatar-container {
    max-width: 80vw !important;
    max-height: 80vw !important;
    width: 80vw;
    height: 80vw;
  }
}

/* ================================================================
   SEARCH BAR — prevent min-width overflow on narrow screens (≤375px)
   ================================================================ */
@media (max-width: 375px) {
  .search-field {
    min-width: 0;
    width: 100%;
  }
}
