* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-weight: 400;
}

/* Top Bar */
.top-bar {
    height: 6px;
    background: linear-gradient(90deg, #ff0000, #ff69b4, #ffff00, #ff69b4, #ff0000);
    background-size: 200% 100%;
    animation: waveFlow 4s ease-in-out infinite;
}

@keyframes waveFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header Styles */
.header {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e9ecef;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 2rem;
}

.logo-left, .logo-right {
    flex: 0 0 auto;
}

.logo-left img, .logo-right img {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.institute-name {
    flex: 1;
    text-align: left;
    padding-left: 1rem;
}

.institute-name h1 {
    font-size: 1.8rem;
    font-weight: 500;
    color: #2c3e50;
    letter-spacing: 0.5px;
    margin: 0;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

/* Navigation */
.navbar {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #1e3c72;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 2rem;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #1e3c72;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(30,60,114,0.1), rgba(42,82,152,0.1));
    color: #1e3c72;
    transform: translateY(-2px);
}

.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-parent:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s ease;
    border: 1px solid rgba(30,60,114,0.1);
    overflow: hidden;
}

.mega-dropdown {
    min-width: 600px;
    display: flex;
    padding: 0.5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.dropdown-column {
    flex: 1;
    padding: 0 1.5rem;
}

.dropdown-column h4 {
    color: #1e3c72;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    padding: 0.4rem 1rem;
    border-bottom: 2px solid #ff69b4;
    background: linear-gradient(90deg, rgba(255,105,180,0.1), transparent);
}

.dropdown-parent:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.4rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
    font-size: 0.85rem;
    border-radius: 4px;
    margin: 0.1rem 0;
}

.dropdown-link:hover {
    background: linear-gradient(90deg, #ff69b4, #1e3c72);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(255,105,180,0.3);
}

/* Main Content */
.main-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: 60vh;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Faculty Directory */
.faculty-directory {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.faculty-member {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
}

.faculty-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.faculty-photo {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.faculty-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: transform 0.3s ease;
    filter: contrast(1.05) brightness(1.02) saturate(1.05);
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.faculty-member:hover .faculty-photo img {
    transform: scale(1.05);
}

.faculty-content {
    padding: 1.5rem;
}

.faculty-content h3 {
    font-size: 1.5rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.position {
    font-size: 1.1rem;
    color: #ff69b4;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.department {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.contact {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact i {
    color: #ff69b4;
    font-size: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.close:hover {
    color: #ff69b4;
    background: white;
    transform: scale(1.1);
}

.modal-faculty-content {
    padding: 3rem;
}

.modal-faculty-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.modal-faculty-photo {
    flex-shrink: 0;
}

.modal-faculty-photo img {
    width: 220px;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-faculty-info h2 {
    font-size: 2rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.modal-faculty-info .position {
    font-size: 1.2rem;
    color: #ff69b4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-faculty-info .department {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.modal-faculty-bio {
    line-height: 1.7;
}

.modal-faculty-bio p {
    margin-bottom: 1.5rem;
    color: #555;
    text-align: justify;
}

.modal-contact {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.modal-contact h4 {
    color: #1e3c72;
    margin-bottom: 1rem;
}

.modal-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #1e3c72;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #1e3c72;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p, .footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

/* Newsletter Form */
.newsletter-form {
    margin-top: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
    margin-bottom: 0.5rem;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-form button {
    width: 100%;
    padding: 0.5rem;
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.newsletter-form button:hover {
    background: #e91e63;
}

/* Visitor Count */
.visitor-count {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.visitor-count h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.visitor-count p {
    font-size: 0.9rem;
}

#visitor-count {
    color: #ff69b4;
    font-weight: 600;
}

/* Newsletter Message */
#newsletter-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

#newsletter-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
    display: block !important;
}

#newsletter-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
    display: block !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
    .footer-bottom {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1002;
        background: white;
        border-radius: 5px;
        padding: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
        flex-direction: column;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
        transition: left 0.3s ease;
        z-index: 1001;
        padding: 1rem 0;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
        color: #333;
        border-bottom: 1px solid #e9ecef;
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .nav-link:hover {
        background: rgba(30,60,114,0.1);
        color: #1e3c72;
        transform: none;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .mega-dropdown {
        flex-direction: column;
        min-width: auto;
        background: transparent;
    }
    
    .dropdown-parent.active .dropdown {
        max-height: 300px;
    }
    
    .dropdown-column h4 {
        color: #1e3c72;
        border-bottom-color: #ff69b4;
        background: rgba(255,105,180,0.1);
        font-size: 0.8rem;
    }
    
    .dropdown-link {
        padding: 0.6rem 1.5rem;
        font-size: 0.8rem;
        color: #555;
    }
    
    .dropdown-link:hover {
        background: rgba(255,105,180,0.2);
        color: #1e3c72;
    }
    
    .faculty-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .faculty-directory {
        padding: 2rem 1rem;
    }
    
    .faculty-photo {
        height: 160px;
    }
    
    .faculty-content {
        padding: 1.5rem;
    }
    
    .modal-faculty-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-faculty-photo img {
        width: 180px;
        height: 220px;
    }
    
    .modal-faculty-content {
        padding: 2rem;
    }
}