/* ==========================================================================
   Faculty Profile Specific Styles (Premium Soft Theme)
   ========================================================================== */

.profile-section {
    padding: 80px 0 0 0; 
    background-color: var(--secondary-maroon-ultra-light); 
    overflow-x: hidden;
    color: var(--charcoal);
}

/* Elegant Page Header */
.faculty-header {
    background: linear-gradient(135deg, var(--secondary-maroon) 0%, var(--secondary-maroon-dark) 100%);
    color: var(--accent-gold-light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 2px solid var(--accent-gold);
}

.faculty-header .static-title {
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 5px;
    color: var(--accent-gold);
    animation: fadeInDown 0.8s ease-out;
}

.faculty-header .dynamic-name {
    font-size: 3.5rem;
    font-family: var(--font-primary);
    margin-bottom: 10px;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--accent-gold-light), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Main Container */
.profile-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: var(--primary-teal-ultra-light);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--primary-teal-light);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--primary-teal);
    transition: all var(--transition-normal);
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

.profile-container:hover {
    box-shadow: var(--shadow-xl);
}

/* Decorative Background Glow */
.profile-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-teal-light) 0%, transparent 70%);
    opacity: 0.8;
    border-radius: 50%;
    z-index: 0;
}

.profile-left, .profile-right {
    z-index: 1; /* Keep content above background glow */
}

.profile-left {
    flex: 1;
    min-width: 300px;
    text-align: center;
    border-right: 2px solid var(--primary-teal-light);
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fitting Photo Properly with Animations */
.img-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    margin-bottom: 30px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--secondary-maroon), var(--accent-gold));
    animation: pulseBorder 4s infinite alternate;
    box-shadow: var(--shadow-md);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.img-wrapper:hover {
    transform: scale(1.05) rotate(2deg);
}

.profile-left img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top;
    border-radius: 50%;
    border: 4px solid var(--primary-teal-light);
    background-color: var(--primary-teal-light);
}

.profile-left h2 {
    color: var(--charcoal);
    margin-bottom: 5px;
    font-size: 2.2rem;
    font-family: var(--font-primary);
    font-weight: 700;
}

.profile-left h3 {
    color: var(--gray);
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.department-tag {
    background-color: var(--primary-teal);
    color: var(--accent-gold-light);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.profile-right {
    flex: 2;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    align-content: flex-start;
}

/* Colorful Info Groups */
.info-group {
    background-color: var(--secondary-maroon-ultra-light); 
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-maroon);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--secondary-maroon-light);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered animation delays for info blocks */
.info-group:nth-child(1) { animation-delay: 0.5s; }
.info-group:nth-child(2) { animation-delay: 0.6s; }
.info-group:nth-child(3) { animation-delay: 0.7s; }
.info-group:nth-child(4) { animation-delay: 0.8s; }
.info-group:nth-child(5) { animation-delay: 0.9s; }
.info-group:nth-child(6) { animation-delay: 1.0s; }
.info-group:nth-child(n+7) { animation-delay: 1.1s; }

.info-group:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-md);
    background-color: var(--primary-teal-ultra-light);
}

.info-group.full-width {
    grid-column: 1 / -1; 
}

.info-group h4 {
    color: var(--secondary-maroon);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-group h4 i {
    color: var(--primary-teal);
    transition: transform 0.3s ease;
}

.info-group:hover h4 i {
    transform: scale(1.2) rotate(10deg);
}

.info-group p {
    color: var(--dark-gray);
    line-height: 1.7;
    margin: 0;
    font-size: 1.05rem;
}

/* Bulleted Lists for Arrays */
.list-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list-section li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--charcoal);
    transition: transform 0.2s ease, color 0.2s ease;
}

.list-section li:hover {
    transform: translateX(5px);
    color: var(--primary-teal-dark);
}

.list-section li::before {
    content: '▹';
    color: var(--accent-gold-dark);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

.list-section li:last-child {
    margin-bottom: 0;
}

/* Default Hidden States (Managed by Javascript) */
#profile-container,
.list-section,
#default-empty-message {
    display: none;
}

/* Empty Profile Message Styling */
#default-empty-message {
    text-align: center;
    padding: 40px;
}

#default-empty-message .empty-icon {
    font-size: 3rem;
    color: var(--primary-teal);
    margin-bottom: 15px;
}

#default-empty-message .empty-title {
    justify-content: center;
    color: var(--charcoal);
}

.contact-link {
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.contact-link:hover {
    opacity: 0.7;
}

.contact-link p {
    color: var(--primary-teal);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.3s ease;
}

.contact-link:hover p {
    text-decoration-color: var(--primary-teal);
}

/* Fix for footer wave style divider color matching the new background */
#footer .custom-shape-divider-top .shape-fill {
    fill: var(--secondary-maroon-ultra-light);
}

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(139, 26, 50, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(139, 26, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 26, 50, 0); }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .profile-container {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .profile-section {
        padding: 40px 0 0 0;
    }
    
    .profile-container {
        flex-direction: column;
        padding: 30px 20px;
        margin: 0 10px 40px 10px;
        gap: 25px;
    }

    .profile-left, .profile-right {
        width: 100%;
        min-width: 0;
    }

    .profile-left {
        border-right: none;
        border-bottom: 2px solid var(--primary-teal-light);
        padding-right: 0;
        padding-bottom: 30px;
    }

    .img-wrapper {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }

    .profile-left h2 {
        font-size: 1.8rem;
    }

    .faculty-header .dynamic-name {
        font-size: 2rem;
    }

    .profile-right {
        grid-template-columns: 1fr; /* Stack vertically on small screens */
    }
    
    .info-group {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .faculty-header .static-title {
        font-size: 1.2rem;
    }
    
    .faculty-header .dynamic-name {
        font-size: 1.6rem;
    }
    
    .img-wrapper {
        width: 160px;
        height: 160px;
    }
}
