How can nitrogen be both inert and bond with everything in periodic table?
Nitrogen as an atom can be bound to any other atom of the periodic table. But nitrogen as a molecule is something else. It is $\ce{N2}$ and the two atoms are strongly bound in the molecule. It is even extremely difficult to separate the two atoms from the molecule $\ce{N2}$, because $\ce{N2}$ contains a triple bond : there are three covalences between the two atoms. That is why $\ce{N2}$ is nearly inert. A huge amount of energy is needed to break these three bonds. And it is usually impossible to do it in a lab at ordinary temperatures. Some plants (beans, peas) are able to do it and to metabolize $\ce{N2}$ by a somewhat mysterious process.