Font size change could happen because of the typo in your code. In CSS it seems you missed the "-". (.nav-item a)
.nav-item a { text-decoration: none; color: black; font-size: 18px; }