# [K (ngn/k)], 24 bytes
-1 byte from @ngn's improvement
{`c$x-32*y{y_x,y~:*x}/x}
[Try it online!][ngn-2c8057c7]
Adapted from my answer on the [Speed of Lobsters](https://codegolf.stackexchange.com/questions/217690/speed-of-lobsters/218688#218688) code golf.
* `y{...}/x` set up a reduction seeded with y (the characters to search for), run over the characters in x (the full string). confusingly, within the function itself, x and y are flipped. this ends up returning a boolean array with 1s in the positions containing the desired matches and 0s everywhere else
* `y~:*x` compare the first character to search for (`*x`) to the current character being iterated over (`y`), updating y with the result of 0 or 1. note that as soon as we have matched all the search characters, no more matches will be identified (since a character will never ~ (match) a 0 or 1)
* `x,` append this result to the list of characters to search for (essentially overloading the reduction to end up returning the desired output)
* `y_` if there was a match, drop the first character (if there wasn't a match, this is a no-op). this allows us to search for the next search character in the next iteration of the reduction
* `` `c$x-32* `` multiply this bitmask by 32, representing the offset necessary to capitalize characters at truthy indices, subtract it from the original text, and convert that result "back" to a string/text
[K (ngn/k)]: https://codeberg.org/ngn/k
[ngn-2c8057c7]: https://ngn.codeberg.page/k/#eJxVjs9rwjAYhu/9Kz6CByu6wXZrTk5kG+ywQ9kUKeuXLK1hsZH0V0LRv32JqwxzeCHv87zwFcmQ84ldPD7M3OC+7Nydk5k93dtTFEVpMkx27mySAu7A0lz/0GleoFTUUkdNnHkp3U1JJTphoNRVhVDKToDTLbRHQkknjySmXvj4F16vwjvJLnNUCpq9gF4b9V0DQt1gKfxaYRnW+HbDl4E/i3Hc7503Q3rz82U71gyRM8Y5Q0+R8UDZEvkTW4XuIs2JJTRE7HMzDq1/15Zswuevd0Ip3UPdsgMaWQlo5CHc6IRogrpd3/A1pIFnv8PQblo=