Double nope. Both collecting sensitive information and/or transferring sensitive information to a foreign nation are espionage. Further, the information need not be classified, the entity the information is transferred to need not be foreign, and foreign nations need not be adversaries. You hand over a document from the US military to a US newspaper - espionage. You draw a sketch in a notebook of a military base - espionage. Listening in on government frequencies to get information for a domestic terrorist group - espionage. A sketchy dude gives you a briefcase and tells you to hand it to another sketchy dude - potentially espionage.
Mishandling of classified documents you had clearance to see, or aiding a foreign adversary are related crimes.
Which you're free to so as long as you've never held a security clearance and/or signed the NDA.
The only exceptions are material covered under the Atomic Energy Act of 1954, which has never really been legally tried (it would probably fall apart — how is anyone supposed to know they have a duty to protect a document that says "Restricted Data"?), and the identities of undercover intelligence officers.