Yep, the nth child selector is the way to go. But keep in mind that this take a performance hit if the number of portfolio items is huge. [Actually huge.]

In those cases, you’re better of checking the position of an entry and assigning an appropriate class through server side code, PHP in this case, I’m assuming. Then you can merely use the class selector to manipulate specific elements in the front end, as needed.

This way, computation is offloaded to the server instead of the client having to do the job. Again, this only applies if you have a huge number of elements to parse. Otherwise, the simpler method noted above should do.