as ‘за’ is followed by either the accusative or the instrumental case, shouldn’t it be тайну or тайной? Now it seems that it stays a nominative case.
English Translation
So, what’s your secret?
From ChatGPT:
In the sentence “Что у тебя за тайна?”, the noun “тайна” is in the nominative case because of how the “что за…” construction works in Russian.
Explanation:
The construction “что за + noun (in nominative)” is used to ask “what kind of…” or “what is this…”, and the noun following “за” is always in the nominative case, not genitive or accusative.
Compare these:
Что за человек он? — What kind of person is he?
Что за книга у тебя? — What kind of book do you have?
Что за тайна у тебя? — What kind of secret do you have?
Even though “у тебя” might make you think of genitive (like in possession), the “что за…” phrase overrides that and requires nominative for the noun that follows.
Analogy:
Think of “что за…” almost like saying “What is this [thing]?” — and since you’re identifying or categorizing something, the noun is the subject of an implied sentence and stays in the nominative.