Rabbi Rahumai said: Illumination preceeded the world, since it is written (Psalm 97:2), "Cloud and gloom surround Him." It is thus written (Genesis 1:3), "And God said, 'let there be light,' and there was light." They said to Him, "Before the creation of Israel your son, will you then make him a crown?" He replied yes. What does this resemble? A king yearned for a son. One day he found a beautiful, precious crown, and he said, "This is fitting for my son's head." They said to him, "Are you then certain that your son will be worthy of this crown?" He replied, "Be still. This is what arises in thought." It is thus written (2 Samuel 14:14), “He thinks thoughts.”
Holy Ground and the Bahir's View of Earth
Sefer HaBahir 1:16