A type of protein present in the nucleus of eukaryotic cells that helps to compact DNA into tightly packed chromosomes.