| Income Taxes - Components of Deferred Income Tax Asset (Details) - USD ($) $ in Thousands | Dec. 31, 2021 | Dec. 31, 2020 | 
|---|---|---|
| Deferred tax assets: | ||
| Net operating loss carryforwards | $ 46,062 | $ 65,790 | 
| Research and development credits | 88,778 | 79,019 | 
| Foreign tax credits | 7,695 | 5,728 | 
| Accrued expenses and other | 2,748 | 5,941 | 
| Lease obligation | 1,041 | 1,731 | 
| Accrued compensation | 5,057 | 4,442 | 
| Stock-based compensation | 8,014 | 5,415 | 
| Deferred tax assets, gross | 159,395 | 168,066 | 
| Less valuation allowance | (68,151) | (71,811) | 
| Deferred tax assets, net of valuation allowance | 91,244 | 96,255 | 
| Deferred tax liabilities: | ||
| Fixed assets | (701) | (42) | 
| Leased right-of-use assets | (735) | (1,099) | 
| Intangible assets | (640) | (9,049) | 
| Pension liability | (792) | 0 | 
| Net deferred tax assets | $ 88,376 | $ 86,065 | 
| X | ||||||||||
| 
- Definition Deferred Tax Asset, Lease obligation No definition available. 
 | 
| X | ||||||||||
| 
- Definition Deferred Tax Liabilities, Pension Liability No definition available. 
 | 
| X | ||||||||||
| 
- Definition Deferred Tax Liability, Leased right-of-use asset No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences and carryforwards. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef 
 | 
| X | ||||||||||
| 
- Definition Amount after allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences and carryforwards. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible operating loss carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible foreign tax credit carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible research tax credit carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from employee compensation. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from share-based compensation. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef 
 | 
| X | ||||||||||
| 
- Definition Amount, before allocation of valuation allowance, of deferred tax asset attributable to deductible temporary differences from reserves and accruals, classified as other. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax assets for which it is more likely than not that a tax benefit will not be realized. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax liability attributable to taxable temporary differences from intangible assets other than goodwill. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax liability attributable to taxable temporary differences from long-lived assets other than property, plant, and equipment. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |