How can I access a template variable from an include that is loaded via ajax?
Since you are only trying to access the existing entry model, you should be able to do something like this:

portfolio/_entry.twig

{% set project = entry %}
...
&lt;h1&gt;{{ project.title }}&lt;/h1&gt;