/* ETC Lab Main Stylesheet - Accessible & Illinois Branded
 * Version: 2.0.0
 * Includes: Mobile menu z-index fix, logo styles, social media, alumni gallery
 */

:root {
    /* Illinois Brand Colors */
    --illinois-blue: #13294B;
    --illinois-orange: #FF5F05;
    --illinois-blue-light: #1e3a5f;
    --illinois-orange-light: #ff7f33;

    /* NEW: High-contrast accent colors */
    --laser-blue: #00D4FF;
    --laser-blue-light: #5CE1FF;
    --laser-blue-dark: #00A8CC;
    --electric-blue: #00BFFF;

    /* Gradients */
    --gradient-blue-orange: linear-gradient(135deg, var(--laser-blue), var(--illinois-orange));
    --gradient-header: linear-gradient(90deg, var(--laser-blue), var(--electric-blue));

    /* Neutral Colors */
    --dark: #0a0a0a;
    --dark-elevated: #141414;
    --silver: #c0c0c0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-heavy: rgba(255, 255, 255, 0.08);
    --text: #f0f0f0;
    --text-muted: #a0a0a0;

    /* Accessibility */
    --focus-color: #FFD700;
    --focus-outline: 3px solid var(--focus-color);
}

/* ==========================================================================
   RESET AND BASE STYLES
   ========================================================================== */

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

/* Focus styles for accessibility */
*:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Skip Links */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 99999;
    padding: 1em;
    background: var(--illinois-blue);
    color: white;
    text-decoration: none;
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 1rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    font-size: 18px;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-blue-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* UPDATED: Section titles now use laser blue for visibility */
h2 {
    font-size: 2.5rem;
    color: var(--laser-blue);
}

/* Links - now laser blue for contrast */
a {
    color: var(--laser-blue);
    text-decoration: underline;
}

a:hover {
    color: var(--laser-blue-light);
}

/* ==========================================================================
   HEADER / NAVIGATION - UPDATED WITH LOGO SUPPORT
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10000; /* INCREASED from 1000 */
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Site Branding with Logo */
.site-branding a,
.site-branding-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
    /* "Etched" effect */
    text-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.5),
        -1px -1px 0 rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   PRIMARY NAVIGATION - DESKTOP
   ========================================================================== */

.main-navigation {
    display: flex;
    align-items: center;
}

.primary-menu-container {
    display: block;
}

/* Top-level menu */
.primary-menu-container > ul,
#primary-menu {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
    position: relative;
}

.main-navigation > .primary-menu-container > ul > li > a,
#primary-menu > li > a {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.main-navigation a:hover,
.main-navigation a:focus {
    background: var(--laser-blue);
    color: var(--dark);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
    background: rgba(0, 212, 255, 0.2);
    color: var(--laser-blue);
}

/* Dropdown arrow for items with children */
.main-navigation .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

/* ==========================================================================
   DROPDOWN / SUB-MENUS - DESKTOP
   ========================================================================== */

/* Hide sub-menus by default */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--dark-elevated);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 10001;
}

/* Show sub-menu on hover/focus */
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Sub-menu items */
.main-navigation .sub-menu li {
    margin: 0;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    border-radius: 0;
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus {
    background: var(--laser-blue);
    color: var(--dark);
    padding-left: 1.5rem;
}

/* Nested sub-menus (third level) */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
    border-radius: 8px;
}

/* Arrow for nested sub-menu items */
.main-navigation .sub-menu .menu-item-has-children > a::after {
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    margin-left: auto;
}

/* ==========================================================================
   MENU TOGGLE BUTTON (Mobile)
   ========================================================================== */

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--laser-blue);
    color: var(--laser-blue);
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    width: 44px;
    height: 44px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    z-index: 100000; /* Above the overlay */
    position: relative;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: var(--laser-blue);
    color: var(--dark);
}

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
}

.menu-icon span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

/* Hamburger animation when open */
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   MOBILE NAVIGATION - FULL-SCREEN OVERLAY FIX
   ========================================================================== */

@media (max-width: 900px) {
    /* Show menu toggle */
    .menu-toggle {
        display: flex;
    }

    /* Header sits below the overlay in mobile mode */
    .site-header {
        z-index: 99998;
    }

    /* Mobile menu container - TRUE FULL-SCREEN OVERLAY */
    .primary-menu-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        max-height: 100vh;
        background: var(--dark-elevated);
        z-index: 99999; /* Above everything except skip-link */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 80px 0 2rem 0; /* Account for header height, add bottom padding */
    }

    .primary-menu-container.toggled {
        transform: translateX(0);
    }

    /* Reset desktop flex layout */
    .primary-menu-container > ul,
    #primary-menu {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        min-height: min-content;
    }

    .main-navigation li {
        border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation > .primary-menu-container > ul > li > a,
    #primary-menu > li > a {
        padding: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.1rem;
    }

    /* Mobile sub-menus - NOT absolutely positioned */
    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: auto;
    }

    /* Show sub-menu when parent has .sub-menu-open class */
    .main-navigation .menu-item-has-children.sub-menu-open > .sub-menu {
        max-height: 1000px;
    }

    .main-navigation .sub-menu a {
        padding: 0.75rem 1rem 0.75rem 2rem;
        font-size: 1rem;
    }

    .main-navigation .sub-menu .sub-menu a {
        padding-left: 3rem;
    }

    /* Rotate arrow when open */
    .main-navigation .menu-item-has-children > a::after {
        transition: transform 0.2s ease;
    }

    .main-navigation .menu-item-has-children.sub-menu-open > a::after {
        transform: rotate(180deg);
    }

    /* Nested sub-menus in mobile */
    .main-navigation .sub-menu .sub-menu {
        left: 0;
        margin: 0;
    }

    /* Site branding on mobile */
    .site-title {
        font-size: 0.95rem;
    }

    .site-logo {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   HERO SECTION - WITH LOGO SUPPORT
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

/* Hero Logo */
.hero-logo {
    margin-bottom: 1.5rem;
}

.hero-logo-img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 212, 255, 0.3));
}

.hero-title {
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--illinois-orange);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Illinois-themed liquid background with improved visibility */
.liquid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, transparent 40%, rgba(0, 212, 255, 0.08) 50%, transparent 60%),
        radial-gradient(circle at 80% 20%, transparent 40%, rgba(255, 95, 5, 0.08) 50%, transparent 60%);
    animation: liquidFlow 20s ease-in-out infinite;
}

/* Neural pathway lines with improved visibility */
.neural-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.neural-line {
    position: absolute;
    height: 2px;
    opacity: 0.5;
    filter: blur(0.5px);
}

.neural-line.orange {
    background: linear-gradient(90deg, transparent, var(--illinois-orange), transparent);
    top: 30%;
    width: 150%;
    animation: flowRight 25s linear infinite;
}

.neural-line.blue {
    background: linear-gradient(90deg, transparent, var(--laser-blue), transparent);
    top: 60%;
    width: 180%;
    animation: flowLeft 30s linear infinite;
}

.neural-line.silver {
    background: linear-gradient(90deg, transparent, var(--silver), transparent);
    top: 45%;
    width: 160%;
    animation: flowRight 35s linear infinite;
}

/* ==========================================================================
   BUTTONS - Updated with better contrast
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: inherit;
}

.btn-primary {
    background: var(--gradient-blue-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--laser-blue);
    border: 2px solid var(--laser-blue);
}

.btn-secondary:hover {
    background: var(--laser-blue);
    color: var(--dark);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   GLASS MORPHISM CARDS
   ========================================================================== */

.glass-morph {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 15px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-morph:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
}

/* ==========================================================================
   RESEARCH SECTION - WITH LOGO SUPPORT
   ========================================================================== */

.research-highlights {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

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

.research-card {
    display: flex;
    flex-direction: column;
}

/* Research Project Logo */
.research-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.research-logo-img {
    max-width: 120px;
    height: auto;
    border-radius: 10px;
}

.research-content h3 {
    color: var(--laser-blue);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.research-excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.read-more {
    color: var(--laser-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.read-more:hover {
    color: var(--laser-blue-light);
}

/* ==========================================================================
   TEAM SECTION
   ========================================================================== */

.team-preview {
    padding: 6rem 0;
    background: var(--dark-elevated);
}

.team-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.team-category {
    text-align: center;
    text-decoration: none;
}

.team-category .count {
    display: block;
    font-size: 3rem;
    font-weight: 300;
    color: var(--laser-blue);
    margin-bottom: 0.5rem;
}

.team-category .label {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ==========================================================================
   NEWS SECTION
   ========================================================================== */

.recent-news {
    padding: 6rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card time {
    color: var(--illinois-orange);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-card h3 {
    margin: 0.5rem 0 1rem;
}

.news-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--laser-blue);
}

/* ==========================================================================
   CALL TO ACTION SECTION
   ========================================================================== */

.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--illinois-blue), #0a1628);
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ==========================================================================
   SOCIAL MEDIA SECTION
   ========================================================================== */

.social-media-section {
    padding: 4rem 0;
    background: var(--dark-elevated);
    text-align: center;
}

.social-media-section .section-title {
    margin-bottom: 0.5rem;
}

.social-tagline {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.social-link svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.social-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-link:hover {
    color: var(--laser-blue);
    background: rgba(0, 212, 255, 0.1);
}

.social-link:hover svg {
    transform: scale(1.15);
}

/* Platform-specific colors on hover */
.social-twitter:hover { color: #1DA1F2; }
.social-bluesky:hover { color: #0085FF; }
.social-linkedin:hover { color: #0A66C2; }
.social-youtube:hover { color: #FF0000; }
.social-instagram:hover { color: #E4405F; }
.social-facebook:hover { color: #1877F2; }
.social-github:hover { color: #fff; }
.social-orcid:hover { color: #A6CE39; }

/* ==========================================================================
   ALUMNI GALLERY STYLES
   ========================================================================== */

.etclab-alumni-gallery {
    padding: 2rem 0;
}

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

.etclab-alumni-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.etclab-alumni-photo {
    text-align: center;
    margin-bottom: 1rem;
}

.etclab-alumni-photo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(0, 212, 255, 0.3);
}

.etclab-alumni-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--illinois-blue), #0a1628);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(0, 212, 255, 0.3);
}

.etclab-alumni-placeholder .dashicons {
    font-size: 3rem;
    color: var(--laser-blue);
    opacity: 0.5;
}

.etclab-alumni-info {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.etclab-alumni-name {
    color: var(--laser-blue);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.etclab-alumni-role-badge {
    display: inline-block;
    background: rgba(255, 95, 5, 0.2);
    color: var(--illinois-orange);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.etclab-alumni-position {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.etclab-alumni-position em {
    color: var(--text-muted);
}

.etclab-alumni-program {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.etclab-alumni-thesis {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.etclab-alumni-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--laser-blue);
    text-decoration: none;
    font-weight: 500;
}

.etclab-alumni-link:hover {
    color: var(--laser-blue-light);
}

.etclab-no-alumni {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ==========================================================================
   TOOLS PAGE STYLES
   ========================================================================== */

.tools-page-content {
    padding: 6rem 0;
    min-height: 60vh;
}

.tools-header {
    margin-bottom: 3rem;
}

.tools-intro {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--text-muted);
}

.tools-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--glass);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.tools-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 1rem;
    color: var(--text-muted);
}

.tools-summary strong {
    color: var(--laser-blue);
    font-weight: 600;
}

.tools-separator {
    opacity: 0.3;
}

/* Filter Buttons */
.tools-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--laser-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--laser-blue);
    background: rgba(0, 212, 255, 0.1);
}

.filter-btn.active,
.filter-btn[aria-pressed="true"] {
    background: var(--laser-blue);
    border-color: var(--laser-blue);
    color: var(--dark);
}

/* Search Input */
.tools-search {
    flex: 0 0 auto;
}

.tool-search-input {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.tool-search-input::placeholder {
    color: var(--text-muted);
}

.tool-search-input:focus {
    border-color: var(--laser-blue);
    background: rgba(0, 212, 255, 0.15);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Tool Card */
.tool-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease, opacity 0.3s ease;
}

.tool-card.hidden {
    display: none;
}

.tool-card .tool-image {
    height: 180px;
    overflow: hidden;
    margin: -2rem -2rem 1.5rem -2rem;
}

.tool-card .tool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-image img {
    transform: scale(1.05);
}

.tool-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--illinois-blue), #0a1628);
}

.tool-image-placeholder .dashicons {
    font-size: 3rem;
    color: var(--laser-blue);
    opacity: 0.5;
}

.tool-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tool-title {
    color: var(--laser-blue);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.tool-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-category-tag {
    background: rgba(0, 212, 255, 0.15);
    color: var(--laser-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.tool-excerpt p {
    margin: 0;
}

.tool-link {
    align-self: flex-start;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* No Results Messages */
.no-tools-message,
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-results-message[hidden] {
    display: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--dark);
    color: var(--text-muted);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: var(--laser-blue);
    margin-bottom: 1rem;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--laser-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

/* ==========================================================================
   COOKIE CONSENT OVERRIDES
   ========================================================================== */

[class*="cookie-consent"] [class*="category-title"] + [class*="category-title"],
[class*="cmplz"] label span:empty,
[class*="cookieconsent"] .cc-category span:nth-child(2):not(:last-child),
.cookie-notice-container .cn-text-container span:empty {
    display: none !important;
}

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

@media (max-width: 768px) {
    /* Hero adjustments */
    .hero-title {
        font-size: 2rem;
    }

    .hero-logo-img {
        max-width: 80px;
    }

    /* Grids to single column */
    .research-grid,
    .team-categories,
    .news-grid,
    .tools-grid,
    .etclab-alumni-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Tools controls stack vertically */
    .tools-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .tools-summary {
        justify-content: center;
    }

    .tools-filters {
        justify-content: center;
    }

    .tools-search {
        width: 100%;
    }

    .tool-search-input {
        width: 100%;
    }

    /* Social links */
    .social-links {
        gap: 1rem;
    }

    .social-link {
        min-width: 60px;
        padding: 0.75rem;
    }

    .social-link svg {
        width: 28px;
        height: 28px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .header-inner {
        padding: 0.75rem 1rem;
    }

    .site-title {
        font-size: 0.85rem;
    }

    .site-logo {
        width: 28px;
        height: 28px;
    }

    .hero-content {
        padding: 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

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

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes liquidFlow {
    0%, 100% { transform: rotate(0deg) scale(1); }
    33% { transform: rotate(120deg) scale(1.1); }
    66% { transform: rotate(240deg) scale(0.9); }
}

@keyframes flowRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

@keyframes flowLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   HIGH CONTRAST MODE SUPPORT
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --glass: rgba(255, 255, 255, 0.15);
        --glass-heavy: rgba(255, 255, 255, 0.25);
        --laser-blue: #00E5FF;
    }

    .glass-morph {
        border-width: 2px;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ==========================================================================
   STUDENT GALLERY CSS ADDITIONS (v2.1.0)
   Added for Graduate and Undergraduate Student Galleries
   ========================================================================== */

/* Student Gallery - Inherits from Alumni Gallery via class doubling */
.etclab-student-gallery {
    padding: var(--section-padding, 4rem 1rem);
}

.etclab-student-research,
.etclab-student-advisor,
.etclab-student-timeline {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted, #6c757d);
    margin: 0.5rem 0;
}

.etclab-student-research strong,
.etclab-student-advisor strong {
    color: var(--text-color, #333);
}

.etclab-student-timeline small {
    font-style: italic;
}

/* Different accent colors for grad vs undergrad (optional differentiation) */
.etclab-grad-gallery .etclab-alumni-role-badge {
    background: linear-gradient(135deg, var(--primary-color, #4f46e5) 0%, #7c3aed 100%);
}

.etclab-undergrad-gallery .etclab-alumni-role-badge {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

/* No students found message */
.etclab-no-students {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted, #6c757d);
    font-style: italic;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
}
