/* ============================================
   About Page Styles
   ============================================ */

.story-section {
    padding-top: calc(var(--spacing-xl) + 80px);
    background-color: var(--color-bg);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.story-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
}

.story-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
}

.story-image {
    position: relative;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Team Section */
.team-section {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 50%, var(--color-bg) 100%);
    padding: var(--spacing-xxl) 0;
    overflow: visible;
}

.team-category {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    overflow: visible;
}

.team-category:last-child {
    margin-bottom: 0;
}

.team-category-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-text-primary);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    padding-bottom: var(--spacing-md);
}

.team-category-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 2px;
}

.team-category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
}

.team-grid {
    display: grid;
    gap: var(--spacing-xl);
    margin-top: 0;
    overflow: visible;
    padding-top: 60px;
    padding-bottom: 20px;
}

/* All cards will have consistent size - using same card width */
.team-grid-single {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
}

.team-grid-double {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
    gap: var(--spacing-xl);
}

.team-grid-advisor {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
    gap: var(--spacing-xl);
}

/* Core Team - 3 cards per row with consistent sizing */
.team-grid-core {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1300px;
    margin: 0 auto;
    gap: var(--spacing-xl);
}

/* All team cards have consistent size and styling - circular profile picture style */
.team-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: visible;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    margin-top: 50px;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.2), 0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 255, 255, 0.3);
}

.team-card:hover::before {
    opacity: 1;
}

/* Circular profile picture at top of card, overlapping */
.team-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface);
    border: 4px solid var(--color-surface);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.team-image::after {
    display: none;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: grayscale(0%) !important;
    display: block;
    border-radius: 50%;
}

.team-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 50%;
}

.team-card:hover .team-image img,
.team-card:active .team-image img,
.team-card:focus .team-image img {
    transform: scale(1.05);
    filter: grayscale(100%) !important;
}

.team-info {
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
    text-align: center;
    background: transparent;
    position: relative;
    z-index: 2;
}

.team-info h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.team-role {
    color: var(--color-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .story-grid {
        gap: var(--spacing-lg);
    }

    .team-category {
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-xs) 0;
    }

    /* Faculty and Advisor cards stay side by side even in tablet view */
    .team-grid-double {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        gap: var(--spacing-lg);
    }

    .team-grid-advisor {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        gap: var(--spacing-lg);
    }

    /* Core Team - 3 cards per row on tablet */
    .team-grid-core {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
        max-width: 1300px;
    }
}

@media (max-width: 768px) {
    .about-page {
        padding-top: calc(var(--spacing-lg) + 80px) !important;
    }

    .page-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-lg);
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .story-content {
        order: 2;
    }

    .story-content h2 {
        font-size: 1.8rem;
    }

    .story-content p {
        font-size: 1rem;
    }

    .story-image {
        order: 1;
    }

    .team-section {
        padding: var(--spacing-xl) 0;
    }

    .team-category {
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-xs) 0;
        overflow: visible;
    }

    .team-category-title {
        font-size: 1.3rem;
        margin-bottom: var(--spacing-lg);
        letter-spacing: 2px;
    }

    .team-grid {
        gap: var(--spacing-md);
        margin-top: 0;
        overflow: visible;
        padding-top: 50px;
        padding-bottom: 15px;
    }

    .team-grid-single {
        max-width: 380px;
    }

    /* Faculty cards stay side by side in desktop mode on phone */
    .team-grid-double {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        gap: var(--spacing-md);
    }

    /* Advisor cards stay side by side */
    .team-grid-advisor {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        gap: var(--spacing-md);
    }

    /* Core Team - 3 cards per row on tablet/mobile */
    .team-grid-core {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
        max-width: 100%;
    }

    .team-card {
        margin-bottom: 0;
    }

    /* Circular profile picture - same size on mobile */
    .team-image {
        width: 140px;
        height: 140px;
        top: -45px;
    }

    .team-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .team-info {
        padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
    }

    .team-info h3 {
        font-size: 1.2rem;
        color: var(--color-text-primary);
    }

    .team-role {
        font-size: 0.85rem;
        color: var(--color-primary);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }

    .story-content h2 {
        font-size: 1.5rem;
    }

    /* On small screens: stack single cards, keep double cards side by side, Core Team 2 columns */
    .team-grid-single,
    .team-grid-advisor {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Faculty and Advisor cards stay side by side even on small screens in desktop mode */
    .team-grid-double {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        max-width: 100%;
    }

    /* Core Team - 2 cards per row on small screens, 3 on larger */
    .team-grid-core {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        max-width: 100%;
    }

    .team-card {
        max-width: 100%;
        overflow: visible;
    }

    /* Circular profile picture - slightly smaller on very small screens */
    .team-image {
        width: 120px;
        height: 120px;
        top: -40px;
    }

    .team-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .team-card {
        padding-top: 70px;
        margin-top: 40px;
    }

    .team-info {
        padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
    }

    .team-info h3 {
        font-size: 1.1rem;
        color: var(--color-text-primary);
    }

    .team-role {
        font-size: 0.8rem;
        color: var(--color-primary);
    }
}



