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

.story-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--spacing-xl) + 80px);
    padding-bottom: var(--spacing-xxl);
    background-color: var(--color-bg);
    overflow: hidden;
    z-index: 1;
}

/* Crisp, unblurred full background image */
.story-bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/about%20section.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: brightness(0.65) contrast(1.05);
    z-index: 0;
}

/* Gradient overlay for smooth contrast and section transition */
.story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 11, 16, 0.75) 0%,
        rgba(10, 11, 16, 0.35) 25%,
        rgba(10, 11, 16, 0.4) 70%,
        #0A0B10 100%
    );
    z-index: 1;
}

.story-section .container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    width: 100%;
}

.story-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: var(--spacing-xl) 0;
}

.story-content h2 {
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    margin-bottom: var(--spacing-lg);
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.9);
}

.story-content p {
    font-size: clamp(1.05rem, 1.9vw, 1.2rem);
    line-height: 1.9;
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.95), 0 1px 5px rgba(0, 0, 0, 0.85);
}

.story-content .story-highlight {
    margin-top: var(--spacing-lg);
    margin-bottom: 0;
    font-weight: 700;
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    color: var(--color-primary);
    letter-spacing: 1px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.95);
}

.story-content .story-tagline {
    font-size: clamp(1.15rem, 2.2vw, 1.4rem);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.95);
}

.story-edition-block {
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    max-width: 600px;
}

.story-edition-block .story-edition-title {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.95);
}

.story-edition-block .story-edition-date {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--color-primary);
    margin-bottom: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95);
}

.story-bullets {
    margin: var(--spacing-lg) auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.story-bullets p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0 !important;
    line-height: 1.6;
}

.story-content .story-cta {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 2px;
    color: #FFFFFF;
    margin-top: var(--spacing-xl);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.95);
}

/* Team Section — Blurred backdrop */
.team-section {
    position: relative;
    background-color: var(--color-bg);
    padding: var(--spacing-xxl) 0;
    overflow: clip; /* clips the blur pseudo-element but allows child overflow */
}

/* Blurred team backdrop using team images */
.team-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    background-image: 
        url('../assets/team/core/Himanshu%20Mishra.webp'),
        url('../assets/team/core/Prakhar%20Agrahari.webp'),
        url('../assets/team/core/Aarya%20Keshari.webp');
    background-size: 40% auto, 40% auto, 40% auto;
    background-position: left 5% center, center center, right 5% center;
    background-repeat: no-repeat;
    filter: blur(55px) brightness(0.18) saturate(120%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.team-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, transparent 15%, transparent 85%, var(--color-bg) 100%);
    z-index: 1;
    pointer-events: none;
}

.team-section .container {
    position: relative;
    z-index: 2;
}

.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.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    margin-top: 50px;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
}

.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-section {
        padding-top: calc(var(--spacing-lg) + 80px);
        padding-bottom: var(--spacing-xl);
        min-height: auto;
    }

    .story-content {
        padding: var(--spacing-lg) var(--spacing-sm);
        background: transparent;
        border: none;
        box-shadow: none;
    }

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

    .story-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .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);
    }
}



