Here's the answer:
“estava nas nuvens”
Watch a real native speaker say it:
Here's how it sounds in a textbook:
You could also say:
- eu estava nas nuvens
Fun fact: the hundreds of thousands of people learning Portuguese with Memrise get this phrase correct 95.75% of the time!