癖（くせ） is a 名詞（めいし） (noun) that means ‘habit’ or ‘tendency’. However, as it usually refers to a negative thing, ‘vice’ is another accurate translation. くせに
(usually appearing without kanji) is the combination of くせ, and the 格助詞（かくじょし） (case marking particle) に. This structure is often used to criticize the actions of others, and is used in a similar way to ‘despite’, ‘even though’, or ‘and yet’ in English.
As くせ is a noun, くせに
may be used after the 連体形（れんたいけい） (attributive form) of any other word.
Even though you said that you are going to sleep earlier, are you still up?
Why are you working so sluggishly even though you are young?
Despite you also being no pro, why are you talking so high and mighty.
Even though he is a dog, he meows.
癖（くせ） is a word that has developed a ‘negative’ meaning over time. Originally, 癖（くせ） was used to convey a preference, or the side that someone or something tended to lean toward (due to it being favorable for some reason). When adding the 格助詞（かくじょし） に to this, it merely expressed that (A) was the preferable state/location, so (B) not being/not acting in a way appropriate for (A) is less than desirable.