A fine-grained silicon detector for high-energy gamma-ray astrophysics