I mean the decline in wealth and clout more than in terms of actual possessions as Portugal ceased to be a major power way before they lost their colonies in the 70s.
On the surface they seem to be a similar to the Dutch, small country empire based on trade more than occupying large territories as Spain did.
Yet the Dutch appear to have done something that the Portuguese couldn't (or maybe I am wrong comparing the two).
Dutch empire left behind a very wealthy state while Portuguese empire left behind a country that is sort of poor for Western European standards - despite the fact that it was spared the devastation in the 20th century.
This bit is irrelevant: Actually the reason why I started wondering about that is the Greek crisis - I looked up if Poland is likely overtake the first one EU15 state in terms of GDP per capita after Greek default only to find out that according to some sources Portugal has GDP lower than Poland (it probably has slightly higher one, but the point still stands). This made me wonder about the history of Portugal and the decline of their once very wealthy empire.
I can't speak of the more recent (last 300 years) of Portuguese history, but I did write about the rise of the Portuguese empire here.
In summary:
Treaty of Tordesillas bound Spain and Portugal's colonies and more importantly routes to those colonies. Portugal largely went east (except for Brazil), Spain exclusively went west through Puerto Rico, to mainland Americas, across the Pacific ocean to the Philippines.
The Dutch rebellion meant Spain and the Netherlands were in conflict for a long time. Earlier in the conflict, Netherlands merchants could still trade in Lisbon. They even set up collaborative plantations in the northeast of Brazil. However, the death of Portugal's king in 1580 led to Spain forcing Portugal into a personal union. This turned Portugal's collaboration with the Dutch into enmity. Thus, the Dutch attacked Portuguese interest both in the Americas and in the east Indies. Spain naturally had more interest in defending the western trade routes and less interest in the east Indies. Ergo, Portuguese colonies in the east were largely lost. In addition, England's enmity against Spain also led to English attacks on Portuguese interests abroad.
By the time the Portuguese restoration war started in the 1670s into the 1680s, many of its colonies and trading powers were already lost. They lost no time in starting negotiations with the Dutch, even as they were still fighting Spain.
Hope this helps!