Congrats on getting the home and starting the process. I too live in Marin, and feel it is a solid long term market for apprecaition, and utilizing the power of principle reduction.
When it comes to refinancing, figure out what the loan costs will be, then divide that buy the monthly savings with the new loan in order to determine how long you have to maintain that loan to break even.
If you use the Heloc option and decide to rent it out, don't forget that property (or you) will have to cover both your primary and secondary position notes.
I don't personally see Marin being a great mid term market. Perhaps if you were right next to the college, or a hospital. Otherwise with the dwindling tech sector in SF, and the remote work (2-3 days a week) that is most likely here to stay, it just doesn't seem like a strong mid term market to me. With that being said, look up other mid term postings in our area and do some research on it.
Your mentioned Heloc a few times. If the property breaks even, or operates in the red currently, it will only operate deeper in the negative (unless you find a strong ROI like creating more bedrooms, convert a non living space to living space, etc) with another loan.
Figure out what your goals are before you make your decision. If you like your job, and your goal is to create long term wealth through equity then keep the property, fix it up over time, and in the future you will be able to rent it out for profit. If your goal is cash flow, then your best bet may be to live in it for 2 years, and then take that tax free gain (250k single person, 500k married) and buy elsewhere.
Best to you and this journey. Be proud that you were able to break into this market. If you ever want to meet up in Marin and grab a coffee to discuss, let me know.