Why are these soft adjectives, but "-ий" are hard? For example, синий, синяя, синее; not синий, синая, синое.

I'm guessing that this has something to do with the letter 'н', but I'm a little confused.