/* faculty-profile.css - Updated Faculty Profile Page Styles with Base-Aligned Columns */

/* Faculty Profile Section */
.faculty-profile-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

/* Container now uses flex-end alignment to align both columns to their base */
.faculty-profile-container {
    display: flex;
    align-items: flex-end; /* This aligns both columns to their bottom/base */
    gap: 4rem;
    margin-bottom: 2rem;
}

/* Faculty info column - now with dynamic height and proper hairline spacing */
.faculty-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative; /* For positioning the hairline at the base */
    padding-bottom: 20px; /* Creates the 20px spacer above the hairline */
}

/* Hairline positioned at the very bottom of the left column with proper spacing */
.faculty-info::after {
    content: '';
    position: absolute;
    bottom: 0; /* Sits at the absolute bottom of the column */
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.faculty-name {
    font-size: 2rem;
    font-weight: 600;
    color: #862C91;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Credentials container grows naturally and respects the 20px bottom padding */
.faculty-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1; /* Allows content to expand while maintaining bottom alignment */
}

.credential-item {
    font-size: 1rem;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

.credential-item.primary {
    color: #862C91;
    font-weight: 600;
}

.credential-item.contact {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Photo column - aligned to base and standardized at 270 x 180px */
.faculty-photo {
    flex: 0 0 270px; /* Fixed width, allows height to be natural */
    width: 270px;
    height: 180px;
    align-self: flex-end; /* Ensures photo sits at the bottom of its column */
}

.faculty-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hide the original separator since we're using the refined pseudo-element approach */
.profile-separator {
    display: none;
}

/* Biography Section - CENTER ALIGNED FROM HERE ONWARDS */
.biography-section {
    padding: 4rem 0;
    background-color: #ffffff;
    text-align: center; /* Center align biography section */
}

.biography-text {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
    color: #4b5563;
    font-size: 1.05rem;
}

.biography-text p {
    margin-bottom: 0;
    text-align: center; /* Center align biography paragraphs */
}

/* Teaching & Research Interests Sections - CENTER ALIGNED */
.teaching-interests-section,
.research-interests-section {
    padding: 4rem 0;
    background-color: #ffffff;
    text-align: center; /* Center align interests sections */
}

.interests-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.interest-box {
    background-color: #fff;
    border: 1px solid #862C91;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    text-align: center;
    color: #862C91;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
}

.interest-box:hover {
    background-color: #862C91;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 60, 114, 0.2);
}

/* Publications Section - CENTER ALIGNED */
.publications-section {
    padding: 4rem 0;
    background-color: #ffffff;
    text-align: center; /* Center align publications section */
}

.publications-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.publication-item {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
}

.publication-separator {
    text-align: center;
    color: #ccc;
    margin: 1rem 0;
    font-size: 1rem;
    font-weight: 300;
}

/* Awards Section - CENTER ALIGNED */
.awards-section {
    padding: 4rem 0;
    background-color: #ffffff;
    text-align: center; /* Center align awards section */
}

.awards-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.award-item {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.award-icon {
    font-size: 1.2rem;
}

.award-text {
    text-align: center;
}

/* Affiliations Section - CENTER ALIGNED */
.affiliations-section {
    padding: 4rem 0;
    background-color: #ffffff;
    text-align: center; /* Center align affiliations section */
}

.affiliations-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.affiliation-item {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.affiliation-icon {
    font-size: 1.2rem;
}

.affiliation-text {
    text-align: center;
}

/* Back Navigation Section - CENTER ALIGNED */
.back-navigation-section {
    padding: 2rem 0;
    background-color: #ffffff;
    text-align: center; /* Center align back navigation */
}

.back-navigation {
    text-align: center;
}

/* Banner */
.faculty-banner {
    margin-bottom: 0;
}

.faculty-banner img {
    max-height: 400px;
}

/* Section Titles - CENTER ALIGNED FROM BIOGRAPHY ONWARDS */
.biography-section .section-title,
.teaching-interests-section .section-title,
.research-interests-section .section-title,
.publications-section .section-title,
.awards-section .section-title,
.affiliations-section .section-title,
.back-navigation-section .section-title {
    text-align: center;
}

/* Responsive Design - Tablet and larger screens maintain base alignment */
@media (max-width: 1024px) {
    .faculty-profile-container {
        gap: 3rem;
    }
    
    /* Maintain the base-aligned layout with proper spacing */
    .faculty-info {
        padding-bottom: 20px; /* Keep the 20px spacer */
    }
    
    /* Photo remains standardized */
    .faculty-photo {
        flex: 0 0 270px;
        width: 270px;
        height: 180px;
    }
    
    .faculty-name {
        font-size: 1.8rem;
    }
    
    .interests-container {
        gap: 0.8rem;
    }
    
    .interest-box {
        font-size: 0.9rem;
        padding: 0.7rem 1.3rem;
    }
    
    /* Maintain center alignment for all sections from biography onwards */
    .biography-section,
    .teaching-interests-section,
    .research-interests-section,
    .publications-section,
    .awards-section,
    .affiliations-section,
    .back-navigation-section {
        text-align: center;
    }
    
    .biography-text,
    .publications-content,
    .awards-content,
    .affiliations-content,
    .back-navigation {
        text-align: center;
    }
}

/* Mobile Layout - Stacked and centered approach */
@media (max-width: 768px) {
    .faculty-profile-section {
        padding: 3rem 0;
    }
    
    /* Switch to stacked mobile layout with centered alignment */
    .faculty-profile-container {
        flex-direction: column;
        align-items: center; /* Center both columns in mobile stack */
        gap: 2rem;
        text-align: center;
    }
    
    /* Left column adapted for mobile - centered content */
    .faculty-info {
        order: 2;
        text-align: center;
        align-items: center;
        padding-bottom: 0; /* Remove bottom padding in mobile layout */
    }
    
    /* Remove hairline in mobile since layout changes to stacked */
    .faculty-info::after {
        display: none;
    }
    
    /* Photo positioned above content in mobile */
    .faculty-photo {
        order: 1;
        flex: none;
        width: 270px;
        height: 180px;
        margin: 0 auto;
        align-self: center; /* Center the photo in mobile layout */
    }
    
    .faculty-name {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .faculty-credentials {
        align-items: center;
        text-align: center;
        flex-grow: 0; /* Reset flex-grow for mobile stacked layout */
    }
    
    .credential-item {
        text-align: center;
    }
    
    .section-title {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .biography-text {
        text-align: center; /* Keep center alignment for biography on mobile */
        padding: 0 1rem;
    }
    
    .interests-container {
        gap: 0.75rem;
        padding: 0 1rem;
    }
    
    .interest-box {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
        min-height: 40px;
    }
    
    .publications-content {
        padding: 0 1rem;
        text-align: center;
    }
    
    .publication-item {
        font-size: 0.9rem;
        text-align: center; /* Keep center alignment for publications on mobile */
    }
    
    .teaching-interests-section,
    .research-interests-section,
    .publications-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    /* Maintain center alignment for all new sections */
    .awards-section,
    .affiliations-section,
    .back-navigation-section {
        text-align: center;
    }
    
    .awards-content,
    .affiliations-content,
    .back-navigation {
        text-align: center;
    }
}

/* Small mobile screens - optimized for narrow viewports */
@media (max-width: 576px) {
    .faculty-profile-section {
        padding: 2.5rem 0;
    }
    
    /* Maintain standardized photo size even on small screens */
    .faculty-photo {
        width: 270px;
        height: 180px;
    }
    
    .faculty-name {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .faculty-credentials {
        text-align: center;
    }
    
    .credential-item {
        text-align: center;
    }
    
    .section-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    /* Interest boxes stack vertically on very small screens */
    .interests-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .interest-box {
        width: 100%;
        max-width: 300px;
        white-space: normal;
        text-align: center;
        padding: 0.8rem 1rem;
        min-height: 50px;
    }
    
    .biography-text {
        font-size: 1rem;
        text-align: center;
    }
    
    .publication-item {
        font-size: 0.85rem;
        line-height: 1.5;
        text-align: center;
    }
    
    .teaching-interests-section,
    .research-interests-section,
    .biography-section,
    .publications-section,
    .awards-section,
    .affiliations-section,
    .back-navigation-section {
        padding: 2.5rem 0;
        text-align: center;
    }
}

/* Extra small screens - final optimization for very narrow displays */
@media (max-width: 480px) {
    .faculty-profile-container {
        gap: 1.5rem;
    }
    
    /* Even on the smallest screens, maintain photo consistency */
    .faculty-photo {
        width: 270px;
        height: 180px;
    }
    
    .faculty-name {
        font-size: 1.35rem;
        text-align: center;
    }
    
    .credential-item {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.35rem;
        text-align: center;
    }
    
    .biography-text {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        text-align: center;
    }
    
    .interest-box {
        font-size: 0.8rem;
        padding: 0.7rem 0.8rem;
    }
    
    .publication-item {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .publications-content {
        padding: 0 0.5rem;
        text-align: center;
    }
    
    /* Ensure all sections from biography onwards remain center aligned */
    .awards-content,
    .affiliations-content,
    .back-navigation {
        text-align: center;
    }
}