This is the 3162nd most frequent Swedish word.
nästan
Almost.
Here, 'nästan' is used as an adverb meaning 'almost', indicating the proximity to completing the project.
Jag är nästan klar med projektet.
I am almost finished with the project.
In this sentence, 'nästan' describes the degree of darkness by meaning 'almost', showing how close the room was to being completely dark.
Det var nästan helt mörkt i rummet.
It was almost completely dark in the room.
The word 'nästan' indicates the near completion of the journey to the destination.