Missed period

Had my period may 11-16. Missed my period in June However had some brown spotting when my period was suppose to happen. (June 14)

Took a pregnancy test July 1. (negative) then bled July 2-6.. it was red blood for 2 days then dark brown for 3 and super light. Could I still be pregnant because I had sex june 23 (one week before I tested negative) Or was the negative accurate and there’s no way im pregnant.