.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Define custom keyframe animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Animation classes (to be applied by JS) */
.fade-in { animation: fadeIn 1s ease-in-out; }
.slide-up { animation: slideUp 1s ease-out; }

/* Intersection Observer animation classes */
.section, .animate, .animate-slide-left, .animate-slide-right {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate.visible {
    opacity: 1;
    animation: scaleUp 0.8s ease-out forwards;
}

.animate-slide-left.visible {
    opacity: 1;
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right.visible {
    opacity: 1;
    animation: slideInRight 0.8s ease-out forwards;
}

.section.visible {
     opacity: 1;
}

/* Staggered Animation for Cards (optional, but nice) */
.research-card:nth-child(1) { animation-delay: 0.1s; }
.research-card:nth-child(2) { animation-delay: 0.2s; }
.research-card:nth-child(3) { animation-delay: 0.3s; }
.research-card:nth-child(4) { animation-delay: 0.4s; }
.research-card:nth-child(5) { animation-delay: 0.5s; }
.research-card:nth-child(6) { animation-delay: 0.6s; }

.instrument-card:nth-child(1) { animation-delay: 0.1s; }
.instrument-card:nth-child(2) { animation-delay: 0.2s; }
.instrument-card:nth-child(3) { animation-delay: 0.3s; }
.instrument-card:nth-child(4) { animation-delay: 0.4s; }

.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.2s; }
.team-card:nth-child(3) { animation-delay: 0.3s; }
.team-card:nth-child(4) { animation-delay: 0.4s; }
.team-card:nth-child(5) { animation-delay: 0.5s; }

/* Custom styling for modal tabs */
.tab-link.active {
    background-color: #d92842; /* --accent color */
    color: white;
}

.publication-list {
    padding-left: 1.25rem; /* pl-5 */
    list-style-type: decimal;
}

.publication-list li {
    margin-bottom: 0.75rem; /* mb-3 */
    line-height: 1.6; /* leading-relaxed */
}