If you’re going in as a freshman, it’s totally doable. Just don’t take a bunch of upper division coursework to make your life easier. Go to assist.org, choose major and UC and fulfill the major req listed at your CSU and fulfill the breadth or IGETC (another form of gen Ed), depending on major.