/* ============================================================
   Team Member Page — Reference-matched single section layout
   Design: role tags → large name → [photo | personal info]
   Theme: site's dark canvas  (#060b1b), Archivo + Tenor Sans
   ============================================================ */

.tm-page {
    --tm-blue: #3b66f5;
    --tm-blue-light: #64b5f6;
    --tm-blue-hover: #355efc;
    --tm-blue-glow: rgba(59, 102, 245, 0.18);

    --tm-bg: #ffffff;
    --tm-card-bg: rgba(0, 0, 0, 0.03);
    --tm-border: rgba(0, 0, 0, 0.08);
    --tm-border-h: rgba(0, 0, 0, 0.15);

    --tm-text: #222222;
    --tm-text-sec: #444444;
    --tm-text-muted: #666666;
    --tm-text-dim: #999999;

    background: var(--tm-bg);
    color: var(--tm-text);
    min-height: 100vh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

/* ── SVG filter (hidden) ── */
.tm-svg-filters {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* ── Page wrapper ── */
.tm-inner {
    max-width: 1360px; /* INCREASED TO ALLOW LARGER PHOTO */
    margin: 0 auto;
    padding: clamp(5.5rem, 11vw, 8.5rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 7vw, 6rem);
    box-sizing: border-box;
}


/* ══════════════════════════════════════
   1. ROLE TAGS ROW  (top strip)
══════════════════════════════════════ */
/* ── Roles row — styled like about-welcome-kicker ── */
.tm-roles-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: clamp(1.2rem, 2.5vw, 1.65rem);
    font-family: 'Archivo', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--tm-text-sec);
}

.tm-role-tag {
    display: inline;
    white-space: nowrap;
}

/* Simple pipe separator — no box */
.tm-role-sep {
    display: inline;
    margin: 0 0.6rem;
    color: var(--tm-text-muted);
    font-weight: 300;
}


/* ══════════════════════════════════════
   2. MEMBER NAME  (large)
══════════════════════════════════════ */
.tm-name {
    margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
    font-family: 'Archivo', sans-serif;
    font-size: clamp(2.8rem, 7vw, 5.25rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--tm-blue);
}


/* ══════════════════════════════════════
   3. MAIN LAYOUT  — photo | info
══════════════════════════════════════ */
.tm-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    /* prevent either column from blowing out the grid */
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 820px) {
    .tm-layout {
        /* larger photo column, 1fr text column */
        grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
        gap: clamp(2.5rem, 5vw, 4.5rem);
        align-items: start;
        overflow: visible;
    }
}


/* ── Photo col ── */
.tm-photo-col {
    position: relative;
    min-width: 0;
    /* on mobile, don't let photo go full viewport width — center it */
    max-width: min(100%, 320px);
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 820px) {
    .tm-photo-col {
        max-width: none;
        margin: 0;
    }
}

.tm-photo-wrap {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
    background: #111827;
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.07);
}

.tm-photo {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.9s ease;
}

.tm-photo:hover {
    filter: grayscale(0%);
}

/* photo-offset frame removed */

/* Thin blue left accent bar */
.tm-photo-bar {
    position: absolute;
    left: -4px;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, transparent, var(--tm-blue) 30%, var(--tm-blue-light) 70%, transparent);
    animation: tmBarPulse 3s ease-in-out infinite;
}

@keyframes tmBarPulse {

    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }
}


/* ── Info col ── */
.tm-info-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* CRITICAL: allow this grid child to shrink below its content size */
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* — Info header row: label + contact btn — */
.tm-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tm-info-heading {
    margin: 0;
    font-family: 'Archivo', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--tm-text);
}

.tm-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.45rem;
    background: #222222;
    border: none;
    border-radius: 0;
    /* SHARP CORNERS */
    color: #ffffff;
    text-decoration: none;
    font-family: 'Archivo', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tm-contact-btn i {
    color: #ffffff;
    font-size: 0.85em;
    opacity: 0.8;
}

.tm-contact-btn:hover {
    background: var(--tm-blue);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 102, 245, 0.25);
}

/* — Divider — */
.tm-info-divider {
    height: 1px;
    background: linear-gradient(90deg,
            rgba(59, 102, 245, 0.55) 0%,
            rgba(255, 255, 255, 0.12) 45%,
            rgba(255, 255, 255, 0.04) 100%);
    margin-bottom: clamp(1.25rem, 2.5vw, 1.85rem);
}

/* — Bio paragraph — */
.tm-bio {
    font-family: 'Tenor Sans', sans-serif;
    font-size: clamp(0.95rem, 1.45vw, 1.075rem);
    line-height: 1.78;
    color: var(--tm-text-sec);
    margin: 0 0 clamp(1rem, 2vw, 1.4rem);
    /* force text to wrap, never overflow */
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

/* — Quote line — */
.tm-quote {
    font-family: 'Tenor Sans', sans-serif;
    font-size: clamp(1.15rem, 1.8vw, 1.3rem);
    font-style: normal;
    font-weight: 500;
    color: var(--tm-blue-light);
    margin: 0 0 clamp(1.25rem, 2.5vw, 1.85rem);
    padding-left: 0.85rem;
    border-left: 2px solid var(--tm-blue);
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* — Details list — */
.tm-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--tm-border);
}

.tm-detail-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--tm-border);
    font-family: 'Tenor Sans', sans-serif;
    font-size: clamp(0.9rem, 1.4vw, 1.025rem);
    line-height: 1.5;
    transition: background 0.2s ease;
}

.tm-detail-row:hover {
    background: var(--tm-card-bg);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 6px;
}

.tm-detail-label {
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    color: var(--tm-text-muted);
    flex-shrink: 0;
    min-width: 100px;
}

.tm-detail-value {
    color: var(--tm-text);
    word-break: break-word;
}

.tm-detail-value a {
    color: var(--tm-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tm-detail-value a:hover {
    color: var(--tm-blue-light);
}

/* Social icons row inside details */
.tm-social-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 0;
}

.tm-social-btn {
    width: 42px;
    height: 42px;
    border-radius: 0;
    /* SHARP CORNERS */
    background: var(--tm-card-bg);
    border: 1px solid var(--tm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-text-sec);
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}

.tm-social-btn:hover {
    background: var(--tm-blue);
    border-color: var(--tm-blue);
    color: #fff;
    transform: translateY(-3px);
}

.tm-social-btn.tm-linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
}

.tm-social-btn.tm-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #dc2743;
}


/* back link removed */


/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes tmFadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tmFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .tm-roles-row,
    .tm-name,
    .tm-layout,
    .tm-back-link {
        opacity: 1;
        animation: none;
    }

    .tm-photo-bar {
        animation: none;
    }

    .tm-photo:hover {
        filter: none;
    }

    .tm-social-btn:hover {
        transform: none;
    }

    .tm-back-link:hover {
        transform: none;
    }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 575px) {
    .tm-name {
        font-size: 2.5rem;
    }

    .tm-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .tm-detail-label {
        min-width: 80px;
    }

    .tm-roles-row {
        font-size: 0.78rem;
    }

    .tm-role-sep {
        width: 14px;
        height: 14px;
    }
}
