/* 教師詳細頁。卡片、版面、資訊列沿用 cases/case_detail.css（cd-*），這裡只放本頁專屬的部分。 */

/* ── 標頭：照片＋姓名＋職稱系所＋專長 ───────── */
.tp-hero {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin: 1rem 0 1.5rem;
}

.tp-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--hp-sky);
    color: var(--color-primary);
    font-size: 2.6rem;
    font-weight: 900;
}

.tp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.tp-hero-body { min-width: 0; }

.tp-role {
    margin-top: 0.35rem;
    color: #3d4a63;
    font-size: 1.02rem;
    font-weight: 700;
}

.tp-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

/* ── 主欄 ─────────────────────────────────── */
.tp-sections .cd-section-title:not(:first-child) { margin-top: 1.75rem; }

.tp-description {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.tp-lab-name {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-size: 1.05rem;
    font-weight: 900;
}

.tp-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tp-links:empty { display: none; }

.tp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-top: 1.25rem;
}

.tp-gallery figure { margin: 0; }

.tp-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.tp-gallery figcaption {
    margin-top: 0.4rem;
    color: #3d4a63;
    font-size: 0.85rem;
}

.tp-files {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--color-border);
}

.tp-files li { border-bottom: 1px solid var(--color-border); }

.tp-files a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.25rem;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.tp-files a:hover { text-decoration: underline; }

/* ── 側欄：參與團隊 ───────────────────────── */
.tp-side-title { margin-top: 1.75rem; }

/* 跟上方聯絡資料（.cd-meta-list）同一套分隔線列表，不再框中框 */
.tp-teams {
    display: grid;
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--color-border);
}

.tp-teams a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
    color: inherit;
    text-decoration: none;
}

.tp-teams a:hover .tp-team-body strong { color: var(--color-hover); }

.tp-team-logo {
    overflow: hidden;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--hp-sky);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 900;
}

.tp-team-body { min-width: 0; }

.tp-team-body strong {
    display: block;
    color: var(--color-primary);
    font-size: 0.92rem;
    line-height: 1.45;
    transition: color 0.2s;
}

.tp-team-body small {
    color: var(--color-muted);
    font-size: 0.8rem;
}

/* ── Markdown 內文（研究領域、學歷、經歷、介紹） ── */
.markdown-content {
    color: #3d4a63;
    line-height: 1.85;
}

.markdown-content > :first-child { margin-top: 0; }

.markdown-content h2,
.markdown-content h3 {
    margin: 1.4rem 0 0.5rem;
    color: var(--color-primary);
    font-size: 1.02rem;
    font-weight: 900;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.3rem 0;
    padding-left: 1.3em;
}

.markdown-content li + li { margin-top: 0.2rem; }

.markdown-content ul li::marker { color: var(--hp-yellow); }

.markdown-content p + p { margin-top: 0.6rem; }

.markdown-content a { color: var(--color-primary); }

@media (max-width: 640px) {
    .tp-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tp-avatar { width: 96px; height: 96px; font-size: 2.1rem; }
}

.tp-team-logo img { width: 100%; height: 100%; object-fit: cover; }
