I googled around and I managed to solve this. I added data-target="main-content" to post links in home.php and made a separate code for smooth-scrolling for these links.
<li class="slide">
<a data-target="main-content" href="<?php echo get_permalink(); ?>">
<?php the_post_thumbnail(); ?>
<div class="bubble">
<h5><?php echo get_the_title(); ?></h5>
</div>
</a>
</li>
jquery:
$('.slide a').on('click', function(event) {
event.preventDefault();
var target = "#" + $(this).data('target');
$('html, body').animate({
scrollTop: $(target).offset().top
}, 1300, 'easeInOutCubic');
});