Studying bonding and electronic structures of materials under extreme conditions