/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #00a8e8;
    --accent-color: #003d7a;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

.hero-background::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

/* GIF Background Section */
#about.section {
    position: relative;
    overflow: hidden;
}

.gif-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 1500px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 4rem;
    gap: 0.5rem;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

.gif-title-container {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.gif-title {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .gif-background-container {
        display: none;
    }


    .gif-left-container,
    .gif-right-container {
        max-width: 100%;
    }
}

.hero-title-container {
    flex: 1;
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gif-left-container,
.gif-right-container {
    position: relative;
    width: 80%;
    max-width: 1600px;
    height: 0;
    padding-bottom: 45%; /* 16:9 aspect ratio at 80% width */
    flex-shrink: 0;
}

.gif-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    clip-path: inset(5px 50px 5px 50px); /* Crop 5px top/bottom, 50px left/right */
}

.gif-slide.active {
    opacity: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-alt {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* About Section */
#about.section {
    padding-top: 6rem;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 2rem auto 0;
    position: relative;
    z-index: 1;
}

.about-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    backdrop-filter: blur(2px);
}

.about-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.about-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: background 0.3s ease;
}

.about-card-header:hover {
    background: var(--primary-dark);
}

.about-card-header h3 {
    font-size: 1.5rem;
    margin: 0;
    color: white;
    font-weight: 600;
}

.about-card-toggle {
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
    user-select: none;
}

.about-card.active .about-card-toggle {
    transform: rotate(45deg);
}

.about-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.about-card.active .about-card-content {
    max-height: 2000px;
    padding: 1.5rem;
}

.about-card-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

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

.about-card-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.about-card-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.about-card-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

.focus-areas {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.focus-areas li {
    padding: 1rem;
    background-color: white;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.focus-areas li:hover {
    transform: translateX(5px);
}

/* People Section */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.person-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.person-image {
    margin-bottom: 1.5rem;
}

.person-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.person-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: var(--shadow);
    border: 3px solid white;
}

.person-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.person-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.person-bio {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.person-education {
    color: var(--text-light);
    margin: 1rem 0;
    font-size: 0.8rem;
    line-height: 1.4;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.person-email {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.person-email:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.past-students-card {
    cursor: pointer;
    border: 2px dashed var(--primary-color);
}

.past-students-card:hover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(33, 150, 243, 0.1));
}

.past-students-icon {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow);
    border: 3px solid white;
}

/* Past Students Modal */
.past-students-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.past-students-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.past-students-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.past-students-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.past-students-close-btn:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

.past-students-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-right: 3rem;
}

.past-students-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.past-students-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

.past-students-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.past-student-item {
    padding: 1.25rem 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.past-student-item:hover {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.past-student-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

.past-student-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
}

.past-student-org {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.project-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.project-text {
    flex: 1;
    min-width: 0;
}

.project-text p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-text p:last-child {
    margin-bottom: 0;
}

.project-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-text a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.project-image-container {
    flex-shrink: 0;
    width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
}

.project-gif {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .project-content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .project-image-container {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

.tag {
    padding: 0.4rem 1rem;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Publications Section */
.year-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.year-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.year-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-color: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

.year-select:hover {
    border-color: var(--primary-color);
}

.year-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.publication-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.publication-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
}

.publication-content {
    flex: 1;
}

.publication-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.publication-authors {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.publication-journal {
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

.publication-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.publication-item.hidden {
    display: none;
}

.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.load-more-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* Teaching Section */
.teaching-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
}

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

.course-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.course-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.course-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.course-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.course-term,
.course-credits {
    padding: 0.4rem 1rem;
    background-color: var(--bg-light);
    border-radius: 20px;
    color: var(--text-light);
}

.course-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.course-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* News Section */
.news-content {
    margin-top: 2rem;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background-color: var(--bg-light);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

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

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: 8rem;
}

.contact-item {
    margin-bottom: 2.5rem;
}

.contact-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-details p {
    color: var(--text-light);
    line-height: 1.8;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

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

.social-link {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-logo a {
        font-size: 1.5rem;
    }

    .nav-logo-full {
        display: none;
    }

    .hero {
        height: 30vh;
        min-height: 250px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .gif-carousel-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .hero-title-container {
        order: -1; /* Title appears first on mobile */
    }


    .section-title {
        font-size: 2rem;
    }

    .section {
        padding: 60px 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-right: 2rem;
    }

    .about-cards {
        gap: 1rem;
    }

    .about-card-header {
        padding: 1.25rem;
    }

    .about-card-header h3 {
        font-size: 1.25rem;
    }

    .about-card.active .about-card-content {
        padding: 1.25rem;
    }

    .about-card-content p {
        font-size: 1rem;
    }

    .past-students-modal.active {
        padding: 1rem;
    }

    .past-students-modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
    }

    .past-students-header {
        padding-right: 0;
        margin-bottom: 1.5rem;
    }

    .past-students-header h2 {
        font-size: 1.75rem;
    }

    .past-students-subtitle {
        font-size: 1rem;
    }

    .past-students-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .past-student-item {
        padding: 1rem 1.25rem;
    }

    .past-student-name {
        font-size: 1rem;
    }

    .past-student-title {
        font-size: 0.9rem;
    }

    .past-student-org {
        font-size: 0.85rem;
    }

    .publication-item {
        flex-direction: column;
        gap: 1rem;
    }

    .publication-year {
        min-width: auto;
    }

    .people-grid,
    .projects-grid,
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .focus-areas {
        grid-template-columns: 1fr;
    }
}

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

    .section-title {
        font-size: 1.75rem;
    }
}

/* Critter Corner */
.critter-corner-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.critter-corner-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.critter-corner-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.6);
    background: linear-gradient(135deg, #FF8BB3 0%, #D45A7F 100%);
}

.critter-icon {
    font-size: 1.5rem;
}

.critter-text {
    font-family: 'Inter', sans-serif;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Critter Modal */
.critter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.critter-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.critter-modal-content {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

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

.critter-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #FF6B9D;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.critter-close-btn:hover {
    background: #C44569;
    transform: rotate(90deg);
}

.critter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.critter-header h2 {
    font-size: 2.5rem;
    color: #2E7D32;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.critter-subtitle {
    font-size: 1.3rem;
    color: #388E3C;
    margin: 0;
    font-weight: 500;
}

.critter-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.critter-image-container {
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.critter-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.critter-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.critter-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #FF6B9D;
}

.critter-card h3 {
    font-size: 1.8rem;
    color: #2E7D32;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.critter-card p {
    font-size: 1.1rem;
    color: #424242;
    line-height: 1.6;
    margin: 0;
}

.critter-fun-fact {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 3px dashed #FBC02D;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.critter-fun-fact p {
    font-size: 1.1rem;
    color: #424242;
    line-height: 1.6;
    margin: 0;
}

.critter-fun-fact strong {
    color: #F57F17;
    font-weight: 600;
}

/* Responsive Critter Corner */
@media (max-width: 768px) {
    .critter-corner-btn {
        bottom: 20px;
        right: 20px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .critter-text {
        display: none;
    }

    .critter-modal.active {
        padding: 1rem;
    }

    .critter-modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
    }

    .critter-header h2 {
        font-size: 2rem;
    }

    .critter-subtitle {
        font-size: 1.1rem;
    }

    .critter-card h3 {
        font-size: 1.5rem;
    }

    .critter-card p,
    .critter-fun-fact p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .critter-corner-btn {
        bottom: 15px;
        right: 15px;
        padding: 0.75rem;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        justify-content: center;
    }

    .critter-icon {
        font-size: 1.8rem;
    }

    .critter-modal-content {
        padding: 1.5rem 1rem;
    }

    .critter-header h2 {
        font-size: 1.75rem;
    }
}
