/**
 * Stylesheet: team page
 * Usage: layouts/team/list.html and content/team/_index.md
 * Variables: static/assets/css/variables.css
 */

 

/* ---------------------------------------------------------------------------
   Section wrapper — one per position group
--------------------------------------------------------------------------- */

.team_section {
    max-width: 1400px;
    margin: 0 auto 56px;
    padding: 0 16px;
    box-sizing: border-box;
}

.team_section_title {
    font-family: var(--dv-font);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dv-navy);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--dv-navy);
}


/* ---------------------------------------------------------------------------
   Full member grid — auto-fill columns
--------------------------------------------------------------------------- */

.team_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    font-family: var(--dv-font);
}


/* ---------------------------------------------------------------------------
   Alumni grid — compact multi-column layout
--------------------------------------------------------------------------- */

.team_grid--alumni {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}


/* ---------------------------------------------------------------------------
   Full member card
--------------------------------------------------------------------------- */

.member_card {
    background-color: var(--dv-bg);
    border: 1px solid var(--dv-border);
    border-radius: 12px;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(12, 12, 79, 0.06);
}

.member_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(12, 12, 79, 0.12);
    border-color: var(--dv-navy);
}


/* ---------------------------------------------------------------------------
   Alumni card — name only, no fixed height
--------------------------------------------------------------------------- */

.member_card--alumni {
    min-height: unset;
    padding: 16px;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 8px;
}

/* Alumni name — slightly muted vs active members */
.member_card--alumni .member_name {
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.75;
}

/* No lift effect on alumni cards */
.member_card--alumni:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(12, 12, 79, 0.08);
    border-color: var(--dv-navy);
}


/* ---------------------------------------------------------------------------
   Photo block
--------------------------------------------------------------------------- */

.member_photo {
    width: 100%;
    flex-shrink: 0;
}

.member_photo img {
    width: 100%;
    aspect-ratio: 3 / 3;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* Placeholder shown when no photo is provided */
.member_photo_placeholder {
    width: 100%;
    height: 220px;
    background-color: #ededf2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9090a8;
    font-size: 3rem;
}

.member_photo_placeholder::after {
    content: "○";
}


/* ---------------------------------------------------------------------------
   Name and position label
--------------------------------------------------------------------------- */

.member_name {
    padding: 20px 20px 4px;
    margin: 0;
    font-family: var(--dv-font);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dv-navy);
    text-align: center;
    word-break: break-word;
}

/* Position label — uppercase, accent colour */
.member_status {
    margin: 0;
    padding: 0 20px 16px;
    font-family: var(--dv-font);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dv-red);
    text-align: center;
}


/* ---------------------------------------------------------------------------
   Info block: research topic + contact links
--------------------------------------------------------------------------- */

.member_infos {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px;
    flex: 1;
}

/* Thin top border visually separating info from photo area */
.member_infos::before {
    content: "";
    display: block;
    height: 1px;
    background-color: var(--dv-border);
    margin-bottom: 4px;
}

/* Research topic — clamped to 4 lines to keep cards a consistent height */
.member_themes {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--dv-navy);
    opacity: 0.75;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ---------------------------------------------------------------------------
   Contact and external links
--------------------------------------------------------------------------- */

.member_links {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--dv-border);
}

.member_link {
    font-size: 0.85rem;
    font-family: var(--dv-font);
    font-weight: 600;
    color: var(--dv-navy);
    text-decoration: none;
    word-break: break-word;
    transition: color 0.15s ease;
}

.member_link:hover {
    color: var(--dv-red);
    text-decoration: underline;
}

.member_link:focus-visible {
    outline: 2px solid var(--dv-red);
    outline-offset: 2px;
}


/* ---------------------------------------------------------------------------
   Empty state
--------------------------------------------------------------------------- */

.no_member {
    text-align: center;
    font-family: var(--dv-font);
    font-size: 1rem;
    color: var(--dv-navy);
    opacity: 0.6;
    margin: 40px 0;
}


/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .team_section {
        padding: 0 12px;
        margin-bottom: 36px;
    }

    .team_grid {
        gap: 16px;
    }

    .team_grid--alumni {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }

    /* Remove fixed min-height so cards fit their content on small screens */
    .member_card {
        min-height: auto;
    }

    .member_photo img {
        aspect-ratio: 3 / 3;
    }
    
    .member_photo_placeholder {
        height: 280px;
    }
}
