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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2.2rem;
    text-align: left;
    margin-bottom: 1rem;
    color: #2c3e50;
    position: relative;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background: #34495e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.btn-secondary:hover {
    background: #2c3e50;
    color: white;
}

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

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #2c3e50;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2c3e50;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2c3e50;
    transition: width 0.3s ease;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    max-width: 1250px;
    margin: 0 auto;
    padding-top: 80px;
}

/* Sticky Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    background: #f8f9fa;
    padding: 2rem 1.5rem;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-name {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.profile-subtitle {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-subtitle p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

/* Main Content */
.main-content {
    background: #fff;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    padding: 2rem;
    background: #fff;
}

.hero-content-wrapper {
    max-width: 1000px;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.highlight {
    color: #2c3e50;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.contact-info-hero {
    text-align: center;
}

.contact-info-hero .contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

.contact-info-hero .contact-item i {
    color: #2c3e50;
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}


.about-content {
    margin: 1.5rem 0 2rem 0;
}

.about-content p {
    margin-bottom: 1rem;
}

/* About Section */
.about {
    padding: 3rem 0;
    background: #fff;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.stat h3 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #666;
    font-weight: 500;
}

/* Simple Section Styling */
.section {
    padding: 1.5rem 0;
    background: white;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.job {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.job:last-child {
    border-bottom: none;
}

.job h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.job h4 {
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1rem;
}

.job p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.job ul {
    list-style: none;
    padding-left: 0;
}

/* Teaching Assistant section list styling */
.project-content ul {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.1rem 0 0 0;
}

.project-content li {
    margin-bottom: 0.3rem;
    line-height: 1.5;
    color: #666;
    font-size: 0.95rem;
}

.ta-intro {
    margin-bottom: 0.2rem !important;
}

.job li {
    color: #666;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
}

.job li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2c3e50;
    font-weight: bold;
}

/* Skills Section */
.skills {
    padding: 3rem 0;
    background: #fff;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: white;
    padding: 1.2rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
}

.skill-category h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-item {
    background: #f8f9fa;
    color: #2c3e50;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

/* Projects Section */
.projects {
    padding: 3rem 0;
    background: #f8f9fa;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 0rem;
    margin-top: -0.2rem;
}

.research-grid {
    display: flex;
    flex-direction: column;
    gap: 0rem;
    margin-top: -0.2rem;
}

.project-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    overflow: visible;
    padding: 0.6rem 0;
}

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


.project-content {
    padding: 0.6rem 1rem;
}

/* Remove padding for research projects to eliminate double padding */
.research-grid .project-content {
    padding: 0;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.8rem 1rem;
    margin-bottom: 0.4rem;
    border-radius: 4px 4px 0 0;
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Make research project headers fill the entire content area */
.research-grid .project-header {
    border-radius: 0;
    margin-bottom: 0;
    padding: 0.4rem 1rem 0.2rem 1rem; /* Much tighter spacing */
    background-color: transparent;
    border-bottom: none;
}

.project-header.collapsed {
    margin-bottom: 0;
    border-radius: 0;
    border-bottom: none;
}


.project-header:hover {
    background-color: #f8f9fa;
}

.project-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.project-preview {
    margin: 0.05rem 0 0 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.0;
}

.paper-link-preview {
    color: #2c3e50;
    text-decoration: none;
    margin-left: 0.5rem;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.paper-link-preview:hover {
    opacity: 1;
    color: #495057;
}

.code-link-inline {
    color: #2c3e50;
    text-decoration: none;
    margin-left: 0.5rem;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.code-link-inline:hover {
    opacity: 1;
    color: #495057;
}

.dropdown-icon {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    color: #2c3e50;
    margin-left: 0.5rem;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    opacity: 0.8;
}

.dropdown-icon.rotated {
    transform: rotate(180deg);
}

.project-details {
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0.4rem 1rem 0.2rem 1rem;
    margin: 0;
}

.research-grid .project-details {
    padding: 0.4rem 1rem 0.2rem 1rem !important;
}

.research-grid .project-details:not(.collapsed) {
    padding: 0.4rem 1rem 0.2rem 1rem !important;
}

.project-details.collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
}

/* Default expanded state for first project only */
.project-details:first-child {
    max-height: none !important;
    overflow: visible !important;
}

.project-content h3 {
    color: #2c3e50;
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
}

.project-content p {
    color: #666;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.project-tech span {
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

/* Project Figures */
.project-figure img, .project-figures img {
    background-color: white;
}

/* Video Styling */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.project-video {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.project-video h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive video */
@media (max-width: 768px) {
    .video-container {
        max-width: 100%;
        margin: 0;
    }
    
    .project-video {
        margin: 1rem 0;
        padding: 0.5rem;
    }
    
    /* Side-by-side layout becomes stacked on mobile */
    .project-details > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .project-details > div[style*="display: flex"] > div {
        flex: none !important;
        width: 100% !important;
    }
}

.project-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
}

.project-link:hover {
    color: #495057;
}

.project-link-disabled {
    color: #6c757d;
    font-weight: 500;
    opacity: 0.7;
    text-decoration: none;
}

/* Publications Section */

.publications-list {
    max-width: 1200px;
    margin: -0.2rem auto 0 auto;
}

.publication-item {
    background: transparent;
    padding: 0.6rem 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    margin-bottom: 0;
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item h3 {
    color: #2c3e50;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.publication-item .authors {
    color: #666;
    margin-bottom: 0.2rem;
    font-style: italic;
    font-size: 0.9rem;
}

.publication-item .venue {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.venue-inline {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.publication-header h3 {
    margin: 0;
    flex: 1;
}

.venue-right {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.publication-item .description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.publication-links .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Contact Section */
.contact {
    padding: 3rem 0;
    background: #f8f9fa;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
}

.contact-items {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #666;
}

.contact-item i {
    color: #2c3e50;
    margin-right: 1rem;
    width: 20px;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #2c3e50;
    color: white;
    border-radius: 50%;
    text-decoration: none;
}

.social-link:hover {
    background: #495057;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    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: #2c3e50;
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding-top: 60px;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

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

    .hero {
        padding: 1.5rem;
    }

    .section {
        padding: 1.5rem;
    }

    .profile-placeholder {
        width: 200px;
        height: 200px;
        font-size: 4rem;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 2rem 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* Simplified design without complex animations */
