A few issues. You are loading both isotope and masonry. They are separate libraries. Isotope has a masonry layout but they are not used together. Remove the library "js/isotope-docs.min.js" and then load the js files like this:
<script src="js/jquery.min.js"></script>
<script src="js/masonry.pkgd.min.js"></script>
<script src="js/scripts.js"></script>
Next you are calling masonry twice with the second call not having any options set:
var elem = document.querySelector('.grid');
var msnry = new Masonry( elem, {
// options
itemSelector: '.grid-item',
columnWidth: '.grid-width',
stagger: 30,
});
// element argument can be a selector string
// for an individual element
var msnry = new Masonry( '.grid', {
// options
});
Change the code to this:
var elem = document.querySelector('.grid');
var msnry = new Masonry( elem, {
// options
itemSelector: '.grid-item',
columnWidth: '.grid-width',
stagger: 30,
});
Third, is you should consider using imagesloaded.js as described hereto avoid image overlaps.