/* ==========================================
   Menden Lab Website - Material Design 3
   Color System & Design Tokens
   ========================================== 
   
   COLOR USAGE GUIDE:
   • Nav: #000F46 (Traditional Heritage Blue)
   • Buttons: #ABC1A7 (Sage), hover #737770
   • Links: #083973 or #46C8F0 (Light Blue)
   • Figures & Highlights: Blues + Sage
   • Cards: #FFFFFF with #F1F1F1 border
   
   ========================================== */

:root {
    /* Material Design 3 with Custom Color Palette */
    
    /* Primary - Traditional Heritage (Blue) */
    --md-sys-color-primary: #000F46;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #BFC3D1;
    --md-sys-color-on-primary-container: #000F46;
    
    /* Secondary - Mt William Greenstone (Light Sage) */
    --md-sys-color-secondary: #ABC1A7;
    --md-sys-color-on-secondary: #444A40;
    --md-sys-color-secondary-container: #D5E0D3;
    --md-sys-color-on-secondary-container: #444A40;
    
    /* Tertiary - Laughing Kookaburra (Light Blue) */
    --md-sys-color-tertiary: #46C8F0;
    --md-sys-color-on-tertiary: #003C55;
    --md-sys-color-tertiary-container: #D1F1FB;
    --md-sys-color-on-tertiary-container: #003C55;
    
    /* Error */
    --md-sys-color-error: #FF2D3C;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFCACE;
    --md-sys-color-on-error-container: #78000D;
    
    /* Surface & Background - Magpie Greys */
    --md-sys-color-surface: #FFFFFF;
    --md-sys-color-on-surface: #2D2D2D;
    --md-sys-color-surface-variant: #E4E4E4;
    --md-sys-color-on-surface-variant: #616161;
    --md-sys-color-outline: #969696;
    --md-sys-color-outline-variant: #C8C8C8;
    
    --md-sys-color-background: #FFFFFF;
    --md-sys-color-on-background: #2D2D2D;
    
    /* Surface Containers - Magpie Light Greys */
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F1F1F1;
    --md-sys-color-surface-container: #E4E4E4;
    --md-sys-color-surface-container-high: #D6D6D6;
    --md-sys-color-surface-container-highest: #C8C8C8;
    
    /* Surface Tint */
    --md-sys-color-surface-tint: #000F46;
    
    /* Inverse - Dark Backgrounds */
    --md-sys-color-inverse-surface: #000B34;
    --md-sys-color-inverse-on-surface: #F1F1F1;
    --md-sys-color-inverse-primary: #46C8F0;
    
    /* Material Design 3 - Elevation (Disabled - Using Color Contrast) */
    --md-sys-elevation-0: none;
    --md-sys-elevation-1: none;
    --md-sys-elevation-2: none;
    --md-sys-elevation-3: none;
    --md-sys-elevation-4: none;
    --md-sys-elevation-5: none;
    
    /* Material Design 3 - Shape */
    --md-sys-shape-corner-none: 0px;
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;
    
    /* Material Design 3 - Typography (Montserrat & Inter) */
    --md-sys-typescale-display-large-font: 'Montserrat', sans-serif;
    --md-sys-typescale-display-large-size: 57px;
    --md-sys-typescale-display-large-weight: 600;
    --md-sys-typescale-display-large-line-height: 64px;
    
    --md-sys-typescale-headline-large-font: 'Montserrat', sans-serif;
    --md-sys-typescale-headline-large-size: 32px;
    --md-sys-typescale-headline-large-weight: 600;
    --md-sys-typescale-headline-large-line-height: 40px;
    
    --md-sys-typescale-title-large-font: 'Montserrat', sans-serif;
    --md-sys-typescale-title-large-size: 22px;
    --md-sys-typescale-title-large-weight: 600;
    --md-sys-typescale-title-large-line-height: 28px;
    
    --md-sys-typescale-body-large-font: 'Inter', sans-serif;
    --md-sys-typescale-body-large-size: 16px;
    --md-sys-typescale-body-large-weight: 400;
    --md-sys-typescale-body-large-line-height: 24px;
    
    --md-sys-typescale-label-large-font: 'Inter', sans-serif;
    --md-sys-typescale-label-large-size: 14px;
    --md-sys-typescale-label-large-weight: 500;
    --md-sys-typescale-label-large-line-height: 20px;
    
    /* State Layer Opacities */
    --md-sys-state-hover-opacity: 0.08;
    --md-sys-state-focus-opacity: 0.12;
    --md-sys-state-pressed-opacity: 0.12;
    --md-sys-state-dragged-opacity: 0.16;
    
    /* Custom Link Colors */
    --md-sys-color-link: #083973;
    --md-sys-color-link-hover: #000F46;
}

/* ==========================================
   Global Styles & Reset
   ========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--md-sys-typescale-body-large-font);
    font-size: var(--md-sys-typescale-body-large-size);
    font-weight: var(--md-sys-typescale-body-large-weight);
    line-height: var(--md-sys-typescale-body-large-line-height);
    color: var(--md-sys-color-on-background);
    background-color: var(--md-sys-color-background);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--md-sys-typescale-headline-large-font);
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

svg {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   Navigation
   ========================================== */

.navbar {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h2 {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 500;
    color: #000F46;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #000F46;
    text-decoration: none;
    font-family: var(--md-sys-typescale-label-large-font);
    font-size: var(--md-sys-typescale-label-large-size);
    font-weight: var(--md-sys-typescale-label-large-weight);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0.75rem;
    border-radius: var(--md-sys-shape-corner-full);
    position: relative;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: #003C55;
    background-color: rgba(0, 60, 85, 0.1);
}

.nav-link.active {
    color: #003C55;
    background-color: rgba(0, 60, 85, 0.15);
    font-weight: 600;
}

.nav-link.btn-apply {
    background: linear-gradient(135deg, #46C8F0 0%, #74D6F4 100%);
    color: #000F46;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--md-sys-shape-corner-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.btn-apply:hover {
    background: linear-gradient(135deg, #74D6F4 0%, #A3E4F7 100%);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #000F46;
    border-radius: var(--md-sys-shape-corner-extra-small);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hero {
    margin-top: 0;
    padding-top: 80px;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #90CAF9 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    min-height: 600px;
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

.hero .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.hero-text {
    padding: 4rem 3rem 4rem 0;
    margin-left: auto;
    max-width: 1200px;
    padding-left: max(20px, calc((100vw - 1200px) / 2));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text h1 {
    font-family: var(--md-sys-typescale-display-large-font);
    font-size: 48px;
    font-weight: 400;
    line-height: 56px;
    color: #000F46;
    margin-bottom: 1.5rem;
}

.hero-text .highlight {
    color: #003C55;
    font-weight: 500;
}

.hero-subtitle {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: var(--md-sys-typescale-title-large-weight);
    line-height: var(--md-sys-typescale-title-large-line-height);
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.hero-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background-color: #E8E8E8;
    border-radius: var(--md-sys-shape-corner-extra-large);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-placeholder svg {
    width: 50%;
    height: 50%;
    color: #B0B0B0;
    opacity: 0.5;
}

.hero-gif {
    width: 100%;
    height: 100%;
    min-height: 600px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    font-family: var(--md-sys-typescale-label-large-font);
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    height: 56px;
    text-decoration: none;
    border-radius: var(--md-sys-shape-corner-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #000F46 0%, #003C55 100%);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #003C55 0%, #46C8F0 100%);
}

.btn-primary:active {
    background: linear-gradient(135deg, #000F46 0%, #003C55 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #ABC1A7 0%, #C0D0BD 100%);
    color: #444A40;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #737770 0%, #ABC1A7 100%);
    color: #FFFFFF;
}

.btn-outline {
    background: linear-gradient(135deg, rgba(0, 15, 70, 0.1) 0%, rgba(0, 60, 85, 0.1) 100%);
    color: #000F46;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #000F46 0%, #003C55 100%);
    color: #FFFFFF;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================
   Section Headers
   ========================================== */

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--md-sys-typescale-headline-large-font);
    font-size: var(--md-sys-typescale-headline-large-size);
    font-weight: var(--md-sys-typescale-headline-large-weight);
    line-height: var(--md-sys-typescale-headline-large-line-height);
    color: #000F46;
    margin-bottom: 1rem;
}

.section-header p {
    font-family: var(--md-sys-typescale-body-large-font);
    font-size: var(--md-sys-typescale-body-large-size);
    color: var(--md-sys-color-on-surface-variant);
}

/* ==========================================
   Research Focus Section
   ========================================== */

.research-focus {
    padding: 5rem 0;
    background-color: #FCFEFF;
}

.mission-statement {
    background: linear-gradient(135deg, #F5F9FA 0%, #EDF5F7 100%);
    padding: 2.5rem;
    border-radius: var(--md-sys-shape-corner-large);
    margin-bottom: 3rem;
}

.mission-statement p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.mission-statement strong {
    color: var(--md-sys-color-primary);
    font-weight: 500;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.research-card {
    background: linear-gradient(135deg, #F0F7FF 0%, #E8F4FF 100%);
    padding: 2rem;
    border-radius: var(--md-sys-shape-corner-large);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover {
    background: linear-gradient(135deg, #D6EBFF 0%, #BEE1FF 100%);
}

.research-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #003C55 0%, #46C8F0 100%);
    border-radius: var(--md-sys-shape-corner-large);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.research-icon svg {
    width: 32px;
    height: 32px;
    color: #FFFFFF;
}

.research-card h3 {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 1rem;
}

.research-card p {
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.research-card p:last-child {
    margin-bottom: 0;
}

.research-card.featured-research {
    grid-column: span 1;
}

.recent-works {
    margin-top: 0;
}

.recent-works-section {
    padding: 5rem 0;
    background-color: #F7FBFF;
}

.recent-works-header {
    margin-bottom: 1.5rem;
}

.recent-works-header h2,
.recent-works-header h3 {
    color: var(--md-sys-color-primary);
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.recent-works-header p {
    color: var(--md-sys-color-on-surface-variant);
}

.recent-works-carousel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recent-works-carousel-viewport {
    overflow: hidden;
}

#recent-works-grid.recent-works-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0.25rem;
}

#recent-works-grid.recent-works-carousel-track::-webkit-scrollbar {
    display: none;
}

.recent-works-carousel-control {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: #E0F0FF;
    color: var(--md-sys-color-primary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.recent-works-carousel-control:hover:not(:disabled) {
    background: #CCE7FF;
    transform: scale(1.03);
}

.recent-works-carousel-control:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.recent-works-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.recent-work-card {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: center;
    background: linear-gradient(135deg, #F5FAFF 0%, #EBF5FF 100%);
    border: 1px solid rgba(0, 15, 70, 0.08);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 1.75rem;
}

.recent-work-card:hover {
    background: linear-gradient(135deg, #E0F0FF 0%, #CCE7FF 100%);
}

.recent-work-card--no-image {
    grid-template-columns: 1fr;
}

.recent-work-card--loading {
    grid-template-columns: 1fr;
    text-align: center;
}

.recent-work-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recent-work-media {
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
    background: #FFFFFF;
    align-self: center;
}

.recent-work-media img {
    width: 100%;
    height: auto;
    display: block;
}

.recent-work-year {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.recent-work-title {
    color: var(--md-sys-color-primary);
    font-size: 1.8rem;
    line-height: 1.18;
    margin-bottom: 0.8rem;
}

.recent-work-journal {
    color: var(--md-sys-color-primary);
    font-weight: 600;
    margin-bottom: 0.7rem;
}

.recent-work-authors {
    color: var(--md-sys-color-on-surface);
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.recent-work-abstract {
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    line-clamp: 10;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-work-link {
    color: var(--md-sys-color-link);
    font-weight: 600;
    text-decoration: none;
}

.recent-work-link:hover {
    color: var(--md-sys-color-link-hover);
    text-decoration: underline;
}

.research-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.research-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    color: var(--magpie-dark-75);
    line-height: 1.7;
}

.research-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--md-sys-color-tertiary);
    font-weight: bold;
}

.research-list strong {
    color: var(--md-sys-color-primary);
    font-weight: 500;
}

/* ==========================================
   Projects Section
   ========================================== */

.projects {
    padding: 5rem 0;
    background-color: #F3F7FB;
}

.projects-carousel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.projects-carousel-viewport {
    overflow: hidden;
}

#repo-container.projects-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0.25rem;
}

#repo-container.projects-carousel-track::-webkit-scrollbar {
    display: none;
}

.projects-carousel-control {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: #E0F0FF;
    color: var(--md-sys-color-primary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.projects-carousel-control:hover:not(:disabled) {
    background: #CCE7FF;
    transform: scale(1.03);
}

.projects-carousel-control:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: linear-gradient(135deg, #F5FAFF 0%, #EBF5FF 100%);
    padding: 1.4rem;
    border-radius: var(--md-sys-shape-corner-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    flex: 0 0 min(420px, 92%);
    scroll-snap-align: start;
}

.project-card:hover {
    background: linear-gradient(135deg, #E0F0FF 0%, #CCE7FF 100%);
}

.project-card--loading {
    justify-content: center;
    min-height: 200px;
}

.project-header {
    margin-bottom: 0.6rem;
}

.project-header h3 {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 0.8rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    padding: 4px 12px;
    border-radius: var(--md-sys-shape-corner-small);
    font-size: 12px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .projects-carousel {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .projects-carousel-control {
        display: none;
    }

    .project-card {
        flex-basis: 96%;
    }
}

.project-description {
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 1rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    padding: 0.75rem 0;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    margin-bottom: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
}

.stat span:first-child {
    font-size: 1.35rem;
    line-height: 1;
    color: var(--md-sys-color-primary);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    background-color: #003C55;
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: var(--md-sys-shape-corner-full);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover {
    background-color: #005A80;
}

.project-link svg {
    width: 18px;
    height: 18px;
}

.project-link-secondary {
    color: #FFFFFF;
    background-color: #005A80;
    padding: 10px 18px;
    border-radius: var(--md-sys-shape-corner-full);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link-secondary:hover {
    background-color: #0071A3;
}

.view-more {
    text-align: center;
}

/* ==========================================
   Team Section
   ========================================== */

.team {
    padding: 5rem 0;
    background-color: #EEF3F8;
}

.team-photo-container {
    margin: 0 auto 2.25rem;
    max-width: 960px;
    border-radius: var(--md-sys-shape-corner-large);
    overflow: hidden;
    border: 1px solid rgba(0, 15, 70, 0.12);
}

.team-group-photo {
    width: 100%;
    height: auto;
    display: block;
}

.team-directory {
    background: transparent;
    border: none;
    border-radius: var(--md-sys-shape-corner-large);
    padding: 0;
}

.team-directory-header {
    margin-bottom: 1.6rem;
}

.team-featured {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    align-items: center;
}

.team-featured-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(0, 15, 70, 0.12);
    background: #FFFFFF;
}

.team-featured-content {
    color: var(--md-sys-color-on-surface);
}

.team-featured-role {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--md-sys-color-on-surface-variant);
}

.team-featured-link {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #000F46 0%, #003C55 100%);
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
}

.team-featured-link:hover {
    background: linear-gradient(135deg, #003C55 0%, #46C8F0 100%);
}

.team-directory-title {
    font-size: 2rem;
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.team-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.team-tab {
    border: 1px solid rgba(0, 15, 70, 0.18);
    border-radius: var(--md-sys-shape-corner-full);
    background: #FFFFFF;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.52rem 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.team-tab:hover {
    background: linear-gradient(135deg, #003C55 0%, #46C8F0 100%);
    color: #FFFFFF;
    border-color: transparent;
}

.team-tab.is-active {
    background: linear-gradient(135deg, #000F46 0%, #003C55 100%);
    color: #FFFFFF;
    border-color: transparent;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.team-card {
    background: #FFFFFF;
    border-radius: 0;
    border: 1px solid rgba(0, 15, 70, 0.12);
    transition: border-color 0.2s ease;
    display: block;
    padding: 0;
}

.team-card:hover {
    border-color: rgba(0, 15, 70, 0.28);
}

.team-card.is-hidden {
    display: none !important;
}

.team-member-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid rgba(0, 15, 70, 0.1);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background-color: #E8E8E8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-placeholder svg {
    width: 40%;
    height: 40%;
    color: #B0B0B0;
    opacity: 0.6;
}

.team-info {
    padding: 0.85rem 0.8rem 1rem;
    min-width: 0;
    text-align: center;
}

.team-info h3 {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.team-role {
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.team-interest {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.83rem;
    line-height: 1.35;
    margin: 0 auto 0.55rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 96%;
}

.team-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.team-link {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(0, 15, 70, 0.2);
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.team-link:hover {
    background: var(--md-sys-color-primary);
    color: #FFFFFF;
    border-color: var(--md-sys-color-primary);
}

.team-link svg {
    width: 13px;
    height: 13px;
}

.team-empty-state {
    margin-top: 1rem;
    color: var(--md-sys-color-on-surface-variant);
    font-style: italic;
}

.team-profile-link {
    display: none;
}

/* ==========================================
   People Directory Page
   ========================================== */

.people-page {
    padding-top: 80px;
}

.people-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #E3F2FD 0%, #D7EDFD 45%, #C5E6FB 100%);
    border-bottom: 1px solid rgba(0, 15, 70, 0.08);
}

.people-hero-content {
    max-width: 760px;
}

.people-kicker {
    color: var(--md-sys-color-primary);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.people-hero h1 {
    color: var(--md-sys-color-primary);
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.people-hero p {
    color: var(--md-sys-color-on-surface-variant);
    max-width: 65ch;
    margin-bottom: 1rem;
}

.people-directory {
    padding: 2.5rem 0 3rem;
    background: #F6F8FB;
}

.team-grid-people {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .team-featured {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 768px) {
    .people-page {
        padding-top: 70px;
    }

    .people-hero {
        padding: 2.25rem 0 1.5rem;
    }

    .people-directory {
        padding: 2rem 0 2.5rem;
    }

    .team-featured {
        grid-template-columns: 1fr;
    }

    .team-featured-photo {
        max-width: 280px;
    }

    .team-tab {
        padding: 0.45rem 0.85rem;
    }

}

@media (max-width: 480px) {
    .people-page {
        padding-top: 60px;
    }

    .team-directory-title {
        font-size: 1.65rem;
    }

    .team-tabs {
        gap: 0.45rem;
    }

    .team-info h3 {
        font-size: 1rem;
    }
}

/* ==========================================
   Apply Section
   ========================================== */

.apply {
    padding: 5rem 0;
    background: linear-gradient(135deg, #000F46 0%, #003C55 50%, #46C8F0 100%);
    color: #FFFFFF;
}

.apply-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.apply-text h2 {
    font-family: var(--md-sys-typescale-headline-large-font);
    font-size: var(--md-sys-typescale-headline-large-size);
    font-weight: var(--md-sys-typescale-headline-large-weight);
    margin-bottom: 1rem;
    color: var(--md-sys-color-on-primary);
}

.apply-subtitle {
    font-size: var(--md-sys-typescale-title-large-size);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.apply-positions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.position h3,
.qualifications h3 {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--md-sys-color-on-primary);
}

.position ul,
.qualifications ul {
    list-style: none;
}

.position ul li {
    margin-bottom: 1.5rem;
}

.position ul li strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--md-sys-color-on-primary);
    font-weight: 500;
}

.position ul li p {
    opacity: 0.9;
    line-height: 1.6;
}

.qualifications ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
    opacity: 0.9;
}

.qualifications ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--md-sys-color-on-primary);
    font-weight: bold;
}

.form-card {
    background-color: #FFFFFF;
    padding: 2.5rem;
    border-radius: var(--md-sys-shape-corner-large);
    color: var(--md-sys-color-on-surface);
}

.form-card h3 {
    font-family: var(--md-sys-typescale-title-large-font);
    font-size: 24px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 1rem;
}

.form-card p {
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item a {
    color: var(--md-sys-color-link);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item a:hover {
    color: var(--md-sys-color-link-hover);
    text-decoration: underline;
}

.contact-item span {
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background: linear-gradient(135deg, #000B34 0%, #000F46 100%);
    color: #F1F1F1;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--md-sys-color-inverse-on-surface);
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--md-sys-color-inverse-primary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.7;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section ul li a {
    color: var(--md-sys-color-inverse-on-surface);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-section ul li a:hover {
    color: var(--md-sys-color-inverse-primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 48px;
    height: 48px;
    background: #003C55;
    border-radius: var(--md-sys-shape-corner-full);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #FFFFFF;
}

.social-links a:hover {
    background: #46C8F0;
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    opacity: 0.8;
}

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

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-text h1 {
        font-size: 42px;
        line-height: 50px;
    }
    
    .research-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
}

/* Tablets and Medium Screens */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 0;
        min-height: auto;
    }
    
    .hero-text {
        padding: 3rem 30px;
        margin-left: 0;
        max-width: 100%;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 36px;
        line-height: 44px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
        padding: 0;
        margin: 0;
        min-height: 400px;
    }
    
    .hero-gif {
        min-height: 400px;
    }
    
    .apply-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Mobile and Small Tablets */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: #FFFFFF;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        width: 100%;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem 0;
        gap: 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hero Section */
    .hero {
        padding-top: 70px;
    }
    
    .hero-text {
        padding: 2.5rem 20px;
    }
    
    .hero-text h1 {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 1.5rem;
    }
    
    .hero-image {
        min-height: 350px;
    }
    
    .hero-gif {
        min-height: 350px;
    }
    
    /* Sections */
    .research-focus,
    .projects,
    .team,
    .apply {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 28px;
        line-height: 36px;
    }
    
    .section-header p {
        font-size: 15px;
    }
    
    /* Mission Statement */
    .mission-statement {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .mission-statement p {
        font-size: 15px;
        line-height: 1.7;
    }
    
    /* Research Grid */
    .research-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .recent-works-carousel {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .recent-works-carousel-control {
        display: none;
    }

    .recent-work-card {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .recent-work-media {
        order: -1;
    }
    
    .research-card {
        padding: 1.5rem;
    }
    
    .research-card.featured-research {
        grid-column: span 1;
    }
    
    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    /* Apply Section */
    .apply-text h2 {
        font-size: 28px;
    }
    
    .apply-subtitle {
        font-size: 18px;
    }
    
    .form-card {
        padding: 2rem;
    }
    
    /* Buttons */
    .btn {
        padding: 14px 32px;
        height: 52px;
        font-size: 16px;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 16px;
    }
    
    /* Navigation */
    .navbar .container {
        padding: 0.75rem 16px;
    }
    
    .nav-brand h2 {
        font-size: 18px;
    }
    
    /* Hero Section */
    .hero {
        padding-top: 60px;
    }
    
    .hero-text {
        padding: 2rem 16px;
    }
    
    .hero-text h1 {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 14px;
        line-height: 22px;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-image {
        min-height: 280px;
    }
    
    .hero-gif {
        min-height: 280px;
    }
    
    /* Sections */
    .research-focus,
    .projects,
    .team,
    .apply {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 24px;
        line-height: 32px;
    }
    
    .section-header p {
        font-size: 14px;
    }
    
    /* Mission Statement */
    .mission-statement {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        border-radius: var(--md-sys-shape-corner-medium);
    }
    
    .mission-statement p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* Research Cards */
    .research-grid {
        gap: 1.25rem;
    }
    
    .research-card {
        padding: 1.25rem;
        border-radius: var(--md-sys-shape-corner-medium);
    }
    
    .research-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }
    
    .research-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .research-card h3 {
        font-size: 18px;
        margin-bottom: 0.75rem;
    }
    
    .research-card p {
        font-size: 14px;
        line-height: 1.6;
    }

    .recent-works {
        margin-top: 2rem;
    }

    .recent-work-card {
        padding: 1.15rem;
    }

    .recent-work-title {
        font-size: 1.25rem;
    }
    
    .research-list li {
        font-size: 14px;
        padding: 0.4rem 0 0.4rem 1.25rem;
    }
    
    /* Projects */
    .projects-grid {
        gap: 1.25rem;
    }
    
    .project-card {
        padding: 1.25rem;
        border-radius: var(--md-sys-shape-corner-medium);
    }
    
    .project-header h3 {
        font-size: 18px;
    }
    
    .project-description {
        font-size: 14px;
    }
    
    .tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    /* Apply Section */
    .apply {
        padding: 2.5rem 0;
    }
    
    .apply-text h2 {
        font-size: 24px;
        margin-bottom: 0.75rem;
    }
    
    .apply-subtitle {
        font-size: 15px;
        margin-bottom: 1.5rem;
    }
    
    .position h3,
    .qualifications h3 {
        font-size: 18px;
        margin-bottom: 0.75rem;
    }
    
    .position ul li {
        margin-bottom: 1rem;
    }
    
    .position ul li strong {
        font-size: 15px;
    }
    
    .position ul li p,
    .qualifications ul li {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .form-card {
        padding: 1.5rem;
        border-radius: var(--md-sys-shape-corner-medium);
    }
    
    .form-card h3 {
        font-size: 20px;
    }
    
    .form-card p {
        font-size: 14px;
        margin-bottom: 1.5rem;
    }
    
    .contact-item {
        gap: 0.75rem;
    }
    
    .contact-item svg {
        width: 20px;
        height: 20px;
    }
    
    .contact-item a,
    .contact-item span {
        font-size: 14px;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 24px;
        height: 48px;
        font-size: 15px;
        width: 100%;
    }
    
    .nav-link.btn-apply {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 18px;
    }
    
    .footer-section h4 {
        font-size: 15px;
    }
    
    .footer-section p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .social-links a {
        width: 42px;
        height: 42px;
    }
    
    .social-links svg {
        width: 18px;
        height: 18px;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 13px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 22px;
        line-height: 30px;
    }
    
    .hero-subtitle {
        font-size: 13px;
        line-height: 20px;
    }
    
    .section-header h2 {
        font-size: 22px;
        line-height: 30px;
    }
    
    .btn {
        padding: 10px 20px;
        height: 44px;
        font-size: 14px;
    }
    
    .research-card,
    .project-card,
    .team-info,
    .form-card {
        padding: 1rem;
    }
}

/* Landscape Orientation on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .nav-menu {
        overflow-y: auto;
        max-height: calc(100vh - 70px);
        padding: 1rem 0;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .hero {
        padding-top: 60px;
    }
    
    .hero-text {
        padding: 2rem 20px;
    }
    
    .hero-text h1 {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 1rem;
    }
    
    .hero-image {
        min-height: 300px;
    }
    
    .hero-gif {
        min-height: 300px;
    }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    body.menu-open {
        position: fixed;
        width: 100%;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 3px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* ==========================================
   Utility Classes
   ========================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

