Shareholder equity increases because the company's net assets increase.
A company can have negative earnings and EPS but own valuable assets (such as real estate, intellectual property, etc.) that is rising in value. It is entirely possible the company has no revenues (or is even posting losses) but is making investments which are rising in value, thus affecting the net assets of the company. There's nothing odd about this at all.
The opposite occurs quite often too. An otherwise profitable company may see a decline in asset value for varying reasons, such as a decline in real estate holding values, unfavorable exchange rates on itf foreign currency/asset holdings, drop in the value of a wholly-owned subsidiary, and so on.
Another scenario is when a company receives deposits in one quarter from a customer but doesn't actually make delivery of the product until the next quarter, when it can actually record having earned the revenue. In such instances, the company's cash position increased immediately with receipt of the deposit but net revenue and income won't be reflected until the revenue is actually earned.
It's a mistake to equate profitability with a rise in net asset value, because there is no automatic correlation. Too many other factors come into play which can impair asset value.
And to your final question, yes, it is ALWAYS possible that overall net assets decline despite shareholders increasing their equity investment. How? The pace of declines in company holdings is faster than the rate of new capital infusion.