Hi! I'm a Realtor in No. Cal and I thought I'd offer my two cents :)
It sounds like it is a good time for you to start investigating it more, that's for sure. Take some time to evaluate your financial standing: do you have a down payment, how is your credit score, would you qualify for a loan. Talk with your accountant/tax advisor and also a mortgage broker re: your possibilities for a loan (they can't give you an absolute answer but can give you an idea).
3-4 years is not a terribly long time in the Real Estate market and you may or may not realize a profit if you sell then. It would be very important to choose your property carefully and get a good price. Any profit would also depend on the amount of your down payment, loan terms and rates & expenses associated with buying/selling. Can you look at neighborhoods that you would want to be in for a longer time (ie in the school dist you like).
A note about Capital Gains: Capital Gains taxes are due on the gain recognized at the sale of your primary residence IF the gain is more than $500k ($250k for single people). Notice, this is the gain and not the sales price so if you purchase a house for $500k and sell it for $600k, you only have $100k in gain. You do not have to pay tax on this gain. If you buy for $500k and sell for $1.3m, you would have $800k in gain. You get $500k in gain tax free so you would pay taxes on $300k (the amount over $500k). Now, obviously, I'm not an accountant but that is the bare bones of it. Talk with an accountant for information specific to you.
Another point to keep in mind. When you own a home and have a loan on the property, all of the interest is tax deductible. All of it. And when you first buy, your monthly payment will be about 99% interest. So, 99% of your payment is deductible against your income. This is where homeownership really pays off over renting since your rent is not tax deductible. So while you do need to budget for PITI (Principal, interest, taxes & insurance) and maintenance, you also get a very large deduction for your mortgage interest payments.
So, talk with a local accountant, mortgage broker and Realtor for specific information. It could be a great time for you to buy. At the very least, it sounds like it is time for you to start making plans for buying.
HTH & GL!
:-)