Can I join the legion and do the Civil War quest line AFTER completing the main story?
Solution 1:
Yes.
I've done this succesfully. The main questline was one of the first questlines that I finished (mainly to get the Dragon Shouts exclusive to it), and the Civil War questline (the Imperial Legion path) was one of the last questlines I finished (because I can't decide who to support, initially).
A word of warning, though: There are a few bugs associated with one of the main quests, coming from a variety of questlines, including the Civil War questline.
If you do not trigger these bugs, or have done a workaround, you should be able to complete the Civil War questline even after the main questline has been finished.
More info:
http://uesp.net/wiki/Skyrim:Main_Quest
http://uesp.net/wiki/Skyrim:Stormcloaks
http://uesp.net/wiki/Skyrim:Imperial_Legion