.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.profile-avatar-wrap {
    margin-bottom: 1rem;
}

.profile-avatar-wrap .avatar {
    margin: 0 auto;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-role {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-level-bar {
    margin-bottom: 1rem;
}

.profile-level-bar .level-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
}

.profile-level-bar .bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.profile-level-bar .bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--accent);
}

.profile-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-top: 1rem;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
}

.profile-info-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.profile-info-label {
    color: var(--text-muted);
}

.profile-info-value {
    color: var(--text-secondary);
}

.profile-info-edit {
    color: var(--text-muted);
    padding: 0.25rem;
    font-size: 0.8125rem;
}

.profile-info-edit:hover {
    color: var(--accent);
}

.profile-content {
    min-width: 0;
}

.profile-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    border: 1px solid var(--border);
}

.profile-tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.profile-tab:hover {
    color: var(--text-primary);
}

.profile-tab.active {
    background: var(--accent);
    color: #fff;
}

.profile-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

@media (max-width: 480px) {
    .profile-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 0.125rem;
    }

    .profile-tab {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .profile-card {
        padding: 1rem;
    }

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

    .profile-stats {
        gap: 0.75rem;
    }

    .profile-stat-value {
        font-size: 1.125rem;
    }
}

@media (max-width: 360px) {
    .profile-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
