Sounds like you know what you're doing. As far as how long you should spend in each city, what kinds of things are you looking to do while you're there? Portland definitely has a great beer scene, sounds like that's something you can/will pursue. And if you're couchsurfing, I suppose it depends what kind of hosts you end up with.