/* Reset some default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
    display: block;
}

nav ul li a:hover {
    background-color: #555;
}

main {
    padding: 2rem;
    flex: 1;
    padding-bottom: 6rem; /* Space for footer */
}

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

h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

p {
    margin-bottom: 1rem;
}

/* Links styling */
a {
    color: #0066cc;
    transition: color 0.3s;
}

a:hover {
    color: #004499;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: bold;
}

input, textarea {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #555;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Make links in header and footer white */
header a, footer a {
    color: #fff;
    text-decoration: none;
}

header a:hover, footer a:hover {
    text-decoration: underline;
}

/* Container and column for home page layout */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

.column {
    flex: 1;
    padding: 20px;
    text-align: center;
}

.column img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 5px;
}

.column p {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Publications list styling */
ul.publications-list,
ul.preprints-list {
    list-style: none;
    padding: 0;
}

ul.publications-list li,
ul.preprints-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

ul.publications-list li:last-child,
ul.preprints-list li:last-child {
    border-bottom: none;
}

.authors {
    color: #555;
}

.title {
    font-weight: 600;
    color: #0066cc;
}

.venue {
    font-style: italic;
}

/* Publication image styling */
.publication-image {
    max-height: 150px;
    margin: 1rem 0 0 0;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.publication-image img {
    width: auto;
    height: 150px;
    display: block;
}

.publication-image figcaption {
    padding: 0.75rem;
    font-size: 0.85em;
    color: #666;
    background-color: #f9f9f9;
}


/* Talks list styling */
.talks-note {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1rem;
}

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

ul.talks-list li {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

ul.talks-list li:last-child {
    border-bottom: none;
}

.invited-indicator {
    color: #0066cc;
    font-weight: bold;
    min-width: 15px;
    flex-shrink: 0;
    text-align: center;
}

.talk-date {
    font-weight: 600;
    color: #333;
    min-width: 140px;
    flex-shrink: 0;
}

.talk-title {
    color: #555;
    line-height: 1.4;
}



/* Software list styling */
ul.software-list {
    list-style: none;
    padding: 0;
}

ul.software-list li {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #0066cc;
}

.software-title {
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
    margin-bottom: 0.5rem;
}

.software-description {
    margin: 0.5rem 0;
    color: #666;
}

/* Image gallery styling */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.image-gallery figure {
    margin: 0;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-gallery figure:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.image-gallery figcaption {
    padding: 1rem;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    background-color: #f9f9f9;
}

/* Single image styling */
figure.single-image {
    max-width: 600px;
    margin: 1.5rem auto;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

figure.single-image img {
    width: 100%;
    height: auto;
    display: block;
}

figure.single-image figcaption {
    padding: 1rem;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    background-color: #f9f9f9;
}

/* Research visual specific styling */
.research-visual {
    margin: 2rem 0;
}

.research-visual h3 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 1rem;
}

/* Software screenshots styling */
.software-screenshot {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.5rem;
    background-color: #f9f9f9;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Hide menu by default on mobile */
    nav .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: #333;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 4rem;
        gap: 0;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    }
    
    /* Show menu when active */
    nav .nav-menu.active {
        right: 0;
    }
    
    nav .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #444;
    }
    
    nav .nav-menu li a {
        padding: 1rem 1.5rem;
        width: 100%;
        transition: background-color 0.3s;
    }
    
    nav .nav-menu li a:hover {
        background-color: #555;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    .column img {
        max-height: 300px;
    }
    
    main {
        padding: 1rem;
    }
    
    section {
        padding: 1rem;
    }
    
    ul.talks-list li {
        flex-wrap: wrap;
    }
    
    .invited-indicator {
        min-width: 15px;
    }
    
    .talk-date {
        min-width: 110px;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    figure.single-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    nav ul li a {
        font-size: 0.9em;
    }

    .talk-date {
        min-width: 100px;
    }
}

/* Interactive Gallery */
.image-gallery.interactive .gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-gallery.interactive .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 102, 204, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.image-gallery.interactive .gallery-overlay span {
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.image-gallery.interactive .gallery-item:hover .gallery-overlay {
    background: rgba(0, 102, 204, 0.7);
}

.image-gallery.interactive .gallery-item:hover .gallery-overlay span {
    opacity: 1;
    transform: translateY(0);
}

.image-gallery.interactive .gallery-item:hover img {
    transform: scale(1.05);
}

.image-gallery.interactive .gallery-item img {
    transition: transform 0.3s ease;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 2001;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-content {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox-info {
    text-align: center;
    color: white;
    max-width: 700px;
}

.lightbox-info h3 {
    font-size: 1.5em;
    margin-bottom: 0.75rem;
    color: #fff;
}

.lightbox-info p {
    font-size: 1em;
    line-height: 1.6;
    color: #ccc;
}

/* New Publication Banner */
.new-publications-banner {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.new-publications-banner h3 {
    font-size: 1.1em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-publications-banner h3::before {
    content: "★";
    color: #ffd700;
}

.new-publications-banner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.new-publications-banner li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.new-publications-banner li:last-child {
    border-bottom: none;
}

.new-publications-banner a {
    color: white;
    text-decoration: underline;
}

.new-publications-banner a:hover {
    color: #ffd700;
}

.new-publications-banner .pub-date {
    font-size: 0.85em;
    opacity: 0.8;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .lightbox {
        padding: 1rem;
    }

    .lightbox-content img {
        max-height: 50vh;
    }

    .lightbox-info h3 {
        font-size: 1.2em;
    }

    .lightbox-info p {
        font-size: 0.9em;
    }
}