:root {
    --tm-primary: #2563eb;
    --tm-primary-dark: #1e40af;
    --tm-ink: #0f172a;
    --tm-text: #1f2937;
    --tm-muted: #64748b;
    --tm-border: #e2e8f0;
    --tm-bg: #ffffff;
}

body {
    color: var(--tm-text);
    background: #f9fafb;
    -webkit-font-smoothing: antialiased;
}

/* ===================== Hero ===================== */
.tm-hero {
    padding: 140px 0 64px;
    background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.tm-hero-content {
    max-width: 760px;
}

.tm-hero-kicker {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    margin-bottom: 10px;
}

.tm-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.tm-hero-subtitle {
    font-size: 1.06rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 750px;
    line-height: 1.9;
}

/* ===================== Breadcrumb ===================== */
.tm-breadcrumb-wrap {
    background: var(--tm-bg);
    padding: 14px 0;
    border-bottom: 1px solid var(--tm-border);
}

.tm-breadcrumb-wrap .breadcrumb-item a {
    color: var(--tm-muted);
    text-decoration: none;
    font-size: 0.86rem;
}

.tm-breadcrumb-wrap .breadcrumb-item.active {
    color: var(--tm-ink);
    font-size: 0.86rem;
    font-weight: 500;
}

/* ===================== Main ===================== */
.tm-main {
    background: var(--tm-bg);
}

/* ===================== Filter Bar ===================== */
.tm-filter-bar {
    padding: 36px 0 0;
}

.tm-filter-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--tm-border);
    padding-bottom: 0;
}

.tm-filter-btn {
    border: none;
    background: transparent;
    color: var(--tm-muted);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 10px 20px 14px;
    cursor: pointer;
    position: relative;
    transition: color 0.25s ease;
    letter-spacing: 0.02em;
}

.tm-filter-btn::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
    transition: background 0.25s ease;
}

.tm-filter-btn:hover {
    color: var(--tm-ink);
}

.tm-filter-btn.active {
    color: var(--tm-primary);
    font-weight: 600;
}

.tm-filter-btn.active::after {
    background: var(--tm-primary);
}

/* ===================== Grid ===================== */
.tm-grid-section {
    padding: 48px 0 80px;
}

.tm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 28px;
}

/* ===================== Member Card ===================== */
.tm-member {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 28px 26px;
    cursor: pointer;
    position: relative;
    background: var(--tm-bg);
    border: 1px solid var(--tm-border);
    opacity: 0;
    transform: translateY(20px);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.5s ease, transform 0.5s ease;
}

.tm-member::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tm-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tm-member:hover::before {
    transform: scaleX(1);
}

.tm-member:hover {
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 100%);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

.tm-member.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tm-member-enter {
    animation: tmFadeIn 0.35s ease forwards;
}

@keyframes tmFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.tm-member:hover .tm-member-photo img {
    filter: grayscale(0);
    transform: scale(1.03);
}

/* ===================== Member Photo ===================== */
.tm-member-photo {
    width: 108px;
    height: 130px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f1f5f9;
}

.tm-member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(0.12);
    transition: transform 0.45s ease, filter 0.45s ease;
}

/* ===================== Member Info ===================== */
.tm-member-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.tm-member-header {
    margin-bottom: 14px;
}

.tm-member-name {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--tm-ink);
    margin: 0 0 6px;
    letter-spacing: 0.06em;
    display: inline;
}

.tm-member-meta {
    display: inline;
    font-size: 0.82rem;
    color: var(--tm-muted);
    margin-left: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.tm-meta-sep {
    font-style: normal;
    margin: 0 6px;
    color: #cbd5e1;
}

.tm-member-areas {
    border-top: 1px solid var(--tm-border);
    padding-top: 12px;
}

.tm-member-areas p {
    margin: 0 0 4px;
    font-size: 0.86rem;
    color: var(--tm-muted);
    line-height: 1.65;
}

.tm-member-areas p:last-child {
    margin-bottom: 0;
}

.tm-member-contact {
    border-top: 1px solid var(--tm-border);
    padding-top: 18px;
}

.tm-member-contact p {
    margin: 0 0 1px;
    font-size: 0.84rem;
    color: var(--tm-muted);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tm-member-contact p:last-child {
    margin-bottom: 0;
}

.tm-member-contact p i {
    color: var(--tm-primary);
    font-size: 0.78rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.tm-member-name i {
    color: var(--tm-primary);
    font-size: 0.9em;
    margin-right: 2px;
}

.tm-member-meta i.fas {
    color: var(--tm-muted);
    font-size: 0.78rem;
    margin-right: 2px;
}

/* ===================== Detail Panel ===================== */
.tm-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tm-detail-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.tm-detail-panel {
    width: 880px;
    max-width: 92vw;
    height: 560px;
    max-height: 88vh;
    background: var(--tm-bg);
    overflow: hidden;
    position: relative;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.tm-detail-overlay.is-open .tm-detail-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.tm-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tm-border);
    border-radius: 0;
    background: var(--tm-bg);
    color: var(--tm-muted);
    font-size: 0.92rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    z-index: 10;
}

.tm-detail-close:hover {
    color: var(--tm-ink);
    border-color: var(--tm-ink);
}

.tm-detail-inner {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.tm-detail-left {
    width: 340px;
    flex-shrink: 0;
    height: 100%;
}

.tm-detail-photo {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f1f5f9;
}

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

.tm-detail-right {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 36px 32px 32px;
    overflow-y: auto;
    overflow-x: hidden;
}

.tm-detail-right::-webkit-scrollbar {
    width: 6px;
}

.tm-detail-right::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 3px;
}

.tm-detail-right::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.32);
}

.tm-detail-right::-webkit-scrollbar-track {
    background: transparent;
}

.tm-detail-role {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--tm-primary);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.tm-detail-name {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--tm-ink);
    margin: 0 0 18px;
    letter-spacing: 0.04em;
}

.tm-detail-divider {
    width: 42px;
    height: 2px;
    background: var(--tm-primary);
    margin-bottom: 24px;
}

.tm-detail-section {
    margin-bottom: 20px;
}

.tm-detail-label {
    font-size: 0.76rem;
    color: var(--tm-muted);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.tm-detail-text {
    font-size: 0.92rem;
    color: var(--tm-text);
    line-height: 1.82;
    margin: 0;
}

.tm-detail-bio {
    font-size: 0.92rem;
    color: var(--tm-text);
    line-height: 1.82;
}

.tm-detail-bio p {
    margin: 0 0 10px;
}

.tm-detail-bio p:last-child {
    margin-bottom: 0;
}

.tm-detail-bio strong,
.tm-detail-bio b {
    font-weight: 700;
}

.tm-detail-bio em,
.tm-detail-bio i {
    font-style: italic;
}

.tm-detail-bio ul,
.tm-detail-bio ol {
    margin: 0 0 10px;
    padding-left: 22px;
}

.tm-detail-bio ul li,
.tm-detail-bio ol li {
    margin-bottom: 4px;
}

.tm-detail-bio a {
    color: var(--tm-primary);
    text-decoration: underline;
}

.tm-detail-bio img {
    max-width: 100%;
    height: auto;
}

.tm-detail-bio h1,
.tm-detail-bio h2,
.tm-detail-bio h3,
.tm-detail-bio h4,
.tm-detail-bio h5 {
    color: var(--tm-ink);
    font-weight: 700;
    margin: 12px 0 8px;
}

.tm-detail-contact {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--tm-border);
}

.tm-detail-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tm-muted);
    text-decoration: none;
    font-size: 0.86rem;
    transition: color 0.2s ease;
    margin-right: 24px;
}

.tm-detail-contact-item:hover {
    color: var(--tm-primary);
}

.tm-detail-contact-item i {
    font-size: 0.9rem;
}

/* ===================== Footer ===================== */
.tm-footer {
    background: var(--tm-ink);
    color: rgba(255, 255, 255, 0.6);
    padding: 28px 0;
    font-size: 0.86rem;
}

.tm-footer .footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.2s ease;
}

.tm-footer .footer-link:hover {
    color: #ffffff;
}

/* ===================== Responsive ===================== */
@media (max-width: 991px) {
    .tm-hero {
        padding: 120px 0 48px;
    }

    .tm-hero-title {
        font-size: 2.3rem;
    }

    .tm-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .tm-detail-panel {
        width: 92vw;
        height: auto;
        max-height: 90vh;
    }

    .tm-detail-inner {
        flex-direction: column;
        height: auto;
    }

    .tm-detail-left {
        width: 100%;
        height: auto;
    }

    .tm-detail-photo {
        height: 300px;
    }

    .tm-detail-right {
        padding: 28px 24px 32px;
        max-height: calc(90vh - 300px);
    }
}

@media (max-width: 767px) {
    .tm-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .tm-member {
        padding: 22px 20px;
        gap: 18px;
    }

    .tm-member-photo {
        width: 88px;
        height: 108px;
    }

    .tm-member-name {
        font-size: 1.14rem;
    }

    .tm-detail-panel {
        width: 96vw;
        max-height: 92vh;
    }

    .tm-detail-photo {
        height: 240px;
    }

    .tm-detail-right {
        padding: 22px 20px 28px;
        max-height: calc(92vh - 240px);
    }

    .tm-detail-name {
        font-size: 1.4rem;
    }

    .tm-filter-inner {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tm-filter-btn {
        white-space: nowrap;
        padding: 10px 16px 14px;
    }
}

@media (max-width: 576px) {
    .tm-hero-title {
        font-size: 1.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tm-member {
        opacity: 1;
        transform: none;
        transition: background 0.3s ease;
    }

    .tm-detail-panel {
        transition: none;
    }

    .tm-detail-overlay {
        transition: none;
    }
}
