## 2 Materials and Methods
The Raman spectra of the films were obtained on a LabRAM HR Evolution Raman spectrometer (Horiba, Kyoto, Japan), equipped with a liquid nitrogen-cooled Symphony II CCD detector, in backscattering geometry (Ar laser, \(\lambda\) = 514.5 nm). UV--Vis transmission spectra were recorded using a Shimadzu UV-3101 PC scanning spectrophotometer (Shimadzu, Kyoto, Japan) in the wavelength range of 190-2200 nm. Ellipsometric measurements of LPCVD BC\({}_{\text{x}}\)N\({}_{\text{y}}\) films were performed on an ELLIPS-1991 spectral ellipsometer (ISP SB RAS, Novosibirsk, Russia) at a light incidence angle on the sample of 60\({}^{\circ}\). The inverse problem of ellipsometry was solved using the Forouhi-Bloomer dispersion model [46]. As a result, the spectra of the refractive index and the extinction coefficient were obtained depending on the wavelength. The values of the optical band gap were estimated using spectrophotometry and spectral ellipsometry data. The values of the optical band gap were estimated from [PERSON]'s plot using the equation \(\alpha h\
u\) = \(A(h\
u\) - \(E_{g})^{2}\), where \(h\) is the Planck constant, \(\
u\) is the vibration frequency [47]. The absorption coefficient \(\alpha\) was calculated using formulas \(\alpha=1/dln(1/T)\) and \(\alpha=4\pi\)k/\(\lambda\) for spectrophotometry and ellipsometry measurements, respectively. The study of the chemical composition of the surface of LPCVD films was carried out on a photoelectron spectrometer (SPECS Surface Nano Analysis GmbH, Berlin, Germany). The spectrometer is equipped with a PHOIBOS-150-MCD-9 hemispherical analyzer, an XR-50 source of X-ray characteristic radiation with a double Al/Mg anode. The characteristic radiation Al K\(\alpha\) (h\(\
u\) = 1486.6 eV) was used to record the spectra. To take into account the charging effect of the samples, the C1s spectra of carbon contamination (E\({}_{\text{b}}\) = 284.8 eV) were used; this peak corresponds to carbon forming C=C/C-H covalent bonds. The relative concentrations of elements were determined based on the integral intensities of XPS lines, taking into account the photoionization cross-section of the corresponding terms [48]. For a detailed analysis, the spectra were decomposed into individual components. Accordingly, after subtracting the background by the Shirley method, the experimental curve was decomposed into a series of lines corresponding to the photoemission of electrons from atoms in various chemical environments. Data processing was carried out using the CasaXPS 2.3.24 PR1.0 software package. The shape of the peaks was approximated by a symmetric function obtained by multiplying the Gauss and Lorentz functions. For PECVD films, the measurements were carried out on a FLEXS X-ray photoelectron spectrometer (Specs, Berlin, Germany) with a Phoibos 150 electron energy analyzer and a DLD electron detector. The spectra were excited by monochromatic Al K\(\alpha\) radiation. The analyzer transmission energy is 20 eV. The vacuum in the system is \(\sim\)7.5 \(\times\) 10\({}^{-11}\) Torr The electron energy was calibrated with respect to the copper line Cu2P\({}_{3/2}\) = 932.6 eV. The spectra were calibrated using the C1s internal standard of carbon (E\({}_{\text{b}}\) = 284.8 eV). The element concentration was calculated from the area of the peaks, taking into account the electron photoionization cross-section and the electron mean free path. The approximation of a uniform distribution of elements at the depth of analysis was used. The depth of analysis was estimated based on the exponential decay of the signal with respect to depth and was 3\(\lambda\), where \(\lambda\) is the electron-free path without inelastic collisions. The value of \(\lambda\) was calculated using the TPP2M formula [49] and lies in the region of 3.2-2.6 nm for the B1s, C1s, N1s, and O1s lines. The contact angles on the films were measured using an OCA 15 PRO device (Databases, Filderstadt, Germany) equipped with a measuring video system with a USB camera and a high-aperture measuring lens with an adjustable viewing angle.