Sounds like you want a Model View Controller framework (MVC) rather than a Content Management System (CMS) which itself could potentially be an MVC. Have a look at Catalyst. I am not a fan of the API for Catalyst, but it's what we got. If you have never worked with an MVC then please understand you have a potentially tremendous learning curve ahead of you. At the very least, the organization, designing and planning involved in porting your existing site will be daunting at best. I recommend identifying the most crucial aspects of your site and work towards rebuilding those in parralel with the maintenence of your existing site. Good luck!