/* ============================================
   team.css — Crafted Team Page Styles
   ============================================ */

/* ── Page Hero ── */
.page-hero {
    background: var(--bg-white);
    border-bottom: 1px solid var(--line);
    padding: 7rem 0 4rem;
    text-align: center;
}
.page-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    display: block;
}
.page-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}
.page-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Team Page Section ── */
.team-page-section {
    padding: 5rem 0 7rem;
    background: var(--bg-light);
}

/* ── Team Grid — auto-fill so adding cards works seamlessly ── */
.team-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

/* ── Member Card ── */
.member-card {
    background: var(--bg-white);
    border: 1px solid rgba(26,26,26,0.08);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.member-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 52px rgba(0,0,0,0.09);
    border-color: rgba(26,26,26,0.17);
}

/* ── Photo Venetian Blind Area ── */
.member-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}
.member-photo-bw {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}
.member-blind {
    position: absolute;
    top: 0;
    left: calc(var(--i) * 20%);
    width: 20%;
    height: 100%;
    background-image: var(--photo-url);
    background-size: 500% 100%;
    background-position: calc(var(--i) * 25%) 0;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: calc(var(--i) * 0.06s);
    pointer-events: none;
}
/* Triggered only when social is hovered (JS adds .color-active) */
.member-card.color-active .member-blind {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.member-card.color-active .member-photo-bw {
    filter: grayscale(0%);
}

/* ── Card Body ── */
.member-body {
    padding: 1.4rem 1.5rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.member-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
    margin: 0;
}
.member-role {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.member-bio {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

.member-focus {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
}

.member-block {
    margin-top: 0.85rem;
}

.member-block-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-main);
    margin: 0 0 0.3rem;
}

.member-skills,
.member-projects {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}

.member-projects a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Card Footer: portfolio link LEFT, socials RIGHT ── */
.member-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--line);
    gap: 0.75rem;
}
.member-portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: opacity 0.2s;
    text-decoration: none;
}
.member-portfolio-link:hover { opacity: 0.55; }
.member-portfolio-link i { font-size: 0.9rem; }

/* ── Social icons — right side ── */
.member-socials {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.member-socials li {
    position: relative;
}
.member-socials a {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: #444;
    border: 1px solid rgba(0,0,0,0.08);
    transition: color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    line-height: 1;
}
.member-socials a .icon-fill {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #000;
    transform: scale(0);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.member-socials a svg,
.member-socials a i {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    font-size: 16px;
    transition: color 0.3s ease;
    flex-shrink: 0;
    display: block;
    margin: auto;
}
.member-socials a:hover {
    color: #fff;
    box-shadow: 0 5px 18px rgba(0,0,0,0.18);
}
.member-socials a:hover .icon-fill { transform: scale(1); }

/* Platform colours */
.member-socials a[data-s="linkedin"]:hover  .icon-fill { background: #0288d1; }
.member-socials a[data-s="github"]:hover    .icon-fill { background: #24292e; }
.member-socials a[data-s="email"]:hover     .icon-fill { background: #ea4335; }
.member-socials a[data-s="whatsapp"]:hover  .icon-fill { background: #25d366; }
.member-socials a[data-s="portfolio"]:hover .icon-fill { background: #1a1a1a; }

/* Tooltip */
.member-socials .tip {
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s, visibility 0.22s;
}
.member-socials li:hover .tip {
    opacity: 1;
    visibility: visible;
}

/* ── Hiring Banner ── */
.hiring-banner {
    margin-top: 3.5rem;
    padding: 2.75rem 2.5rem;
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.hiring-banner h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.3rem;
}
.hiring-banner p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .team-page-grid { grid-template-columns: 1fr; }
    .hiring-banner { flex-direction: column; text-align: center; }
    .member-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .member-socials { margin-left: 0; }
}
