/* ============================================
   Profile Page Design
   ============================================ */

.profile-container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

@media (max-width: 768px) {
    .profile-container {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
}

.container-narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Header & Cover */
.profile-header {
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 !important;
}

.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    opacity: 0.8;
}

.profile-avatar-row {
    padding: 0 2rem 2rem;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: -60px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    background: var(--bg-card);
    border: 4px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--brand-primary);
    box-shadow: var(--shadow-lg);
    z-index: 5;
}

.profile-title-group {
    padding-bottom: 0.5rem;
}

.profile-name {
    margin: 0;
    font-size: 1.75rem;
    color: var(--text-heading);
}

.profile-role-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

/* Grid Layout */
.profile-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .profile-content-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -60px;
        padding: 0 1rem 1.5rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
        border-radius: 25px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.25rem;
    }
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-body);
    word-break: break-word;
    /* Ensure long emails don't overflow */
}

/* Stats Page Grid (Multiple Cards) */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    align-content: start;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--brand-primary-faint);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Animations */
.profile-container {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}