Write a Kotlin function `fun parseDuration(s: String): Long` that converts a duration string to seconds. Rules: the string is made of up to three parts in this order: hours (`h`), minutes (`m`), seconds (`s`), for example "1h30m", "90s", "2h5s", "1h30m15s". Each part is a non-negative whole number followed by its unit letter. Each unit appears at most once, in that order. At least one part is required. Anything else (empty string, spaces, unknown letters, wrong order, repeated unit, a number without a unit) must throw IllegalArgumentException. Reply with the complete function in one kotlin code block.