Thumbnail is showing outside its div instead of inside it

the_post_thumbnail() echo the output, hence that’s why the thumbnail is misplaced.

To manually echo the output, you should use get_the_post_thumbnail() instead:

echo '<div class="post-image right">' . // wrapped
    get_the_post_thumbnail(null, 'featured-portrait-large') . '</div>';

Or you can instead do this:

echo '<div class="post-image right">';
the_post_thumbnail('featured-portrait-large');
echo '</div>';