## 2 Design and Optimization  
The proposed device has a SiO\({}_{2}\) substrate with an extruded GaP grating of period \(P\), and with a rectangular profile (GW is the width and GH is the height). This nanostructure is overfilled with MgF\({}_{2}\) for a total thickness of \(t_{b}\) (being \(t_{b}>\) GH). From a fabrication point of view, the MgF\({}_{2}\) layer can be spin coated to generate a flat surface. On top of this layer, we find a gold coating of thickness \(t_{m}\) to generate the surface plasmon resonances. As long as the metal is connected to an external circuit, a thin isolation layer of SiO\({}_{2}\) (\(t_{\text{up}}\) in thickness) must be placed between the metal and the analyte to maintain reliable electric connections. The arrangement of these layers and structures is shown in Figure 1b. The dimensions of the layers and the structure, along with the optical and thermal constants of the material used in the design are presented in Table 1. The analyte is considered as an aqueous medium having a purely real index of refraction, \(n_{a}=1.33\). Physically, Fano resonances appear when a discrete and narrow spectral resonance interferes coherently with a broadband background. In our case, the narrow peak is caused by an SPR appearing at the metal/dielectric interface; and the broadband spectral background (compared with the very narrow SPR), is produced by the radiation scattered from the grating structure, that is illuminated by the same source [4]. The total aborption spectrum of the structure is linked with the SPR, which complies with the wave vector matching condition [27; 28]:  
\[\frac{2\pi m}{P}=\frac{\omega}{c}\sqrt{\frac{\varepsilon_{m}\varepsilon_{\text {eff}}}{\varepsilon_{m}+\varepsilon_{\text{eff}}}}, \tag{1}\]  
where \(P\) is the grating period, \(m\) represents the diffraction order, \(\omega\) is the angular frequency, \(c\) the speed of light, \(\varepsilon_{m}\) is the real part of the dielectric permittivity of the metal, and \(\varepsilon_{\text{eff}}\) is the effective dielectric permittivity of the effective media where the plasmon propagates. This effective medium  
Figure 1: (**a**) Schematic representation of the physical phenomena (optical, thermal, and electronic responses) present in the proposed device. At the resonant wavelength, the excited plasmons (optical response) enhance absorption within the metal which increases its temperature (thermal response). This temperature increase also changes the electric resistivity of the metal layer, through the bolometric effect, which is read by an external circuit (electric response). (**b**) Geometric and material arrangement of our structure. combines both the analyte and the SiO\({}_{2}\) layer, and it is related to the propagation distance of the SPR in the analyte. Our goal is to increase as much as possible the temperature of the gold layer. To do so, we must enhance absorption at the metal layer which, in combination with the nanostructure, we consider as an almost-perfect absorber. Figure 2a shows the spectral absorption of an optimized structure (see parameters in Table 1) with an absorption maximum of 0.999 at \(\lambda_{\text{res}}=1.351~{}\upmu\)m. The resonant wavelength can be tuned by adjusting the periodicity \(P\) in Equation (1). The magnetic field maps of the device for several wavelengths are shown in Figure 2b. As far as the amplitude of the incoming wavefront is \(H_{0}=1\) A/m, these maps can be interpreted as Field Enhancement, FE maps (\(\text{FE}(x,y,z)=|H(x,y,z)|/H_{0}\)). We have also represented the magnetic field enhancement when the system is detuned from the resonance at both sides of the resonance (\(\lambda=1.3~{}\upmu\)m and \(\lambda=1.4~{}\upmu\)m) [4]. The results show how the magnetic field enhancement is significant in a large volume of the analyte near the nanostructure for the resonant wavelength. This also improves the sensitivity of the device for variations in the index of refraction of the analyte. The physical linked mechanisms can be described as follows.