/* ============================================================
   Teams Home — 師資總覽
   ============================================================ */

.th-page {
    margin-top: -2rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.th-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 560px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: #010e2a;
}

/* grid mesh overlay */
.th-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* radial glow */
.th-hero::after {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(0,91,172,0.35) 0%, transparent 70%);
    pointer-events: none;
}

.th-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem 4.5rem;
    width: 100%;
    box-sizing: border-box;
}

.th-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: rgba(100,160,255,0.85);
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}

.th-hero-eyebrow::before {
    content: '';
    display: block;
    width: 32px;
    height: 1.5px;
    background: rgba(100,160,255,0.6);
}

.th-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.th-hero-title em {
    font-style: normal;
    color: #64a0ff;
}

.th-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: rgba(255,255,255,0.5);
    font-weight: 300;
    letter-spacing: 0.25em;
    margin: 0 0 1.8rem;
}

.th-hero-lead {
    max-width: 600px;
    font-size: 0.97rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.9;
    margin: 0 0 2.8rem;
}

.th-hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.th-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.th-stat-num {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.th-stat-num span {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(100,160,255,0.9);
    margin-left: 0.1em;
}

.th-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}

/* ── Section header ────────────────────────────────────────── */
.th-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 5rem 0 4rem;
    background: #f7f8fb;
    overflow: hidden;
}

.th-section-header {
    max-width: 1100px;
    margin: 0 auto 3.5rem;
    padding: 0 2rem;
}

.th-section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.th-section-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.6rem;
}

.th-section-desc {
    font-size: 0.92rem;
    color: #777;
    line-height: 1.8;
    margin: 0;
}

/* ── Department marquee rows ───────────────────────────────── */
.th-dept-row {
    margin-bottom: 2.8rem;
}

.th-dept-row:last-child {
    margin-bottom: 0;
}

.th-dept-header {
    max-width: 1100px;
    margin: 0 auto 1rem;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.th-dept-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    white-space: nowrap;
}

.th-dept-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #d0d8e8 0%, transparent 100%);
}

.th-dept-link {
    font-size: 0.72rem;
    color: var(--color-accent);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.th-dept-link:hover {
    text-decoration: underline;
}

/* ── Marquee viewport ──────────────────────────────────────── */
.th-marquee-viewport {
    width: 100%;
    overflow: hidden;
    cursor: grab;
}

.th-marquee-viewport:active {
    cursor: grabbing;
}

.th-marquee-track {
    display: flex;
    gap: 1rem;
    will-change: transform;
    /* width set by JS */
}

/* ── Faculty card ──────────────────────────────────────────── */
.th-faculty-card {
    flex-shrink: 0;
    width: 120px;
    background: #fff;
    border: 1px solid #e2e6ef;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.22s, transform 0.22s;
    position: relative;
}

/* thin navy accent line at bottom */
.th-faculty-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.th-faculty-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.th-faculty-card:hover::after {
    transform: scaleX(1);
}

/* photo area: 1:1 square — most uniform across varied source photos */
.th-faculty-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #dde3ee;
    flex-shrink: 0;
}

.th-faculty-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.35s ease;
}

.th-faculty-card:hover .th-faculty-avatar {
    transform: scale(1.04);
}

/* placeholder: same dimensions, initials */
.th-faculty-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, var(--color-primary) 0%, #0d4a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-serif);
    letter-spacing: 0.05em;
}

/* info strip below photo */
.th-faculty-info {
    padding: 0.65rem 0.6rem 0.75rem;
    border-top: 1px solid #eaecf2;
    background: #fff;
    text-align: center;
}

.th-faculty-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.35;
    margin-bottom: 0.2rem;
    letter-spacing: 0.02em;
}

.th-faculty-position {
    font-size: 0.7rem;
    color: #7a8499;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .th-hero-stats {
        gap: 2rem;
    }

    .th-stat-num {
        font-size: 1.7rem;
    }
}
