The Buddha defined the tiniest specks of matter (paramanu) [synonymous with ‘atoms’] to be occupying (and moving about within) time and space, whilst flickering in and out of existence. This is how the Buddha redefines matter (rupa) as being both ‘existant’, and ‘insubstantial’ (or non-existant).
Instead, the Buddha reiterated that different types consciousness arises out of specific material conditions, and that without the presence of these specific material conditions, the different types of consciousness do not arise. The concept of Buddhist consciousness does not constitute a theistic ‘atma’, or ‘soul’ that stands in opposition to the material world, but is in fact a product of conditions arising out of the material world.
The Buddha explains that the world is experienced through the six senses, which in the Buddhist teachings includes the ‘mind’ as a sense-organ. Whether or not an ‘idealist’ position exists within later Buddhism is a matter of academic dispute.