/* ═══════════════════════════════════════════════════════════════════
   TEAM PAGE - Elegant Minimalist Design
   Black & White photography with refined typography
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════ */
body.team-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Dark Theme (default) */
html:not(.theme-light) body.team-page {
    background: #000000;
    color: #e8e8e8;
}

/* Light Theme */
html.theme-light body.team-page {
    background: #f8f8f8;
    color: #1a1a1a;
}

.team-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════ */
.team-hero {
    padding: 100px 0 80px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.team-hero.revealed {
    opacity: 1;
    transform: translateY(0);
}

.team-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    margin: 0 0 20px;
    text-transform: uppercase;
}

/* Dark Theme Title */
html:not(.theme-light) .team-title {
    color: #ffffff;
}

/* Light Theme Title */
html.theme-light .team-title {
    color: #000000;
}

.team-subtitle {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.05em;
    margin: 0;
    opacity: 0.7;
}

/* Dark Theme Subtitle */
html:not(.theme-light) .team-subtitle {
    color: #b0b0b0;
}

/* Light Theme Subtitle */
html.theme-light .team-subtitle {
    color: #555555;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════ */
.team-section {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 50px;
}

.section-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Dark Theme Section Label */
html:not(.theme-light) .section-label {
    color: #fac929;
}

/* Light Theme Section Label */
html.theme-light .section-label {
    color: #1F75FE;
}

.section-line {
    flex: 1;
    height: 1px;
}

/* Dark Theme Section Line */
html:not(.theme-light) .section-line {
    background: linear-gradient(90deg, rgba(250, 201, 41, 0.5), transparent);
}

/* Light Theme Section Line */
html.theme-light .section-line {
    background: linear-gradient(90deg, rgba(31, 117, 254, 0.5), transparent);
}

/* ═══════════════════════════════════════════════════════════════════
   TEAM GRID
   ═══════════════════════════════════════════════════════════════════ */
.team-grid {
    display: grid;
    gap: 48px;
}

.founders-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.members-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════
   TEAM CARDS
   ═══════════════════════════════════════════════════════════════════ */
.team-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.card-image-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.image-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
}

/* Dark Theme Image Frame */
html:not(.theme-light) .image-frame {
    background: #111111;
}

/* Light Theme Image Frame */
html.theme-light .image-frame {
    background: #e8e8e8;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* Dark Theme Photo Brightness */
html:not(.theme-light) .member-photo {
    filter: grayscale(100%) contrast(1.05) brightness(0.95);
}

/* Light Theme Photo Brightness */
html.theme-light .member-photo {
    filter: grayscale(100%) contrast(1.1) brightness(1);
}

.team-card:hover .member-photo {
    transform: scale(1.03);
}

/* Dark Theme Hover Effect */
html:not(.theme-light) .team-card:hover .member-photo {
    filter: grayscale(100%) contrast(1.1) brightness(1.05);
}

/* Light Theme Hover Effect */
html.theme-light .team-card:hover .member-photo {
    filter: grayscale(100%) contrast(1.15) brightness(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    pointer-events: none;
}

/* Dark Theme Overlay */
html:not(.theme-light) .image-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

/* Light Theme Overlay */
html.theme-light .image-overlay {
    background: linear-gradient(to top, rgba(248, 248, 248, 0.4), transparent);
}

/* ═══════════════════════════════════════════════════════════════════
   CARD CONTENT
   ═══════════════════════════════════════════════════════════════════ */
.card-content {
    padding: 0 8px;
}

.member-name {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin: 0 0 8px;
}

/* Dark Theme Name */
html:not(.theme-light) .member-name {
    color: #ffffff;
}

/* Light Theme Name */
html.theme-light .member-name {
    color: #000000;
}

.member-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 20px;
}

/* Dark Theme Title Text */
html:not(.theme-light) .member-title {
    color: #888888;
}

/* Light Theme Title Text */
html.theme-light .member-title {
    color: #666666;
}

/* ═══════════════════════════════════════════════════════════════════
   MEMBER QUOTES
   ═══════════════════════════════════════════════════════════════════ */
.member-quote {
    margin: 20px 0 0;
    padding: 20px;
    border-left: 2px solid;
    border-radius: 0 8px 8px 0;
}

/* Dark Theme Quote */
html:not(.theme-light) .member-quote {
    border-color: rgba(250, 201, 41, 0.4);
    background: linear-gradient(90deg, rgba(250, 201, 41, 0.05), transparent);
}

/* Light Theme Quote */
html.theme-light .member-quote {
    border-color: rgba(31, 117, 254, 0.4);
    background: linear-gradient(90deg, rgba(31, 117, 254, 0.05), transparent);
}

.member-quote p {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.7;
    margin: 0;
}

/* Dark Theme Quote Text */
html:not(.theme-light) .member-quote p {
    color: #c8c8c8;
}

/* Light Theme Quote Text */
html.theme-light .member-quote p {
    color: #444444;
}

/* ═══════════════════════════════════════════════════════════════════
   BACK BUTTON CONTAINER
   ═══════════════════════════════════════════════════════════════════ */
.back-button-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding-bottom: 40px;
}

.back-button {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 14px 40px;
    min-width: 160px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-font-smoothing: antialiased;
}

/* Dark Theme Button */
html:not(.theme-light) .back-button {
    background-color: #fac929;
    border: 2px solid #fac929;
    color: #000000;
    box-shadow: 0 4px 14px rgba(250, 201, 41, 0.35),
                0 2px 6px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html:not(.theme-light) .back-button:hover,
html:not(.theme-light) .back-button:focus {
    background-color: #ffd43d;
    border-color: #ffd43d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(250, 201, 41, 0.45),
                0 4px 12px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(250, 201, 41, 0.3);
    outline: none;
}

html:not(.theme-light) .back-button:active {
    background-color: #e6b625;
    border-color: #e6b625;
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(250, 201, 41, 0.3),
                0 1px 4px rgba(0, 0, 0, 0.2),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Light Theme Button */
html.theme-light .back-button {
    background: linear-gradient(168deg, #2480FF 0%, #1F75FE 40%, #1A6AE8 100%);
    border: 2px solid rgba(31, 117, 254, 0.9);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 14px rgba(31, 117, 254, 0.35),
                0 2px 6px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html.theme-light .back-button:hover,
html.theme-light .back-button:focus {
    background: linear-gradient(168deg, #3A8FFF 0%, #2480FF 40%, #1F75FE 100%);
    border-color: #1F75FE;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(31, 117, 254, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(31, 117, 254, 0.2);
    outline: none;
}

html.theme-light .back-button:active {
    background: linear-gradient(168deg, #1A6AE8 0%, #1660D8 40%, #1255C8 100%);
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(31, 117, 254, 0.3),
                0 1px 4px rgba(0, 0, 0, 0.15),
                inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════════════════════════════ */
body.team-page::-webkit-scrollbar {
    width: 12px;
}

html:not(.theme-light) body.team-page::-webkit-scrollbar-track {
    background: #111;
}

html:not(.theme-light) body.team-page::-webkit-scrollbar-thumb {
    background: #fac929;
    border-radius: 6px;
}

html:not(.theme-light) body.team-page::-webkit-scrollbar-thumb:hover {
    background: #e6b000;
}

html.theme-light body.team-page::-webkit-scrollbar-track {
    background: #f0f0f0;
}

html.theme-light body.team-page::-webkit-scrollbar-thumb {
    background: #1F75FE;
    border-radius: 6px;
}

html.theme-light body.team-page::-webkit-scrollbar-thumb:hover {
    background: #1565D8;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .team-main {
        padding: 0 20px 60px;
    }

    .team-hero {
        padding: 70px 0 50px;
    }

    .team-title {
        letter-spacing: 0.2em;
    }

    .team-section {
        margin-bottom: 60px;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .team-grid {
        gap: 40px;
    }

    .founders-grid {
        grid-template-columns: 1fr;
    }

    .members-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }

    .member-name {
        font-size: 1.25rem;
    }

    .member-quote {
        padding: 16px;
    }

    .member-quote p {
        font-size: 0.95rem;
    }

    .back-button-container {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .team-main {
        padding: 0 16px 50px;
    }

    .team-hero {
        padding: 50px 0 40px;
    }

    .team-title {
        letter-spacing: 0.15em;
    }

    .section-header {
        gap: 16px;
    }

    .section-label {
        font-size: 0.7rem;
    }

    .team-grid {
        gap: 32px;
    }

    .card-content {
        padding: 0 4px;
    }

    .member-name {
        font-size: 1.15rem;
    }

    .member-title {
        font-size: 0.8rem;
    }

    .back-button {
        padding: 12px 32px;
        min-width: 140px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   REDUCED MOTION SUPPORT
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .team-hero,
    .team-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .member-photo {
        transition: none;
    }

    .back-button {
        transition: none;
    }
}
