  We present spectra of the afterglow of GRB 021004 taken with WHT ISIS and VLT
FORS1 at three epochs spanning 0.49--6.62 days after the burst. We observe
strong absorption likely coming from the host galaxy, alongside absorption in
HI, SiIV and CIV with blueshifts of up to 2900 km/s from the explosion centre
which we assume originates close to the progenitor. We find no significant
variability of these spectral features. We investigate the origin of the
outflowing material and evaluate various possible progenitor models. The most
plausible explanation is that these result in the fossil stellar wind of a
highly evolved Wolf-Rayet star. However, ionization from the burst itself
prevents the existence of HI, SiIV and CIV close to the afterglow surface where
the fast stellar wind should dominate, and large amounts of blueshifted
hydrogen are not expected in a Wolf-Rayet star wind. We propose that the
Wolf-Rayet star wind is enriched by a hydrogen-rich companion, and that the GRB
has a structured jet geometry in which the gamma rays emerge in a small opening
angle within the wider opening angle of the cone of the afterglow. This
scenario is able to explain both the spectral line features and the irregular
light curve of this afterglow.
