How do I get the custom category URL from the custom post type?

Once you have the post’s term(s) (see get_the_terms) you can use get_term_link to get the term’s link:

 $url = get_term_link('category-1','portfolio-categories');

You can pass the term object, the term slug, or the term ID. If you pass the term ID it must be cast as an integer.