The Fourier-transform infrared (FTIR) spectra confirm that the fingerprint region of PHI within 1700-1140 cm -1 remains nearly unchanged after each modification step (Figure ). The typical breathing mode of triazines is also clearly visible at about 808-810 cm - 1 . The modification of KPHI with silica produces a broad peak on FTIR spectra centred at 1090 cm -1 assigned to asymmetric Si-O-Si stretching and a maximum at 465 cm -1 corresponding to the Si-O-Si bending modes. The protonation of the PHI structure is manifested in the FTIR spectra of KPHI-HTS and KPHI-OTS by the reduction of the intensity of the maximum at 2190 cm -1 , which is a consequence of partial hydrolysis of the cyanamide functions induced by HCl (Figure ). The incorporation of alkyl groups is evidenced on the spectra of KPHI-HTS and KPHI-OTS by the peaks in the range of 2930-2950 cm -1 ascribed to C-H stretching vibrations. These peaks do not appear in the spectra of another hydrophobized sample KPHI-HMDS, due to a shorter alkyl chain and, possibly, a smaller number of the grafted functions. ). The sol-gel modification of KPHI with silica was carried out in acidic conditions leading to K + for H + exchange, hence no mass loss corresponding to potassium-containing compounds is observed in high-temperature range on the TGA profile of KPHI-Si (Figure ). The residue of 26.6 wt% formed upon the KPHI-Si thermal decomposition at 1000 C most likely corresponds to the SiO2 content in the material. The TGA data obtained for the hydrophobically modified KPHI-HTS (Figure ), KPHI-OTS (Figure ) and KPHI-HMDS (Figure ) allow the estimation of silica content in these samples as 24.3, 26.8 and 24.3 wt%, respectively. It is worth noting that the thus determined silica concentration in the hydrophobized KPHI samples corresponds both to the SiO2 incorporated during the sol-gel modification step and to the silica formed as the result of thermal decomposition of grafted alkylsilane or methylsilazane moieties. Another important feature that can be observed in the TGA graphs is the appearance of the mass loss step in the 250-270 C range for the KPHI-HTS (Figure ) and KPHI-OTS (Figure ) samples that corresponds to the oxidation of alkyl functions. This effect is not visible for KPHI-HMDS as the grafted HMDS groups tend to be more thermally stable. 46 The optical properties of the prepared materials are barely affected by the grafted hydrophobic functions and are mostly conditioned by the protonation degree of PHI (Supplementary Information, Figure ). The sol-gel silica modification of KPHI is carried out in acidic conditions, which causes the absorption edge to blue-shift from 2.7 eV to 2.9 eV (Figure ) due to increased protonation of KPHI. The protonation of KPHI by HCl released during the hydrophobization makes this value to increase up to 3.0 eV for the KPHI-HTS and KPHI-OTS samples (Figure ), while for KPHI-HMDS the absorption onset is 2.8 eV close to that of the parent KPHI (Figure ).