Evolving the Mind: On the Nature of Matter and the Origin of Consciousness