/**
 * Employee profile pages — theme-aware, Qubibyte-branded.
 *
 * Content panels use plain block layout + single-column flex lists.
 * No CSS grid for roles/highlights — grid rows were forcing dead space
 * inside section boxes on wide screens.
 */

body.employee-page {
    background: var(--bg-primary, #0a0a1a);
    color: var(--text-primary, #f1f5f9);
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.employee-hero {
    position: relative;
    padding: 96px 0 28px;
    overflow: hidden;
    color: #fff;
}

.employee-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    transform: scale(1.04);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

body.employee-page.is-ready .employee-hero-bg {
    transform: scale(1);
}

.employee-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(6, 135, 201, 0.82) 0%, rgba(85, 74, 158, 0.78) 48%, rgba(171, 111, 175, 0.72) 100%),
        linear-gradient(to top, rgba(10, 10, 26, 0.55) 0%, transparent 55%);
}

.employee-hero-inner {
    position: relative;
    z-index: 1;
}

.employee-hero-inner .back-link {
    margin-bottom: 16px;
}

.employee-hero .employee-back-link {
    font-family: 'Khand', system-ui, sans-serif;
    font-size: 1.15em;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    gap: 8px;
    opacity: 0.92;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.employee-hero .employee-back-link:hover {
    opacity: 1;
    color: #fff;
    transform: translateX(-3px);
}

.employee-hero .employee-back-link svg {
    transition: transform 0.25s ease;
}

.employee-hero .employee-back-link:hover svg {
    transform: translateX(-2px);
}

.employee-hero-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 24px 32px;
    margin-top: 4px;
}

.employee-hero-identity {
    display: flex;
    align-items: center;
    gap: 26px;
    min-width: 0;
    text-align: left;
}

.employee-headshot-wrap {
    position: relative;
    flex-shrink: 0;
    width: clamp(148px, 16vw, 176px);
    height: clamp(148px, 16vw, 176px);
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.45));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.25),
        0 16px 40px rgba(0, 0, 0, 0.32);
    animation: employeeHeadshotIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.employee-headshot-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--bg-card, #141428);
}

.employee-hero-text {
    min-width: 0;
    animation: employeeTextIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.employee-badge {
    display: inline-block;
    margin: 0;
    padding: 5px 14px;
    border-radius: 99px;
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 1.4vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
}

.employee-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.employee-personal-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.employee-personal-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    text-decoration: none;
}

.employee-personal-social a img {
    width: 22px;
    height: auto;
    display: block;
    opacity: 0.9;
    filter: none;
    transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

html[data-theme="light"] .employee-personal-social a img {
    filter: invert(1);
}

.employee-personal-social a:hover img {
    opacity: 1;
    transform: translateY(-1px);
}

.employee-hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    color: #fff;
}

.employee-primary-role {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.3vw, 1.55rem);
    font-weight: 600;
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.95);
}

.employee-since {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    color: rgba(255, 255, 255, 0.78);
}

/* ── Quote (hero) ─────────────────────────────────────────────────── */
.employee-quote-card {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.employee-quote-card--hero {
    padding: 28px 30px 28px 36px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    animation: employeeTextIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}

.employee-quote-card--hero::before {
    content: '\201C';
    position: absolute;
    top: 0;
    left: 8px;
    font-family: var(--font-display);
    font-size: 5.5rem;
    line-height: 1;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.22);
    pointer-events: none;
    user-select: none;
}

.employee-quote-card--hero::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 3px 0 0 3px;
}

.employee-quote-text {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3.6vw, 2.65rem);
    font-weight: 600;
    line-height: 1.45;
    font-style: italic;
}

.employee-quote-line {
    display: block;
}

.employee-quote-card--hero .employee-quote-text {
    color: #fff;
}

.employee-quote-attribution {
    display: block;
    margin-top: 12px;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.employee-quote-card--hero .employee-quote-attribution {
    color: rgba(255, 255, 255, 0.82);
}

/* ── Main content: intrinsic-height panels ────────────────────────── */
.employee-content {
    padding: 28px 0 32px;
}

.employee-content-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 860px;
}

.employee-panel {
    display: block;
    margin: 0;
    padding: 20px 24px;
    border-radius: 14px;
    background: var(--bg-card, #141428);
    border: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
    box-shadow: var(--shadow-card, 0 4px 20px rgba(0, 0, 0, 0.22));
}

.employee-panel-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.employee-panel-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--gradient-primary, linear-gradient(135deg, #0687C9, #AB6FAF));
}

/* About */
.employee-prose p {
    margin: 0 0 1em;
    font-family: var(--font-body);
    font-size: 1.05em;
    line-height: 1.75;
    color: var(--text-secondary);
}

.employee-prose p:last-child {
    margin-bottom: 0;
}

.employee-prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Leadership roles — single-column rows, no grid */
.employee-role-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.employee-role-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-primary, #0a0a1a);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.employee-role-row:hover {
    border-color: var(--color-secondary, #0687C9);
    transform: translateX(4px);
    box-shadow: 0 6px 20px -10px var(--color-secondary-glow, rgba(6, 135, 201, 0.35));
    color: inherit;
    text-decoration: none;
}

.employee-role-row-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 220px;
    min-width: 0;
}

.employee-role-dept {
    font-family: var(--font-body);
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent, #AB6FAF);
}

.employee-role-title {
    font-family: var(--font-display);
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

.employee-role-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
}

.employee-role-tenure {
    font-family: var(--font-body);
    font-size: 0.9em;
    color: var(--text-muted);
    white-space: nowrap;
}

.employee-role-acting {
    padding: 2px 8px;
    border-radius: 99px;
    font-family: var(--font-body);
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-secondary-light, #38bdf8);
    background: rgba(6, 135, 201, 0.14);
    border: 1px solid rgba(6, 135, 201, 0.28);
    white-space: nowrap;
}

.employee-role-arrow {
    flex-shrink: 0;
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 1.1em;
    font-weight: 700;
    color: var(--color-secondary, #0687C9);
    line-height: 1;
}

@media (min-width: 768px) {
    .employee-role-row-labels {
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
    }

    .employee-role-dept {
        flex: 0 0 108px;
    }
}

/* Highlights — single-column rows */
.employee-highlight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.employee-highlight-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-primary, #0a0a1a);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.employee-highlight-row:hover {
    border-color: var(--border-hover, rgba(6, 135, 201, 0.35));
    transform: translateX(4px);
}

.employee-highlight-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.05em;
    background: linear-gradient(135deg, rgba(6, 135, 201, 0.18), rgba(171, 111, 175, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.employee-highlight-text {
    font-family: var(--font-body);
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-secondary);
}

.employee-highlight-text strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.employee-footer {
    background: var(--bg-deepest, #060614);
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--border-default);
}

.employee-footer p {
    font-family: var(--font-body);
    color: var(--text-muted);
    margin: 0;
    font-size: 0.85em;
}

/* ── Animations ───────────────────────────────────────────────────── */
@keyframes employeeHeadshotIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

/* ── Light theme ──────────────────────────────────────────────────── */
html[data-theme="light"] .employee-panel {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .employee-role-row,
html[data-theme="light"] .employee-highlight-row {
    background: var(--bg-secondary, #f8f9fc);
}

html[data-theme="light"] .employee-role-row:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .employee-highlight-icon {
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .employee-footer {
    background: var(--bg-secondary);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .employee-hero-profile {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .employee-hero {
        padding: 92px 0 28px;
    }

    .employee-hero-identity {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .employee-hero-meta {
        justify-content: center;
    }

    .employee-headshot-wrap {
        width: 140px;
        height: 140px;
    }

    .employee-quote-card--hero {
        padding: 22px 22px 22px 28px;
    }

    .employee-panel {
        padding: 16px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .employee-hero-bg,
    .employee-headshot-wrap,
    .employee-hero-text,
    .employee-quote-card--hero,
    .employee-role-row,
    .employee-highlight-row {
        animation: none !important;
        transition: none !important;
    }
}
