/* Team Page Styles */

.team-page {
    max-width: 1000px;
    padding-bottom: 0;
}

.team-hero {
    padding-top: 160px;
    padding-bottom: 80px;
    max-width: 700px;
}

.team-hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
}

.team-intro {
    font-size: 1.3rem;
    color: #555;
    line-height: 1.6;
    max-width: 800px;
}

/* Team Grid */

.team-grid-section {
    padding-bottom: 120px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
}

.team-member {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.team-member:hover {
    transform: translateY(-4px);
}

.team-member:hover .member-photo img {
    filter: grayscale(0%);
}

.member-photo {
    aspect-ratio: 1;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #e8e5de;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(20%);
    transition: filter 0.3s ease, transform 0.4s ease;
}

.team-member:hover .member-photo img {
    transform: scale(1.03);
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-name {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.member-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 0.02em;
}

/* Modal */

.member-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.member-modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #F6F3ED;
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.member-modal.open .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    z-index: 10;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-inner {
    padding: 3rem;
}

.modal-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #d4d0c8;
}

.modal-photo {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    background: #e8e5de;
}

.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.modal-header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
}

.modal-header-info h2 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.modal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 0.02em;
}

.modal-origin {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

.modal-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.modal-linkedin {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #666;
    text-decoration: underline;
    text-decoration-color: #ccc;
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.modal-linkedin:hover {
    color: #1a1a1a;
    text-decoration-color: #1a1a1a;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.modal-bio {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #333;
}

.modal-section {
    border-top: 1px solid #e8e5de;
    padding-top: 1.5rem;
}

.modal-section h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #999;
    margin-bottom: 0.75rem;
}

.modal-section p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #555;
}

.modal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    padding-left: 1rem;
    position: relative;
}

.modal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    background: #e8e5de;
    padding: 0.4rem 0.75rem;
    color: #555;
    letter-spacing: 0.01em;
    text-decoration: none;
}

a.modal-tag:hover {
    background: #dbd8d0;
}

.modal-fun-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    background: #EFECE5;
    margin: 0 -3rem -3rem;
    padding: 1.75rem 3rem;
    border-top: none;
}

.fun-fact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: calc(50% - 1rem);
    min-width: 0;
}

.fun-fact-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
}

.fun-fact-value {
    font-size: 0.95rem;
    color: #444;
}

/* Team CTA */

.team-cta-section .approach-cta {
    border-top: none;
}

/* Responsive */

@media (max-width: 768px) {
    .team-hero {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .team-hero h1 {
        font-size: 2.6rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.25rem;
    }

    .member-name {
        font-size: 1.1rem;
    }

    .modal-inner {
        padding: 2rem 1.5rem;
    }

    .modal-header {
        flex-direction: column;
        gap: 1.25rem;
    }

    .modal-photo {
        width: 120px;
        height: 120px;
    }

    .modal-header-info h2 {
        font-size: 1.6rem;
    }

    .modal-fun-facts {
        gap: 1rem;
        margin: 0 -1.5rem -2rem;
        padding: 1.5rem;
    }

    .fun-fact {
        width: calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
}
