/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
}

/* Prevent horizontal scroll caused by off-canvas elements on mobile */
html, body {
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Garamond', serif;
}

a {
    color: #0077cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
    padding: 0;
}

/* Header */
header {
    background: #fff;
    color: #333;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    justify-content: space-around;
}

.nav-links li {
    padding: 0 1rem;
}

.nav-links a {
    color: #333;
    font-weight: bold;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px;
    transition: all 0.3s ease;
}

/* Main Content */
main {
    width: 80%;
    margin: 2rem auto;
}

section {
    background: #fff;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

section h2 {
    border-bottom: 2px solid #0077cc;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-pic-container {
    flex-shrink: 0;
    text-align: center;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0077cc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.profile-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
    color: #333;
}

.profile-affiliation {
    font-size: 1rem;
    color: #666;
}

.contact-links {
    margin-top: 1rem;
}

.contact-links a {
    font-size: 2rem;
    margin-right: 1rem;
    color: #333;
}

.contact-links a:hover {
    color: #0077cc;
}

/* Research Section */
#research ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

#research ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0077cc;
    font-weight: bold;
}

/* Publications & Projects Section */
.publication-item, .project-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.publication-item:last-child, .project-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.publication-image, .project-image {
    flex: 1;
    max-width: 150px;
}

.publication-image img, .project-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background-color: #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.publication-info, .project-info {
    flex: 3;
}

.publication-info h3, .project-info h3 {
    margin-top: 0;
}

.publication-info p, .project-info p {
    margin: 0.5rem 0;
}

/* Demo Videos Section */
.demo-item {
    margin-bottom: 2rem;
}

.demo-item h3 {
    margin-bottom: 1rem;
}

.video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto; /* center the video container */
    background: #000;
    aspect-ratio: 16 / 9; /* keep 16:9 proportion without padding hack */
    position: relative;
    overflow: hidden;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Video Section */
video {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background: #333;
    color: #fff;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .publication-item, .project-item {
        flex-direction: column;
    }

    .publication-image, .project-image {
        max-width: 100%;
    }

    .publication-image img, .project-image img {
        height: auto;
    }

    main {
        width: 95%;
    }
}

.nav-active {
    transform: translateX(0%);
}

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

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}
