Introduction

Gold nanoparticles (GNPs) are metallic nanoparticles broadly used in areas such as biomedical science, sensing, catalysis, optics, electronics, etc. (El-Bendary and Moharam 2018). GNPs are utilized in the medical field for several purposes, such as targeted drug delivery, photothermal therapy, biosensors, and bioassays (Hu et al. 2020). In environmental monitoring, sensing applications identify heavy metals, toxins, and organic and inorganic pollutants quickly and sensitively (Paul and Tiwari 2015). Metal nanoparticles possess exceptional catalytic potential due to their high surface area-to-volume ratio and high rate of surface adsorption ability, which lower the activation energy band (Singh et al. 2018). These properties of GNPs are the reason behind potential pollutant dye removal and antimicrobial activities (Singh et al. 2020). Advancements in the fabrication of nanomaterials, such as those based on polymers, metals, and their oxides, carbon, and silicon attached with organic ligands and covalent functionalization create highly sensitive and selective colorimetric sensors for metal detection (Rasheed et al. 2022).

The ruby red color of colloidal gold with nanoscale dimension has unique properties (Barnawi et al. 2022). Surface plasmonic resonance (SPR) of GNPs is an optical phenomenon due to the interaction of electromagnetic waves, triggering oscillation of the free surface electrons in the conduction band (Bai et al. 2020). SPR depends upon the shape, size of GNPs, and the dielectric constant of the solution (Ogarev et al. 2018). Chemical and physical methods of GNPs synthesis involve harmful chemicals that pollute the environment and induce health hazards. Contrary to chemical and physical methods of GNPs synthesis, the green synthesis approach using microbes such as bacteria, algae, fungi, and plant materials is simple, cost-effective, and energy-saving, with less environmental impact (Singh et al. 2018; Manoj Kumar et al. 2020; Santhosh et al. 2022). Fungi are the unique contenders for the intracellular, extracellular, or cell-free synthesis of GNPs and the possibility of efficient large-scale production (Molnár et al. 2018). Many fungi have been exploited for GNPs synthesis, such as Aspergillus sydowii (Vala 2015), Aspergillus flavus, Phoma exigua, Aspergillus niger, Trichoderma reesei (Chakravarty et al. 2015), Cladosporium cladosporioides (Joshi et al. 2017), Fusarium oxysporum (Pourali et al. 2018; Naimi-Shamel et al. 2019), Macrophomina phaseolina (Sreedharan et al. 2019), Aspergillus terreus (Priyadarshini et al. 2014a), Humicola sp. (Syed et al. 2022), Penicillium purpuronum (Priyadarshini et al. 2014a, b, c; Pradhan et al. 2011; Nayak et al. 2011). Fungi are capable of secreting a large number of bioactive metabolites responsible for the reduction of metal ions and capping of nanoparticles (Priyadarshini et al. 2021).

Some of the species-specific enzymes reported for nanoparticle synthesis are xylanases of Aspergillus niger LE (NE) and Trichoderma longibrachiatum L2 (TE) for silver-gold alloy nanoparticles (Elegbede et al. 2019). Phytochemicals such as tannins, flavonoids, phenols, diterpenes, alkaloids, glycosides, and carbohydrates were present in extracellular secretions of Aspergillus terreus used for nanoparticle synthesis (Rani et al. 2017). NADPH-dependent nitrate reductase and anthraquinones of Fusarium oxysporum reduce silver ions into silver nanoparticles (Durán et al. 2005; Drake and Hazelwood 2005; Rai et al. 2021); also, α-NADPH-dependent nitrate reductase with phytochelatin was reported for silver nanoparticles synthesis (Kumar et al. 2007). Recently, it was claimed that NADPH alone could produce smaller, monodispersed, and stable silver nanoparticles better than in the presence of nitrate reductase (Hietzschold et al. 2019). The understanding of the role of metabolites and proteins secreted by the fungus that induce nanoparticle formation and its stability is still not clear. However, the stability of GNPs in colloidal solution is an important attribute of facile applications in nanobiotechnology (Das et al. 2014).

Due to their optical properties and ability to conjugate with other molecules, GNPs are highly sensitive and selective sensors for metal ion detection. Changes in the interparticle distance along with the size and shape of GNPs are involved in sensing analytes including heavy metal ions. The naked eye can easily detect as the color of the solution changes from red to purple due to aggregation of GNPs (Dhumale et al. 2021). Magnesium ion detection is crucial in various fields, including healthcare, environmental monitoring, industrial processes, etc. Magnesium ions play a vital role in enzymatic reactions and cellular functions (Amirjani et al. 2022). Monitoring magnesium ion levels helps ensure proper cellular function and can provide insight into various physiological processes (Zhang et al. 2017). The intracellular concentration of free Mg2+ ranges from 0.5 to 0.7 mM. Both hypo- and hypermagnesemia can lead to serious health issues. Monitoring calcium and magnesium ion concentrations in water is crucial for assessing water hardness (Wang et al. 2011; Kim et al. 2017). The recommended limit of magnesium in ambient surface water by the United States Environmental Protection Agency is 35 mg/l. The World Health Organization has set a recommended limit of 30 mg/l in wastewater (Mustapha and Adeboye 2014). Magnesium salts were more toxic than sodium salt to aquatic plants such as Lemna aequinoctialis and Hydra viridissima (Bogart et al. 2019).

Colorimetric and optical sensing of metal ions provides an easy and fast way of detection and overcomes the complexity of conventional methods such as atomic absorption spectroscopy (AAS) and inductively coupled plasma-mass spectroscopy. Most sensors that have been reported are unable to discriminate between Mg2+ and other metal cations, particularly Ca2+ and Zn2+ (Tuan et al. 2021; Li et al. 2016). Thus, it is challenging to develop colorimetric sensors for biological and environmental analysis that have selectivity specifically toward Mg2+ while minimizing interference from other ions (Paderni et al. 2022). Most of the reported colorimetric studies demonstrated a high degree of sensitivity and selectivity in the detection of magnesium ions; however, they necessitated post-synthesis modification of the GNP surface using a functionalizing ligand specific to magnesium ions. The current work used a one-step, quick, sensitive, and economical method without requiring additional functionalization of the GNP surface.

This study focuses on exploiting the cell-free extract of Aspergillus austwickii CO1, which acts both as a reducing and capping agent in the fabrication of GNPs, under optimized conditions. Further, the biosynthesized GNPs were observed to be more selective toward Mg2+ ions than other metal ions. The effectiveness of this GNP solution as a colorimetric sensor for detecting Mg2+ ions with the naked eye was established.

Materials and methods

Chemicals

Hydrogen tetrachloroaurate (HAuCl4.3H2O), and metal chlorides such as barium chloride (BaCl2), calcium chloride (CaCl2), cadmium chloride (CdCl2), cobalt chloride (CoCl2), chromium chloride (CrCl2), copper chloride (CuCl2), mercury chloride (HgCl2), magnesium chloride (MgCl2), nickel chloride (NiCl2), lead chloride (PbCl2), tin (II) chloride dihydrate (SnCl2), and zinc chloride (ZnCl2) were purchased from Sigma-Aldrich Co. (USA) of analytical reagent grade. Trisodium citrate dihydrate was purchased from Merck. Ultrapure MilliQ water (Type I) was used for the preparation of all solutions. For fungus isolation and cultivation, Potato Dextrose Agar (PDA) and Potato Dextrose Broth (PDB) from HiMedia were used.

Fungus selection and identification

The fungus was isolated from the mineral/ore dump area i.e., mineral-contaminated soil, and designated as fungus CO1. The morphological features of the fungus were examined under a phase-contrast microscope using lactophenol cotton blue. Molecular identification of the fungus CO1 was made by internal transcribed spacer (ITS) recombinant DNA gene sequencing analysis. Fungal DNA was isolated, and polymerase chain reaction (PCR) amplification was carried out using fungi primer for ITS1 and ITS4 to amplify the ITS regions. The amplified product was sequenced, and the Basic Local Alignment Search Tool (BLAST) sequence similarity search was conducted for identification.

Gold nanoparticles synthesis

In 100 ml of PDB, the fungus was allowed to grow for 72 h at 30 °C and 120 rpm speed in an orbital shaking incubator. Biomass was separated and washed thoroughly using sterilized MilliQ water. The biomass was resuspended further in 100 ml MilliQ water and incubated under similar conditions for another 72 h. The extracellular filtrate (ECF) collected after biomass filtration comprises the extracellular metabolite secreted by fungus, which was used for GNPs synthesis. For optimization of the synthesis process, variation in pH (at original pH of ECF, 5, 6, 7, 8, 9, and 10), variation in reaction temperature (room temperature (RT), 40, 60, 80, and 100 °C), and variation in precursor AuCl 4  concentration (0.5, 1, 1.5, 2 and 2.5 mM) were done. For optimizing pH incubation temperature was RT (30 °C) and AuCl 4  concentration was 1 mM. pH was adjusted with NaOH and HCl. Effect of these variations in GNP characteristics was studied. The kinetics of GNP synthesis was studied using UV–Vis absorption spectra and particle size analysis.

Characterization of gold nanoparticles

UV–Vis spectroscopic analysis of biosynthesized GNPs was performed using BioTek Synergy H1 UV–Visible spectrophotometer with microplate reader in the range of 300–800 nm. The crystallinity of synthesized GNPs was studied by X-ray diffraction pattern obtained under PANalytical X’Pert PRO. Anton Paar Litesizer 500 Particle Analyzer was used to determine the hydrodynamic diameter and zeta potential of the synthesized GNPs at 658 nm. The shape and size of GNPs were analyzed using FEI Tecnai G2 20 Twin transmission electron microscope (TEM). The electron microscope Zeiss SUPRA 55 was used to evaluate the chemical elemental composition of GNPs solution by energy-dispersive X-ray (EDX) analysis. The BRUKER Fourier transform infrared ALPHA-II spectra in the 4000–400 cm−1 region was used to compare the ECF before and after NPs synthesis to recognize the functional groups involved in the synthesis and stability.

Colloidal stability of biosynthesized GNPs

The stability of colloidal GNPs was observed at regular intervals for around 4 months spectrophotometrically. Citrate-GNPs (Cit-GNPs) were chemically synthesized using trisodium citrate as a reducing and stabilizing agent. Into 20 ml of 1 mM HAuCl4.3H2O heated at 95 °C, 2 ml of 1% trisodium citrate was added and heated for another 12 min (Priyadarshini et al. 2022). For testing the stability of biosynthesized GNPs and citrate-GNPs, they were exposed to NaCl which induce high ionic concentrations in the colloidal GNP solution. For this, different concentrations of NaCl (0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, and 0.5 M) were added to GNP solutions in 1:1 ratio (GNPs solution: NaCl solution). The resulting solutions were observed visually and spectrophotometrically.

Detection of metal ions by synthesized gold nanoparticles

Metal detection ability of biosynthesized GNPs was examined using different metal ion solutions containing cations such as Ba2+, Ca2+, Cd2+, Co2+, Cr2+, Cu2+, Hg2+, Mg2+, Ni2+, Pb2+, Sn2+, and Zn2+. Experiments were carried out at RT by treating GNP solution with metal solution (100 ppm) in a ratio of 1:1. Analysis to determine the minimum detection limit (MDL) of Mg2+ was carried out with a concentrations range of 5, 10, 20, 40, 60, 80, and 100 ppm Mg2+ solution. Any changes in color and deviation in the SPR peak of GNPs were recorded spectrophotometrically.

Result and discussion

Fungus characteristics

Fungus CO1 displayed typical morphological features of Aspergillus species with yellowish-green spores making the colony look powdery, and the reverse colony appeared cream in color (Fig. 1a and b). Conidiophores appeared to be rough, with round vesicles and radiated phialides (Fig. 1c). Both morphological characterizations along with ITS1 and ITS4 regions sequencing were carried out for exact identification of the strain up to the species level (Zulkifli and Zakaria 2017).

Fig. 1
figure 1

Ptotograph showing colony characteristics of Fungus A. austwickii CO1 on PDA solid media plate a from front, b from back, c phase-contrast microscopic image, and d the phylogenetic tree of CO1 based on percent identity (above 90%)

ITS genomic sequencing was exposed to BLAST sequence analysis. The fungus CO1 showed maximum similarity with Aspergillus austwickii DTO 228-F7 with percent identity of 97.01%. It was given the accession number a NR_171607.1. A phylogenetic tree was constructed using the maximum parsimony method with the Min-mini heuristic algorithm in MEGA11 software (Tamura et al. 2021). The consensus tree represented the evolutionary history of the isolate, constructed from 1000 bootstrap hits (Fig. 1d). The group of fungi Aspergillus austwickii, A. aflatoxiformans, A. flavus, and A. fasciculatus along with fungus CO1 shared a same most recent common ancestor (MRCA). Thus, from morphological, molecular, and phylogenetic analysis, the isolate fungus CO1 was assumed to be most similar to A. austwickii, so we assigned it the name A. austwickii CO1. A. austwickii is a newly described species in the A. flavus clade (Frisvad et al. 2019).

Aspergillus species are potential producers of a wide range of diverse secondary metabolites of economic importance (Siddiquee 2018). Bioactive secondary metabolites with potential enzymatic activities and properties such as antibacterial, antiviral, anti-inflammatory, etc. were newly discovered from coral-derived fungus Aspergillus austwickii SCSIO41227 (Chen et al. 2023). Newly discovered compounds like polyketides, asperfuran, and kojic acid dipalmitate along with twelve more identified compounds showed an inhibitory effect on enzymes pancreatic lipase, neuraminidase, and acetylcholinesterase. This indicates these components are potential future candidates for new therapeutic techniques.

Aspergillus species have been mentioned as potential biological tools for the synthesis of metal nanoparticles (El-Bendary and Moharam 2018). As GNP synthesized using A. flavus filtrate tested safe on normal foreskin fibroblast cell lines, in contrast, it is cytotoxic to both breast and lung carcinoma human cell lines. Nanoparticles synthesized by A. austwickii need further investigation to comprehend the potential and possible side effects.

Optimization of conditions for gold nanoparticle synthesis

For optimization of extracellular synthesis of GNPs by A. austwickii CO1, three parameters including pH of ECF, reaction temperature, and concentration of gold salt were considered. The variation in pH ranging from 5 to 10, reaction temperatures (40, 60, 80, and 100 °C, including RT), and the AuCl 4 —concentrations of 0.5, 1, 1.5, 2, and 2.5 mM were studied.

Effect of pH

The pH of the solution is one of the key factors for synthesizing stable GNPs with desirable shapes and sizes (Minati et al. 2014; Yang et al. 2017). To find the effect of pH, the pH of ECF was adjusted to different pH, ranging from 5 to 10, and was reacted with 1 mM of AuCl 4  at RT. Also, the original ECF with the pH 7.7 was reacted with 1 mM of AuCl 4 . After 24 h of incubation and reaction at room temperature, the corresponding SPR peak for GNPs was measured spectrophotometrically. The reaction mixture having pH 7, 8, and 9 changes the color from colorless to purple (Fig. 2a). The SPR peak at different pH exhibited different wavelength maxima, i.e., 555 nm, 554 nm, and 562 nm at pH 7, 8, and 9, respectively. As lower absorbance maxima suggest smaller nanoparticle, the slightly alkaline pH was effective in the GNPs synthesis compared to the acidic pH. It was reported earlier that OH ions increase the reduction rate of metal ions (Roy et al. 2016).

Fig. 2
figure 2

Extracellular synthesis of GNPs by A. austwickii CO1 at different a pH, i.e., original (ori), 5, 6, 7, 8, 9, 10 (inserted image shows the optical image of the GNP solutions), b temperatures, i.e., RT, 40, 60, 80, 100 °C (inserted image shows the optical image of GNP solutions), and c AuCl 4  concentrations i.e., 0.5, 1, 1.5, 2, and 2.5 mM (inserted image shows the optical image of the GNP solutions)

Effect of temperature

The effect of temperature on GNPs synthesis was at RT (23 °C ± 1), 40, 60, 80, and 100 °C (Fig. 2b). At higher temperatures (100 °C), the color of the solution changed quickly to ruby red with a narrow SPR peak indicating an accelerated rate of reduction. Boiling the ECF extracted from A. austwickii CO1 in a water bath after adding metal salt was appropriate for dispersed GNP synthesis. Similar reports of better dispersed GNPs with a sharp and narrow SPR peak of the GNPs synthesized at high temperatures exist (Mohan et al. 2019; Rai et al. 2006; Latif et al. 2018). From the results, it can be concluded that the higher reaction temperature favored the increased reduction rate and subsequent high nucleation rates. This rapidly consumes most of the gold ions resulting in the higher concentration of smaller-sized GNPs and completion of reaction in shorter time.

Effect of precursor gold salt concentration

With the inherent pH (7.7) of ECF and 100 °C temperature, GNP synthesis was carried out by taking different AuCl 4  concentrations (0.5, 1, 1.5, 2, 2.5 mM). The SPR peaks were observed at 524 nm with the concentrations of 0.5 mM and 1 mM, with the characteristic color change of the reaction mixture (Fig. 2c). But higher absorbance was observed for 1 mM AuCl 4 concentration. Similar observations were reported in the case fungus Fusarium acuminatum (Tidke et al. 2014) and algae Chlorella sorokiniana (Gürsoy et al. 2021), where 1 mM gold salt concentration was taken for optimum GNPs synthesis. Above 1 mM, concentration broadening of the peak was observed, and the color changed to deep blue. With the increase in HAuCl4 salt concentration, the polydispersity of synthesized GNPs also increased, resulting in broader peaks toward larger wavelengths (Kathiresan et al. 2009).

Standardization of the synthesis process

From the above observations of effect of pH, temperature, and salt concentration on GNP synthesis, optimum conditions were chosen. Temperature is an important physical parameter, as clear shifting of SPR peaks toward lower wavelength (blue shift) was observed with increasing intensity when the reaction occurred at 100 °C. High reaction temperature contributes to a large amount of nucleation as the reaction rate increases, whereas lower temperature contributes to the large size particle growth of the nanoparticles (Liu et al. 2020). Also, an alkaline pH of 9 supported a high-intensity peak, conferring a higher reduction rate which leads to the synthesis of more monodispersed nanoparticles is also supported by literature (Priyadarshini et al. 2014b). The gold salt concentration of 1 mM was suitable for this study as increasing gold salt concentration leads to the assembly of larger particles, resulting in a redshift of SPR peak (Mishra et al. 2011). GNP of size 72.32 ± 21.8 nm is reported to be synthesized using the fungus Cladosporium oxysporum AJPO3 by reducing 1 mM of gold salt at pH 7, incubated in the dark at 28 °C in 72 h (Bhargava et al. 2016). Fusarium oxysporum was reported to synthesize GNP of the size range of 22–30 nm and 10–25 nm using 3.5 mmol/l and 1 mmol/l of chloroauric acid respectively, at 30 °C in 48 h (Naimi-Shamel et al. 2019; Pourali et al. 2018). Fungus Mariannaea sp. HJ-based GNP synthesis showed 11.7 nm sized spherical and pseudo-spherical GNP with gold ion concentration of 2 mM at pH 7 (Pei et al. 2017). In the present study, optimum conditions for best monodispersed GNPs synthesis were ECF pH of 9, 1 mM of AuCl 4  concentration, 100 °C reaction temperature and 2 h reaction time using A. austwickii CO1 (Fig. 3). The synthesized GNP showed narrowest SPR peak in range of 527–532 nm.

Fig. 3
figure 3

Assorted reactions conditions with the combination of extract pH, temperature, and HAuCl4 concentration. 1 to 12 numbers represent different pH/temperature/concentration combinations, (1: pH 7/80 °C/0.5 mM AuCl 4 , 2: 7/80/1, 3: 8/80/0.5, 4: 8/80/1, 5: 9/80/0.5, 6: 9/80/1, 7: 7/100/0.5, 8: 7/100/1, 9: 8/100/0.5, 10: 8/100/1, 11: 9/100/0.5, and 12: 9/100/1 (Inserted image shows optical image of synthesized GNPs of assorted reactions)

Characterization of biosynthesized gold nanoparticles

The crystalline nature of GNPs synthesized using ECF of A. austwickii CO1 was determined from XRD analysis (Fig. 4a). The GNPs exhibit 4 distinct peaks at 38.23, 44.36, 64.74, and 77.63 XRD peaks, which correspond to standard Bragg reflections (111), (200), (220), and (311) of face-centered cubic (fcc) lattice which was matched with the reported reference code of Joint Committee on Powder Diffraction Standard (JCPDS) card No. 04-0784 for pure crystalline gold (Sadalage et al. 2021).

Fig. 4
figure 4

Characterization of biosynthesized GNP a XRD analysis, b ZP and DLS analysis (insert: hydrodynamic diameter of GNP), c TEM image, d size distribution histogram based on TEM, e FeSEM-EDX spectrum, and f FTIR spectra of ECF and biosynthesized GNPs

The particle size distribution profile and zeta potential of gold nanoparticles in the solution were measured by DLS (Fig. 4b). The hydrodynamic diameter of GNPs was around 47.5 nm (Fig. 4b insert) with a polydispersity index of 23.7%. Zeta potential (ZP) shows the repulsion force in between the similar suspended charged particles in the solution, which keeps the particles separate and possibly influences their stability (Camas et al. 2018). The ZP value of the colloidal GNPs was − 15.7 ± 2.4 mV (Fig. 4b). The ZP of − 30 mV was reported as the minimum requirement for the physical stability of colloidal GNPs suspension (Doan et al. 2020). According to Kasim et al. (2020), highly stable nanoparticles may have ZP of >  ± 30 mV, ± 20–30 mV is moderately stable, ± 10–20 mV is relatively stable, and ± 0–10 mV is highly unstable. In contrast, other theories stated that the electrostatic repulsive force (value of ZP) along with the van der Waal attractive force (Hamaker constant) is responsible for colloidal stability (Bhattacharjee 2016). It is also stated that the high value of zeta potential is not necessarily an indication of high nanoparticle stability (Pochapski et al. 2021). Thus, even weak van der Waal forces and mild electrostatic force may be adequate to ensure the stability of nanoparticles. In the present study, biosynthesized GNPs were stable over 90 days, with even − 15.7 ± 2.4 mV ZP indicating the contribution of both forces. The stability of these GNPs is further proved by resistance to aggregation in the presence of metal cations and high ionic strength due to NaCl, as described in later sections.

The TEM image revealed that the GNPs were 8–20 nm in size and mostly spherical in shape (Fig. 4c). The histogram obtained from TEM analysis by measuring diameter of 330 GNP particles exhibited a size of 14.7 ± 6.9 nm (Fig. 4d). The size distribution of synthesized GNPs by A. austwickii CO1 was consistent which varied largely in the case of GNPs synthesized by other fungi like Metarhizium anisopliae (9–54 nm) (Kaman et al. 2022), Rhizopus oryzae (5–65 nm) (Das et al. 2012), Penicillium rugulosum (20–80 nm) (Mishra et al. 2012), Epicoccum nigrum (5–50 nm) (Sheikhloo et al. 2011), etc. Different GNPs sizes were recorded for fungi Aspergillus flavus, Rhizoctonia solani, Fusarium oxysporum, and Verticillium dahlia which was due to the kind and quantity of enzymes and metabolites secreted by the different fungi (Iranmanesh et al. 2020). The EDX spectrum showed the clear dominance of elemental gold (Fig. 4e). The gold peak observed at 2.1 keV indicated the presence of gold nano-crystallites with a weight % of 82.65 and atomic % of 27.52. Some other elements were also detected, such as C and O in fewer amounts (weight % of 6.23 and 6.58%, respectively).

The difference in the measured diameters of the GNPs from DLS and TEM analysis was perhaps due to the capping of organic molecules around the particles in hydrodynamic zone under suspension conditions (Lim et al. 2013). The GNPs were separated by an interparticle distance which indicates the presence of capping agents on GNPs (Mishra et al. 2010). The biosynthesis of GNPs involves the reduction of gold ions to Au0, followed by the accretion of biomolecules on the outer surface of GNP for stability (Lee et al. 2020). The FTIR spectrum indicated presence of components in ECF before and after GNPs biosynthesis (Fig. 4f). ECF showed absorption peaks at 698, 1398, 1450, 1648, 2361, 2846, 2922, 3025, and 3442 cm−1. The band observed at 1398 cm−1 represented the bending vibration of the OH group in phenol (Islam et al. 2019). The peak of 1450 cm−1 may be attributed to the C–C stretching of an aromatic ring, but it was absent after GNP synthesis. This indicated that these components might be involved in nanoparticle synthesis. Peak at wavenumber 1648 cm−1 indicates amide group. The two peaks at 2922 and 2846 cm−1 may be attributed to aliphatic C–H stretching vibration in CH3 and CH2 (Pei et al. 2017). The peak at 3442 cm−1 referred to the stretching vibration of primary amines and hydroxyl groups (–OH), probably related to the proteins, flavonoids, phenolic acid, and amide linkages involved in the reduction, capping, and stability of GNPs (Eskandari-Nojehdehi et al. 2016; Sunayana et al. 2020). In the case of GNPs, some bands showed slight shifting, and the change in peak height might be due to the reduction and stabilization method (Bogireddy et al. 2017).

Kinetics of gold nanoparticle synthesis

During GNP synthesis at 100 °C, the color of the reaction mixture changed quickly within 10 min in the following sequence: gray, gray-bluish, purple, red, and finally ruby red. Sample aliquots were withdrawn at regular time intervals throughout the process and kept on ice for rapid cooling. From the spectrophotometric absorbance spectrum, it was observed that the SPR peak of the reaction mixture at first appeared around the longer wavelength with less intensity which gradually shifted toward the left (blue shift) with increased intensity, indicating an increasing number of particles with the reduction in particle size. The steadiness of absorbance at 532 nm clearly indicated completion of reaction after 120 min of synthesis (Fig. 5a and b).

Fig. 5
figure 5

a UV–Vis spectrophotometric analysis of GNP synthesis with time, b optical density (OD) at absorbance maxima 532 nm as a function of reaction time (insert: logarithmic plot of optical density/absorbance versus time), and c hydrodynamic diameter and zeta potential of GNPs throughout the synthesis (insert: the color variation of growing GNPs at different time intervals). Data are depicted as the mean value of three repeated experiments with standard deviation represented as error bars

The DLS analysis of the particle size indicated the assembly of larger structures of gold with hydrodynamic diameter of 242.3 ± 70.2 nm, which gradually disintegrated into smaller structures of hydrodynamic diameter 43.5 ± 1.2 nm, which remained constant afterward (Fig. 5c). The initial particles of 242.3 nm diameter at start of reaction gradually decreased to 81.1 nm after 1 min, which further decreased to 42.0 nm after 30 min and then slightly increased to 49.1 nm after 2 h which persisted afterward. Initially, the zeta potential was slightly low, around − 18.9 mV, which gradually increased to − 10.8 mV after 10 min and then again decreased to − 18.3 mV after 180 min. The low ZP at 1–60 min indicated the self-assembling phase of nano-seeds to figure a unit that steadily stabilized afterward. Several studies also reported that the synthesis of GNPs involves the formation of larger intermediate structures, which eventually dissociate into smaller stable forms (Jakhmola et al. 2017; Madhavan et al. 2020).

The UV–Vis spectra and DLS analysis have shown that initially, the molecules aggregated to form seed particles which were gradually followed by rapid particle growth. The sigmoid kinetics graph of absorbance at 532 nm as a function of reaction time indicated the autocatalysis nature of the synthesis process. The reaction rate for synthesis of GNPs was calculated by plotting ln[a/(1 − a)] against the time graph, where a = [OD(t)/OD (∞)]; OD(t) is the optical density at time t and OD (∞) at the time ∞ (Priyadarshini et al. 2016). The rate constant (kobs) of the reaction was calculated from the slope of the straight-line curve, i.e., 0.032 min−1 (insert in Fig. 5b).

The mechanism of gold nanoparticle synthesis involves the reduction of gold ions (AuCl4) to elemental gold (Au0) by fungal metabolites, followed by the nucleation of gold atoms into small clusters or seeds and then the addition of gold atoms to the existing nuclei which grow into nanoparticles (Mikhailova 2021). The growth of nanoparticles slows down due to limiting reactants, steric hindrance, or other factors. The fungus biomolecules act as stabilizing agents, preventing agglomeration and maintaining the stability of the gold nanoparticles. In the present method, the nucleation phase is very fast reflecting the formation of a large number of small nanoparticle clusters or seeds, also known as burst nucleation or rapid nucleation (Thanh et al. 2014). The steep ascent in the graph (Fig. 5b) during this phase indicates the swift initiation of nanoparticle formation. Alkaline pH favors a high nucleation rate resulting in monodispersed and small-sized particles (Priyadarshini et al. 2014a). Characteristics of the growth phase in GNP synthesis included the addition of atoms or small cultures to the existing nuclei. After the exponential growth phase, a plateau indicates saturation of the reaction.

Stability of GNP over the time

The rate of particle collision is linked to aggregation, a time-dependent phenomenon, whereas the size of the particles, surface complexation, and their affinity for other environmental components primarily determine the stability of the suspension (Singh et al. 2018). The colloidal stability of nanoparticles is a major issue for their further in vitro and in vivo applications (Priyadarshini and Pradhan 2017). The lack of colloidal stability and irreversible aggregation of nanoparticles complicates its use for biological purposes and in industrial scale-up (Gupta et al. 2016). In the present study, the synthesized GNPs at an alkaline pH of 9 persisted stability for around 92 days in dark and ambient conditions (Fig. 6). GNP synthesized by cell-free extracts of the fungus Trichoderma sp. WL-Go was only stable for 7 days (Qu et al. 2019). Many approaches were made to increase the colloidal stability of GNPs such as surface modification by cyclic poly-(ethylene glycol) (Wang et al. 2020), dendrimeric ligands (Elbert et al. 2018), etc. In the current study, the one-pot synthesized GNPs were stored at room temperature without further modification for an extended period, which may be advantageous in commercialization. The stability of synthesized GNPs was observed at regular interval, and any change in absorption spectra was recorded to understand the pace of the aging process.

Fig. 6
figure 6

Stability of the A. austwickii CO1 ECF-synthesized GNPs under optimum conditions (pH 9, 100 °C, reaction time 2 h) over 4-month time duration (stored at room temperature). d indicates days

Ionic stability of A. austwickii CO1-based GNP and chemically synthesized GNPs

The impact of addition of ionic solution on the stability of colloidal GNP solution is an important aspect while sensing applications in environmental or biological systems. In such sample, the chances of interference with other electrolytes or interfering agents causing destabilization are high. With increasing ionic strength of added solution to the colloidal suspension, the surface charge on nanoparticles ultimately gets disturbed thereby destabilizing the dispersed solution (Mateos et al. 2020). Sodium chloride (NaCl) is considered the most active electrolyte for the prominent plasmon resonance sensitivity of GNPs (Mehrdel and Aziz 2018). The stability of A. austwickii CO1-synthesized GNPs and citrate-synthesized GNPs in NaCl ionic medium of varying concentrations was investigated (Fig. 7a). With the increased concentration of NaCl, the ruby red color of GNPs changed to light pink and then gray (Fig. 7b), which indicated aggregation of nanoparticles due to surface charge alteration, i.e., electric dipole–dipole interaction and coupling of SPR of the surrounding particles (Zhou et al. 2020; Dhumale et al. 2021). The electrostatic repulsive force between nanoparticles, which is mostly responsible for nanoparticle colloidal state, gets suppressed by the addition of NaCl. Additional forces like van der Waals and hydrophobic interaction become more vital to bind the nanoparticles together (Dai et al. 2016).

Fig. 7
figure 7

a Absorbance maxima of citrate-GNP and fungus A. austwickii CO1-based GNPs (insert: the optical image of colloidal GNPs), b optical observation of color change of fungus CO1 GNPs with different NaCl concentrations, c UV–Vis spectra, and d absorbance ratio (A700/532) of biosynthesized CO1 GNPs with increasing concentration of NaCl. e Optical observation of color change of citrate-GNP with NaCl, f UV–Vis spectra of citrate-GNP with NaCl, and g absorbance ratio (A700/521) of citrate-GNP with increasing concentration of NaCl. In Fig. 7d and g, data are depicted as the mean value of three repeated experiments with standard deviation represented as error bars

The critical coagulation concentration (CCC) parameter specifies the level of electrolyte concentrations above which the particle agglomerates and destabilizes the solution (Galli et al. 2020). Interaction of biosynthesized GNPs with NaCl above the concentration of 0.2 M lowers the absorbance of the peak at 532 nm and the appearance of a second broad peak around 720 nm (Fig. 7c and d), whereas the chemically synthesized GNPs aggregated at substantially lower concentration of 0.05 M of NaCl. Thus, the CCC of biosynthesized GNPs was 0.2 M NaCl, while that of colloidal Cit-GNPs was 0.05 M of NaCl (Fig. 7e–g). This suggested that the GNPs synthesized using fungal ECF have a more robust shield of biomolecules on the particle surface, which resists higher concentrations of NaCl than Cit-GNPs. The large polymeric capping agents exhibit greater stability of nanoparticles compared to smaller molecules (Priyadarshini et al. 2022). Thus, the capping agent is an important contributor to nanoparticle’s functional properties and can be altered with small surface modifications (Bélteky et al. 2021).

Selective colorimetric detection of metal ions using A. austwickii CO1-based GNP

The optical properties of GNPs are due to surface plasmon excitation which occurs when electromagnetic radiation interacts with the GNPs. Due to this property of GNPs, a visual color change and broadening or shifting of SPR peak can be noticed when they aggregate (Ali et al. 2021). The selectivity of GNPs toward different analytes including metal ions depends upon the molecules covering the surface of nanoparticles. The presence of metal ions and their reaction with functional groups activated the aggregation of GNPs. This leads to change in  the color of solution from red to purple/blue because of interparticle surface plasmon coupling (Gaviña et al. 2019). The biosynthesized GNPs (size around 47 nm) showed a maximum absorbance peak at 532 nm. The selective reactivity of biosynthesized GNPs toward different metal ions such as Ba2+, Ca2+, Cd2+, Co2+, Cr2+, Cu2+, Hg2+, Mg2+, Ni2+, Pb2+, Sn2+, and Zn2+ was checked. Out of these, only Mg2+ triggered aggregation of GNPs within a few seconds. Aggregation of these ions changed the color of the solution from ruby red to purple (Fig. 8a). The broadening of the absorbance peak at 532 nm occurred along with the development of a new peak toward a higher wavelength (around 700 nm). The absorbance ratio at 700 and 532 nm (A700/532) was used for quantitative assessment of the degree of aggregation. This is a measure of the proportion of aggregated and dispersed nanoparticles in the solution (Fig. 8b). The TEM image of colloidal GNPs with or without the addition of the Mg2+ ion is shown in Fig. 8c and 8d, respectively. The absorbance ratio for Mg2+ was higher than other metal ions showing maximal aggregation, similar to earlier reports (Priyadarshini and Pradhan 2017). The sensitivity of GNPs toward Mg2+ ions might be due to later’s smaller size, which promptly facilitates ionic interactions (Basu et al. 2017).

Fig. 8
figure 8

a Color change fungus A. austwickii CO1-based GNPs on the addition of 100 ppm of different metal ions solutions and b its absorbance ratio (A700/532). TEM image of the colloidal solution c before and d after interaction with Mg2+. e absorbance ratio of A. austwickii CO1-based GNPs with Mg2+ (100 ppm) and in co-presence of other metal ions (50 ppm + 50 ppm)

We also investigated how other metal ions might interfere with Mg2+ detection. Except for Ba2+, Co2+, and Ni2+, the co-presence of other metal ions (Ca2+, Cd2+, Cr2+, Cu2+, Hg2+, Pb2+, Sn2+, Zn2+) with Mg2+, the color of the colloidal GNPs persisted and no new peak appeared at the longer wavelength (Fig. 8e). Only Ba2+, Co2+, and Ni2+ interfered with the selectivity of Mg2+ detection using A. austwickii CO1–GNPs. Individually these metals could not destabilize the GNPs, but with the co-existence of Mg2+ aggregation of GNPs occurred, changing the color of the solution from ruby red to purple. These findings demonstrate that A. austwickii CO1-based synthesized GNPs have specificity for detecting Mg2+ ions. Most of the reported sensors are unable to differentiate Mg2+ from other metal ions, particularly Ca2+ and Zn2+ (Velu et al. 2010; Zor et al. 2013; Zhang et al. 2023). So, high selectivity for Mg2+ can be of significant value in the field of environment and biological systems (Paderni et al. 2022). A tryptophan-functionalized SNPs sensor was reported with specificity for Mg2+ detection in concentrations of 1–200 μM without any interference of Ca2+ (Amirjani et al. 2022). Our findings also showed that the GNP has a high specificity for Mg2+ over other metal ions. The mechanism behind the detection of Mg2+ ions is possibly its affinity toward the biomolecules surrounding the surface of GNPs. The presence of specific binding sites or ligands on the nanoparticle surface facilitates the recognition and binding of magnesium ions. The selective chelating of Mg2+ ion with biomolecules alters the surface charge of the nanoparticles resulting in color change due to aggregation of GNPs and shifting of SPR peak. Furthermore, the specificity of GNPs toward Mg2+ ions rather than Ca2+ ions and other metal ions arises likely from the fact that Mg2+ is a better charge acceptor due to its smaller size and higher charge density, which enhances its ability to bind with carboxylate groups in the binding motif (Jing et al. 2018). Gallic acid-capped GNPs are reported to create a highly selective and sensitive colorimetric sensor for the Mg2+ ions that is free from interference from Ca2+ and K+ (Kim et al. 2017).

Detecting and sensing Mg2+in biological and environmental systems are critical because excessive or insufficient Mg2+ levels can harm animals and humans (Fiorentini et al. 2021). Analysis to determine the minimum detection limit (MDL) was carried out with a range of concentrations of Mg2+ (5, 10, 20, 40, 60, 80, and 100 ppm). The assay showed a gradual decrease in the SPR peak of GNP at 532 nm. This change could be observed by naked eye with a visual color change from ruby red to purple. The MDL of Mg2+ using GNPs was observed at 40 ppm. GNP aggregation and color change were not detected below this concentration. The efficacy of the Au-DNA nanocomposite sensor for magnesium ion detection was demonstrated up to 100 ppm (Basu et al. 2017). Kim et al. (2017) reported a high selectivity study of tryptophan-capped GNPs toward Mg2+ with a minimum detection limit of 0.2 μmol L−1 as suitable for water, urine, and serum samples. Here the detection limit is below the WHO standard permissible range of Mg2+ in water, i.e., 50 mg/l (Meride and Ayenew 2016).

As ionic strength is also considered a key factor in sensing the specific metal ion in a solution (Xia et al. 2010; Kim et al. 2017), A. austwickii CO1-based GNPs added with 0.2 M NaCl (critical coagulation concentration) were used for enhancing sensitivity toward Mg2+detection (Fig. 9). The MDL decreased to 20 ppm in the presence of NaCl, with a straight-line graph (R2 = 0.97) plotted in the Mg2+ concentration range of 20–100 ppm. A fluorescence-based azothiazol-benzenesulfonamide derivative (M-sensor) is reported to be capable of detecting Mg2+ in water and different pharmaceutical samples with a detection limit of 18 ng ml−1 (Badr et al. 2022). An electrochemical sensor like multi-walled carbon nanotube powder and polydimethylsiloxane (MWCNTs/PDMS) sensor with sensitivity ranging from 1 to 100 ppm is also reported (Akhter et al. 2020). Further micro-electro-mechanical systems (MEMS) with a detection ability ranging from 10 to 50 ppm (Wang et al. 2018) are also reported. Other detection methods involving fluorescence and electrochemical sensors showed good sensitivity. However, simple preparation, minimal equipment, and cost-effectiveness make the colorimetric method more accessible.

Fig. 9
figure 9

Increasing sensitivity Mg2+ detection by A. austwickii CO1-based GNPs by addition of 0.2 M NaCl to GNP solution. The mean value of three repeated experiments is represented with standard deviation as an error bar

The fungus A. austwickii CO1 extract-based single-step process for biosynthesis of GNPs is demonstrated where both the reduction and functionalization of GNPs are done without any external chemicals requirement. Thus, it is a time-saving as well as economical approach. The by-product was fungus biomass which can further be utilized for multiple applications or degraded naturally in an environment-friendly manner. The technique offers the benefit of utilizing synthesized GNPs as such, eliminating the need for a laborious two- or multi-step process to modify or functionalize the GNP surface. Moreover, a potential application of A. austwickii CO1-based GNPs as colorimetric tools for Mg2+ detection is cost-effective method. The optical sensor stated here offers a quick and affordable solution for monitoring Mg2+.

Conclusion

The present study employed the fungus Aspergillus austwickii CO1 for the extracellular synthesis of GNPs. The bioactive metabolites secreted in the medium are solely responsible for the reduction of precursor AuCl 4 and the stability of synthesized GNPs. The desirable size and particle size distribution of particles are achieved by changing the pH, temperature, and AuCl 4 concentration. The TEM analysis showed that the size of GNPs is 14.7 ± 6.9 nm. DLS study revealed that the ZP of the particles is 15.7 ± 2.4 mV and hydrodynamic diameter is 47.5 nm with polydispersity index of 23.7%. This indicates the presence of layer of biomolecules around the nanoparticles acting as capping agent. FTIR analysis of the fungal extract and GNPs shows that the phenol, amide, amines, hydroxyl, aliphatic, and aromatic groups are probably involved in the reduction and colloidal stability of GNPs. Even at higher salt concentrations, the biosynthesized GNPs are more stable than chemically synthesized Cit-GNPs. Furthermore, the biosynthesized GNPs showed high selectivity for Mg2+ ions. Spectral and visual color change can be observed for a minimum concentration of 40 ppm and 20 ppm unaided and aided with ionic stress, respectively. The present method has the advantage of using one-step synthesized GNPs for Mg2+ detection. This means that the multi-step, labor-intensive process of functionalizing or modifying the GNP surface may be avoided. The optical sensor presented here offers a rapid and low-cost non-equipment-based way to monitor Mg2+ and has the potential to be used as colorimetric tool for Mg2+ detection. Thus, this study may help understand the biosynthesis process of colloidal GNPs using fungus with better stability, consenting to its applications in the environment and biomedical fields, and decreasing the toxic, costly, and energy-consuming physical and chemical methods.