It's a combination of both. Hard work often creates opportunity, which can allow for luck to happen. I think luck also has a lot to do with being around the right people as well. If you network and are in the places where you want to be, then you can get lucky and have things that are considered lucky happen a lot easier