/* about.css - Complete File */

/* Page Hero */

/* Mission Section - SIDE BY SIDE LAYOUT */
.mission-section { padding: 4rem 2rem; }

.mission-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split 50/50 */
    gap: 4rem;
    align-items: center; /* Vertically center content */
}

.mission-text { text-align: left; }
.mission-text h2 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 1.5rem; }
.mission-text p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2x2 Grid */
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    aspect-ratio: 1/1; /* Square boxes */
}

.stat-card:hover { border-color: var(--neon-blue); transform: translateY(-5px); }

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
}

.stat-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; }

/* People Section - FIXED STACKING */
.people-section { padding: 4rem 2rem 0; background: #0A192F; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { color: var(--neon-blue); font-size: 2.5rem; font-family: var(--font-heading); }
.section-header p { color: var(--text-muted); }

/* Ensure the container is a block to force vertical stacking */
.people-container {
    display: block !important;
    max-width: 1200px;
    margin: 0 auto;
}

/* Force rows to stack vertically */
.people-row {
    width: 100%;
    margin-bottom: 4rem;
    display: block;
    clear: both;
}

.category-group {
    width: 100%;
    display: block;
}

.category-group h3 {
    font-family: var(--font-heading);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Horizontal Scroll Container */
.scroll-container {
    width: 100%;
    overflow-x: auto; /* Enable horizontal scroll */
    padding-bottom: 1.5rem; /* Space for scrollbar */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on mobile */
}

/* Custom Scrollbar for Chrome/Safari */
.scroll-container::-webkit-scrollbar {
    height: 8px;
}
.scroll-container::-webkit-scrollbar-track {
    background: #112240;
    border-radius: 4px;
}
.scroll-container::-webkit-scrollbar-thumb {
    background: #233554;
    border-radius: 4px;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

.people-grid {
    display: flex; /* Horizontal layout inside scroll container */
    gap: 1.5rem;
    width: max-content; /* Ensure container expands to fit all cards */
}

.person-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    width: 200px; /* Fixed width for cards */
    flex-shrink: 0; /* Prevent shrinking */
}

.person-card:hover { border-color: var(--neon-blue); transform: translateY(-5px); }

.initials {
    height: 140px;
    background: #112240;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
}

.person-info { padding: 1.2rem; text-align: center; }
.person-info h4 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 0.2rem; color: #fff; }
.role { font-size: 0.8rem; color: var(--neon-blue); display: block; }

/* Faculty Section */
.faculty-section { padding: 0 2rem 6rem; }
.faculty-container { display: flex; flex-direction: column; gap: 2rem; max-width: 1200px; margin: 0 auto; }
.faculty-container .section-header { margin-top: 2rem; margin-bottom: 2rem; }

.faculty-card, .lab-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.faculty-card:hover, .lab-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.faculty-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.faculty-card-wide {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.faculty-info { flex: 1; }

.faculty-initials {
    width: 120px; height: 120px; border-radius: 50%;
    background: #222; border: 2px solid var(--neon-blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; color: var(--neon-blue);
    flex-shrink: 0;
    overflow: hidden; position: relative;
}

.faculty-title { color: var(--neon-blue); margin-top: 0.5rem; margin-bottom: 1rem; font-weight: 400; }
.faculty-bio { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

.lab-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem;
}
.lab-features span {
    background: #112240; padding: 1rem; text-align: center;
    border-radius: 4px; font-size: 0.9rem; border: 1px solid rgba(100, 255, 218, 0.1);
}

/* Header Layout */
.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.group-header h3 {
    font-family: var(--font-heading);
    color: var(--text-color);
    margin: 0;
    border: none; /* Removed border from h3 since parent has it */
}

/* Scroll Buttons */
.scroll-controls {
    display: flex;
    gap: 0.8rem;
    position: relative; /* Add this */
    z-index: 10; /* Add this */
}

.scroll-btn {
    background: rgba(255, 255, 255, 0.05); /* Transparent dark */
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px; /* Slightly larger touch target */
    height: 40px;
    border-radius: 50%; /* Circular buttons looks more modern */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-btn svg {
    width: 20px;
    height: 20px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Hover State - Tech Glow */
.scroll-btn:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    transform: scale(1.1);
}

/* Active Click State */
.scroll-btn:active {
    transform: scale(0.95);
    background: var(--neon-blue);
    color: #000;
}


/* Responsive */
@media (max-width: 968px) {
    .mission-layout { grid-template-columns: 1fr; gap: 3rem; }
    .faculty-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .stat-card { padding: 1.5rem 1rem; }
    
    /* On mobile, people rows naturally stack, but grid scroll stays */
    .people-grid { width: auto; flex-wrap: nowrap; overflow-x: auto; }
}

/* Grid for three-column layout */
.people-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

/* Larger card styling */
.person-card.large {
    width: 100%; /* Fill the grid column */
    min-height: 250px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.person-card.large:hover {
    border-color: var(--neon-blue);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.person-card.large .initials {
    height: 180px; /* Bigger initials area */
    font-size: 3.5rem;
}

/* Recruitment Section Fix */
.recruitment-cta {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #112240 0%, #0A192F 100%);
    border-top: 1px solid #222;
}

.recruitment-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.recruitment-text {
    text-align: left;
    flex: 2; /* Takes up more space than the button */
}

.recruitment-text h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.recruitment-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.recruitment-action {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Pushes button to the right */
}

/* Ensure button doesn't stretch weirdly */
.recruitment-cta .btn.primary {
    white-space: nowrap; /* Keeps text on one line */
    padding: 1.2rem 2.5rem;
    display: inline-block;
    text-align: center;
    width: auto;
}

/* Responsive Fix for Mobile */
@media (max-width: 900px) {
    .recruitment-flex {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .recruitment-text { text-align: center; }
    .recruitment-action { justify-content: center; width: 100%; }
    .recruitment-cta .btn.primary { width: 100%; } /* Button full width on mobile */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .people-grid-full { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .people-grid-full { grid-template-columns: 1fr; }
}

/* --- Dr. Beheshti Image --- */

.faculty-initials {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid #111;
    overflow: hidden;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}

.faculty-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Maintain the tech glow behind the photo */
.faculty-initials:after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-blue), transparent);
    filter: blur(8px);
    opacity: 0.3;
    z-index: -1;
}

/* Mobile Menu Button Styling */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 3px;
    background-color: var(--neon-blue);
    transition: 0.3s;
}

/* Transformation into an 'X' */
.mobile-menu-btn.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.mobile-menu-btn.is-active .bar:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Styling for mini-bios in faculty cards */
.person-card.large .faculty-bio {
    padding: 0 1rem;
    color: var(--text-muted);
    line-height: 1.4;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Ensure the Research Area Advisors grid centers if there are only 2 items */
@media (min-width: 1025px) {
    .faculty-container .people-grid-full {
        display: flex;
        justify-content: center;
        gap: 2rem;
    }
    .faculty-container .person-card.large {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
}