I have heard that coffee actually loses caffeine as you roast it, which means darker blends have less caffeine. Why is this?
This is a very common misconception. Coffee does not lose caffeine as it is roasted. It is often misunderstood that darker roasts have less caffeine. Caffeine's melting point is 455F which is well above what most beans reach during the roasting process. Essentially, caffeine content changes because the mass/density of the beans change (they lose water and undergo changes in the roasting process). If you measure your coffee by volume, dense greener beans will have more caffeine. If you measure by weight, darker roasted beans will have more caffeine. The total amount of caffeine in a batch of beans changes very little, if any.