Fair Value Measurements - Summary (Details) - USD ($) $ in Thousands | Mar. 31, 2021 | Dec. 31, 2020 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | $ 329,503 | $ 885,562 |
Investments | 957,660 | 504,544 |
Total | 1,298,839 | 1,405,735 |
U.S. Treasury bills | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 78,787 | 49,546 |
Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 182,759 | 130,970 |
Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 553,473 | 240,765 |
U.S. Agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 133,532 | 83,263 |
Sovereign debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 9,109 | |
Long-term Investments | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 11,676 | 15,629 |
Cash | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 34,614 | 20,398 |
Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 294,889 | 865,164 |
Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 329,503 | 885,562 |
Investments | 78,787 | 49,546 |
Total | 408,290 | 935,108 |
Level 1 | U.S. Treasury bills | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 78,787 | 49,546 |
Level 1 | Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 1 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 1 | U.S. Agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 1 | Sovereign debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | |
Level 1 | Long-term Investments | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 1 | Cash | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 34,614 | 20,398 |
Level 1 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 294,889 | 865,164 |
Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 0 | 0 |
Investments | 878,873 | 454,998 |
Total | 878,873 | 454,998 |
Level 2 | U.S. Treasury bills | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 2 | Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 182,759 | 130,970 |
Level 2 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 553,473 | 240,765 |
Level 2 | U.S. Agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 133,532 | 83,263 |
Level 2 | Sovereign debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 9,109 | |
Level 2 | Long-term Investments | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 2 | Cash | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 0 | 0 |
Level 2 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 0 | 0 |
Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 0 | 0 |
Investments | 0 | 0 |
Total | 11,676 | 15,629 |
Level 3 | U.S. Treasury bills | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 3 | Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 3 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 3 | U.S. Agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | 0 |
Level 3 | Sovereign debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 0 | |
Level 3 | Long-term Investments | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Investments | 11,676 | 15,629 |
Level 3 | Cash | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | 0 | 0 |
Level 3 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total cash and cash equivalents | $ 0 | $ 0 |