Introduction

The diet of most animals can vary tremendously with their age and body size (Wilbur 1980; Werner and Gilliam 1984; Krenek and Rudolf 2014). Understanding how diet changes with ontogeny can allow us to link the size structure of consumers with their trophic roles and contributions to the flow of energy through ecosystems (Layman et al. 2015), and may further help us to characterize the architecture of food webs (Brose et al. 2006; Dijoux and Boukal 2021). Historically, ecologists have used a number of methods (e.g., gut contents, observations of animals eating, fecal analysis) to build models to describe how species change their diets through ontogeny. However, a growing body of research has shown that intraspecific variation in animal traits can drive heterogeneity in their diet across space and time (Post 2003; Bolnick et al. 2011), calling into question the approach of using a single model of diet through ontogeny for a given species. Instead, multiple within-species models may more accurately explain how diet changes through ontogeny, which may indicate there to be widespread intraspecific variation in where an individual species occupies food webs and consequently their roles in driving ecosystem structure and function (Des Roches et al. 2018). Yet, we still lack a clear understanding of whether ontogenetic changes in diet and trophic position are conserved across populations (reviews by Miller and Rudolf 2011; Nakazawa 2015; Sánchez-Hernández et al. 2019). To address this research gap, here we studied how diet and trophic position varied with ontogeny for an ecologically and economically important generalist consumer across spatially separated local populations. In doing so, we deepen our understanding of how heterogeneity in animal diet as well as natural and human-induced variation in animal body size can influence ecosystem structure, function, and services.

Spatial heterogeneity in the trophic roles of consumers occur for a number of reasons, such as spatiotemporal variation in prey availability (Galarowicz et al. 2006), geographic variation in productivity (Segev et al. 2021), food web architecture (Sánchez-Hernández et al. 2017), predator personality (Wolf and Weissing 2012), and food web fidelity (Kurth et al. 2019). For example, the classic role of purple sea stars (Pisaster ochraceus) as a keystone predator in intertidal systems (Paine 1966; Menge et al. 1994) varies in strength with slight changes in temperature associated with latitude and seasonal events (Sanford 1999). Furthermore, both intrinsic consumer characteristics and extrinsic environmental parameters can govern the strength of the keystone role in this marine predator (Menge et al. 2021). In terrestrial systems, coyotes (Canis latrans) change their diets and roles from apex predators to subordinate mesopredators in the presence of gray wolves (Canis lupus, Colborn et al. 2020). Conspecific consumer roles can also vary substantially throughout their life history via ontogenetic niche shifts. We have long understood that ontogenetic niche shifts can influence species interactions and demographics rates (Werner and Gilliam 1984). More recently, there has been an emerging focus to understand the consequences of ontogenetic shifts in a broader community and food web context (Miller and Rudolf 2011; de Roos and Persson 2013; Nakazawa 2015).

The presence of ontogenetic niche shifts can have consequences that extend from the individual and population levels of consumer species (e.g., growth, survival, recruitment) to community and ecosystem levels (e.g., prey biodiversity and structure, alternative stable states, food web stability). As predators grow, they may experience new foraging opportunities due to changes in their morphology (e.g., increased gape) and behavior (e.g., hunting speed or success, habitat shifts), which can alter patterns in prey consumption (Werner and Hall 1974; Petchey et al. 2008). Ontogenetic shifts in diet often coincide with predators occupying higher trophic positions, which has been demonstrated to strongly affect their roles (Rudolf and Van Allen 2017). Attaining higher trophic positions may be advantageous to the predator, since they are more likely to integrate different biomass pathways over space and time, leading to higher energetic stability than that generally afforded to lower trophic positions (Rooney et al. 2006). Shifts in trophic position also increases food web complexity through heterogeneity in functional positions and increased foraging linkages (Takimoto 2003; van Leeuwen et al. 2014). Theory generally predicts that ontogenetic shifts will increase food web stability (de Roos and Persson 2013), but the effects can be variable (Nilsson et al. 2018) and complex (Rudolf and Lafferty 2011). Much of the focus on the consequences of ontogenetic shifts, including the effects on predator roles, has been theoretical with recent calls to increase empirical examinations on wild populations (Sánchez-Hernández et al. 2019). Such efforts are needed to better understand whether ontogenetic changes in the prey consumed and the coinciding effects on predator roles are conserved across populations (Fig. 1).

Fig. 1
figure 1

Conceptual model that shows how diet and trophic roles can vary during the life history of a predator. The boxes ad represent the different possible outcomes for populations of a two-stage predator (circles) undergoing an ontogenetic niche shift from common (triangles) to different prey (squares or diamonds) occupying different trophic positions (grayscale shading). The role of the predator either remains constant (a, b) or changes between stages (c, d). Comparing any two (or more) boxes (ad) provides a framework for testing the outcomes of predator roles across their ontogenies and the mechanisms driving them across multiple populations. For any two populations, the simplest outcome occurs when they each exhibit the same scenario (i.e., both from the same box). In this situation, both predator populations switch to the same species of prey occupying the same trophic positions, and predator roles are conserved spatially. However, three other between-population outcomes may be realized. First, the species identity of second-stage prey may differ between predator populations, but if they occupy similar trophic positions, the predator roles will be conserved (rows: a vs. b and c vs. d). Second, stage-two prey can be similar in species identity between populations, but if they occupy different trophic positions we expect to observe heterogeneity in predator roles (columns: a vs. c and b vs. d). Such variation in the trophic positions of prey may occur due to their own ontogenetic niche shifts (e.g., life history intraguild predation) or may reflect variation in local food web architecture. Last, the diagonals (a vs. d and b vs. c) reflect heterogeneity of prey identity, their trophic positions, and predator roles

Testing whether ontogenetic changes in trophic ecology are conserved across wild populations requires a tractable, model system. Like many fishes that ultimately become piscivorous, juvenile gag (Mycteroperca microlepis; Epinephelidae) have been shown to undergo ontogenetic diet shifts during their larval (Weisberg et al. 2014) and juvenile phases in the northern (Stallings et al. 2010) and southern Gulf of Mexico (Brulé et al. 2011). However, previous work has not evaluated whether ontogenetic diet shifts are consistent among local populations in terms of the composition of prey consumed or the rate at which gag increase their trophic positions. Broadly, diet shifts during their juvenile phase tend to progress from small to large species of decapods (Malacostraca) and finally to fish prey for this ecologically and economically important predator (Stallings 2010; Stallings et al. 2010). During this phase of their life (young-of-year), gag inhabit seagrass habitats and other rugose benthic areas (Switzer et al. 2015) where their prey are both abundant and diverse (Stallings et al. 2015a). As one of the upper predators in the seagrass systems they occupy, mortality of gag is low during this phase (Koenig and Coleman 1998). The core distribution of seagrass habitats used by juvenile gag is in the eastern Gulf of Mexico, spanning two biogeographic provinces and two ecoregions from warm temperate to subtropical latitudes (Spalding et al. 2007), where the composition and abundance of decapods and fishes (i.e., likely prey) have been shown to vary spatially (e.g., Schrandt et al. 2018; Faletti et al. 2019). Regional heterogeneity in species that are likely to be prey for gag may also reflect a gradient in basal-resource dependence from more phytoplankton-based food webs at higher, eutrophic latitudes to greater dependence on benthic food webs at lower, oligotrophic latitudes (Radabaugh et al. 2013; Lesser et al. 2020; Peake et al. 2022). Because this region covers the geographic center of this generalist predator’s distribution across which heterogeneity of potential prey has been shown to exist, this is an ideal model system to test whether and how ontogenetic changes in trophic ecology vary across local populations.

In this study, we investigated how the diet of juvenile gag varied with body size (ontogeny) across seven spatially separated local populations. We focused on nearly the full-size spectrum of juvenile gag inhabiting seagrass habitats and asked the following questions: (1) Do the diets of a generalist predator that undergoes ontogenetic niche shifts vary among spatially separated local populations? (2) How does ontogenetic and spatial variation in diet affect the trophic ontogenies (roles) of this generalist predator, and is it conserved among local populations? We combined analyses of stomach contents and stable isotopes to address the study questions and show that despite substantial spatial variation in the prey species consumed by gag, their trophic ontogenies and consumer roles were conserved across all local populations.

Material and methods

To address the study questions, we focused on the diet of juvenile gag, a generalist predator that inhabits the coastal waters of the Gulf of Mexico and western Atlantic Ocean. Larvae of these long-lived predators settle to shallow, polyhaline seagrass beds in the late spring where they remain before they move onto shallow, offshore reefs in the fall (Switzer et al. 2015; Stallings et al. 2010). While juvenile gag are in seagrass (~ 5–6 months), they undergo minimal migration (Koenig and Colemen 1998) and exhibit gradual ontogenetic diet shifts, generally from small to large species of decapods and then switching to fishes (Stallings et al. 2010; Brule et al 2011). This general sequence of diet shifts is common among juveniles of piscivorous fishes (Mittelbach and Persson 1998), making gag a suitable model species to address our study questions.

We focused our study on the core geographic extent of the gag distribution. Although populations of gag are found as far north as the western warm temperate Atlantic (e.g., off North Carolina, USA) and as far south as the tropical Yucatan Peninsula (Mexico), the core distribution of juvenile gag that inhabit seagrass habitats is in the eastern Gulf of Mexico (eGOM), from Florida’s (USA) panhandle to its southern peninsula (~ 750 km of coastline; Switzer et al. 2012). Specifically, we sampled local populations of gag during their post-recruitment summer months in seven seagrass systems from St. Andrew Bay to Pine Island Sound (Fig. 2). These seven seagrass systems span from the Warm Temperate Northwest Atlantic province (Northern Gulf of Mexico ecoregion) in the north to the Tropical Northwestern Atlantic province (Floridian ecoregion) in the south (Spalding et al. 2007). Coinciding with the large biogeographic expanse of these focal seagrass systems, the composition and abundance of species that are observed prey of gag vary substantially (DeAngelo et al. 2014; Stallings et al. 2015a; Schrandt et al. 2018; Faletti et al. 2019). As generalist predators, we expected this variation in prey availability to be reflected in the diets of gag.

Fig. 2
figure 2

Map of the study region that shows the locations where local populations of juvenile gag were collected. The labels, from north to south are Saint Andrews Bay (SAB), St. Joseph Bay (SJB), Turkey Point Shoal (TPS), Big Bend Region (BBR), Tampa Bay (TAM), Sarasota Bay (SAR), and Pine Island Sound (PIS)

Within each seagrass system, we collected juvenile gag with a 5 m otter trawl towed for approximately 150 m at a rate of 1.8 km h−2, which is consistent with previous studies (Koenig and Coleman 1998; Stallings et al. 2010). We focused our collections on areas previously demonstrated to have gags present, which were typically at the outer (GOM) edge of the estuaries (Switzer et al. 2012). We collected a total of 900 juvenile gag during annual trips (2003–2006) to the seven seagrass systems. The sizes of the collected fish spanned nearly the full-length spectrum observed during their seagrass-inhabiting phase (Supporting Information, Table S1). Because juvenile gag do not become trawl susceptible until approximately 10 cm total length, we were unable to sample smaller individuals (i.e., ~ 2–9 cm total length). Upon capture, we measured gag for total length and placed them on ice in the field, followed by preservation in a − 20 °C freezer. Freezing does not cause offsets in stable isotope analysis of gag (Stallings et al. 2015b).

In the laboratory, gag were thawed before processing, which involved three primary techniques: (1) stomach content analysis, (2) bulk-tissue stable isotope analysis of δ15N (SIA), and (3) compound-specific amino acid stable isotope analysis of δ15N (CSIA-AA). Stomach contents can provide high-resolution taxonomic information about what consumers eat, but are limited to snapshots of recent foraging and may be further affected by the digestive state of prey. In contrast, stable isotope analyses integrate long-term trophic information, but lack the taxonomic resolution about which specific prey are consumed as indicated by stomach contents. Thus, each technique provides different information about the feeding ecology of consumers and can complement each other when used in combination (Bradley et al. 2015; Harrod and Stallings 2022). We followed standard protocols for all three techniques, which are briefly summarized here. For stomach contents, we identified and counted each prey item to the lowest taxonomic level possible (usually species) and measured their dry-blotted wet mass (in grams). For both stable isotope techniques, we used white muscle tissue ventral to the dorsal fin, removed from gag that were randomly and evenly sampled across their length range from each population (primarily within the range of 10–25 cm total length for consistency among populations).

Stomach contents require large sample sizes due to empty stomachs or highly digested prey commonly observed (reviewed by Harrod and Stallings 2022). We conducted stomach content analyses on all 900 juvenile gag. In addition to revealing the geographic distribution of prey consumed, we used stomach content analysis to examine two dynamical patterns to test whether ontogenetic diet shifts were consistent across populations. The first pattern we analyzed was the timing of diet shifts from small to large decapods and then to fishes (e.g., Stallings et al. 2010). The second dynamic pattern was based on the observation that prey size often scales with trophic position in marine ecosystems (e.g., Hussey et al. 2014). Thus, consistency in diet shifts would be reflected as similar relationships between the sizes of gag and their prey. The analytical procedures for these examinations are described below.

Stable isotope analysis of muscle tissue provides information on feeding patterns across a time window that extends well beyond the snapshot provided by stomach content analysis. SIA of nitrogen has become a common method used to describe the trophic position of consumers (Harrod and Stallings 2022), but can be influenced by both temporal and geographic variation in isotopic baselines (McMahon et al. 2013). CSIA-AA of nitrogen can also be used to describe consumer trophic position, and can separate source (i.e., isotopic baselines) from trophic amino acids (McClelland and Montoya 2002). Specifically, source amino acids undergo minimal fractionation of 15N during trophic transfer and are therefore isotopically similar to the primary producer in the consumer’s food web. In contrast, trophic amino acids are strongly fractionated and therefore can be used to estimate the trophic position of consumers by calculating the difference between it and the source amino acid. Here, we subtracted phenylalanine (Phe) as the source from both glutamic acid (Glu) and aspartic acid (Asp) for the trophic effect (Chikaraishi et al. 2009). We used multiple amino acid pairs to address the issue of inherent variation in physiologically mediated discrimination (Whiteman et al. 2019). Because stable isotope values reflect assimilated diet, they require substantially smaller sample sizes compared to stomach contents (reviewed by Kjeldgaard et al. 2021; here: npopulation = 32, ntotal = 224 for SIA; npopulation = 12, ntotal = 84 for CSIA-AA). We estimated trophic position (TP) using the equation TPGlu/Phe = (δ15NGlu − δ15NPhe − 3.4)/7.6 + 1, where the constant 3.4 is the estimated difference between the δ15N values of trophic and source amino acids (β), and the constant 7.6 is the mean enrichment per trophic level (trophic discrimination factor, TDF), based on Chikaraishi et al. (2009). Note that although these constants have been widely used to estimate trophic positions of consumers, variance in TDF has been reported (e.g., McMahon and McCarthy 2016). However, we assumed that any discrepancy between the constants we used and actual values was consistent among populations within our focal species.

The analytical procedures differed between the two stable isotope techniques. For SIA, we placed dried, ground samples with a weight of 200–1000 μg in tin capsules and sealed them for combustion and isotopic analysis. Using a Carlo-Erba NA2500 Series II elemental analyzer (Carlo Erba Reagents, Milan, Italy) coupled to a continuous-flow Thermo Finnigan Delta + XL isotope ratio mass spectrometer (Thermo Finnigan, San Jose, California, USA), we measured 15N/14N. The lower limit of quantification for this instrumentation was 12 μg N. We used calibration standards NIST 8573 and NIST 8574 L-glutamic acid standard reference materials. Analytical precision, obtained by replicate measurements of NIST 1577b bovine liver, was ± 0.19‰ for δ15N.

For CSIA-AA, we followed the methods used in Corr et al. (2007). We first hydrolyzed proteins by adding 2 mL of 6 M HCl to approximately 1 mg dry weight of muscle tissue within a 20 mL glass vial and heated at 100 °C for 24 h. After heating, the resulting solution was evaporated at 70 °C under flowing N2. The dry sample was redissolved in 0.05 N HCl and transferred to a Dowex 50wx8, 200–400 mesh cation-exchange resin column constructed within a clean Pasteur pipette. De-ionized water was then used to flush non-amino acid material from the column, and the retained amino acids were eluted from the resin using 3 M NH4OH. The eluent was thoroughly evaporated within a 70 °C drying oven, and the remaining amino acids were esterified at 100 °C for 1 h using 2 mL of anhydrous isopropanol acidified with acetyl chloride (4:1). Esterified amino acids were then dried under flowing N2, acylated using a solution of acetone, trimethylamine, and acetic anhydride (5:2:1 by volume), and heated for 10 min at 60 °C. The acylated amino acids were dried again under flowing N2 and dissolved again using 2 mL of ethyl acetate. We then extracted organic components by adding approximately 1 mL of NaCl-saturated water to the solution and evaporated to dryness again under flowing N2. The samples were kept refrigerated until they were injected into the gas chromatography–combustion–isotope ratio mass spectrometer (GC–C–IRMS). Before injection into the GC–C–IRMS, the derivatized samples were dissolved in 1 mL ethyl acetate, and 50 µL of the resulting solution was placed in a glass auto-sampler vial. 15N/14N was measured in replicate with an Agilent 6890 GC and Thermo Finnigan GCC-III interface coupled to a continuous-flow Thermo Finnigan Delta + XL isotope ratio mass spectrometer. Analytical precision was ± 0.17‰ for Glu, ± 0.18‰ for Asp, and ± 0.31‰ for Phe. Results are presented in standard notation (δ, in ‰) relative to air as δ15N = [Rsample/Rstandard − 1] × 1000, where R is 15N/14N. Both bulk SIA and CSIA-AA were conducted at the University of South Florida, College of Marine Science in St. Petersburg, Florida.

Statistical analysis

To address our study questions, all analyses involved diet responses (stomach contents, stable isotopes, or trophic positions) to both gag size and geographic location of local populations (i.e., seagrass system). For the stomach contents, we reduced the taxonomic resolution to the family level and to prey types (Table S2). We did this for two reasons. First, some prey could not be identified to the species or genus levels, but all could be confidently identified to the family level, thus ensuring consistency of taxonomic resolution across samples. Second, our study was concerned with the timing and consistency of diet shifts and corresponding variation in the trophic roles of gag within and across local populations, not the actual species contributing to them. Thus, these lower taxonomic resolutions and prey types were assumed to be appropriate at capturing these trophic dynamics. Prey types defined decapods (and similar invertebrate prey) as either “small” (e.g., hippolytid shrimps) or “large” (e.g., penaeid shrimps) groups based on maximum sizes attainable for these benthic-associated species and “fishes.”

With a focus on stomachs observed to contain prey items (i.e., empty stomachs were excluded), we conducted both multivariate and univariate analyses of the stomach contents data. We used permutation-based ANCOVA to test whether gag diet (number of observed prey at the family taxonomic level) varied with the main and interactive effects of total length (as a covariate) and population location. The interaction term was not significant (p > 0.05), so we dropped it from the model and focused on the main effects. The ANCOVA was based on the Bray–Curtis resemblance matrix of square root-transformed number of prey. We followed this with permutation-based pairwise tests to identify differences in diet between population locations. We also performed a canonical analysis of principal coordinate (CAP) ordination to visualize among-population variation and overlap of diet in multivariate space. We simplified the output of the CAP by plotting centroids with 95% confidence intervals for each local population. Multivariate analyses were performed using Primer version 7 (Clarke and Gorley 2015).

We used generalized linear mixed models (glmm; binomial family) to examine the relationships between the presence of each of the three main prey types (i.e., small decapods, large decapods, fish) with the main and interactive effects of total length and population location, and individual fish ID included as a random variable. Again, none of the interaction terms were significant (p > 0.05), so we dropped them from the models and focused on the main effects. We also calculated the empirical cumulative distribution function (ECDF) for each of the three main prey types (i.e., small species of decapods, large species of decapods, fishes) that have been previously described as those observed during ontogenetic diets shifts of juvenile gag (e.g., Stallings et al. 2010). We plotted the prey groups against gag total length both across populations for each prey type and within populations for all three prey types together. This semi-quantitative approach allowed for a visualization of the sizes and rates at which gag shifted their diets across the seven local populations. These analyses were performed in the R statistical environment (R Core Team 2021) with the lme4 package (Bates et al. 2015) for the glmms and plotted using the ggplot2 package (Wickham 2016).

Next, we conducted four additional glmms on the stomach contents data. The responses, per stomach, for each of the four models were: (1) number of prey items, (2) taxonomic richness of prey (family level), (3) total mass of prey, and (4) maximum prey mass. Again, the separate glmms tested the effects of both gag total length and population location, with individual fish ID included as a random variable. We used a Poisson distribution for the number of prey and taxonomic richness models using the lme4 package (Bates et al. 2015). Total prey mass and maximum prey mass were non-integer data, so we used a quasi-Poisson distribution with the MASS package (Venables and Ripley 2002).

Last, we conducted four mixed effects ANCOVAs (Gaussian distributions) on the stable isotope data with the responses: (1) δ15Nbulk values (SIA), (2) δ15NGlu-Phe values (CSIA-AA), (3) δ15NAsp-Phe values (CSIA-AA), and (4) TPGlu/Phe. As with the stomach contents data, the ANCOVAs tested the effects of both gag total length and population location, with individual fish ID included as a random variable. The interaction between gag total length and location was significant in the δ15Nbulk model. Thus, we performed separate models of the relationships between δ15Nbulk and gag size for each of the seven local populations. For simplicity, we plotted the seven models together on a single graph. The interaction term was not significant for any of the other three models, so it was dropped. All ANCOVAs were performed in the base package for the R statistical environment (R Core Team 2021) and outputs were plotted using the ggplot2 package (Wickham 2016).

Results

We found that the trophic ontogenies of gag were conserved across the seven local populations despite high levels of variation in the prey they consumed. Of the 900 stomachs inspected, 664 (74%) included contents (overall empty = 26%, rangepopulation = 13–41%). Stomach contents were diverse and primarily represented by decapods and bony fishes from 25 families plus two groups of unidentified prey (Fig. 3; Tables S2–3 and Fig. S1). Most stomachs with prey contained a single item (both mode and median = 1). However, there was notable variation in both the number of prey items (mean = 2.49 items stomach−1, se = 0.15, min = 1, max = 24) and their taxonomic richness (mean = 1.45 families stomach−1, se = 0.03, min = 1, max = 4). Likewise, the mass of prey per stomach tended to be fairly low (median = 0.9 g stomach−1, se = 0.09), but with some stomachs having high prey mass (max = 18.56 g, 14% of stomachs containing > 3 g of prey).

Fig. 3
figure 3

Numerical proportion of observed prey by family in the diet of juvenile gag across the seven local populations (n = 664 fish with prey in stomach contents). Prey families and unidentified groups accounting for 95% of the observations are individually identified and are presented in descending order of abundance from zero on the figure (i.e., Penaeidae was the most abundant across populations). Fourteen additional families/taxa, accounting for a combined representation of 5% across populations, are listed as “Other,” and included (in descending order of representation): Gerreidae, Sciaenidae, Alpheidae, Lutjanidae, Serranidae, Ostraciidae, Blenniidae, Euphasiidae, Fundulidae, polychaetes, Engraulidae, Processidae, Atherinopsidae, and Xanthidae

Diet of juvenile gag varied with their total length, reflecting a general trend of ontogenetic shifts from small and large species of decapods to fishes (pseudo-F1,426 = 6.84, p = 0.001, permutations = 999). However, the diet also varied among local populations (Pseudo-F6,426 = 2.84, p = 0.001, permutations = 999). Indeed, the diet differed in 12 of the 21 (57%) possible pairwise tests between local populations (p < 0.05). After controlling for ontogenetic variation in diet, the observed prey consumed within local populations differed from two to all six of the other populations (Fig. 4). The presence of the three main prey also varied with total length, but in opposite directions for invertebrates [small decapod coef (se) = − 0.14 (0.04), z = − 3.80, p < 0.001; large decapod coef(se) = − 0.08 (0.03), z = -2.61, p = 0.009] versus fish dietary items [coef (se) = 0.16 (0.04), z = 4.37, p < 0.001; Fig. 5]. Regional variation in diet was further reflected in substantial differences in the composition and timing of diet shifts among each local population (Figs. S2–5). Notably, the sizes at which we observed half the cumulative proportion of fish in the different locations to reach piscivory varied by 4.2 cm, which represented 27% of the entire range of sizes we examined. However, there was no spatial pattern in this variation. For example, the populations with the smallest (Pine Island Sound) and largest (Sarasota Bay) fish to reach piscivory were adjacent to each other and were the two locations that were farthest south. Although neither the number of prey [coef (se) = − 0.014 (0.013), z421 = 1.02, p = 0.31] nor their richness [coef (se) = − 0.005 (0.012), z421 = 0.40, p = 0.69] were related to gag size, both the total mass [coef (se) = 0.125 (0.012), t421 = 10.84, p < 0.001] and maximum prey mass [coef (se) = 0.121 (0.013), t421 = 9.28, p < 0.001] were positively related to predator total length.

Fig. 4
figure 4

Centroids of the loadings (± 95% confidence intervals) from a canonical analysis of principal coordinates (CAP) ordination for each of the seven local populations (n = 664)

Fig. 5
figure 5

Fitted probabilities of the three main prey types (small decapods, large decapods, fish) against total lengths of juvenile gag collected across seven local populations (n = 664)

Overall, δ15Nbulk values had a positive relationship with the total length of juvenile gag (F1,210 = 15.80, p < 0.0001). However, population location also had a strong effect on δ15Nbulk values (F6,210 = 33.02, p < 0.0001) and, importantly, trophic ontogenies when measured with δ15Nbulk were not consistent across the seven study locations (interaction F6,210 = 3.49, p = 0.0023; Fig. S6). Individual models indicated δ15Nbulk values were positively related to total length for only four (p < 0.05 for St. Joseph Bay, Turkey Point Shoal, Tampa Bay, and Sarasota Bay) of the seven local populations (p > 0.05 for St. Andrews Bay, Big Bend, and Pine Island Sound), and model fit was generally low (R2median = 0.13, R2range = 0.009–0.35).

Values of δ15NGlu-Phe [coef (se) = 0.26 (0.024), F1,70 = 116.55, p < 0.0001; Fig. S7a], δ15NAsp-Phe [coef (se) = 0.27 (0.024), F1,70 = 114.46, p < 0.0001; Fig. S7b], and estimated trophic positions [coef (se) = 0.03 (0.003), F1,70 = 115.93, p < 0.0001; Fig. 6] were positively related to total length of gag. Model fit was better for both amino acid pairs (δ15NAsp-Phe R2 = 0.65; δ15NGlu-Phe R2 = 0.66) compared to that for bulk stable isotopes. There were no differences in location for either amino acid pair (δ15NGlu-Phe F6,70 = 1.88, p = 0.10; δ15NAsp-Phe F6,70 = 2.05, p = 0.07) or estimated trophic position (F6,70 = 1.88, p = 0.10). Importantly, the interaction term between gag total length and location was not found to be statistically significant in any of the models (δ15NGlu-Phe F6,70 = 1.04, p = 0.41; δ15NAsp-Phe F6,70 = 0.54, p = 0.78; TPGlu/Phe F6,70 = 0.99, p = 0.44), indicating that the patterns of increasing trophic position through ontogeny were consistent across local populations (Fig. 6).

Fig. 6
figure 6

Fitted (trendlines), 95% confidence interval (gray envelope), and observed (points) values of the estimated trophic positions of juvenile gag against their total lengths across local populations (n = 12 per location; N = 84). The legend lists the local populations by latitude (top is north) and their complete names are provided in Fig. 2

Discussion

Despite high spatial heterogeneity in diet, trophic ontogeny as measured by two pairs of CSIA-AA was conserved across the geographic extent of the study, suggesting that the roles of this generalist consumer scaled consistently with its body size across local populations (i.e., consistent with Fig. 1, row c vs. d). This finding suggests that while predators may vary in their behavior and the prey they consume, the manner by which their position in the food web changes with ontogeny can be incredibly consistent. Thus, the emerging patterns identified in this study indicated that although the species composition of prey varied tremendously across locations, there were overriding patterns in the architecture of the food web in which juvenile gag foraged that transcended species identities.

Diet heterogeneity was expected to some degree among the seven locations, given the observed availability of different prey, both in composition and abundance, from the different seagrass systems. Indeed, such foraging plasticity in response to variation in prey availability has been observed in generalist predators (e.g., Cavallo et al. 2020; Moorhouse-Gann et al. 2020; Ng et al. 2021). However, there was no apparent spatial structure in the stomach contents data such as a latitudinal trend, by distance, or between ecoregions (i.e., Northern Gulf of Mexico versus Floridian ecoregions; Spalding et al. 2007). In fact, diet differed between most of the pairwise comparisons between local populations, including those that were adjacent to each other, reflecting a high degree of spatial heterogeneity. This observation suggests the composition of prey was patchy at the scale of the local seagrass systems, independent of the underlying regional species pool. Spatial patchiness in abundance and composition is a common feature in benthic communities, particularly for those with high regional diversity. Since generalist consumers tend to respond to the relative availability of prey (Nelson et al. 2015), spatial patchiness would be expected to be reflected in their diets. Hamilton et al. (2011) similarly found the diet of California sheephead (Semicossyphus pulcher) varied among local populations even at small spatial scales, and that geographic variation in diet was related to both prey availability and demographic rates of this generalist predator.

Despite variation in the identity of prey consumed, larger gag ate larger prey, likely a result of increased gape and capture ability. The distribution of body sizes, including that of prey, tends to scale with trophic position in marine ecosystems (Romanuk et al. 2011; Hussey et al. 2014; Potapov et al. 2021; but see Keppeler et al. 2020), which would explain the observed consistency in increased trophic positions across populations (Fig. S8). In addition, we observed diets of the three main prey types that slowly transitioned from a mix of small and large invertebrates to fishes as gag attained larger sizes. These gradual transitions were qualitatively consistent across local populations and provide further insight on the mechanisms responsible for the conservation of trophic ontogeny across the geographic extent of the study. However, there was variation across populations in the sizes at which gag became piscivorous. The variation was not related to latitude, which could have reflected greater search and capture times for gag in the northern populations located in eutrophic/mesotrophic waters (higher turbidity) compared to the southern, more oligotrophic waters (e.g., Chacin and Stallings 2016). Stallings (2010) experimentally demonstrated a lack of preference between shrimp and fish prey for gag (same size range as examined here) that accounted for half of the cumulative proportion of fish prey consumed. In addition, capture and handling times for invertebrate prey may be shorter compared to fish. Capture success of prey is affected by a complex suite of characteristics, including encounter rates and mobility of the prey. One prediction of optimal diet theory is that predators chose prey with low escape ability (reviewed by Sih and Christensen 2001). Although fish prey should provide more total energy per gram to gag, prey that are easier to capture, such as hippolytid shrimps and portunid crabs, may provide higher net energy due to lower energetic costs to the consumer. These types of prey can be abundant but patchy, which may have explained the variation in sizes to piscivory across locations. In addition, gastric evacuation of crustacean prey can be slower than that for soft-bodied fishes (Beukers-Stewart and Jones 2004), which can bias the apparent importance of invertebrates in stomach contents data. It is also important to note that the estimated increase in trophic position was rather modest for the size range of gag we examined, but we used a constant value for the discrimination factor. The emerging picture in stable isotope research is that trophic discrimination factors likely decrease with each trophic step (Hussey et al. 2014). If this was the case in the current study, the increase in trophic position would be higher than what we estimated (i.e., steeper slopes). The larger individuals from all locations were mostly piscivorous. Thus, because diets at the upper end of the length range examined here were similar, any diet-related influences on trophic discrimination factors (e.g., McCutchan et al. 2003) among larger individuals would have also become similar among locations. Future work can examine the complex interplay between ontogenetic diet shifts, diet-related influences on trophic discrimination factors, and estimates of trophic position.

Ontogenetic diet shifts can cause faster growth rates and higher survival (Post 2003), which are especially important during early life stages (Sogard 1997). These effects are consistent with and extend previous work on the growth and survival of juvenile gag. Growth of gag in seagrass habitats can exceed 1 mm day−1, which has been linked to the combined effects of abundant prey available to them and voracious feeding behaviors (Stallings et al. 2010). Survival of gag is also very high during this post-settlement phase (Koenig et al. 1998). Ontogenetic diet shifts may improve survival by reducing both predation risk and competition with other consumers (Post 2003; Wollrab et al. 2013). Moreover, attaining higher trophic positions may afford gag with greater energetic stability if this allows them to integrate their diet across different biomass pathways (Rooney et al. 2006). However, consumers that are considered generalists at the species level can exhibit ontogenetic stage-level specializations, which can make them vulnerable to loss of resources (Rudolf and Lafferty 2011). Moreover, Araujo et al. (2011) suggest that stability can only be realized if higher-level predators do not specialize. Our work contradicts this suggestion with strong evidence that spatial dietary variation (whether through specialization or responding to the prey that are available) does not undermine the typically stabilizing effects of attaining higher trophic levels.

This study also highlights the power of using multiple methods to understand the trophic dynamics of consumers (reviewed by Harrod and Stallings 2022). Because the different methods track different processes and resolutions of consumer diets, they are complementary when used in combination and can provide a more comprehensive understanding of trophic ecology compared to any single method (Bradley et al. 2015; Potapov et al. 2021). High heterogeneity in diet was reflected in both stomach contents and bulk stable isotopes. Had we relied solely on these measures, we would have concluded that the trophic ontogenies were highly variable among the seven local populations. This would have led us to incorrectly conclude that there was spatial context dependency in the roles of this generalist predator. Stomach contents data are notoriously noisy, and because bulk stable isotopes mix both trophic- and baseline-derived amino acids, they are sensitive to spatial and temporal variation in baseline isotope levels. We were able to correct for this issue by using CSIA-AA to reveal conserved trophic ontogenies of gag across space. Although CSIA-AA has been around for decades (e.g., McClelland and Montoya 2002), its use has remained low, likely due to the combined effects of high costs and training required relative to bulk stable isotope analysis. However, CSIA-AA can control for spatial and temporal variability in isotopic baselines that may cause misinterpretations of bulk stable isotope data. We hope this study and others (e.g., Hetherington et al. 2022) help to demonstrate ways this powerful approach can be used to address a number of different ecological topics.

Our results have shown that the trophic ontogenies of a generalist predator were highly conserved across geographically separated local populations. Given the high degree of diet heterogeneity we observed, this finding suggests that even though the dietary patterns differed, the underlying architecture of the food web of juvenile gag transcended variation in prey species across locations. Our work builds upon decades of theoretical research and small-scale empirical work to address a critical gap in our understanding of whether ontogenetic shifts vary among populations across large spatial scales (reviews by Miller and Rudolf 2011; Nakazawa 2015; Sánchez-Hernández et al. 2019). As almost all multicellular organisms exhibit some degree of niche shifts with associated trophic growth (Wilbur 1980), we agree with recent reviews that have highlighted the need to expand empirical research to better understand the mechanisms and consequences of ontogenetic trophic shifts in regard to community and ecosystem perspectives at large spatial scales (Nakazawa 2015; Sanchez-Hernandez et al. 2019).