/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: #333; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* Animated Molecular Background */
.particles-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: linear-gradient(135deg, #0c0c1a 0%, #1a1a3e 50%, #2a1a4e 100%);
    opacity: 0.3;
}
.particles-bg::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120,219,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,120,150,0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120,255,120,0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0) rotate(0);} 50%{transform:translateY(-20px) rotate(180deg);} }

/* Navbar */
.navbar { background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: #007bff; }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-menu a { text-decoration: none; color: #333; font-weight: 500; transition: color 0.3s; }
.nav-menu a:hover { color: #007bff; }

/* Hero & Metrics */
#hero { text-align: center; padding: 4rem 2rem; position: relative; }
.profile-img { width: 200px; height: 200px; border-radius: 50%; border: 5px solid #007bff; box-shadow: 0 20px 40px rgba(0,123,255,0.3); margin-bottom: 2rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 20px 40px rgba(0,123,255,0.3);} 50%{box-shadow:0 30px 60px rgba(0,123,255,0.5);} }
.hero-text h1 { font-size: 3rem; background: linear-gradient(45deg, #007bff, #00d4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; }
.subtitle { font-size: 1.2rem; color: #666; }

.metrics-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin: 4rem 0; }
.metric-card { 
    background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); padding: 2rem; border-radius: 20px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
}
.metric-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(0,123,255,0.1) 0%, transparent 70%); transition: all 0.4s; }
.metric-card:hover { transform: translateY(-20px) scale(1.05); box-shadow: 0 30px 60px rgba(0,0,0,0.2); }
.metric-card:hover::before { transform: rotate(180deg); }
.metric-card i { font-size: 2.5rem; color: #007bff; margin-bottom: 1rem; }
.metric-value { font-size: 2.5rem; font-weight: 700; color: #007bff; margin-bottom: 0.5rem; }
.metric-label { font-size: 1rem; color: #666; }

.scholar-badge { margin: 2rem 0; opacity: 0.9; }

/* Cards & Sections */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin: 3rem 0; }
.card { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); padding: 2rem; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: transform 0.3s; }
.card:hover { transform: translateY(-10px); }

/* Forms */
.contact-form { max-width: 600px; margin: 2rem auto; display: grid; gap: 1rem; }
.contact-form input, .contact-form textarea { padding: 1rem; border: 2px solid #e9ecef; border-radius: 12px; font-size: 1rem; transition: border-color 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #007bff; }
.contact-form button { padding: 1rem 2rem; background: linear-gradient(45deg, #007bff, #00d4ff); color: white; border: none; border-radius: 12px; font-weight: 600; cursor: pointer; transition: transform 0.3s; }
.contact-form button:hover { transform: scale(1.05); }

/* Responsive */
/* === PERFECT MOBILE GIF SIZING === */
@media (max-width: 1024px) {
    .md-animation { 
        width: 250px; 
        height: 250px; 
        top: 8%; 
        right: 8%; 
    }
}

@media (max-width: 768px) {
    .md-animation { 
        width: 100px; 
        height: 100px; 
        top: 1%; 
        right: 1%; 
        opacity: 0.3; /* Lighter on mobile */
    }
}

@media (max-width: 480px) {
    .md-animation { 
        width: 140px; 
        height: 140px; 
        top: 2%; 
        right: 2%; 
        opacity: 0.25; /* Very light */
    }
}

@media (max-width: 360px) {
    .md-animation { 
        display: none; /* Hide completely on tiny screens */
    }
}


/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
section { animation: fadeInUp 0.8s ease-out; }

#research {
    background: 
        #linear-gradient(rgba(0,123,255,0.8), rgba(0,12,26,0.9)),
        url("images/SBVS.jpg") center/cover; /* Upload your image */
    color: black;
}

/* Instruments Grid */
.instruments-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin: 4rem 0;
}

.instrument-card {
    background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15); overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 4px solid #007bff;
}
.instrument-card:hover {
    transform: translateY(-15px) scale(1.02); box-shadow: 0 40px 80px rgba(0,0,0,0.25);
}

.instrument-image {
    position: relative; height: 250px; overflow: hidden;
}
.instrument-image img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s;
}
.instrument-card:hover .instrument-image img { transform: scale(1.1); }
.image-overlay {
    position: absolute; bottom: 1rem; right: 1rem; background: rgba(0,123,255,0.9);
    color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.2rem; opacity: 0; transition: opacity 0.3s;
}
.instrument-card:hover .image-overlay { opacity: 1; }

.instrument-card h3 { padding: 1.5rem 1.5rem 1rem; font-size: 1.4rem; color: #333; margin: 0; }
.model, .doi { padding: 0 1.5rem; font-size: 0.95rem; margin-bottom: 0.5rem; }
.doi a { color: #007bff; text-decoration: none; }
.doi a:hover { text-decoration: underline; }

.usage-box {
    padding: 1.5rem; background: linear-gradient(135deg, #f8f9ff 0%, #e8f4ff 100%);
    border-top: 1px solid #dee2e6;
}
.usage-box label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: #555; }
.usage-box textarea {
    width: 100%; min-height: 100px; border: 2px solid #e9ecef; border-radius: 12px;
    padding: 0.75rem; font-family: inherit; resize: vertical; background: white;
    transition: border-color 0.3s;
}
.usage-box textarea:focus { border-color: #007bff; outline: none; }

.request-form { max-width: 700px; margin: 4rem auto; background: rgba(255,255,255,0.95); padding: 3rem; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.request-form h2 { text-align: center; margin-bottom: 2rem; color: #333; }
.request-form > * { display: block; width: 100%; margin-bottom: 1.5rem; padding: 1rem; border: 2px solid #e9ecef; border-radius: 12px; font-size: 1rem; }
.request-form button { background: linear-gradient(45deg, #007bff, #00d4ff); color: white; border: none; font-weight: 600; cursor: pointer; transition: transform 0.3s; }
.request-form button:hover { transform: scale(1.05); }

.subpage-hero {
    text-align: center; padding: 6rem 2rem 4rem; color: black; position: relative;
}
.subpage-hero h1 { font-size: 3rem; margin-bottom: 1rem; }


.particles-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%; 
    z-index: -1;
    
    /* Existing gradient + NEW protein-ligand image */
    background: 
        /* Faded protein-ligand complex (upload protein-ligand-bg.jpg to repo) */
        url('images/LBVS.jpg') center / cover,
        /* Existing molecular gradient */
        linear-gradient(135deg, #0c0c1a 0%, #1a1a3e 50%, #2a1a4e 100%),
        /* Existing particles */
        radial-gradient(circle at 20% 80%, rgba(120,219,255,0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,120,150,0.2) 0%, transparent 50%);
    
    opacity: 0.4; /* Fade effect */
    
    /* Enhanced rotation animation */
    animation: rotateProteinComplex 45s linear infinite;
}

@keyframes rotateProteinComplex {
    0% { 
        transform: rotate(0deg) scale(1); 
        filter: hue-rotate(0deg) brightness(1);
    }
    25% { 
        transform: rotate(90deg) scale(1.05); 
        filter: hue-rotate(90deg) brightness(1.1);
    }
    50% { 
        transform: rotate(180deg) scale(1.1); 
        filter: hue-rotate(180deg) brightness(0.9);
    }
    75% { 
        transform: rotate(270deg) scale(1.05); 
        filter: hue-rotate(270deg) brightness(1.1);
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        filter: hue-rotate(360deg) brightness(1);
    }
}

.particles-bg-lab {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%; 
    z-index: -1;
    
    /* Existing gradient + NEW protein-ligand image */
    background: 
        /* Faded protein-ligand complex (upload protein-ligand-bg.jpg to repo) */
        url('images/SBVS.jpg') center / cover,
        /* Existing molecular gradient */
        linear-gradient(135deg, #0c0c1a 0%, #1a1a3e 50%, #2a1a4e 100%),
        /* Existing particles */
        radial-gradient(circle at 20% 80%, rgba(120,219,255,0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,120,150,0.2) 0%, transparent 50%);
    
    opacity: 0.4; /* Fade effect */
    
    /* Enhanced rotation animation */
    animation: rotateProteinComplex 45s linear infinite;
}

@keyframes rotateProteinComplex {
    0% { 
        transform: rotate(0deg) scale(1); 
        filter: hue-rotate(0deg) brightness(1);
    }
    25% { 
        transform: rotate(90deg) scale(1.05); 
        filter: hue-rotate(90deg) brightness(1.1);
    }
    50% { 
        transform: rotate(180deg) scale(1.1); 
        filter: hue-rotate(180deg) brightness(0.9);
    }
    75% { 
        transform: rotate(270deg) scale(1.05); 
        filter: hue-rotate(270deg) brightness(1.1);
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        filter: hue-rotate(360deg) brightness(1);
    }
}
/* === MOBILE NAVBAR FIX - ADD AT BOTTOM === */

/* Hide desktop menu on mobile */
@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Hide links */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        border-radius: 0 0 20px 20px;
    }
    
    /* Show mobile menu when active */
    .nav-menu.active {
        display: flex;
    }
    
    /* Hamburger menu - SHOW ON MOBILE */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        width: 30px;
        height: 25px;
        cursor: pointer;
        gap: 4px;
    }
    
    .hamburger span {
        width: 100%;
        height: 4px;
        background: #007bff;
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    /* Navbar container fix */
    .nav-container {
        padding: 1rem;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }
    .logo {
        font-size: 1.3rem;
    }
}



/* What's New Section Styling */
.whats-new-container {
    
    margin-top: 10px; /* Adjust this: Navbar height (e.g., 60px) + Gap (20px) */background: #f8f9fa; /* Light background to stand out */
    border-bottom: 2px solid #007bff; /* Accent color matching your theme */
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 40px;
    font-family: 'Inter', sans-serif;
}

.whats-new-label {
    background: #007bff;
    color: white;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 600;
    z-index: 2; /* Keeps label above the moving text */
    white-space: nowrap;
}

.marquee-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #fff;
    height: 100%;
    display: flex;
    align-items: center;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    position: absolute;
    animation: marquee 25s linear infinite;
}

/* Individual links styling */
.marquee-content a {
    color: #333;
    text-decoration: none;
    margin-right: 50px; /* Space between links */
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.marquee-content a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Pause animation on hover so users can click easily */
.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

/* The movement logic */
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}


