:root {
    /* Modern iOS-inspired Color System */
    --primary: #007AFF;
    --secondary: #5856D6;
    --success: #34C759;
    --warning: #FF9500;
    --error: #FF3B30;
    --info: #5AC8FA;
    
    /* Neutral Grays (iOS Style) */
    --gray-50: #F2F2F7;
    --gray-100: #E5E5EA;
    --gray-200: #D1D1D6;
    --gray-300: #C7C7CC;
    --gray-400: #AEAEB2;
    --gray-500: #8E8E93;
    --gray-600: #636366;
    --gray-700: #48484A;
    --gray-800: #3A3A3C;
    --gray-900: #1C1C1E;
    
    /* Semantic Colors */
    --background: #FFFFFF;
    --background-secondary: var(--gray-50);
    --surface: #FFFFFF;
    --surface-secondary: #FAFAFA;
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --border: var(--gray-200);
    --border-light: var(--gray-100);
    --divider: var(--gray-100);
    
    /* Project Type Colors */
    
    /* Legacy support (gradually phase out) */
    --purple: var(--secondary);
    --primary-color: var(--text-primary);
    --secondary-color: var(--primary);
    --accent-color: var(--error);
    --background-color: var(--background-secondary);
    --card-background: var(--surface);
    --text-color: var(--text-primary);
    --text-muted: var(--text-secondary);
    --border-color: var(--border);
    --border-light: var(--border-light);
    
    /* Modern Shadow System */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px rgba(0, 122, 255, 0.2);
    
    /* Legacy shadows */
    --shadow: var(--shadow-sm);
    --shadow-hover: var(--shadow-md);
    
    /* Modern Border Radius System */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-3xl: 24px;
    --radius-full: 9999px;
    
    /* Legacy radius */
    --border-radius: var(--radius-lg);
    --border-radius-sm: var(--radius-sm);
    --border-radius-lg: var(--radius-xl);
    
    /* Comprehensive Spacing System */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    
    /* Legacy spacing */
    --spacing-xs: var(--space-1);
    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-8);
    --spacing-xxl: var(--space-12);
    
    /* Typography Scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
    --text-5xl: 48px;
    --text-6xl: 60px;
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    background-color: var(--background);
    line-height: var(--leading-normal);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    width: 100%;
    /* Sticky footer layout */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* App container grows to fill available space, pushing footer to bottom */
#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============ NAVIGATION STYLES ============ */

.main-navigation {
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(1.8);
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    height: 72px;
}

.nav-brand .brand-link {
    text-decoration: none;
    color: var(--text-primary);
}

.nav-brand h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin: 0;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: var(--text-base);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--gray-50);
}

.nav-button {
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.nav-button:hover {
    background: #0056CC;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* User Dropdown */
.nav-user {
    position: relative;
}

.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    color: var(--text-primary);
}

.user-button:hover {
    background: var(--gray-50);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.user-name {
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-fast);
    z-index: 50;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.dropdown-header .user-name {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.dropdown-header .user-email {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.dropdown-header .user-role {
    font-size: var(--text-xs);
    color: var(--primary);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-2) 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

.dropdown-item svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.logout-btn:hover {
    background: #FEF2F2;
    color: var(--error);
}

.logout-btn:hover svg {
    color: var(--error);
}

/* Mobile Navigation */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
    z-index: 101;
}

.nav-mobile-toggle:hover {
    background: var(--gray-100);
}

.nav-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-mobile-toggle span:nth-child(1) {
    top: 9px;
}

.nav-mobile-toggle span:nth-child(2) {
    top: 15px;
}

.nav-mobile-toggle span:nth-child(3) {
    top: 21px;
}

/* Active state - Transform to X */
.nav-mobile-toggle.active span:nth-child(1) {
    top: 15px;
    transform: translateX(-50%) rotate(45deg);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scale(0);
}

.nav-mobile-toggle.active span:nth-child(3) {
    top: 15px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--space-4);
        height: 64px;
        position: relative;
    }
    
    .nav-brand h1 {
        font-size: var(--text-xl);
    }
    
    .nav-mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border-light);
        box-shadow: var(--shadow-xl);
        padding: var(--space-8) var(--space-6) var(--space-12);
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-6);
        z-index: 100;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
    }
    
    .nav-link {
        padding: var(--space-6) var(--space-8);
        border-radius: var(--radius-2xl);
        text-align: center;
        background: var(--gray-50);
        font-weight: var(--font-semibold);
        font-size: var(--text-lg);
        transition: var(--transition-fast);
        border: 1px solid var(--border-light);
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    
    .nav-auth {
        display: flex;
        flex-direction: column;
        gap: var(--space-4);
        border-top: 1px solid var(--border-light);
        padding-top: var(--space-8);
        margin-top: var(--space-8);
    }
    
    .nav-button {
        text-align: center;
        padding: var(--space-6) var(--space-8);
        border-radius: var(--radius-2xl);
        font-weight: var(--font-semibold);
        font-size: var(--text-lg);
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .user-dropdown {
        border-top: 1px solid var(--border-light);
        padding-top: var(--space-4);
        margin-top: var(--space-4);
    }
    
    .user-button {
        justify-content: center;
        padding: var(--space-6);
        background: var(--gray-50);
        border-radius: var(--radius-2xl);
        border: 1px solid var(--border-light);
        width: 100%;
        min-height: 56px;
        font-size: var(--text-lg);
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: 1px solid var(--border-light);
        margin-top: var(--space-4);
        border-radius: var(--radius-xl);
    }
    
    .dropdown-item {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-base);
        min-height: 48px;
    }
    
    /* Overlay for mobile menu */
    .nav-menu-overlay {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        z-index: 99;
    }
    
    .nav-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ============ END NAVIGATION STYLES ============ */

/* ============ NEW HERO SECTION STYLES ============ */
/* 
 * Hero Section Redesign - December 2024
 * Features:
 * - 3-step journey visualization for main page
 * - Animated background decoration
 * - Responsive grid layout
 * - University logos section
 * - Compatible with both main page (.hero-section) and auth pages (.hero-split)
 * 
 * Dependencies:
 * - CSS variables from main design system
 * - University logo images in root directory
 * - Navigation component styles for auth pages
 */

/* Hero Section */
.hero-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #F5F7FF 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-16) var(--space-6) var(--space-12);
    min-height: 600px;
}

/* Background Decoration */
.background-decoration {
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 100%;
    opacity: 0.4;
    pointer-events: none;
}

.flow-path {
    stroke: var(--secondary);
    stroke-width: 2;
    fill: none;
    opacity: 0.15;
    stroke-dasharray: 8 6;
    animation: flowAnimation 20s linear infinite;
}

.flow-circle {
    fill: var(--secondary);
    opacity: 0.1;
}

@keyframes flowAnimation {
    to {
        stroke-dashoffset: -70;
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Left Column */
.hero-content {
    padding-right: var(--space-8);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-10);
    font-weight: 400;
    max-width: 480px;
}

.hero-cta {
    background: var(--primary);
    color: white;
    padding: var(--space-4) var(--space-8);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 14px 0 rgba(0, 122, 255, 0.3);
    text-decoration: none;
}

.hero-cta:hover {
    background: #0051D5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(0, 122, 255, 0.4);
}

.hero-cta svg {
    transition: transform 0.3s ease;
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* Right Column - Journey Steps */
.journey-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: var(--space-6) 0;
    max-width: 500px;
    margin-left: auto;
}

/* Journey Step Card */
.journey-step {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-6) var(--space-8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.journey-step:nth-child(1) { animation-delay: 0.2s; }
.journey-step:nth-child(2) { animation-delay: 0.4s; }
.journey-step:nth-child(3) { animation-delay: 0.6s; }

.journey-step:hover {
    transform: translateX(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

/* Step Number Badge */
.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Step Content */
.step-content {
    flex: 1;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.step-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Step Icons */
.step-icon {
    width: 28px;
    height: 28px;
    color: var(--secondary);
    opacity: 0.6;
    margin-left: auto;
    flex-shrink: 0;
}

/* Connection Dots */
.connection-dots {
    position: absolute;
    left: 48px;
    top: 100%;
    height: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    z-index: -1;
}

.journey-step:last-child .connection-dots {
    display: none;
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 50%;
}

/* Universities Section */
.universities-section {
    text-align: center;
    max-width: 1200px;
    margin: var(--space-16) auto 0;
    padding-top: var(--space-12);
    border-top: 1px solid var(--gray-100);
}

.universities-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.universities-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-16);
    flex-wrap: wrap;
}

.university-logo {
    height: 64px;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(0.2) opacity(0.9);
    transition: all 0.3s ease;
    cursor: pointer;
}

.university-logo:hover {
    filter: grayscale(0) opacity(1);
    transform: translateY(-4px);
}

/* Animations */
@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        margin: 0 auto var(--space-10);
    }

    .journey-container {
        margin: 0 auto;
        max-width: 500px;
    }

    .background-decoration {
        opacity: 0.2;
        width: 100%;
        right: 0;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .journey-step {
        padding: var(--space-5) var(--space-6);
        gap: var(--space-4);
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .step-title {
        font-size: 16px;
    }

    .step-description {
        font-size: 14px;
    }

    .step-icon {
        width: 24px;
        height: 24px;
    }

    .universities-grid {
        gap: var(--space-8);
    }

    .university-logo {
        height: 48px;
    }
}

/* ============ SHARED HERO STYLES FOR AUTH PAGES ============ */

/* Make hero-split work with both new and old class names */
.hero-split {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #F5F7FF 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-16) var(--space-6) var(--space-12);
    min-height: 600px;
}

.hero-content-split {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-left-col {
    padding-right: var(--space-8);
}

.hero-right-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Typography styles that work for both designs */
.headline {
    margin-bottom: var(--space-6);
}

.headline h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.03em;
}

.subheadline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-10);
    font-weight: 400;
    max-width: 480px;
}

/* CTA Button styles compatible with both designs */
.cta-button {
    background: var(--primary);
    color: white;
    padding: var(--space-4) var(--space-8);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 14px 0 rgba(0, 122, 255, 0.3);
    text-decoration: none;
    font-family: inherit;
    min-height: 48px;
}

.cta-button:hover {
    background: #0051D5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(0, 122, 255, 0.4);
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

.cta-button:focus {
    outline: none;
    box-shadow: var(--shadow-focus), 0 8px 20px 0 rgba(0, 122, 255, 0.4);
}

.cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px 0 rgba(0, 122, 255, 0.3);
}

/* Universities Section - compatible with both designs */
.participating-universities {
    text-align: center;
    max-width: 1200px;
    margin: var(--space-16) auto 0;
    padding-top: var(--space-12);
    border-top: 1px solid var(--gray-100);
}

.participating-universities h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.uni-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-16);
    flex-wrap: wrap;
}

.participating-logo {
    height: 64px;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(0.2) opacity(0.9);
    transition: all 0.3s ease;
    cursor: pointer;
}

.participating-logo:hover {
    filter: grayscale(0) opacity(1);
    transform: translateY(-4px);
}

/* Auth-specific overrides */
.auth-hero {
    min-height: calc(100vh - 80px); /* Account for navigation bar */
    padding: 2rem 2rem 2rem;
    display: flex;
    align-items: center;
    margin-top: 80px; /* Push down to account for fixed navigation */
}

.auth-content {
    align-items: center;
    gap: 4rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive Design for Shared Styles */
@media (max-width: 1024px) {
    .hero-content-split {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .hero-left-col {
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .subheadline {
        margin: 0 auto var(--space-10);
    }
}

@media (max-width: 640px) {
    .headline h1 {
        font-size: 2rem;
    }

    .subheadline {
        font-size: 1.125rem;
    }

    .uni-logos-container {
        gap: var(--space-8);
    }

    .participating-logo {
        height: 48px;
    }
}

/* ============ END NEW HERO SECTION STYLES ============ */


/* Enhanced Modal Overlay with iOS/macOS Design Philosophy */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px;
}

.modal-overlay.modal-active {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Modal Content with Card Emphasis */
.modal-content {
    background: #ffffff;
    padding: 0;
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.25),
        0 25px 50px -12px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    transform: scale(0.92) translateY(40px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
}

.modal-overlay.modal-active .modal-content {
    transform: scale(1) translateY(0);
}

/* Enhanced Modal Header with Inline Meta */
.modal-header {
    padding: 40px 40px 0;
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fdfdfe 100%);
    border-radius: 20px 20px 0 0;
}

/* Modal Title Section */
.modal-title-section {
    margin-right: 60px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* Enhanced Typography with SF Pro */
.modal-content h2 {
    color: #1a1a1a;
    margin: 0 0 16px 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.04em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

/* Inline Meta Information */
.modal-meta-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Clean Inline Project Type */
.modal-project-type-inline {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Elegant Separator */
.modal-separator {
    color: #9ca3af;
    font-weight: 500;
    font-size: 16px;
}

/* Modal Department Styling */
.modal-department {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Modal Timeline Styling */
.modal-timeline {
    margin-top: 12px;
}

.modal-timeline .timeline-text {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(203, 213, 225, 0.6);
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}


/* University Name Styling */
.modal-content .university {
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.modal-content .university::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #007AFF;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* Enhanced Modal Body */
.modal-body {
    padding: 32px 40px 40px;
}

/* Enhanced Domain Tags */
.modal-domain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.modal-domain-tag {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(203, 213, 225, 0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-domain-tag:hover {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(0, 122, 255, 0.4);
}

/* Content Section Styling */
.modal-content-section {
    margin-bottom: 32px;
}

.modal-content-section h4 {
    color: #1a1a1a;
    margin: 0 0 16px 0;
    font-size: 19px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content-section h4::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 2px;
}

/* Enhanced Description */
.modal-content .description {
    color: #374151;
    line-height: 1.7;
    font-size: 16px;
    margin: 0;
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Premium Contact Section */
.modal-contact {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.modal-contact h4 {
    color: #1a1a1a;
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.modal-contact h4::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.3);
}

/* Contact Details */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-name {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.contact-email {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.contact-email a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-email a:hover {
    color: #0056CC;
    text-decoration: underline;
}

.contact-email a::before {
    content: '✉';
    font-size: 14px;
    opacity: 0.7;
}



/* Modal Responsive */
@media (max-width: 767px) {
    .modal-overlay {
        padding: 16px;
    }
    
    .modal-content {
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 24px 20px 20px;
    }
    
    .modal-content h2 {
        font-size: 24px;
        margin-right: 44px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .modal-actions {
        padding: 16px 20px 24px;
        flex-direction: column;
    }
    
    .modal-btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .modal-close {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
    }
}

.subheadline {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #1a252f;
}

/* Legacy filter styles removed - now using unified .filters-section system */

.uni-icon {
    flex-shrink: 0;
}

.checkmark {
    flex-shrink: 0;
    margin-left: 0.25rem;
}

header {
    background-color: var(--purple);
    color: white;
    padding: 2rem;
    text-align: center;
}

h1 {
    margin-bottom: 1.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

select {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Google Sans', sans-serif;
    background-color: white;
    cursor: pointer;
    font-weight: 500;
}

main {
    padding: 1.5rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile main padding */
@media (max-width: 1024px) {
    main {
        padding: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* Enhanced Project Grid with Consistent Card Heights */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

/* Enhanced Project Card with Consistent Layout */
/* ============ REFINED PROJECT CARD DESIGN ============ */
/* Clean, informative cards with color-coded project types */

.project-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

/* Project Title */
.project-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

/* Institution Information */
.institution-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.university-logo-container {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px; /* Align with first line of text */
}

.university-logo-card {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.university-fallback {
    border-radius: 4px !important;
}

.institution-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.institution-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.2;
}

.institution-dept {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.2;
}

/* Legacy support - keep for backward compatibility */
.institution-text {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 15px;
}

/* Timeline Display */
.timeline-display {
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Project Description - DRY: shared truncation rules */
.project-description,
.project-card .description {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gray-700);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    margin: 0 0 16px 0;
    max-height: calc(1.6em * 6);
}

/* Domain Tags */
.domain-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.domain-tag {
    background: rgba(88, 86, 214, 0.1);
    color: var(--secondary);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.project-card:hover .domain-tag {
    background: rgba(88, 86, 214, 0.15);
    color: #4338CA;
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-info {
    color: var(--gray-600);
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.contact-link:hover {
    text-decoration: underline;
    color: #0056CC;
}

.view-details-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.view-details-link:hover {
    gap: 8px;
    color: #0056CC;
}

/* ============ PROJECT CARDS GRID ============ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    padding: 24px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gray-500);
    font-size: 16px;
    padding: 48px 24px;
}

/* ============ PDF LINK STYLING ============ */
/* Universal PDF link styling for all views (cards and modals) */
.secure-pdf-link,
.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.secure-pdf-link:hover,
.pdf-link:hover {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
}

.secure-pdf-link:active,
.pdf-link:active {
    background: rgba(0, 122, 255, 0.15);
    transform: translateY(0);
}

/* ============ MOBILE COMPACT LIST VIEW ============ */
@media (max-width: 1024px) {
    .projects-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Compact Card Styles - Reference Implementation */
    .compact-card {
        background: var(--surface);
        border-radius: var(--radius-lg);
        padding: 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        transition: all 0.2s ease;
        border: 1px solid transparent;
        width: 100%;
        box-sizing: border-box;
    }
    
    .compact-card:active {
        transform: scale(0.98);
    }
    
    .compact-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-color: var(--primary);
    }
    
    .card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }
    
    .card-title-section {
        flex: 1;
        margin-right: 12px;
    }
    
    .card-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--gray-900);
        line-height: 1.3;
        margin-bottom: 4px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .card-university {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
        color: var(--gray-600);
    }
    
    .compact-card .university-logo-container {
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .compact-card .university-logo {
        width: 16px;
        height: 16px;
        border-radius: 3px;
        object-fit: contain;
    }
    
    .contact-button {
        background: var(--primary);
        color: white;
        border: none;
        border-radius: var(--radius-md);
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        cursor: pointer;
        transition: background 0.2s ease;
        flex-shrink: 0;
    }
    
    .contact-button:active {
        background: #0051D5;
    }
    
    .card-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .meta-tag {
        background: var(--gray-100);
        color: var(--gray-700);
        padding: 4px 10px;
        border-radius: var(--radius-md);
        font-size: 12px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .meta-tag.timeline {
        background: rgba(0, 122, 255, 0.1);
        color: var(--primary);
    }
    
    .card-domains {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .card-domains .domain-tag {
        background: rgba(88, 86, 214, 0.1);
        color: var(--secondary);
        padding: 3px 8px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 500;
        white-space: nowrap;
    }
    
    /* Mobile modal domain tags */
    .modal-domain-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
    }
    
    .modal-domain-tag {
        background: rgba(88, 86, 214, 0.1);
        color: var(--secondary);
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
    }
    
    /* ============ MOBILE MODAL STYLES ============ */
    /* Mobile-first modal for mobile screens */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .modal-content {
        max-width: 100vw;
        width: 100vw;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        margin: 0;
        transform: translateY(100%);
        box-shadow: 
            0 -8px 32px rgba(0, 0, 0, 0.15),
            0 -4px 16px rgba(0, 0, 0, 0.08);
        overflow-y: auto;
        overflow-x: hidden;
        position: relative;
        background: white;
        border-top: 4px solid transparent;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Status-based modal content border colors for mobile */
    .modal-content.status-draft {
        border-top-color: var(--gray-600);
    }
    
    .modal-content.status-pending {
        border-top-color: var(--warning);
    }
    
    .modal-content.status-approved {
        border-top-color: var(--success);
    }
    
    .modal-content.status-rejected {
        border-top-color: var(--error);
    }
    
    .modal-overlay.modal-active .modal-content {
        transform: translateY(0);
    }
    
    /* Mobile modal handle */
    .modal-handle {
        width: 36px;
        height: 4px;
        background: var(--gray-300);
        border-radius: 2px;
        margin: 12px auto;
        display: block;
    }
    
    /* Status-based modal handle colors for mobile */
    .modal-content.status-draft .modal-handle {
        background: var(--gray-600);
    }
    
    .modal-content.status-pending .modal-handle {
        background: var(--warning);
    }
    
    .modal-content.status-approved .modal-handle {
        background: var(--success);
    }
    
    .modal-content.status-rejected .modal-handle {
        background: var(--error);
    }
    
    /* Mobile modal close button */
    .modal-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 32px;
        height: 32px;
        border: none;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: var(--gray-600);
        z-index: 2;
    }
    
    .modal-close:hover {
        background: rgba(0, 0, 0, 0.1);
    }
    
    /* Hide modal handle on desktop */
    @media (min-width: 769px) {
        .modal-handle {
            display: none;
        }
    }
    
    /* Override desktop header styles for mobile */
    .modal-header {
        position: sticky;
        top: 0;
        background: white;
        padding: 0 24px 20px 24px;
        margin: 0;
        border-bottom: 1px solid var(--gray-100);
        border-radius: 24px 24px 0 0;
        z-index: 1;
    }
    
    .modal-title {
        font-size: 22px;
        line-height: 1.3;
        text-align: left;
        margin: 0 0 12px 0;
        font-weight: 700;
        letter-spacing: -0.02em;
        color: #1a1a1a;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .modal-subtitle {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
        color: #6c757d;
        text-align: left;
        justify-content: flex-start;
    }
    
    .university-details {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .university-name {
        font-size: 14px;
        color: #6c757d;
        font-weight: 500;
    }
    
    .modal-department {
        font-size: 14px;
        color: #6c757d;
    }
    
    .modal-department::before {
        content: '|';
        margin-right: 4px;
        color: #d1d5db;
    }
    
    .modal-section {
        margin-top: 24px; /* Increased top margin for separation */
        padding-top: 16px;
        border-top: 1px solid #e9ecef;
    }
    
    .modal-section:first-of-type {
        margin-top: 16px;
        padding-top: 0;
        border-top: none;
    }
    
    .modal-section .section-title {
        font-size: 1.1em; /* Emphasize section title */
        font-weight: 600;
        margin-bottom: 12px;
        color: #343a40;
    }

    .modal-description {
        font-size: 16px;
        line-height: 1.5;
        color: var(--gray-700);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Mobile timeline display */
    .modal-timeline {
        background: rgba(0, 122, 255, 0.1);
        padding: 12px 16px;
        border-radius: var(--radius-md);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--primary);
        font-size: 14px;
        font-weight: 500;
        margin: 16px 0;
    }
    
    .timeline-icon {
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Mobile domains */
    .modal-domains {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .modal-domain-tag-mobile {
        background: rgba(88, 86, 214, 0.1);
        color: var(--secondary);
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
    }
    
    /* Mobile contact section */
    .modal-contact {
        background: var(--gray-50);
        padding: 24px;
        border-radius: var(--radius-lg);
        text-align: left;
        border: 1px solid var(--gray-200);
    }
    
    .contact-name {
        font-size: 18px;
        font-weight: 600;
        color: var(--gray-900);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .contact-name::before {
        content: "";
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        flex-shrink: 0;
    }
    
    .contact-email {
        margin-top: 8px;
    }
    
    .contact-email a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
        padding: 14px 20px;
        background: white;
        border-radius: var(--radius-lg);
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
        transition: all 0.2s ease;
        border: 1px solid rgba(0, 122, 255, 0.1);
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile modal status indicator styling */
    .modal-header .status-indicator {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 16px;
        margin-bottom: 8px;
        letter-spacing: 0.3px;
    }
    
    .modal-header .status-indicator.status-draft {
        background: rgba(99, 99, 102, 0.1);
        color: var(--gray-600);
        border: 1px solid rgba(99, 99, 102, 0.2);
    }
    
    .modal-header .status-indicator.status-pending {
        background: rgba(255, 149, 0, 0.1);
        color: var(--warning);
        border: 1px solid rgba(255, 149, 0, 0.3);
    }
    
    .modal-header .status-indicator.status-approved {
        background: rgba(52, 199, 89, 0.1);
        color: var(--success);
        border: 1px solid rgba(52, 199, 89, 0.3);
    }
    
    .modal-header .status-indicator.status-rejected {
        background: rgba(255, 59, 48, 0.1);
        color: var(--error);
        border: 1px solid rgba(255, 59, 48, 0.3);
    }
    
    /* Additional mobile modal styling for better status visibility */
    .modal-content.status-draft .modal-header {
        background: linear-gradient(to bottom, rgba(99, 99, 102, 0.02), white);
    }
    
    .modal-content.status-pending .modal-header {
        background: linear-gradient(to bottom, rgba(255, 149, 0, 0.02), white);
    }
    
    .modal-content.status-approved .modal-header {
        background: linear-gradient(to bottom, rgba(52, 199, 89, 0.02), white);
    }
    
    .modal-content.status-rejected .modal-header {
        background: linear-gradient(to bottom, rgba(255, 59, 48, 0.02), white);
    }
    
    .contact-email a::before {
        content: "";
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23007AFF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 8l7.89 3.26a2 2 0 001.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        flex-shrink: 0;
    }
    
    .contact-email a:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
        border-color: var(--primary);
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 0;
    }
    
    .project-card {
        padding: 20px;
        min-height: 350px;
    }
    
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .contact-info {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        gap: 12px;
    }
    
    .project-card {
        padding: 16px;
        min-height: 320px;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .institution-info {
        font-size: 14px;
    }
    
    .timeline-display {
        font-size: 14px;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-background);
    color: var(--text-color);
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

footer p {
    margin-bottom: 1rem;
}

footer p:last-child {
    margin-bottom: 0;
}

.footer-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-cta {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-contact {
    color: #666;
}

.footer-copyright {
    color: #666;
    font-size: 0.9rem;
}

/* Removed old .back-to-top style */

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}



.uni-logo {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Back to Top Button Styles */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%; /* Make it circular */
    width: 50px;
    height: 50px;
    font-size: 24px; /* Adjust arrow size */
    line-height: 50px; /* Center arrow vertically */
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: var(--secondary-color); /* Change color on hover */
}

/* ============ ENHANCED FILTERING STYLES ============ */

/* Search Section */
.search-section {
    padding: var(--spacing-xl) var(--spacing-xl);
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: var(--space-4) var(--space-5) var(--space-4) 3.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    font-size: var(--text-base);
    font-family: inherit;
    transition: var(--transition-fast);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    min-height: 56px;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: var(--shadow-focus), var(--shadow-md);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: var(--text-tertiary);
    font-weight: var(--font-normal);
}

.search-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    transition: var(--transition-fast);
}

.search-input:focus + .search-icon {
    color: var(--primary);
}

.search-clear-btn {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
}

.search-clear-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.05);
}

.search-clear-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Filters Wrapper */
.filters-wrapper {
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    padding: 1.5rem 0;
}

/* Filters Section Base */
.filters-section {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.filters-section:last-child {
    border-bottom: none;
    padding-bottom: 1.5rem;
}

.filters-section:first-child {
    padding-top: 1.5rem;
}

/* Filters Header */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filters-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filters-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--purple));
    border-radius: 2px;
}

/* Filters Container */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

/* University Filter Specific */
.university-filters .filters-title img.university-label-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-left: 4px;
}

/* Domain Filter Specific */
.domain-filters .filters-title svg {
    color: var(--secondary-color);
}

/* Project Type Filter Specific */
.project-type-filters .filters-title svg {
    color: var(--purple);
}

/* Modal Enhancements */
.project-meta-modal {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.modal-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.btn-primary {
    background: var(--purple);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background: #6c5ce7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 52, 212, 0.3);
}

/* Clear filters button styling */
.clear-filters-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.clear-filters-btn:hover {
    background: var(--background-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.clear-filters-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.clear-filters-btn::before {
    content: '×';
    font-size: 1.2rem;
    font-weight: 600;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Enhanced responsive design */
@media (max-width: 1024px) {
    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .project-meta-modal {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============ LOADING STATES & ERROR HANDLING ============ */

/* Loading Spinners */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-small {
    padding: 1rem;
}

.loading-medium {
    padding: 2rem;
}

.loading-large {
    padding: 4rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
    position: relative;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

.loading-small .loading-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

.loading-large .loading-spinner {
    width: 56px;
    height: 56px;
    border-width: 5px;
}

.loading-message {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loaders */
.projects-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.skeleton-header {
    margin-bottom: 1rem;
}

.skeleton-title {
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.skeleton-badge {
    width: 80px;
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

.skeleton-university {
    width: 120px;
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

.skeleton-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.skeleton-tag {
    width: 60px;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 10px;
}

.skeleton-description {
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-line.short {
    width: 70%;
}

.skeleton-contact {
    border-top: 1px solid #f1f3f4;
    padding-top: 1rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Error States */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 300px;
}

.error-icon {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-network .error-icon {
    color: #ffc107;
}

.error-notfound .error-icon {
    color: #6c757d;
}

.error-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.error-message {
    color: #6c757d;
    margin-bottom: 2rem;
    max-width: 400px;
    line-height: 1.5;
}

.error-retry-btn {
    background: var(--purple);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-retry-btn:hover {
    background: #6c5ce7;
    transform: translateY(-1px);
}

/* Empty States */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 300px;
}

.empty-state-icon {
    color: #6c757d;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-state-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.empty-state-message {
    color: #6c757d;
    margin-bottom: 2rem;
    max-width: 400px;
    line-height: 1.5;
}

.empty-state-action {
    background: var(--purple);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.empty-state-action:hover {
    background: #6c5ce7;
    transform: translateY(-1px);
}

/* Notifications */
.notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Google Sans', sans-serif;
    font-size: 0.9rem;
}

.notification-icon {
    color: var(--notification-color);
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

/* Responsive Design System */

/* Mobile First - 320px+ */
@media (max-width: 767px) {
    /* Hero Section Mobile */
    .hero-split {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .hero-content-split {
        flex-direction: column;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .hero-left-col,
    .hero-right-col {
        flex: 1 1 100%;
    }
    
    .headline h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        line-height: 1.2;
    }
    
    .subheadline {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    /* University Logos Mobile */
    .participating-universities {
        padding: var(--spacing-md) 0;
    }
    
    .uni-logos-container {
        /* flex-direction: column; */
        /* gap: var(--spacing-lg); */
    }
    
    .participating-logo {
        /* height: 56px; */
        /* max-width: 160px; */
    }
    
    /* Search Section Mobile */
    .search-section {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-input {
        padding: var(--spacing-md) 3rem var(--spacing-md) 3rem;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 52px;
    }
    
    /* Filters Mobile */
    .filters-section {
        padding: 1rem 1rem;
    }
    
    .filters-section:first-child {
        padding-top: 1.25rem;
    }
    
    .filters-section:last-child {
        padding-bottom: 1.25rem;
    }
    
    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
        margin-bottom: 0.75rem;
    }
    
    .filters-title::before {
        width: 3px;
        height: 16px;
    }
    

    
    .clear-filters-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        min-height: 32px;
        font-size: 0.8rem;
    }
    
    /* Projects Grid Mobile */
    .projects-skeleton {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .skeleton-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .error-container,
    .empty-state-container {
        padding: var(--spacing-xl) var(--spacing-md);
        min-height: 200px;
    }
    
    .notification {
        max-width: calc(100vw - 40px);
        margin: 0 20px;
    }
}

/* Tablet - 768px+ */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content-split {
        gap: var(--spacing-xl);
    }
    
    .headline h1 {
        font-size: clamp(2rem, 5vw, 2.75rem);
    }
    
    .uni-logos-container {
        gap: var(--spacing-lg);
    }
    
    .participating-logo {
        height: 64px;
    }
    
    /* Tablet filter optimizations */
    .filters-wrapper {
        padding: 1.25rem 0;
    }
    
    .filters-section {
        padding: 0.875rem 1.5rem;
    }
    
    .filters-section:first-child {
        padding-top: 1.25rem;
    }
    
    .filters-section:last-child {
        padding-bottom: 1.25rem;
    }
    
    .filters-header {
        margin-bottom: 0.875rem;
    }
    
    /* Balanced main spacing on tablet */
    main {
        padding: 1.25rem 1.5rem 2rem;
    }
}

/* Desktop - 1024px+ */
@media (min-width: 1024px) {
    .hero-content-split {
        gap: var(--spacing-xxl);
    }
    
    .participating-logo:hover {
        transform: scale(1.08);
    }
    
    /* Desktop filter optimizations */
    .filters-wrapper {
        padding: 1rem 0;
    }
    
    .filters-section {
        padding: 0.75rem 2rem;
    }
    
    .filters-section:first-child {
        padding-top: 1rem;
    }
    
    .filters-section:last-child {
        padding-bottom: 1rem;
    }
    
    .filters-header {
        margin-bottom: 0.75rem;
    }
    
    /* Tighter main spacing on desktop */
    main {
        padding: 1rem 2rem 2rem;
    }
}

/* Large Screens - 1440px+ */
@media (min-width: 1440px) {
    .hero-content-split {
        max-width: 1400px;
    }
    
    .headline h1 {
        font-size: 3.25rem;
    }
    
    .subheadline {
        font-size: 1.25rem;
    }
    
    /* Ultra-wide screen filter optimizations */
    .filters-wrapper {
        padding: 0.75rem 0;
    }
    
    .filters-section {
        padding: 0.625rem 3rem;
    }
    
    .filters-section:first-child {
        padding-top: 0.75rem;
    }
    
    .filters-section:last-child {
        padding-bottom: 0.75rem;
    }
    
    .filters-header {
        margin-bottom: 0.625rem;
    }
    
    /* Minimal spacing for ultra-wide screens */
    main {
        padding: 0.75rem 3rem 2rem;
        max-width: 1400px;
    }
}

/* Accessibility Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus Indicators */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .cta-button:hover,
    .participating-logo:hover {
        transform: none;
    }
    
    .cta-button:active {
        transform: scale(0.98);
    }
    
    /* Ensure touch targets are 44px minimum */
    .cta-button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cta-button,
    .participating-logo {
        transition: none;
    }
}

/* Mobile Responsive Enhancements for Modal */
@media (max-width: 767px) {
    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
        transform: translateY(100%);
        box-shadow: 
            0 -8px 32px rgba(0, 0, 0, 0.15),
            0 -4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .modal-overlay.modal-active .modal-content {
        transform: translateY(0);
    }
    
    .modal-header {
        padding: 28px 20px 0;
        background: linear-gradient(180deg, #ffffff 0%, #fdfdfe 100%);
    }
    
    .modal-title-section {
        margin-right: 44px;
        padding-bottom: 20px;
        text-align: left;
        border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    }
    
    .modal-content h2 {
        font-size: 24px;
        line-height: 1.3;
        text-align: left;
        margin: 0 0 12px 0;
        font-weight: 700;
        letter-spacing: -0.02em;
        color: #1a1a1a;
    }
    
    .modal-meta-inline {
        justify-content: flex-start;
        gap: 8px;
        margin-top: 8px;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .modal-project-type-inline {
        background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
        color: white;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        order: 1;
    }
    
    .modal-separator {
        color: #d1d5db;
        font-weight: 500;
        order: 2;
    }
    
    .modal-university-info {
        order: 3;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .modal-university-info .university-name {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
    }
    
    .modal-university-row {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 8px;
        justify-content: flex-start;
    }
    
    .modal-university-name {
        font-size: 16px;
        color: var(--text-primary);
        font-weight: 600;
    }
    
    .modal-department-row {
        margin-top: 4px;
    }
    
    .modal-department-text {
        font-size: 14px;
        color: var(--text-secondary);
    }
    
    .modal-close {
        top: 16px;
        right: 16px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: rgba(248, 250, 252, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(226, 232, 240, 0.6);
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px 20px 28px;
    }
    
    .modal-domain-tags {
        justify-content: flex-start;
        margin-bottom: 20px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .modal-domain-tag {
        background: rgba(59, 130, 246, 0.08);
        color: #2563eb;
        border: 1px solid rgba(59, 130, 246, 0.2);
        padding: 6px 12px;
        border-radius: 16px;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.3px;
    }
    
    .modal-content-section {
        margin-bottom: 24px;
    }
    
    .modal-content-section h4 {
        font-size: 17px;
        justify-content: flex-start;
        margin-bottom: 12px;
        color: #1a1a1a;
        font-weight: 600;
        letter-spacing: -0.01em;
    }
    
    .modal-content-section h4::before {
        content: '';
        width: 3px;
        height: 14px;
        background: linear-gradient(135deg, #007AFF, #5856D6);
        border-radius: 2px;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .modal-content .description {
        color: #374151;
        line-height: 1.6;
        font-size: 15px;
        margin: 0;
        letter-spacing: -0.01em;
        text-align: left;
    }
    
    .modal-contact {
        padding: 18px;
        text-align: left;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-radius: 14px;
        border: 1px solid rgba(226, 232, 240, 0.7);
    }
    
    .modal-contact h4 {
        justify-content: flex-start;
        font-size: 15px;
        margin-bottom: 12px;
        color: #1a1a1a;
        font-weight: 600;
    }
    
    .modal-contact h4::before {
        content: '';
        width: 3px;
        height: 14px;
        background: linear-gradient(135deg, #007AFF, #5856D6);
        border-radius: 2px;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .contact-details {
        align-items: flex-start;
        gap: 6px;
    }
    
    .contact-name {
        font-size: 14px;
        font-weight: 600;
        color: #1f2937;
        margin: 0;
        text-align: left;
    }
    
    .contact-email {
        margin: 0;
        text-align: left;
    }
    
    .contact-email a {
        color: #007AFF;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: all 0.2s ease;
    }
    
    .contact-email a:hover {
        border-bottom-color: #007AFF;
        color: #0056CC;
    }
}

/* Tablet Responsive Design */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal-overlay {
        padding: 32px;
    }
    
    .modal-content {
        max-width: 600px;
    }
    
    .modal-header {
        padding: 32px 32px 24px;
    }
    
    .modal-content h2 {
        font-size: 30px;
    }
    
    .modal-body {
        padding: 24px 32px 32px;
    }
    
    .modal-actions {
        padding: 20px 32px 32px;
    }
}

/* Domain Tags Container Styling */
.domain-tags-container {
    margin: 12px 0 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Premium Close Button with iOS Styling */
.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.7);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 18px;
    font-weight: 400;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.modal-close:hover {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
    transform: scale(1.05);
    box-shadow: 0 8px 20px -4px rgba(0, 122, 255, 0.4);
}

.modal-close:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 3px;
}

.modal-close:active {
    transform: scale(0.98);
}

/* University Logo Styles for Cards and Modals */
.university-info,
.modal-university-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.university-logo-container,
.modal-university-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.university-logo-card,
.university-logo-modal {
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.university-logo-card:hover,
.university-logo-modal:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.university-fallback {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.university-fallback:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Enhanced University Name Styling */
.university-name {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    line-height: 1.2;
}

.project-card:hover .university-name {
    color: #4b5563;
}

/* Modal University Info Styling */
.modal-university-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-university-info .university-name {
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Remove old university styles that conflict */
.project-card .university::before,
.modal-content .university::before {
    display: none;
}

/* Enhanced Project Meta Layout */
.project-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Responsive adjustments for university logos */
@media (max-width: 767px) {
    .university-info,
    .modal-university-info {
        gap: 6px;
    }
    
    .university-name {
        font-size: 14px;
    }
    
    .modal-university-info .university-name {
        font-size: 15px;
    }
}

/* General Filter Chip Styles (for all filter types) */
.filter-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(203, 213, 225, 0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    white-space: nowrap;
    outline: none;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #007AFF;
    color: #007AFF;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 122, 255, 0.2);
}

.filter-chip.selected {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border-color: #007AFF;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.filter-chip.selected:hover {
    background: linear-gradient(135deg, #0056CC, #4A3ACD);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 122, 255, 0.5);
}

.filter-chip:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* University Filter Specific Logo Styles */
.filter-chip-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-chip-logo {
    border-radius: 3px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.filter-chip:hover .filter-chip-logo {
    transform: scale(1.05);
}

.filter-chip.selected .university-fallback {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Remove old uni-logo styles that might conflict */
.filter-chip img.uni-logo {
    display: none;
}

/* Mobile responsive adjustments for filter chips */
@media (max-width: 767px) {
    .filter-chip {
        padding: 6px 14px;
        font-size: 13px;
        gap: 6px;
    }
}

/* Mobile Responsive Card Styles */
@media (max-width: 1024px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0;
    }

    main {
        padding: 1rem;
    }
    
    /* Enhanced Mobile Project Cards */
    .project-card {
        min-height: 340px;
        padding: 1.25rem;
        margin-bottom: 0;
    }
    
    .project-card h2 {
        font-size: 18px;
        min-height: auto;
        margin-bottom: 6px;
    }
    
    .university-info {
        margin-bottom: 12px;
    }
    
    .project-meta {
        gap: 0.5rem;
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
        min-height: auto;
    }
    
    .university-name {
        font-size: 13px;
    }
    
    
    .domain-tags-container {
        margin: 0 0 12px 0;
        gap: 4px;
        min-height: auto;
    }
    
    .domain-tag {
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 10px;
    }

    .project-card .description,
    .project-description {
        font-size: 15px;
    }

    .project-card .contact {
        font-size: 12px;
        padding-top: 0.75rem;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .projects-grid {
        gap: 1rem;
    }
    
    main {
        padding: 0.75rem;
    }
    
    .project-card {
        min-height: 320px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .project-card h2 {
        font-size: 17px;
        min-height: auto;
        line-height: 1.25;
        margin-bottom: 6px;
    }
    
    .university-info {
        margin-bottom: 10px;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        min-height: auto;
        margin-bottom: 0.5rem;
    }
    
    .university-info {
        width: 100%;
        order: 2;
        margin-bottom: 8px;
    }
    
    
    .domain-tags-container {
        margin: 0 0 10px 0;
        min-height: auto;
    }
    
    .domain-tag {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 8px;
    }

    .project-card .description,
    .project-description {
        font-size: 12px;
        line-height: 1.5;
    }

    .project-card .contact {
        font-size: 11px;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    main {
        padding: 1.25rem;
    }
    
    .project-card {
        min-height: 360px;
        padding: 1.25rem;
    }
    
    .project-card h2 {
        font-size: 19px;
        min-height: auto;
    }

    .project-card .description,
    .project-description {
        font-size: 13px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 2rem;
    }
    
    main {
        padding: 1.5rem 2rem 2rem;
    }
    
    .project-card {
        min-height: 380px;
        padding: 1.75rem;
    }
    
    .project-card h2 {
        font-size: 21px;
        min-height: auto;
    }

    .project-card .description,
    .project-description {
        font-size: 15px;
    }
}

/* Form Group Row - Side by side layout for date fields */
.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group-row .form-group {
    margin-bottom: 0;
}

/* Responsive form group row */
@media (max-width: 768px) {
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Project Timeline Display */
.project-timeline {
    margin: 1rem 0;
}

.timeline-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    background: var(--background-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.timeline-info svg {
    color: var(--primary);
    flex-shrink: 0;
}

.timeline-text {
    line-height: 1.4;
}

/* Date input validation styling to match other form fields */
input[type="date"]:valid:not(:placeholder-shown) {
    border-color: #10b981;
    background: #f0fdf4;
}

input[type="date"]:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #CBD5E1;
}

input[type="date"].error {
    border-color: var(--error);
    background: rgba(255, 59, 48, 0.05);
}

/* Remove unwanted browser autofill styling while preserving validation */
input[type="date"]:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px var(--background) inset;
    box-shadow: 0 0 0px 1000px var(--background) inset;
}

/* ============ SEARCH HEADER WITH VIEW TOGGLE ============ */

.search-header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    width: 100%;
    position: relative;
}

.search-container {
    flex: 1;
    max-width: 600px;
}

.view-toggle {
    display: flex;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2px;
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
    position: absolute;
    right: 0;
}

.view-toggle-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 36px;
    font-family: inherit;
}

.view-toggle-option:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

.view-toggle-option.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.3);
}

.view-toggle-option svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.view-toggle-option span {
    font-weight: 500;
}

/* ============ PROJECTS TABLE VIEW ============ */

.projects-table-container {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease-out forwards;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid animation */
.projects-grid {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease-out forwards;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Table Header */
.table-header-row {
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.table-header-row th {
    padding: var(--space-4) var(--space-6);
    text-align: left;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.sortable-header:hover {
    background: var(--gray-100);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.sort-indicators {
    display: flex;
    flex-direction: column;
    gap: 1px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.sortable-header:hover .sort-indicators {
    opacity: 0.7;
}

.sortable-header.sorted .sort-indicators {
    opacity: 1;
}

.sort-icon {
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.sortable-header.sorted.asc .sort-asc,
.sortable-header.sorted.desc .sort-desc {
    color: var(--primary);
}

/* Table Rows */
.project-table-row {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.project-table-row:hover {
    background: var(--gray-50);
    transform: translateX(2px);
}

.project-table-row:last-child {
    border-bottom: none;
}

.project-table-row td {
    padding: var(--space-4) var(--space-6);
    vertical-align: top;
    border-bottom: 1px solid var(--border-light);
}

/* Table Cells */
.title-cell {
    width: 40%;
    min-width: 300px;
}

.title-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.table-project-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.university-cell {
    width: 25%;
    min-width: 220px;
}

.university-content {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.table-university-logo-container {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.university-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.university-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.university-dept {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.timeline-cell {
    width: 15%;
    min-width: 140px;
}

.timeline-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.domains-cell {
    width: 12%;
    min-width: 160px;
}

.table-domain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.table-domain-tag {
    background: rgba(88, 86, 214, 0.1);
    color: var(--secondary);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    white-space: nowrap;
}

.table-domain-tag.more-tag {
    background: var(--gray-100);
    color: var(--text-tertiary);
}

.contact-cell {
    width: 8%;
    min-width: 130px;
}

.table-contact-link {
    color: var(--primary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color 0.2s ease;
}

.table-contact-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ============ MOBILE RESPONSIVE TABLE ============ */

@media (max-width: 1024px) {
    .search-header-container {
        flex-direction: column;
        gap: var(--space-3);
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .view-toggle {
        align-self: center;
    }
    
    .projects-table-container {
        border-radius: var(--radius-lg);
        margin: 0 var(--space-4);
        max-width: none;
    }
    
    /* Hide desktop table headers and show mobile layout */
    .projects-table thead {
        display: none;
    }
    
    .project-table-row {
        display: block;
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
        background: var(--surface);
        min-height: 75px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        transition: background-color 0.2s ease;
    }
    
    .project-table-row:hover {
        transform: none;
        background: var(--gray-50);
    }
    
    .project-table-row td {
        display: block;
        padding: 0;
        border: none;
    }
    
    /* Mobile list layout - Essential info only */
    .title-cell {
        width: 100%;
        margin: 0;
        order: 1;
    }
    
    .title-content {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    .table-project-title {
        font-size: 14px;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .table-project-meta {
        display: none; /* Hide from title cell in mobile */
    }
    
    .university-cell {
        width: 100%;
        margin: 0;
        order: 2;
    }
    
    .university-content {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        justify-content: space-between;
    }
    
    .university-details {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        flex: 1;
    }
    
    .table-university-logo-container {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .university-name {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .university-dept {
        display: none; /* Hide department in mobile list */
    }
    
    /* Timeline display in mobile */
    .timeline-cell {
        display: block;
        width: 100%;
        margin: 0;
        order: 3;
        text-align: center;
    }
    
    .timeline-text {
        font-size: 12px;
        color: var(--text-tertiary);
        font-weight: 500;
    }
    
    /* Hide domains cell in mobile */
    .domains-cell {
        display: none;
    }
    
    /* Contact in mobile - compact button style */
    .contact-cell {
        width: auto;
        margin: 0;
        order: 1; /* Place next to title */
        display: flex;
        align-items: flex-start;
    }
    
    .table-contact-link {
        background: var(--primary);
        color: white;
        padding: 4px 8px;
        border-radius: var(--radius-sm);
        text-decoration: none;
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 2px;
        min-height: 24px;
    }
    
    .table-contact-link:hover {
        background: var(--secondary);
        color: white;
    }
    
    .table-contact-link::before {
        content: "📧";
        font-size: 10px;
    }
    
    /* Mobile list specific styles */
    .project-table-row {
        position: relative;
        padding: 12px 16px;
    }
    
    /* Row structure for mobile */
    .mobile-row-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 6px;
    }
    
    .mobile-row-middle {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        margin-bottom: 4px;
    }
    
    .mobile-row-bottom {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .view-toggle-option span {
        display: none;
    }
    
    .projects-table-container {
        margin: 0 var(--space-3);
        border-radius: var(--radius-md);
    }
    
    .project-table-row {
        padding: var(--space-3);
    }
    
    .table-project-title {
        font-size: var(--text-base);
    }
    
    .table-project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }
}

/* ============ CONSISTENT MODAL STYLES ============ */

/* Consistent Timeline Display - matches compact card style */
.modal-timeline-consistent {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 12px 0;
}

/* Consistent Contact Section - clean and minimal */
.modal-contact-consistent,
.contact-details-consistent {
    margin-top: 16px;
}

.contact-person {
    margin-bottom: 12px;
}

.contact-person strong {
    color: var(--gray-900);
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.contact-department {
    color: var(--gray-600);
    font-size: 13px;
    font-style: italic;
}

.contact-email-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.contact-email-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    text-decoration: none;
}

.contact-email-link::before {
    content: '✉';
    font-size: 12px;
    opacity: 0.7;
}

.contact-email-link:hover::before {
    opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    .modal-timeline-consistent {
        font-size: 14px;
        padding: 10px 16px;
        gap: 6px;
    }
    
    .contact-email-link {
        font-size: 15px;
        padding: 12px 16px;
        justify-content: center;
        width: 100%;
        margin-top: 8px;
    }
}

/* ============ MODAL ACTIONS STYLING ============ */

/* Dashboard Modal Actions */
.modal-actions-dashboard {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
}

/* Admin Modal Actions */
.modal-admin-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.modal-admin-actions h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-admin-actions h4::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* Mobile responsive adjustments for modal actions */
@media (max-width: 767px) {
    .modal-actions-dashboard,
    .modal-admin-actions {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .modal-admin-actions h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
}

/* ============ ORIGINAL MODAL STYLES ============ */

/* Auth Pages Footer */
.auth-hero + footer {
    padding: var(--space-8) var(--space-6);
    background-color: var(--background-secondary);
}

.auth-hero + footer .participating-universities {
    margin: 0 auto;
    padding-top: 0;
    border-top: none;
}

.hero-right-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content-split .participating-universities {
    grid-column: 1 / -1;
}
