In Christ, the opposite of legalism is not brazen, in-your-face worldliness (libertinism).
And the opposite of sinful worldliness (libertinism) is not legalism.
Jesus Christ is the opposite of both.
He’s not a legalist and doesn’t boast about that with new found worldliness.
He’s not a boastful sinner and doesn’t display that by acting like a strict legalistic.
I’ve noticed in some church circles each generation takes turns being opposite of the one before.
It’s like a daddy-issues theology. “I am mad at daddy, I haven’t gotten over it, (because I am led primarily by emotion). So I’m going to rebel and be opposite of him.”
It is not at all like this in Jesus Christ.