add styles if custom header was included

get_header has an action hook called, (surprise!) get_header which gets a single parameter – the name of the header file. So what we do is check that name and if it matches our name we add a style. So something like this:

add_action( 'get_header', 'wpse_260353_add_css_for_header' );

function wpse_260353_add_css_for_header( $name ){
   if( 'modern' === $name ){
      wp_enqueue_style('landing-style', get_template_directory_uri() . '/css/navbar.css');
   }
}