Polymeric carbon nitrides and related metal-free materials for energy and environmental applications | 11075 Journal of Materials Chemistry

Carbon nitride polymers have emerged as a new class of materials for a wide range of applications such as photo- and electro-catalysis, sensors, bioimaging and more due to their chemical, photophysical and catalytic properties as well as their low-price, facile synthesis and high stability under harsh chemical conditions. In this review we begin with a broad overview of carbon-based materials, arriving at the focus of this review, polymeric carbon nitrides (CNs). After a brief overview of applications, we delve into their various synthetic methods, with an emphasis on achieving control on the nanoscale features of this intriguing polymeric semiconductor. The main synthetic pathways include copolymerization at various stages, templating, an ionothermal pathway and harnessing of supramolecular pre-organization, which are discussed in detail along with CN growth and deposition on substrates. Finally, we give our perspectives on the evolution of this ﬁ eld, the current limitations, and elaboration of achievable control over the chemical composition, the electronic structure and the morphology of this family of materials. 700 in


Carbon materials: synthesis, applications and challenges
Carbon materials ranging from graphene, 1 carbon nanotubes (CNTs) 2 or fullerenes 3 to activated carbon and aerogels 4 are widely used for environmental and energy-related purposes [5][6][7][8] such as batteries, 9,10 supercapacitors 11 and electrocatalysis 12,13 Jesús Barrio received his B.Sc in Chemistry from the Universidad Autónoma de Madrid (Madrid, Spain) in 2014 and in 2016 his M.Sc in Nanoscience and Molecular Nanotechnology while working at the IMDEA Nanoscience Institute. He then carried out a research project at the Max Planck Institute for Colloids and Interfaces where he developed a keen interest in the design of carbon nitride materials and their application in photocatalysis. Aerwards, he moved along with his PhD supervisor, Prof. Menny Shalom, to the Chemistry Department of the Ben-Gurion University of the Negev where he is currently nishing his doctoral studies. His interests cover the design of low dimensional materials and hybrid structures for energy-related applications.

Michael Volokh received his BSc in Chemistry and Chemical
Engineering from the Ben-Gurion University of the Negev (Israel). During his MSc and PhD (2017), under the supervision of Prof. Taleb Mokari, he focused on gas-and liquid--phase synthesis and characterization of inorganic hybrid nanostructures. His current research interests include photoelectrocatalysis, the formation of complex hybrid nanostructures, and electrophoretic deposition.
due to their conductivity, nanosized-derived effects (e.g., dirac points in graphene, metallic or semiconductor CNTs and electron accepting properties of fullerenes) and the possibility of inducing defects by chemical design. 14 There are numerous synthetic pathways to synthetize this class of materials, such as chemical vapor deposition (CVD), [15][16][17] pyrolysis of C-rich molecules, [18][19][20] hydrothermal means, etc. [21][22][23][24][25] Nevertheless, in most catalysis and energy-related scenarios, these materials serve as a support or as a platform for an additional active component or molecular complex to perform a given reaction. 26 The morphology and properties of the nal carbon-based material strongly depend on the synthetic pathway, as well as on the precursor. 27 Additionally, utilizing foreign elements like templating agents or doping species [28][29][30] can precisely tune the porous structure and electronic conguration, towards their implementation in a wider range of applications. 31,32

Inserting heteroatoms into carbon matrices
To modify the electronic structure of C-materials and enable semiconductor-like properties, such as UV/visible light absorption, the formation of defects through the insertion of heteroatoms has emerged as a promising approach. Chemical elements that differ in parameters like the atomic radius or electronegativity can induce effects on the materials that are benecial for their application in energy-related elds, i.e., the creation of a band gap or selectivity towards a given reaction. Furthermore, combining several heteroatoms in a Cmatrix can produce synergistic effects such as the formation of reactive centers and a change in its intrinsic mechanical, chemical, physical and electronic properties. 29 The insertion of nitrogen into a carbonaceous matrix is among the most frequently reported methods, given the straightforward synthetic pathways for such an insertion; for example, a thermal treatment of precursors containing C-N or a hydrothermal synthesis. Nevertheless, other heteroatoms, such as B, P, S, or metals, display a better affinity towards reactant molecules for various chemical reactions and therefore their inclusion within C-materials has been a common subject of research. 33 Non-metallic elements have been typically included by a co-polymerization route from a C-source with heteroatomcontaining molecules at high temperatures or by direct thermal calcination of (bio)molecules, such as amino acids and ionic liquids. [34][35][36][37][38] Wohlgemuth et al. obtained carbon microspheres and aerogels co-doped with nitrogen and sulfur by the hydrothermal treatment of glucose along with amino acids containing sulfur, and they studied their electrochemical performance for the oxygen reduction reaction (ORR). 39,40 Furthermore, S-doped C-materials were recently explored for the nitrogen reduction reaction (NRR); Xia et al. prepared S-doped carbon nanospheres by a hydrothermal reaction comprising glucose and benzyl disulde. The resulting materials showed excellent selectivity and a faradaic efficiency of 7.47% at À0.7 V versus (vs.) RHE, much higher than the undoped material (1.45%). 41 The presence of heteroatoms within carbon materials strongly affects their reactivity in elds such as electrocatalysis, batteries or supercapacitors. B and P, for example, display a lower electronegativity than carbon, which results in a charge redistribution and modies the adsorption modes of reactant molecules. 42,43 The energy redistribution imprinted by electron-decient heteroatoms in carbon materials has been widely reported by various groups; boron-doped graphene, for example, showed enhanced NRR performance (10.8% faradaic efficiency at À0.5 V) due to the lower energy barrier for N 2 electroreduction within BC 3 structures. 44 Furthermore, the presence of BC 3 trimers within the hexagonal lattice of C materials induces a p-type semiconductor behavior and the resulting material displays unique sensing capabilities (e.g., to NO 2 and NH 3 toxic gases). 45 Phosphorous incorporation by pyrolysis or hydrothermal treatment also results in materials with catalytic sites, which are widely utilized as supercapacitors and electrocatalysts. [46][47][48][49][50][51] From the synthetic point of view, achieving homogeneity in the distribution of dopant atoms within the lattice is a standing challenge; our group developed an approach to produce homogeneous heteroatomdoped carbons by utilizing polycyclic aromatic hydrocarbons (PAHs) and heteroatom-containing species which melt during a thermal reaction. During the polycondensation of PAHs with heteroatom-containing molecules (or metal salts), their sublimation is quenched, and the structural carbon is completely preserved thanks to the formation of new covalent or coordination bonds. Using this method, boron, nitrogen, oxygen, or different metals have been successfully included within carbon materials and their performance has been tested in Li-ion batteries or an electrochemical oxygen evolution reaction (OER, see Fig. 1). 52,53 2.1. N-Doped carbons, C 2 N, C 3 N 4 and other C-N containing polymers Given nitrogen's electron-accepting ability and different atomic radius, its incorporation into a C-matrix alters the electronic structure and modies the charge distribution (uneven across a C-N bond) and the neighboring carbon atoms display a relatively positive charge that makes them more reactive in various catalytic scenarios. 54,55 Modulating the amount of nitrogen in this class of materials, ranging from N-doped carbons, C-N based organic polymers, and C x N y H z derivatives, dramatically alters their electronic structure.
Carbon and nitrogen-based organic polymers allow a relatively easy design, functionality and processing, which make them suitable for a wide range of applications ranging from photo-and electro-catalysis to gas storage and more. [56][57][58][59][60][61][62] Their porosity and the tunability of their chemical composition promoted their utilization as precursors for the synthesis of Ndoped carbon materials. [63][64][65] Additionally, metal-organic frameworks (MOFs) and other highly ordered pre-organized molecular compounds have also been utilized for the hightemperature synthesis of heteroatom-modied carbon materials. [66][67][68][69][70] Increasing the nitrogen amount in carbon materials can be done by using N-rich precursors; the thermal condensation of such molecules, e.g., barbituric acid, urea or triaminopyrimidine, amongst others, can imprint graphitic or pyridinic nitrogen sites into the structure and yield C 3 N and C 2 N structures with varying electronic and porous structures. [71][72][73] Already in 1986, Kouvetakis et al. have shown the preparation of BC 3 and C 5 N planar structures by thermal condensation of a monomer containing B and N at high temperatures (800-1400 C). 74 Mahmood et al. reported for the rst time the synthesis of a C 2 N material suitable for eld-effect transistors by a wetchemical reaction between hexaaminobenzene trihydrochloride and hexaketocyclohexane octahydrate in N-methyl-2pyrrolidone (NMP) as shown in Fig. 2. 75 The same group later reported the synthesis of twodimensional (2D) polyaniline (C 3 N) frameworks by the direct pyrolysis of hexaaminobenzene trihydrochloride single crystals. 76 Since these reports, several groups have thoroughly exploited these graphitic materials for various applications, such as photocatalysis or as anodes in Li-ion batteries. [77][78][79] Nitrogen-rich frameworks (C 3 N 3 , C 3 N 4 or C 3 N 5 ) are more commonly exploited in photocatalytic scenarios given their typical semiconducting behavior that allows the harvesting of visible light with the concomitant generation of an electronhole (e À -h + ) pair, which can reduce (electron) or oxidize (hole) molecules. 80,81 C 3 N 3 materials are the less explored of this kind, and theoretical predictions have shown that a C 3 N 3 monolayer has a band gap (E g ) of 1.6 eV and could potentially be used in devices for H 2 separation from impurity gases. 82 Experimentally, this stoichiometry has been reported by our group and others by either high pressure-high temperature treatments, which results in the inclusion of P atoms (C 3 N 3 P) or by the thermal condensation of a supramolecular assembly containing triaminopyrimidine and cyanuric acid at low temperatures. 83,84 C 3 N 4 materials, commonly referred to as "carbon nitrides" or "melon" (rst discovered by Liebig 85,86 and typically labelled "CN"), have been the most widely studied and reported. The rst C 3 N 4 structures reported were obtained through solvothermal means, 87 along with chemical and physical vapor deposition variants, which were summarized by Kroke et al. in a comprehensive review in 2004. 88 Despite the fact that C 3 N 4 is commonly referred to as a 2D analogue of graphene, the C 3 N 4 stoichiometry, composed of tri-s-triazine units with remaining H atoms at the boundaries (due to a non-ideal condensation), is structurally a diamond-like CN allotrope, a hard material reported to be harder than diamond. [89][90][91] Increasing the N-to-C ratio in carbon nitrides can result in novel properties, such as increased basicity; nevertheless, the synthesis of such materials involves the insertion of unstable N-N bonds. Kumar et al. showed the synthesis of a novel C 3 N 5 material by the thermal deammoniation of melem hydrazine. The prepared framework exhibited a narrow E g of 1.76 eV and was evaluated in several applications ranging from photoelectrochemistry to dye adsorption. 92 Additionally, Kim et al. recently prepared thermodynamically stable, mesoporous C 3 N 7 and C 3 N 6 by the thermal treatment of a tetrazole derivative at temperatures lower than 300 C. DFT calculations conrm the formation of N-N bonds in the form of tetrazines and triazoles and the catalytic activity of the nitrogen sites was assessed in the ORR, which was enhanced using C 3 N 7 . 93 Furthermore, the inclusion of B atoms has allowed the formation of semiconducting C 9 N 4 monolayers for an electrocatalytic NRR, as shown by Zhang et al. 94 Fig. 2 Schematic representation of the synthesis of a C 2 N material (a), and its corresponding digital images as prepared (b), solution cast over SiO 2 after condensation at high temperatures (c) and in a film over a PET substrate (d). Reproduced with permission from ref. 75, copyright (2015) Nature publishing group.

Graphitic carbon nitrides: introductory aspects and applications
Graphitic carbon nitride (a melon-based C 3 N 4 , to which we refer here as CN) is a 2D semiconductor based on C and N and residual hydrogen atoms, with remarkable chemical and electronic properties. 95 It has been widely used in energy-related scenarios since the 2009 pioneering report that showed its ability to split water under visible light. 96 The synthesis of this material entails the thermal treatment of C-N monomers at high temperatures, which undergo a solid-state condensation reaction that releases ammonia and results in the formation of in-plane aromatic heptazine units with terminal amine groups, which interact with each other by van der Waals forces (Fig. 3). [97][98][99] Many organic monomers containing carbon, nitrogen, and oen heteroatoms like oxygen or sulfur have been used for the synthesis of CN such as: dicyanamide, 100 melamine, 101-105 urea, 106-109 thiourea, [110][111][112] triazoles, 113 and others, 114-120 at different time intervals 121 and temperatures ranging from 400 to 650 C. [122][123][124][125] The utilization of different precursors yields CN materials with a wide range of properties and possible applications. 126,127 To this end, we refer the reader to excellent previously published reviews for a wider picture on the synthesis and characterization of CNs using a single precursor. [128][129][130][131][132][133][134] To date, CN has been applied mainly in photo-(electro)catalytic reactions, [135][136][137][138][139] with H 2 production through water splitting, 140-150 CO 2 reduction 151-153 and degradation of organic pollutants [154][155][156] being the most comprehensive and commonly reported. Nevertheless, the ne control over the electronic structure or morphology of CNs has allowed their exploitation in a wide scope of additional applications 157-159 as illustrated in Fig. 4, including water oxidation, 160-162 organic transformations, [163][164][165][166][167][168][169][170] supercapacitors, 171 biosensing, [172][173][174][175][176][177][178] nitrogen xation, 179-186 emulsion stabilizers, 187-189 H 2 O 2 production, 190 and even as micromotors. 191 The solid-state reaction that solid monomers undergo during the CN synthesis, along with the required high temperatures and the poor solubility of the nal product in common solvents, impedes a full control over their chemical and electronic properties, as well as their functionalization or implementation in devices. Therefore, achieving high performance in a given application with a realistic perspective of industrial application is not common. In the next two sections, we review the state of the art of the synthetic pathways to control the nanostructure and/or the chemical composition of CN, via either a direct synthetic pathway or coupled to a post-synthetic treatment.

Synthetic pathways for the control of CN properties
During the last decade, different synthetic approaches have emerged in order to modify CN's properties towards an enhanced performance in photocatalytic scenarios. Improving optical absorption by tailoring energy band positions, achieving a high number of active sites through morphology and porosity   control, and prolonging the lifetime of the photogenerated charge carriers have been the aims of the various demonstrated synthetic pathways. However, controlling these parameters is very challenging in a solid-state reaction and despite the recent progress, a complete and rational design of efficient photocatalytic CN systems from the reactant level is still a standing challenge.

Copolymerization
Copolymerization is one of the most common synthetic approaches to the preparation of CN materials with extended light absorption due to its simplicity. In this technique, a mixture of two or more small organic monomers, obtained by grinding, ball-milling or dissolution in common solvents, reacts at high temperature typically through Schiff-base reactions 192 or nucleophilic attacks. Zhang et al. reported in 2010 the rst CN material prepared by copolymerization, where 2-cyanoguanidine (dicyandiamide, DCDA) and various amounts of barbituric acid (BA) were dissolved in water before a thermal treatment at 550 C (Fig. 5a). 193 In this work the C/N ratio increased up to 0.96 due to the replacement of nitrogen atoms in the melon ring by carbon, which entailed the narrowing of the CN's band gap to 1.58 eV (from the 'pristine' E g of CN, ca. 2.7 eV) and a substantial enhancement of H 2 production through water splitting in a water-triethanolamine (TEOA) solution with Pt serving as a cocatalyst. Since this pioneering work, CN prepared by copolymerization of DCDA and BA has been widely used in different scenarios such as glutathione detection through photoactivated oxidase mimetics, 194 degradation of aniline 195 or detection of Cu 2+ . 196 The modication of the p-conjugated system of CN was studied by Zhang et al., who copolymerized DCDA with a wide library of different organic monomers containing an aromatic ring. 197 The highest photocatalytic performance for the hydrogen evolution reaction (HER) was obtained with a 5% loading of 2-aminobenzonitrile (147 mmol h À1 ); the presence of aromatic carbon species in the CN structure was conrmed by 13 C-solid-state nuclear magnetic resonance (NMR), which   showed new peaks at 115 and 126 ppm. Generally, a wide variety of monomers have been utilized for copolymerization with DCDA, which is the most common C-N building block in this type of synthesis. 198 Thiourea, for example, can decompose into gas bubbles during calcination, thereby inducing nanoporosity when copolymerized with DCDA and resulting in a 3.4 fold enhancement of the specic surface area (S A ), with an average pore size of 3.7 nm, and an enhanced photocatalytic activity in the photodegradation of methylene blue (MB) dye. 199 A decrease in the E g of CN from 2.75 to 2.58 and 2.54 eV was achieved by copolymerizing DCDA with uracil and diaminopyrimidine, respectively. These molecules replace some of the nitrogen with carbon and allow additional netuning of the electronic structure and morphology towards enhanced e À -h + separation and photocatalytic performance in different model reactions. 200,201 Despite the wider use of DCDA as the main C-N building block for copolymerization, other precursors are also common. The high solubility and reactivity of urea allow the formation of uorescent CN quantum dots (CNQDs) by copolymerization under hydrothermal conditions in the presence of sodium citrate (molar ratio 6 : 1, see Fig. 5b). The size of the obtained CNQDs ranges from 2.6 to 5.5 nm, with thicknesses of 1.5-2.5 nm and the nal material contains a high oxygen content, a consequence of the hydrothermal treatment and of the incorporation of oxygen from sodium citrate. Furthermore, the uorescence quantum yield reached 42%, resulting in a remarkable performance for HEK 293T cell imaging. 202 A similar photoluminescent behavior was shown by introducing phenyl groups into CN through the copolymerization of urea with a small amount of trimesic acid. Song et al. observed that this treatment causes a downshi of the conduction band (CB) level, which results in a shi of the emission from blue (with two peaks at 443 and 457 nm) to green (522 nm) upon excitation at 340 nm. The uorescence quantum yield of 14% allowed, for the rst time, the application of CN for the imaging of latent ngerprints. 203 Highly photoactive CN materials were also achieved by copolymerization of different precursor molecules with urea; 204 aromatic moieties were induced by phenylurea, 205 azoles, 206,207 benzoic acid and others. 208 These materials exhibited a narrower E g and improved charge transfer and separation of photogenerated excitons towards improved performance in H 2 production through water splitting.
Additionally, as mentioned previously, the copolymerization of urea with BA and other C-rich molecules can improve the optical absorption and charge separation by the creation of surface molecular heterojunctions that boost the HER and the CO 2 photoreduction performance. 209,210 A nanotube morphology with enhanced carrier mobility can also be obtained from mixtures of urea and oxamide; they display a similar structure and reactivity and therefore interact during thermal condensation to form a cross-linked complex, which upon further calcination yields a CN polymer with 1.3% AQY in the HER under green light illumination, 211 as a result of an enhancement in light harvesting and a red shi of the absorption edge up to 650 nm. 212 Melamine is also widely applied in copolymerization due to its compatibility with a wide range of commercially available triazine-based molecules. In 2010, the formation of Nrich (N/C ratio of 1.64) CN hollow vessels through the copolymerization of melamine and cyanuric chloride at a ratio of 2 : 1 was reported. 213 In this case, the reaction took place in a sealed quartz tube at 800 C; the released gases during the condensation increase the inner pressure, which in turn contributes to the modication of the morphology and crystallinity of the nal CN and leads to strong photoluminescence (PL) in the greenblue region.
Cyanuric chloride can be transformed into 2,4,6trihydrazino-1,3,5-triazine (THDT) by a reaction with hydrazine hydrate at 130 C under reux; the resulting monomer shows a high N/C ratio and its copolymerization with melamine alters the morphology and chemical composition of the nal CN. The high nitrogen content, up to 77.2% as determined by X-ray photoelectron spectroscopy (XPS), disturbs the band structure of CN, resulting in an E g ¼ 1.98 eV and a 2.3-fold enhancement of the HER for a sample with a 0.15 mass ratio of THDT. 214 Triaminopyrimidine, which contains one more C atom, successfully substitutes one nitrogen in the triazine ring of CN upon thermal condensation with melamine. This allows the narrowing of the E g to 2.4 eV by a negative shi in the valence band (VB), resulting in enhanced performance in NO removal. 215 As shown, the choice of the precursor monomers to include in a copolymerization determines the microstructure, band structure and charge separation properties, thus affecting the overall performance in a given reaction.
Several groups have reported a higher photocatalytic activity for a carbon nitride derived from urea vs. a CN derived from other C-N monomers, such as melamine, cyanamide or thiourea. 126,216 Similarly, Zhang et al. studied the copolymerization of common C-N monomers (melamine, DCDA, thiourea and urea) with the amino acid glycine. Of all the copolymers formed, the one with urea showed the highest hydrogen evolution performance. 217 Recently, the copolymerization of more than two C-N monomers has been described by Vidyasagar et al. 218 In this work, phenylurea was copolymerized along with a melamine/urea mixture for a successful incorporation of phenyl groups. The assembly of phenyl units within the CN was conrmed by solid-state NMR, and the narrowing of the band gap contributes to a superior performance in CO 2 reduction to formic acid and degradation of rhodamine B (RhB) dye. 218 4.2. Doping 4.2.1. Metal doping. As shown before, a careful selection of the monomers taking part in the copolymerization process allows the formation of CN materials with tuned chemical compositions and tailored optical properties and/or electronic structures. Utilizing building blocks containing heteroatoms can lead to new CN materials with a modied chemical composition by the insertion of a given heteroatom (metal, halogen, chalcogen, pnictogen, etc.) within the C-N matrix. The presence of foreign atoms has been proven to have benecial effects on the photocatalytic performance, typically improving the charge transfer and separation of photogenerated excitons. 219,220 The rst evidence of the formation of a hybrid material through copolymerization was provided by , who reported the synthesis of a transition metal-modied CN by the copolymerization of DCDA with FeCl 3 . 221 The iron ions were included in the so-called "nitrogen pots" emulating the chemical structures of systems present in nature (e.g., chlorophyll, heme groups and coordination modes of phthalocyanines). The crystal structure of pristine CN is modied, with a signicant shi in the in-plane period to 0.681 nm (vs. 0.713 nm), and the coordination of iron to the nitrogen atoms in CN is conrmed by the absence of diffraction peaks corresponding to iron species. The prepared materials show enhanced optical absorption, conrming the modication of the electronic structure, which resulted in the enhancement of the photocatalytic activity towards RhB dye degradation. Since then different metal-modied CN materials have been shown. For example, Ding et al. extended this study to other transition metal cations, such as Cu 2+ , Mn 2+ , Ni 2+ and Co 3+ . In this work, XPS characterization shows a systematic shi to lower binding energy of the N 1s species in C]N-C units upon coordination with the metal cation, as well as the presence of all the metallic elements.
Furthermore, the improved charge separation properties, proven by PL measurements, resulted in an enhanced photocatalytic performance in the oxidation of benzene to phenol for all hybrid materials. 222 Iron doping was evaluated with different C-N building blocks as well, such as DCDA, glucose formamide and citric acid, to achieve iron and carbon doping. 223,224 In both cases, the improved electron transfer resulted in an enhanced photocatalytic performance, for RhB degradation and the HER, respectively. Additionally, Hu et al. demonstrated how Fe-doped CN, synthetized from the pyrolysis of melamine and Fe(NO 3 ) 3 -$9H 2 O, is capable of performing N 2 photoxation thanks to the activation of N 2 molecules by Fe-N bonds. 225 These examples show that doping with transition metals gives access to a wide array of materials with improved photocatalytic activity. 226 Copper, nickel, manganese or cobalt doping can be easily achieved by polymerization of a C-N building block, namely DCDA, urea and others, 227 with the corresponding transition metal chlorides [228][229][230][231][232][233][234][235][236] or nitrates. 237 The use of vanadate salts has also been reported. 238 Furthermore, the doping amount used in the synthesis can promote the coexistence of metal cations with different oxidation states, as shown recently by Dai et al., who prepared CN materials synergistically doped with Cu(I) and Cu(II). 239 Precious metals typically allow very high selectivity in organic reactions and, despite their high cost, they have also been incorporated as a dopant into CN lattices, thereby achieving improved photocatalytic performance. Eid et al. prepared homogeneous Pd-doped CN by the thermal polymerization of melamine with K 2 PdCl 4 in the presence of nitric acid. The resulting CN nanowires show remarkable performance in the CO oxidation reaction thanks to the physicochemical properties of the nanowires and the catalytic activity of Pd atoms, achieving complete CO to CO 2 conversion at 283 C. The authors also demonstrated a synergistic effect between Pd and Cu atoms, which reduced the temperature needed for this oxidation down to 149 C. 240 Furthermore, Pd/Cu-doped CN showed enhanced electrocatalytic performance for CO 2 reduction due to the quick charge transfer in the material, conrmed by impedance spectroscopy. 241 Similarly, Au-Pd co-doped CN nanobers were synthesized through copolymerization of melamine with HAuCl 4 and K 2 PdCl 4 , 242,243 and Pt-Pd with Na 2 -PtCl 4 and the same palladium salt. 244 In all cases, the oxidation of CO was substantially enhanced compared to non-doped CN bers.
Choi et al. carried out the complexation of Al 3+ ions with N and O ligands by a rationally designed in situ keto-enol cyclization of urea and aluminum acetylacetonate (Al(acac) 3 ). The inclusion of Al 3+ ions, proven by XPS, signicantly enhances light absorption; an E g ¼ 2.71 eV was observed and both the CB and VB shied to more positive values. The overall AQY for the HER reached 6.2% under 420 nm light illumination. 245 Molecular silver species have also been incorporated into CN polymers by the copolymerization of silver tricyanomethanide with cyanamide, resulting in an improvement of the optical absorption and an enhanced performance in the selective hydrogenation of alkynes. 246 Rare-earth metals such as yttrium and lanthanides (e.g., Eu and Ce) have also been included in CN materials through copolymerization, generally achieving enhanced optical absorption, improved charge separation properties and an overall high photocatalytic activity. [247][248][249][250] Alkali metals are another class of widely utilized metals along with a broad variety of semiconductor materials or molecular catalysts for enhancing their photocatalytic performance. [251][252][253][254][255][256] The rst reports on the doping of CN with Na + and K + , through the copolymerization of DCDA with NaOH and KOH respectively, showed the feasibility of effectively tuning the band gap with increasing alkali metal doping levels (Fig. 6). 257,258 Including these cations within CN lattices typically increases the interplanar d spacing, which inuences the S A and electronic band structure (effectively narrowing the band gaps to 2.50-2.55 eV, depending on the doping amount). The coordination of either Na + or K + to the pyridinic nitrogens of the triazine lattice results in hybridization between the dopant orbitals and molecular orbitals of CN, which strongly modies the potential of the VB and CB, as conrmed by the VB analysis through XPS. This strong alteration of the reduction and oxidation potential of CN materials allows an enhancement in their performance in the photocatalytic degradation of organic pollutants. Since the pioneer studies on alkali-metal doping and the complementary theoretical reports conrming a strong electron transfer from the alkali metal to the CN moiety, which narrows the highest occupied molecular orbital-lowest unoccupied molecular orbital (HOMO-LUMO) gap, 259 several studies have been reported on this topic, with different precursor salts [260][261][262] and C-N building blocks, 263 with applications in solar fuel production. 264 Additionally, the mediation of CN synthesis by K ions can induce useful chemical modications, such as the creation of cyano groups, probably as a result of the formation and preservation of stable potassium cyanide intermediates. 265 The presence of cyano groups at the surface of a CN photocatalyst can substantially improve the photocatalytic activity (e.g., the degradation of organic pollutants, 266 HER, 267 or photocatalytic NRR). 268 Besides the more widespread utilization of Na + and K + , theoretical and experimental studies show that other cations, namely Li + or Mg + , also signicantly alter CN's electronic structure, which has benecial effects in photocatalytic scenarios. 269,270 4.2.2. Non-metal doping. Given the metal-free nature of CN, much effort has been made towards designing an all-metalfree efficient photocatalytic system. In particular, introducing non-metallic elements into a CN lattice has attracted widespread attention. Utilizing small organic monomers containing B, P, S, and so forth during calcination can lead to a certain concentration of the foreign element. The covalently bound heteroatoms in CN materials strongly modify their electronic properties and improve the interaction with reactant molecules in catalytic scenarios. The rst report on non-metal doping of CN through copolymerization was published by Yan et al. in 2010, where a solid mixture of melamine and boron oxide was heated to temperatures in the 500-600 C range. The B-doped CN, with boron atoms coordinated to tertiary amines, as proven by XPS, exhibits a blue shi in the optical absorption and quenching of the uorescence. Both effects synergistically contribute to the measured enhancement in photocatalytic activity towards degradation of RhB and methyl orange (MO). 271 Also in 2010, the uorination of CN solids was carried out by Wang et al., who copolymerized DCDA and NH 4 F. Based on the strong electronegativity of uoride ions, the authors hypothesized that C-F bonds are formed, inducing a partial C-sp 3 character within the material, thus lowering the in-plane order of the material. Furthermore, the enlarged optical absorption corresponded to E g ¼ 2.63 eV, and the photochemical properties were strongly modied; namely, the hydrogen production through water splitting was 2.7 times higher than that of bulk CN, and a substantial improvement in benzene oxidation to phenol was observed. 272 The same authors also reported codoping of CN with boron and uorine as a result of the calcination of DCDA with the ionic liquid 1-butyl-3methylimidazolium tetrauoroborate. 273 These CNBF materials show excellent performance in the photooxidation reaction of cyclohexane due to their higher S A (444 m 2 g À1 , determined by nitrogen sorption measurements) coming from an increased interlayer distance (d), lower E g , and enhanced charge separation properties derived from charge localization on the surface terminal sites.
Since these studies, doping of CN frameworks through copolymerization has become a bustling research eld; the rational selection of heteroatom-containing organic monomers and different kinds of building blocks can result in the inclusion of non-metals such as B, P, S, O and halogens, which modify the selectivity in a given photocatalytic reaction and act as collection centers for e À or h + , enhancing the charge carriers' lifetime.
Boron is one of the most commonly utilized heteroatoms for incorporation into CN frameworks, due to its similar size to carbon and nitrogen, lower electronegativity, strong binding to nitrogen and inuence on the nal material's optical properties. These materials range from B-doped CN to BCN to C-doped boron nitride (BN). 274 Wang et al. and others achieved the preparation of B-doped CN through the polymerization of DCDA and a borane ammonia complex; 275 in this work, the B atoms were included mainly at the bay-carbon site, as proven by solid-state NMR and the enhanced catalytic activity of the material, which was tested for the oxidation of aliphatic C-H bonds of several substrates. 276 Sodium tetraphenylboron ((C 6 H 5 ) 4 BNa) has been utilized along with urea to achieve a ne control of the surface of the CN material. 277 The phenyl leaving groups induce high S A in the nal CN (up to 144 m 2 g À1 ), which promotes its facile delamination, reaching thin lms of approximately 2-5 nm thickness. Furthermore, XPS proves the formation of N-B-N bonds, which strongly affects the band gap and photophysical properties of the materials. 278 The prepared materials show an enhancement in the photocatalytic HER through water splitting with TEOA as a hole scavenger and Pt as a co-catalyst. Boric acid (H 3 BO 3 ) along with melamine, DCDA or thiourea has also been reported to achieve homogeneous Bdoping in CN frameworks and the altered electronic properties and morphology result in enhanced photocatalytic performances in the photodegradation of organic pollutants, 279 photoreduction of uranium species (UO 2 2+ ) 280 and cycloaddition of CO 2 to epoxide. 281 Sulfur doping is complicated to achieve, due to the tendency of sulfur-containing moieties to leave (usually in the form of sulfates) upon calcination. Nevertheless, the use of monomers which contain sulfur for the synthesis of CN has been proven to successfully achieve its inclusion within the lattice. For this, trithiocyanuric acid and thiourea have typically been the monomers of choice since the rst report describing their pyrolysis and transformation into S-doped CN for water oxidation and reduction, respectively. 117,282 Indeed, various reports described the preparation of SCN materials with proven photocatalytic performance in water splitting, 283 degradation of dyes and organic pollutants, 284-286 oxygen reduction 287 and CO 2 reduction. 288 SCN has also been applied in bioimaging applications; namely, its connement through top-down techniques such as ultrasonication yields highly uorescent S-doped CN QDs with redshied emission, good biocompatibility and low toxicity, as shown in the imaging of PC-3 cells. 289 Furthermore, the enhanced chemiluminescence of SCN vs. bulk-CN was shown by Zhu et al. The strong electrochemiluminescence signals of SCN can be quenched in the presence of Cu 2+ , which allows the quantication of L-cysteine. 290 Selenium has also been incorporated into CN materials and they have been utilized in different scenarios. Qiao et al. showed the synthesis of Se-CN by copolymerization of DCDA, cyanuric acid (CA) and SeO 2 , which resulted in a Se loading of 2.1 atomic %. This material could oxidize tetramethylbenzidine (TMB) in the presence of H 2 O 2 . 291 Kumar et al. followed the same synthetic route and utilized the prepared Se-CN for the efficient photocatalytic production of formaldehyde from CO 2 . 292 Phosphorus atoms within CN frameworks can strongly alter electrical or thermal conductivity, permitting their use in different applications, mainly relying on the enhanced charge mobility in the P-containing CN. 293 One of the rst reports on the synthesis of PCN through copolymerization involved the thermal treatment of DCDA with the ionic liquid 1-butyl-3methylimidazolium hexauorophosphate. 294 Ionic liquids have been previously used for the introduction of dopants such as B or F, and in this case, EDS analysis determined that the presence of the phosphate salt in the initial reactant resulted in a weight percentage (wt%) of 0.5% P in the nal material; the inclusion of P in the CN matrix was conrmed by XPS. The enhancement in photocatalytic performance induced by the extended optical absorption and the improvement in the charge separation properties was conrmed by visible-light degradation of RhB and MO. 295 Since then, the most commonly utilized species for the synthesis of PCN through copolymerization have been phosphate salts 277,296-298 or phosphonic acids, associated with common monomers such as DCDA or melamine. 299,300 In these scenarios, the photocatalytic activity towards the degradation of model organic dyes or a water-splitting HER was substantially enhanced due to the more benecial electronic structure aer P inclusion in CN frameworks.
Phosphonitrilic chloride trimer monomer (PCT) has also been utilized for the formation of co-polymers containing C-N-P elements, taking advantage of its high phosphorous content and a melting point (112-115 C) that allows the formation of a homogeneous medium upon thermal treatment. In 2014, Zhou et al. carried out the copolymerization of guanidinium hydrochloride as a CN precursor with PCT; the resulting material possessed P atoms, which replaced carbon in the CN lattice, as shown by XPS and 31 P solid-state NMR. As a result, the photocatalytic performance in hydrogen production and RhB degradation was substantially enhanced. 301 The same monomer was copolymerized with thiourea and the resulting material was tested for photocatalytic NO removal. 302 Our group reported the thermal copolymerization of PCT with 2,4-diamino-6-phenyl-1,3,5-triazine (DPT) and the formation of C-N-P materials with remarkable re-resistance performance. 303 In this case, both monomers create a liquid-state intermediate that allows an enhanced reactivity at higher temperature and the formation of CNP materials through ring opening of PCT and the nucleophilic attack of the amine group at the chlorine, before the nal condensation takes place (Fig. 7). The inclusion of P in the CN framework reaches up to 32 wt%, and the prepared materials show an impressive resistance to oxidation.
Another pnictogen (group 15), antimony (Sb), was included within CN frameworks by copolymerization of urea and sodium antimonate (NaSbO 3 ). The resulting N-Sb(III) bonds were shown to perform as charge-capture centers, leading to a strong enhancement of the photocatalytic HER, with a 6.4% AQY at 420 nm. 304 Doping CN semiconductors with oxygen was predicted to improve visible-light harvesting through the improvement of charge carrier mobility. 305 Qiu et al. achieved the extension of the optical absorption of CN up to 700 nm by inserting oxygen in its lattice, partially replacing nitrogen atoms. In this work, the doping with oxygen was achieved by copolymerization of urea with oxalic acid, and the resulting material showed an increased photocatalytic performance in the degradation of bisphenol A (BPA), with hydroxyl radicals playing the major role in the photocatalytic reaction. 306 Another oxygen-rich monomer, citric acid, was copolymerized with thiourea in order to achieve simultaneous oxygen-and sulfurdoping in the nal CN material. In this case, the oxygen doping was obtained by the partial retention of carboxylic acid groups aer the hydrothermal reaction at 200 C; this strongly altered the PL properties, resulting in blue uorescence with a 14.5% AQY and allowing a remarkable performance in the detection of mercury ions and cell imaging. 307 Obtaining the inclusion of several heteroatoms that synergistically contribute to the modication of the electronic structure and improvement of the overall photocatalytic performance can be achieved by rationally selecting heteroatom-containing organic monomers and will take place at the elevated temperatures of the synthesis. Thiourea copolymerized with PCT incorporates both sulfur and phosphorous atoms in the CN lattice, which improves light harvesting and S A compared to pristine or single-element-doped CN. 308 Similarly, thiourea along with ionic liquids containing PF 6 groups or phosphate salts, successfully yields S-P co-doped CN frameworks. 309 Furthermore, DFT calculations performed by Liu et al.
show that doping of P atoms preferentially occurs by replacing C atoms or occupying the interstitial sites of CN, while S or O doping can replace N or be included in an interstitial site. 310 The modication of CN layers with halogens has been predicted to occur more feasibly in the interstitial position; their introduction has been proven to lead to new density states and redistribution of the HOMO and LUMO energy levels. Fluoride perturbs the VB and HOMO due to its high electronegativity; meanwhile, chloride, bromide and iodide are involved in the conduction band and LUMO. Overall, the calculations performed by Zhu et al. illustrated that halogen-doped CN possesses a narrower E g , increased light absorption and reduced work function. 311 Experimentally, aer the rst report by Wang et al. 272 describing the uorination of CN polymers, Zhang et al. extended this study by carrying out the copolymerization of DCDA with various ammonium halide salts (NH 4 X, X ¼ F, Cl, Br and I) and testing the resulting halogen-modied CN materials as photocatalysts for the HER; CN-I showed the highest performance, reaching an AQY of 2.4% at 420 nm. 312 The extension of the aromatic CN system thanks to halogen insertion results in an enhanced optical absorption; the band gap narrowing was proven by VB analysis through XPS (supported by DFT calculations). This nding can be explained by the delocalization of electrons that interact with the p-electron system of CN. Further evidence of the photocatalytic enhancement of CN by iodine doping was provided by Guo et al., who achieved simultaneous K and I inclusion into CN frameworks by copolymerization of DCDA and KI. 313   and thiourea were chosen for the copolymerization along with NH 4 Br. 314 As predicted by others, 126,216 Br-CN prepared with urea resulted in higher H 2 evolution rates and photocatalytic OER with Pt and cobalt oxide as co-catalysts, respectively.
In addition to the popular method of CN doping with heteroatoms through direct copolymerization, it is also possible to include foreign elements within CN matrices in a postsynthetic manner, which can successfully alter the electronic structure and enhance the photocatalytic performance of CNderived materials. 219,220,315 Lui et al. showed the incorporation of sulfur atoms by the thermal treatment of pre-formed CN under a H 2 S atmosphere and observed an enhancement of photocatalytic activity in several model reactions including the HER, phenol degradation and the photogeneration of hydroxyl radicals. The sulfur atoms are incorporated by replacing lattice nitrogen atoms. Since new C-S bonds are formed, the band gap is enlarged by the widening of the modied CN's VB stemming from the interaction of S 3p states with N 2p states. 316 Another a chalcogen, i.e., Se, was introduced by the thermal treatment of a mixture consisting of CN and diphenyl selenide in ethanol, which resulted in the exfoliation of the product into thin nanosheets with thicknesses in the range of 0.7-2 nm. The Se atoms replace heptazine nitrogens and strongly modify the electronic structure towards enhanced photocatalytic performance in the CO 2 reduction and HER. 317 Other non-metals have been inserted within CN using similar approaches, for example, boron in the form of borate. The treatment of CN with NaBH 4 in water results in the formation of Na 3 BO 3 , H 3 BO 3 and hydrogen, which is a strong reducing agent that attacks N atoms and creates nitrogen defects, allowing the insertion of BO 3 À species. The reductive treatment results in an S A enhancement and in a narrowed band gap down from 2.71 to 2.66 eV, which contributes synergistically to the enhanced photocatalytic activity tested for NO removal. 318 Phosphorous doping was achieved by wet grinding a urea-derived CN along with NaH 2 PO 2 , followed by thermal treatment at 400 C. The introduced P atoms replace corner-site C atoms, which results in E g ¼ 2.52 eV with a negative shi of both the CB and VB. The enhanced S A and hydrophilicity contribute as well to an improved HER performance (AQY of 6.52% at 420 nm). 319 The introduction of metals by a simple treatment of CN with metallic species has also been demonstrated. Typically, N atoms from CN, which serve as Lewis bases, coordinate to the utilized metal (cation) Lewis acid. Doping with alkaline metals, such as potassium or cesium, by the thermal treatment of a mixture containing prepared CN with either KCl or CsCl was recently reported. 320,321 Cu 2+ has also been widely inserted into CN matrices in a post-synthetic manner; Ju et al. showed that Cu-modied CN, prepared by a reaction between urea-derived CN and CuCl 2 , exhibits a better separation of the HOMO and LUMO distributions, which in turn leads to an enhanced production of reactive oxygen species (ROS) upon visible-light illumination. 322 Furthermore, Vázquez-González et al. followed the same synthetic approach and demonstrated that Cu-CN can act as a heterogeneous catalyst mimicking the function of horseradish peroxidase. 323 Other cations (e.g., Ru 3+ and Zn 2+ ) were incorporated following similar procedures and their photocatalytic performances were tested for organic catalysis and the HER. 324,325 Lanthanum was also loaded by hydrothermally treating CN nanosheets with La(NO 3 ) 3 ; the resulting material showed strong uorescence and outstanding performance in the detection of Fe 3+ ions. 326 Doping with halogens, such as iodine, was described by Han et al., who ball-milled melaminederived CN with iodine in different ratios and observed, using XPS, that the formed C-I bonds could narrow the E g down to 2.37 eV and enhance the photocatalytic HER, reaching an AQY of 3% at 420 nm. 327 4.3. Templating 4.3.1. Hard templating. One of the parameters that determines the overall photocatalytic performance of a given reaction is the number of active sites on the catalyst's surface. Tailoring the morphology and the porosity of CN materials is therefore an important strategy to overcome the bottlenecks towards high yields in photocatalytic reactions. The utilization of templates has permitted achieving signicant progress in the controlled synthesis of CN nanostructures with a dened morphology, porosity and particle size distribution. This synthetic approach involves lling or coating a rigid template (typically made of inorganic materials as SiO 2 , Al 2 O 3 , etc.) with a C-N precursor, thermal condensation at high temperatures into a polymeric CN structure and nally, etching the template (commonly using an acidic wash, Fig. 8). 328,329 Already in 2005, Groenewolt et al. carried out the synthesis of CN nanoparticles (NPs) in different solid silica matrices with pore sizes in the 5-70 nm range. 330 The porous templates were lled with cyanamide (CY) and the nanosized CN material was obtained via a thermal treatment at 550 C. The rst evidence of an enhancement in the catalytic performance by templated CN was given later in 2006 by Goettmann et al., who utilized SiO 2 NPs of 12 nm for the synthesis of mesoporous CN, using CY as a molecular precursor. Electron microscopy along with the analysis of nitrogen sorption using the Brunauer-Emmett-Teller (BET) model conrmed weak microporosity and enhancement of S A up to 439 m 2 g À1 , which resulted in improved activity for the Friedel-Cras acylation of benzene with hexanoyl chloride, reaching 90% conversion and a TOF of 6200 h À1 . 331 Vinu et al. used two different precursors, namely ethylenediamine (EDA) and CCl 4 along with SBA-15 (a family of mesoporous silica templates with different pore diameters), 332 for the synthesis of well-ordered materials with a pore diameter range of 4.2-6.4 nm. 333 The catalytic activity was tested in Friedel-Cras acylation of benzene using hexanoyl chloride and the prepared materials show a 100% conversion to caprophenone thanks to their high S A , reaching 830 m 2 g À1 . 333 EDA and CCl 4 were further utilized for the synthesis of CN nanotubes templated by porous anodic aluminum oxide (AAO) and as well for preparing mesoporous nanoparticles (>150 nm size) templated with ultra-small silica nanoparticles. Aer the formation of the nanotubes at high temperature and the removal of the AAO template by treatment with NaOH, the prepared materials were utilized as a nanotubular support for the deposition of Pt nanoparticles; this hybrid nanostructure was used for the hydrogenation of cyclohexene to cyclohexane. 334 Furthermore, the high nitrogen content in the prepared CN nanoparticles gives rise to numerous basic sites in the form of amine or imine groups that promote the trans-esterication of b-keto esters, in synergy with the enhanced S A (645 m 2 g À1 ). 335 Conned nanorods of a 260 nm diameter with directional charge transport properties were synthesized utilizing an AAO template and CY as a C-N precursor; the connement inside the nanochannels of the template enhances the orientation and crystallinity of the resulting CN with a lower HOMO given the lack of both free NH 2 groups and defects within the structure (Fig. 9a). The photoactivity of the nanorods was substantially enhanced compared to bulk CN in the H 2 and O 2 evolution reactions, 336 as was also conrmed by others. 337 Further insight into HER performance enhancement using templating was provided by Sun et al. who used hollow silica nanoparticles along with CY for the formation of CN nanospheres, which aer the template removal and light-induced deposition of Pt as a co-catalyst, showed a high HER AQY of 7.5% at 420.5 nm. This fact is attributed mainly to the maximized light harvesting due to inner reections and photonic effects within the nanostructure of the CN vesicle (Fig. 9b). 338 Si and co-workers reported a similar strategy, using silica spheres as nanoreactors to achieve the conned thermal polymerization of cyanamide precursors under pressurized conditions. The resulting nanosized CN showed a nanoporous structure as well as improved crystallinity and yielded a 44-and 30-fold HER enhancement under visible-light irradiation compared to bulk CN and a material prepared under atmospheric pressure, respectively. 339 SiO 2 nanoparticles have also been utilized to alter the electronic structure of CN forming nanojunctions and improve the photocatalytic performance in the degradation of RhB. Shalom et al. demonstrated that the polymerization of a DCDA/SiO 2 mixture yields a CN/SiO 2 hybrid composite, which exhibits improved charge separation efficiency upon illumination besides enhanced S A . 340 In the same way, aluminum oxide (Al 2 O 3 ) loaded with nickel was utilized to generate CN through the polymerization of EDA and CCl 4 resulting in Ni NPs covered with 3-4 layers (calculated) of CN. The CN/Ni/Al 2 O 3 composites were used for the hydrogenation of p-nitrobenzoic acid at different pH values, where they showed remarkable conversion for more than 20 cycles. This performance stems from the donation of electrons from Ni to CN, which enhances its capability to activate hydrogen for its reaction with nitro compounds. 341 Despite the variety in the utilized templates in this synthetic approach, [342][343][344][345] in general, SBA-15 has been the most commonly used hard material to tailor the nanostructure of CN polymers. Carrying out the polymerization at different temperatures, 346 modifying SBA-15 by cross-linking or protonation 347,348 and testing the photocatalytic performance in different model reactions 349 have been some of the recent developments in this research line. Furthermore, SBA-15 as well as common silica NPs allow the combination of this synthetic pathway with other modications such as doping or copolymerization, by simple manipulation of the initial reactants (cast onto a hard template).
Utilizing thiourea to achieve S-doping 282,350 or common C-N monomers along with metal salts (Fe 2+ , 351 Cu 2+ , 352,353 and others 354,355 ) together with templating agents permitted combining the electronic modication of CN towards an improved charge transfer and/or separation with a precise engineering of the morphology and porosity, with the aim of improving the photocatalytic activity in several model reactions. Additionally, Chen et al. carried out the copolymerization of DCDA with thiophene within a silica NP template to create mesopores in a CN framework that included conjugated functional groups, thus achieving synergistic molecular and textural engineering of the prepared material towards an efficient photocatalyst for the selective oxidation of alcohols. 356 4.3.2. So templating. So templating slightly differs from hard templating; in this approach, molecular building blocks, namely, surfactants, ionic liquids or block polymers, are utilized in order to direct the synthesis of CN. A self-assembly process between the CN-polymers' reactants and the molecular templating agents imprints a given morphology during the calcination process. The templating molecules typically decompose before reaching the nal synthesis temperature, which avoids the use of strong acids or basic agents for their removal from the product, as in the case of hard templating. 328 The rst evidence of the effectiveness of this technique was provided in 2010 by Wang et al., who used a wide variety of nonionic surfactants, block copolymers and ionic liquids (ILs) along with DCDA for the synthesis of mesoporous CN. Here, instead of the typical thermal treatment at high temperatures, intermediate sequences were utilized at lower temperatures before reaching the nal condensation step at 550 C to allow a structural rearrangement to occur before the decomposition of the so template.
Parameters such as the crystal structure and elemental composition are strongly altered by the type of template and its relative amount; for example, when using Pluronic P123, the molar C/N ratio varies from 0.82 to 2.06 due to the insertion of carbons from Pluronic P123 into the structure of the nal CN. Ionic surfactants as cetyltrimethylammonium chloride and cetyltrimethylammonium bromide (CTA) lead to S A ¼ 80 m 2 g À1 , while Triton X-100 provides high organization of the pore walls, with pore sizes ranging from 3.8 to 15 nm and S A ¼ 76 m 2 g À1 . Furthermore, utilizing ionic liquids as templates proved to induce nanoporosity, as observed by transmission electron microscopy (TEM) with pore sizes of 5.6 nm and S A ¼ 80 m 2 g À1 in the case of 1-butyl-3-methylimidazolium dicyanamide. 357 Yan et al. used melamine along with P123 for the synthesis of wormlike CN with a narrow pore size distribution; the utilization of Pluronic P123 also resulted in a certain carbon enrichment that shied the absorbance edge up to 800 nm. Consequently, the prepared material showed good photocatalytic HER activity with Pt as a cocatalyst and produced 148.2 mmol h À1 H 2 under visible light irradiation. Additionally, when the incident wavelength was longer than 700 nm, the material still produced 3.6 mmol h À1 . 358 A smaller templating agent (e.g., sucrose) was also used with melamine to produce mesoporous CN. Upon thermal condensation, sucrose rstly melts and then decomposes, releasing carbon-based gases that induce porosity in the nal CN. BET analysis conrmed the S A enhancement up to 121 m 2 g À1 , which contributed to the enhancement of the photocatalytic HER activity. 359 The utilization of biopolymers or bio-bers as so templating agents has been shown as another effective path to modify textural and photophysical properties. Zhang et al. used DCDA along with alginate or gelatin to modify the microstructure and electronic properties of CN and observed 5-and 6-fold S A enhancement when using alginate and gelatin, respectively. An additional consequence of these conditions is the insertion of carbon atoms, which in turn results in unpaired electrons within the CN lattice, measurable using electron paramagnetic resonance (EPR). Furthermore, the prepared materials were tested as photocathodes in a photoelectrochemical cell, showing a 2.6-fold enhancement of the photocurrent which remained stable during repeated on/off cycles. 360 Additionally, mesoporous tubular CN with carbon doping was obtained using kapok ber as a templating agent along with urea. This novel approach modies the band structure toward an enhanced optical absorption and fast charge carrier separation, resulting in enhanced HER photocatalytic performance. 361 Recently, urea was also condensed with a melamine formaldehyde resin; the resulting CN shows a nanotube morphology with enhanced S A , hydrophilicity and light harvesting properties, which result in a remarkable HER performance, reaching a 19.2% AQY. 362

Ionothermal synthesis
The crystallinity of CN materials is a key factor for an efficient charge transfer and for the separation of photoexcited states and therefore for the achievement of a high photocatalytic activity. Merschjann et al. and others have shown that the electronic transport in CNs occurs perpendicularly to the 2D sheets' plane, in contrast to the situation in graphene-related materials. 363,364 Therefore, achieving the closest possible, defect-free, highly ordered packing of the CN layers can substantially improve the electron and hole mobilities, one of the main bottlenecks of CN photocatalysts. Unlike the copolymerization of an organic monomer with a single alkaline salt, which typically results merely in a CN doped with the alkali metal or the anionic counterpart, 365-370 using eutectic salt mixtures for the preparation of CNs induces both crystallinity and a higher degree of condensation in the resulting CN materials, and therefore has emerged as an effective approach to obtain high photocatalytic performance. 371,372 A eutectic mixture is composed of two or more compounds that melt simultaneously at temperatures ranging from 100 up to 1000 C, allowing a miscible multicomponent liquid phase for the synthesis of inorganic crystalline materials and carbonnitrogen based materials. 373, 374 Kuhn et al. described in 2008 the synthesis of triazine-based porous polymers in molten ZnCl 2 that promoted the crystallinity of the framework. In this work the aromatic nitriles undergo dynamic trimerization within the ionic melt in a quartz ampule at 400 C for 40 h, reaching an almost complete conversion. Fourier-transform infrared (FTIR) spectroscopy and X-ray diffraction (XRD) conrmed the formation of a crystalline polymer with a hexagonal pore packing and a specic surface area and pore volume of 791 m 2 g À1 and 0.4 cm 3 g À1 , respectively. 375 The utilization of a salt-melt mixture for the synthesis of CN was shown in a report by Bojdys et al. in 2008, where the condensation of DCDA was carried out in a LiCl/KCl mixture as the solvent. The CN obtained via this synthetic route shows an optimal degree of condensation, as proven by the absence of detectable amine groups in FTIR and corroborated by its high crystallinity reected in the XRD patterns, where the (100) and (002) diffractions were observed at 12.1 and 26.5 respectively, corresponding to d ¼ 7.3 and 3.36Å and further supported by TEM. 376 Later in 2011, Winhier et al. conrmed that the previously reported proposition of heptazine-based structures consists of a triazine-based framework, poly(triazine imide) (PTI). 377 Li + and Cl À intercalated PTI was prepared through the thermal treatment of DCDA in a eutectic mixture of LiCl and KCl, and the resulting material consisted of 2D networks composed of planar layers based on imide-bridged triazine units with Li + and Cl À ions as conrmed by electron energy loss spectroscopy (EELS). 15 N-NMR conrmed the triazine-based structure and the absence of heptazine motifs. Poly(triazine imides) have been studied in depth ever since; in 2013, the use of LiBr and KBr for their synthesis expanded the d spacing from 3.38 (observed in PTI prepared in LiCl/KCl) to 3.52Å and led to a theoretical band gap between 1.6 and 2.0 eV. 378 Chong et al. have shown the replacement of Br À by F À ions by washing with concentrated ammonium uoride, obtaining PTI with intercalated uoride ions and a smaller interlayer distance of 3.32Å. 379 The high photocatalytic performance of PTI materials was described later for both water half-splitting reactions with high H 2 and O 2 production rates. [380][381][382][383] Further modication of the texture and electronic properties of the resulting material can be obtained by using organic monomers in order to enhance their optical absorption 384 and by combining metallic salts with different loadings 385 (e.g., NaCl, CuCl 2 , ZnCl 2 and others). [386][387][388][389] In 2018, Heymann et al. showed the electrochemical synthesis of PTI by coupling melamine radicals in a three-electrode setup; this novel approach allows the synthesis of PTI materials without intercalated ionic species. Additionally, despite the well-known high dispersibility of PTI, 390 in this work, the high solubility of the obtained product allowed its analysis using liquid-state NMR. 391 By selecting a novel monomer with a condensation temperature lower than that of the standard C-N based reactants, Dontsova et al. prepared well-dened potassium poly(heptazine imides) (PHTIK). Here, substituted triazoles were used along with a KCl/LiCl mixture. Given the temperature of the rst reaction step (300 C) and the melting point of the eutectic mixture (352 C), the structure of the nal material was directed towards a crystalline, heptazine-based structure 113 with the capability to reduce water and exchange ions within the solid state. 392 Since this rst report on the ionothermal synthesis of PHTIK from triazole derivatives, several reports have been published on the modication of the properties of the nal CN material produced from different reactant molecules [393][394][395] or metallic salts. 396 Their remarkable performances in photooxidation processes and catalyzing organic syntheses have also been described. [397][398][399] Besides using raw C-N monomers with a condensation temperature lower than the melting point of the eutectic mixture, thermally treating common organic molecules to obtain melon units before the ionothermal synthetic step has emerged as an approach for the synthesis of highly photoactive materials. Lin et al. preheated melamine at 500 C to prepare tris-triazine units (or s-heptazines 400 ) and further heated the product in a KCl/LiCl mixture in order to achieve highly crystalline CN. Theoretical and experimental results conrmed the improved photogenerated charge carrier mobility of the tris-triazine-based CN vs. PTI, or melon type (Fig. 10), which resulted in a remarkable 50.7% AQY in the HER under 405 nm light illumination in a natural photosynthetic environment. 401 Zhang et al. used a copolymerized CN material derived from urea and oxamide for the synthesis of a highly crystalline network based on heptazine units in a LiCl/KCl mixture. The narrowed interlayer distance and enhanced light absorption result in signicant hydrogen production with a 57% and 10% AQY at 420 and 525 nm, respectively. 402 The variety of CN structures that can be obtained via ionothermal synthesis and the optimization of synthetic parameters (e.g., monomer-to-salt ratio or condensation path) has allowed, amongst others, the formation of isotype triazineheptazine heterojunctions. They typically enhance the lifetime of photogenerated charge carriers thanks to the band alignment between different electronic structures, thereby promoting the photocatalytic activity; 403  500 C resulted in PTI structures given their high thermal stability compared to heptazine structures. Nevertheless, at a xed synthesis temperature of 500 C, the salt-to-urea ratio determines the structural transformation from PTI into heptazines: a high molar ratio of molten salt to urea promotes the formation of a triazine-based structure, while a moderate ratio favors the heptazine form. The PTI/heptazine structure was conrmed by XRD, TEM and solid-state NMR and its photocatalytic performance (for the HER in this case) was substantially enhanced by the improved charge separation at the isotype heterojunction (Fig. 11). 405 The presence of cations in the CN material resulting from an ionothermal synthetic procedure resulted in varying photocatalytic HER performance when salts were added to the reaction mixture. Li et al. polymerized melamine in the presence of a KCl-LiCl eutectic mixture and observed that the addition of certain cations, such as Rb + or K + , promotes the assembly of the CNK material into nanorods and furthermore boosts the photocatalytic activity due to a dielectric screening effect. 406

Supramolecular design
The use of supramolecular structures as a tool for the rational design of CNs has attracted widespread attention during the last 7 years, due to the possibility of imprinting novel morphologies and electronic structures from the molecular level all the way to the nal product aer calcination. In this approach, C-N-based monomers interact by non-covalent interactions, forming versatile self-assembled supramolecular frameworks of different dimensionalities in a given solvent. Their features strongly depend on the intermolecular forces at play (hydrogen and halogen bonding, p-p stacking, electrostatic interactions, etc.). 407,408 The thermal condensation of the described supramolecular structures at high temperatures (300-650 C) can induce the morphology and the monomer sequence onto the nal CN material, thereby allowing the rational design of properties for a given application while surpassing the drawbacks of solid-state reactions. 409 4.5.1. Acidic treatment of organic precursors. The protonation of organic monomers with halogen acids is a versatile tool for the generation of supramolecular assemblies of different dimensionalities. Melamine, for example, aer protonation with a halogen acid, generates organic microsheets through counterion-bridged hydrogen bonds, electrostatic interactions and p-p stacking. 410,411 Consequently, inducing a certain kind of dimensionality and electronic properties in a pristine supramolecular assembly can promote a ne control over the morphology and charge transport of the nal CN material (aer the thermal condensation at 300-650 C). The rst insight into the effect of the treatment of organic precursors with strong acids and its utilization for the synthesis of CN materials was provided by Yan et al., who treated melamine with sulfuric acid before thermal condensation; they observed an enhanced thermal stability of the supramolecular arrangement. At high temperatures, sulfur was partially retained, which promoted charge separation upon illumination and HER photocatalytic activity. 412 The formation of a supramolecular assembly between sulfuric acid and melamine was further explored by others, conrming the quenching of sublimation during thermal treatment, the enhanced porosity, and the presence of trace amounts of sulfur, thereby modifying the chemical composition in the nal bulk material, which promotes the photoactivity in various model reactions. 413,414 Hydrochloric acid is the most commonly used strong acid for the synthesis of C-N-based supramolecular assemblies that serve as reactants for a high temperature solid-state reaction, and a large amount of work has been carried out since the rst reports, showing the possibility of tuning the morphology and photoactivity of the nal CN by using melamine hydrochloride as the starting reactant. [415][416][417][418] Our group and others studied the effect of chloride ions on the features of the initial supramolecular assembly with melamine. 419 Upon protonation, melamine is arranged in a 3D fashion with a repeating unit in plane, 420 and this structure has also been observed in other supramolecular structures, where treatment with HCl induces directionality. 421 The morphology imprinted by the supramolecular assembly strongly alters the physical features of the CN material, promoting the formation of ultrathin nanosheets or enhanced porosity. 422 Furthermore, Zhang et al. conrmed the strong alteration of the band structure, which results in a positive shi of the CB and a negative shi of the VB. 423 Bromide can also direct supramolecular assemblies based on melamine; our group showed that the sequential treatment of melamine with HCl and HBr results in the selective coordination of each halogen acid at a different binding site, namely an amine group or pyridinic nitrogen. Additionally, molecular dynamics simulations showed a stronger interaction of both amine and pyridinic N with Br rather than with Cl; therefore the modications imprinted by HBr in the melamine-HCl supramolecular assembly strongly alter its chemical nature and dimensionality. The latter CN material showed a novel dot-like morphology with remarkable performance for the HER, reaching an AQY of 3.2% and 2.1% upon illumination at 405 and 455 nm, respectively. 424 Treating melamine with nitric acid (HNO 3 ) is one of the most effective approaches to direct the growth of the prepared CN towards one direction. Melamine and nitric acid interact by hydrogen bonding, forming supramolecular complexes with a rod-like shape and different sizes depending on the acid concentration or reaction time (Fig. 12). 425 The rod-like morphology of the supramolecular assembly (melamine-HNO 3 ) can effectively imprint a 1D morphology on the nal CN material aer condensation, as shown for the rst time by Tahir et al. in 2014. 426 Other groups have shown the application of 1D carbon nitrides, prepared using this method, in different catalytic scenarios such as dye photodegradation, an electrocatalytic ORR or a photocatalytic HER. [427][428][429][430] Furthermore, several groups have studied the self-assembly of melamine with different strong acids and their combinations; CN obtained from selfassembled melamine-HNO 3 proved to have the highest photocatalytic performance. 431,432 Additionally, the use of supramolecular assemblies comprising melamine and nitric acid has allowed the tailoring of the chemical composition and electronic structure by further inserting heteroatoms, 433 promoting the exfoliation of CN into ultrathin lms (Fig. 12b), 434 and generating homojunctions that improve the charge separation efficiency. 435 Furthermore, while the protonation of standard C-N monomers before the pyrolysis does not typically modify the bulk chemical composition of the CN polymers, the use of acids containing heteroatoms can successfully alter it by inserting a given dopant element. Weng et al. and others described the synthesis of BN and BCN nanosheets from a hydrogen-bonded framework precursor containing melamine and boric acid aer pyrolysis at 1050 C, 436,437 where hydrogen bonds are established between the hydroxyl groups of boric acid and both the amine and pyridinic nitrogens of melamine. 438 4.5.2. Hydrogen bonding between C-N monomers. Jun et al. reported the use of hydrogen-bonded frameworks based on the self-assembly of different C-N building blocks for the synthesis of nanostructured CN. In their work, melamine was preorganized with cyanuric acid in dimethylsulfoxide (DMSO), resulting in ower-like supramolecular spheres, which aer thermal treatment form hollow CN spheres with enhanced photocatalytic activity for RhB photodegradation and the HER. 439,440 The cyanuric acid-melamine lattice (CM) contains up to 3 different type of hydrogen bonds and can adopt several forms depending on the solvent used for its preparation; this supramolecular assembly has been known for a long time and is one of the most utilized platforms for the synthesis of supramolecular structures. [441][442][443][444] The versatility of the CM assembly and the possibility of modifying its nature by using different solvents or suitable C-N monomers have allowed its exploitation as a common reactant for CN synthesis with tailored chemical composition, electronic properties, morphology and dimensionality. 409 The possibility of ne-tuning the CM lattice by using different solvents was conrmed, and thus the porosity and electronic properties of the resulting CNs were optimized towards enhanced photocatalytic activity. Nevertheless, due to the chemical composition of melamine and cyanuric acid and the release of both amine groups and O atoms, the chemical composition of the nal CN polymer remains unaltered. 445 Since the rst reports on the utilization of CM lattices for the preparation of nanostructured CN, the modication of CM assemblies for the preparation of various CN materials with novel electronic structures and morphologies along with their versatile applications have been widely explored, which resulted in the accumulation of a vast body of knowledge. [446][447][448][449] Inserting suitable C-N monomers modies the dimensionality of the CM supramolecular assembly and the electronic properties of the nal CN material by increasing the C-to-N ratio, which effectively narrows the optical band gap; small organic molecules, such as barbituric acid, 450-452 aromatic moieties, 453-456 urea, 457 caffeine, 458 nucleobases 459 and others, [460][461][462][463] have been shown to undergo supramolecular assembly with melamine and cyanuric acid, thus enhancing the photocatalytic activity of the nal CN material (Fig. 13a). Furthermore, modulating the CM assembly with heteroatomcontaining molecules allows the successful inclusion of the desired heteroatom within the framework of the nal CN material, thereby modifying its bulk composition; boric acid or phosphoric acid can be integrated within the CM by hydrothermal treatment and preserve a certain amount of the doping agent, which promotes the charge transfer and separation of photoexcited states (Fig. 13b). [464][465][466] Additionally, the utilization of sodium persulfate (Na 2 S 2 O 8 ) along with the in situ generated CM lattice results in an enhanced porosity of the nal CN, thanks to the release of sulfur-containing species, which improves the photo-electrochemical performance. 467 The replacement of melamine with a similar C-rich triazinelike molecule in the CM lattice modies the chemical and electronic properties of CN. Xu et al. showed that when substituting a phenyl-modied triazine-based molecule such as benzoguanamine for melamine, a molten state was induced during the thermal condensation, which allowed the formation of homogeneous lms of C-rich CN polymers over conductive substrates, opening the door to its application in solar cells. 468 Additionally, the resulting phenyl-modied CN material, upon exfoliation, yields CN QDs with a remarkable PL behavior. 469 Other C-rich molecules such as triaminopyrimidine (very similar to melamine but with one carbon replacing a nitrogen in the triazine ring), when self-assembled with cyanuric acid (CA), lead to the formation of C 3 N 3 O materials aer thermal condensation at low temperatures, with photocatalytic activity for dye degradation, the HER and CO 2 reduction. 84 In addition to the widespread utilization of the CM lattice as a versatile platform for the design of C-N based supramolecular structures, melamine and other C-N monomers can also selfassemble with a wide variety of suitable monomers; this results in a diversity of supramolecular structures that modify the nal CN properties towards an enhanced photoactivity. Trithiocyanuric acid (TTC), for example, has been widely used along with melamine for the synthesis of sulfur-doped CN, as shown by Feng et al. 470 Aer this report, several groups have reported the formation of a M-TTC supramolecular assembly and its conversion into S-doped CN, with sulfur atoms typically replacing carbon in the CN framework; they used the latter for different photocatalytic scenarios including dye degradation, 471 reduction of Cr(VI), 472 the HER 473 and formation of liquid crystals (Fig. 13c). 474 Additionally, a large number of small organic molecules have been utilized and self-assembled with melamine; urea, 475 glucose, 476 oxalic acid, 477 chitosan 478 and others [479][480][481] can interact by hydrogen bonding with melamine and form supramolecular aggregates, which aer thermal treatment preserve certain C-doping. The clever selection of the building blocks taking part in the supramolecular self-assembly permits the obtention of semiconducting domains with a nonnegligible photoactivity at low temperatures (250 C); benzoquinone derivatives or chloranilic acid are some of the species that, aer assembly with melamine and condensation at mild temperatures, have resulted in semiconducting polymers with photocatalytic activity in dye degradation and water oxidation. 482,483 Additionally, several reports have performed the selfassembly of melamine with inorganic salts and explored the features of the nal CN. Chen et al. preorganized melamine with [Al(NO 3 ) 3 $9H 2 O], which interacts via hydrogen bonding between the amine groups of melamine and the water molecules of the hydrated complex. The thermal condensation of the supramolecular arrangement results in aluminum oxide species that can be removed using an acidic wash, resulting in enhanced S A and photocatalytic activity. 484 Following this report, ionic complexes such as ammonium oxalate or hydroxylammonium chloride have been proven to form a supramolecular precursor with melamine by hydrogen bonding between amino groups and carbonyl or hydroxyl groups. The thermal condensation of these supramolecular precursors directs the morphology of the nal CN towards porous nanotubes and enhanced photocatalytic activity in the HER or CO 2 reduction. 485,486 4.5.3. Solvent-directed supramolecular assemblies. Solvents play a decisive role in the aggregation shape and size of supramolecular assemblies. In the case of a hydrogen-bonded framework, a polar solvent can disrupt the molecular forces and interact with the monomeric units, thus inducing a complete rearrangement. Meanwhile, a non-polar solvent, which cannot participate directly in hydrogen bonding, may just imprint surface modications on the aggregate. [487][488][489][490] Solvents can also serve as building blocks in the formation of supramolecular assemblies due to their hydrogen bonding sites; for example, water, hydrogen peroxide and polyethylene glycol have all been shown to self-assemble with melamine and different supramolecular frameworks, resulting in the modication of the chemical composition, morphology and photophysical properties of the nal CN materials. This approach has led to oxygen doping, the formation of homogeneous CN lms and an overall enhancement in photocatalytic activity. [491][492][493][494] As another example, the treatment of DCDA with N,N-dimethylformamide (DMF) before the thermal condensation results in the generation of N vacancies that promote the separation of photoexcited charges and enhance the photocatalytic activity. 495 In the case of CM lattices, the solvent determines the aggregation mode of the supramolecular assembly and therefore the properties of the CN. In 2013, Shalom et al. prepared a CM lattice in different solvents, namely water, chloroform and ethanol. They observed that given the different surface energies of the hydrogen-bonded structures formed the aggregate displayed different morphologies, namely rods, needles and pancake-like structures, which introduced different structural motifs and photophysical properties into the nal CN. 445 Later this phenomenon was further studied in CM-barbituric acid (CMB) networks. A supramolecular CMB assembly in water yields a rod-like morphology, while in ethanol, spheres were formed. Upon thermal condensation, macroscopic (up to 4-5 cm long) CN wires grow spontaneously from the supramolecular spheres, whose properties strongly differ from the substrate, resulting in two distinct CN populations that can be used for water purication or H 2 production through water splitting. 496 Furthermore, recently Wang et al. studied the variation of the hydrogen-bond lengths in a CM framework and its effect on the resulting CN material. The self-assembled precursors were freeze-dried in order to decrease the length and increase the strength of the hydrogen bonds. 497,498 Upon calcination, the distorted supramolecular structure results in a nanocage-like CN with enhanced S A , which can photocatalyze CO 2 reduction. 499 For heteroatom-containing supramolecular assemblies, our group has shown that the solubility of the initial monomers in a given solvent can dramatically alter their inclusion within the hydrogen-bonded framework. We have shown that preorganizing melamine with 1,3,4-thiadiazole-2,5dithiol in DMSO results in a higher integration of the Scontaining moiety in the starting assembly, which implies a more dened structural rearrangement compared to the assemblies prepared in water or common organic solvents. The unique chemical composition and structure achieved when using DMSO as the solvent are induced in the nal CN material, resulting in a trace amount of sulfur doping, a benecial electronic structure for photocatalysis and an enhanced S A . 500 The manipulation of CM lattices by sequential solvent treatment also allows the formation of thermodynamically driven gradients of energy levels; Sun et al. prepared CM supramolecular assemblies in various solvents and conrmed the stronger aggregation of CM lattices in acetone and ethanol. Additionally, the prepared assemblies were subsequently immersed in a second solvent and this solvent's capability to disrupt the hydrogen bonding between the monomers was explored. As expected, polar solvents could penetrate within the structure, causing a complete rearrangement, while non-polar solvents modify only the aggregate's surface, which in turn leads to the formation of two interconnected CNs with an energy band gradient aer thermal treatment, enhancing the lifetime of the photogenerated electron-hole pairs and the overall photocatalytic activity. 501 Nevertheless, the introduction of a second solvent for the synthesis of supramolecular structures that serve as CN reactants is still in its infancy, and nowadays, most assemblies are still prepared in only one solvent. This fact limits the library of available monomers to those dispersible in a common solvent. However, in polymer chemistry and other elds, the advantages of using two nonmiscible solvents have been demonstrated for the interfacial polymerization of supramolecular structures, allowing the interaction of several different units dispersed in non-miscible solvents (Fig. 14a). 502 This concept was recently utilized in our group for the synthesis of CM frameworks. Specically, we have shown the formation of CM frameworks in water-chloroform interfacial systems. Molecular dynamics simulations showed that both monomers tend to interact at the interface rather than in the bulk of either solvent. This thermodynamic tendency induces a complete rearrangement of the morphology. The thermal condensation of this system results in hollow CN tubes with altered electronic properties. 503 Additionally, this approach allows a straightforward modication of CM units, either in situ by drop-casting a dopant monomer (such as picric acid from the aqueous phase, which inserts C-C bonds within the nal CN polymer) or by preorganizing melamine before the mixing of the immiscible phases (water and chloroform, Fig. 14b). Particularly, Dolai et al. used a monomer with both hydrogen-bond donor and acceptor sites (i.e., the amino acid creatine) to selectively bind melamine and CA at the interface, thereby directing the modied CM units towards one direction. The latter CN material shows an altered morphology and electronic properties, which promote its photocatalytic activity towards several model reactions. 504 4.5.4. Supramolecular single crystals. The use of supramolecular single crystals has recently been proven to be a very accurate method to tailor the morphology and chemical composition of the prepared C-N based materials. A single crystal is a solid with a dened repetitive chemical composition and a long-range atomic order and does not contain grain boundaries. The growth of molecular single crystals can be carried out in several manners, and the solvent most oen plays a crucial role: slow solvent evaporation, liquid diffusion, gas diffusion and others. 505,506 The synthesis of supramolecular single crystals based on C-N monomers as building units followed by their thermal condensation at elevated temperatures has been recently exploited as a very reliable approach to precisely control the properties of the nal C-N based materials. 507 The rst reports describing the synthesis of a melaminebased ordered supramolecular framework and its utilization as a reactant for a high temperature solid-state reaction included the formation of a metal-organic network between melamine and Cu(II) species in different solvents; it yielded threedimensional porous structures with hexagonal pores linked by N-H/N hydrogen bonds. The thermal condensation of such structures resulted in nanosheets and nanorods with residual Cu doping and decoration with CuO. 508,509 In 2018 this concept was established as a tool for the rational design of CN properties; our group showed the synthesis of melaminium chloride hemihydrate single crystals, where protonated melaminium residues are connected by chloride ions and water molecules. The crystals exhibited a 1D needle shaped morphology, which aer thermal treatment was induced in the nal CN material, resulting in macroscopic centimeter-long CN needles suitable for optoelectronic applications. Additionally, the chemical and photophysical properties of the nal material could be ne-tuned by the reaction temperature (up to 650 C) as well as by the chemical composition of the starting crystal through the insertion of a C-rich monomer such as benzoguanamine. 510 Several groups have exploited novel single-crystal structures based on triazine molecules for the synthesis of modied CN materials. Zhu 511 The pyrolysis of this precursor allowed the release of HCl(g), which favors the formation of Cu-N bonds and results in the successful inclusion of up to 25.9 wt% of Cu within the nal CN material. Furthermore, they studied the crystal preorganization effect by comparing the resulting material to the one obtained by the simple copolymerization of melamine with a metallic salt, concluding that the formation of highly ordered crystals promotes the inclusion of metallic Cu 2+ , whereas in other scenarios CuO NPs were formed on the CN surface. The photocatalytic activity was substantially enhanced as a result of the capability of Cu-N bonds to produce hydroxyl radicals which efficiently degrade standard organic pollutants such as RhB, MB or MO. 512 Jiang et al. further used a wide variety of metal chlorides (Fe 3+ , Ni 2+ , Co 2+ and Mn 2+ ) for the synthesis of metal-organic crystal precursors; the latter were obtained by slowly cooling a saturated solution containing melamine and the metal chloride. The use of the highly crystalline precursors for the synthesis of CN resulted in the formation of nanotubes with enhanced photocatalytic activity for RhB degradation and the HER. 513 Besides metal-organic crystals, using co-crystals formed by non-covalent interactions between different organic monomers can lead to a novel layered morphology, as well as a certain degree of carbon doping in the CN. Fang et al. showed the formation of co-crystals comprising terephthalic acid (TPA) and melamine, which interact by hydrogen bonding between the carboxylic groups of TPA and the amines of melamine, and their utilization as precursors for high temperature reactions. The hydrogen-bonded framework is organized as 2D molecular sheets. Additionally, the aromatic character of TPA allows the preparation of carbon-rich frameworks with a long range order, thereby promoting the charge separation of photogenerated charge carriers in the nal CN material. The resulting C-rich material showed simultaneous H 2 and O 2 production, with an AQY of 5.3% for the HER. 514 Additionally, Zhang et al. utilized a 3D hydrogen bonded crystal obtained by the recrystallization of urea from DMF. Upon thermal condensation, the DMF within the crystal structure is released promoting the formation of nanosheets with an enhanced surface area and photocatalytic performance. 515

Post-synthetic modifications
Despite the relatively easy manipulation of CN parameters from the synthetic point of view, where electronic properties, texture and surface chemistry can be tailored, the post-synthetic modication of these materials is more complicated given the stability and low dispersibility of CN polymers in most solvents. The polarity of the -C]Nbond within the lattice, or the remaining -NH 2 groups, a result of non-ideal condensation, permits the tailoring of the electronic properties and structure in a post-synthetic manner. Since covalent transformations within the CN structure are complex, several means have emerged in order to induce doping or defects, which improve the charge transfer and the photocatalytic performance, including consecutive thermal treatments, 516-521 hydrothermal and solvothermal means, 522-529 protonation 530-532 and others. 533 In this section, the focus is on the recent developments in postsynthetic modications of CN, as well as the formation of hybrid composites with other layered materials, NPs, molecular complexes and so forth.

Covalent functionalization
Covalent chemistry offers a wide range of possible organic motifs to include within CN frameworks; the electronic properties and other parameters, such as colloidal stability or surface chemistry, are strongly affected by the attached functional group. Furthermore, this approach allows the formation of nanostructures and features, which is not possible to achieve by other conventional means. 534 The rst studies involving covalent functionalization of CN frameworks were performed by taking advantage of the electron lone pairs of the -NH 2 terminal groups; in 2010, Guo et al. described the amidation of 1,2,4,5benzene tetracarboxylic dianhydride (PMDA) and the CN amine groups for the extension of the polymer conjugation towards improved visible-light harvesting properties. First principles calculations conrmed that the PMDA moiety is perpendicular to the CN plane, promoting the repulsion between 2D layers, and 13 C-NMR proved the presence of carbonyl carbons in the imide group. The improved conjugation leads to extended light absorption and promotes photocatalytic activity as demonstrated for MO photodegradation. 535 In a similar manner, the conjugation was further extended by the introduction of perylene imidies into the CN framework, which promoted the photocatalytic removal of nitric oxide. 536,537 Lotsch and co-workers screened a wide variety of heptazine units functionalized in the 2, 5 and 8 positions with different moieties (e.g., alkyl chains, p-tolyl, p-benzoic acid, melonates and triphtalimide). The melonate form, obtained by salt-melt synthesis, improves the coordination to a platinum co-catalyst by cyanamide defects and therefore enhances the chargetransfer efficiency, resulting in a HER with 9.3% AQY. 538 The introduction of cyano terminal groups through different synthetic pathways was also investigated by several groups showing a general enhancement of the photocatalytic activity thanks to the modication of the electronic structure. In these studies, the materials were prepared by mild treatment with a strong reducing agent such as NaBH 4 or photoinduced in the presence of thiocyanates. 539,540 Further treatment of the melonates with HCl yields urea-modied CNs through the hydrolyzation of the cyanamide defect group. This library of materials was shown to produce hydrogen through the water splitting reaction even in the absence of a Pt co-catalyst. When Pt was loaded, an AQY of 18% was obtained with methanol as a sacri-cial electron donor, one of the highest photocatalytic activities for polymeric photocatalysts. 541 Schiff-base chemistry involving terminal -NH 2 groups has been widely used to prepare CNs with extended conjugation and enhanced photocatalytic performances. 542 The thermal treatment at mild temperatures of CN with various aromatic carboxylic acids has been demonstrated to successfully gra the organic moiety to the solid polymer by Tian et al., who synthesized aromatic heterocycle-graed CNs and observed that the electronic properties and photocatalytic performance strongly depended on the structure of the formed copolymer. 543 The conjugation of CN frameworks through terminal amino groups can also modify their semiconductor behavior. Vidyasagar et al. successfully graed CN with 2,5-thiophenedicarboxylic acid. The introduction of the organic moiety, proven by XPS and solid-state NMR, strongly modies the band structure of CN, yielding both n-and p-type semiconducting domains, probed by Mott-Schottky analyses. The minimization of e À -h + recombination enhanced both photocatalytic activity and chargecapacitance behavior. 544 Besides small conjugated molecules or functional groups, the -NH 2 groups in the edge planes of CN also allow covalent bonding to larger molecular materials or graphitic nanostructures; Pan et al. covalently embedded heptazine units within a covalent-organic framework (COF) by reacting them with 1,3,5-triformyl phloroglucinol and 2,4,6-tris (4-aminophenyl)-1,3,5-triazine in DMSO (Fig. 15a). 545 Lu et al. immobilized Zn-phthalocyanine on CN through amide bonding in order to improve the light absorption and overall photocatalytic performance in organic dye degradation. 546 The same effect has been observed with covalently bonded porphirins to CN, which promote light harvesting and lead to a remarkable HER and CO 2 reduction performance. 547,548 The amidation reaction has also been utilized for the covalent bonding of CN to carbon nanotubes (CNTs), which promoted the electron transfer in the ORR and the photocatalytic activity for H 2 O 2 production (Fig. 15b). 549 Besides the covalent functionalizations taking advantage of the lone pair of terminal amine groups, cycloadditions, alkylations and other reactions have been carried out on CN by making use of the polar -C]Nbond within the framework. In 2014, Zhang et al. carried out the 1,3-dipolar cycloaddition reaction of azomethine ylides, known as Prato's reaction, for the functionalization of CN frameworks with a wide library of organic groups, including aryls, ionic liquids, ferrocene and more (Fig. 15c). In this work, the reaction takes place in toluene at 120 C for 21 h, where azomethine ylide is rst generated, in situ, by condensation of an a-amino acid and an aldehyde bearing the functional group to be inserted. The electronic structure of functionalized CN was tailored according to the functional group and a general light-absorption enhancement was observed. The photocatalytic activity was tested for the C-H oxidation reaction of b-isophorone to ketoisophorone, where the CN functionalized with ferrocene achieved a 96% conversion with 82% selectivity. 550 Graphitic nanostructures like fullerenes can also be covalently bonded to CN by a solid-state mechanochemical route; Chen et al. utilized ball-milling to functionalize CN with a C 60 fullerene in the presence of lithium hydroxide (LiOH) through the fourmembered ring of azetidine.
The CN/C 60 hybrid was used as a photocatalyst for the hydrogen evolution reaction under visible light with eosin Y as a sensitizer, without a noble-metal cocatalyst, showing a 4-fold increase in activity over pristine CN due to electron transfer from the sensitizer to the hybrid system and an improved charge separation efficiency. 551 The C]N bond reactivity within CN also allows the covalent bonding of alkyl chains, forming a new C-C bond by using alkyl halides (the C]N bond serves as an excellent radical acceptor in this alkyl halide radical mechanism). The inclusion of such chains promotes the exfoliation of CN layers, by improving their solubility in common solvents such as tetrahydrofuran (THF). 552 Related mechanisms can use dihalides and allow further functionalization with bio-compatible molecules as quinoxalines for organocatalysis. 553 The chemical oxidation of CN nanosheets through acidic hydrothermal treatment has also been studied as a feasible way to improve the solubility of the material and its reactivity toward further functionalization. 554 Along these lines, Teng et al. synthetized edge-functionalized CN via Hummers' method. 555 Mulliken charge distribution conrmed that the surface acid groups improve the charge separation efficiency, thereby facilitating the formation of hydrogen peroxide and displaying a remarkable performance in the photocatalytic disinfection of water. A more complex covalent functionalization has been carried out utilizing halogenated organic monomers for the synthesis of CN frameworks modied with functional groups. Our group demonstrated that the calcination at 350 C of a triazine-based molecule modied with halogenated aromatics, prepared by a reaction between DCDA and halogenated benzonitriles, yields CN frameworks with photophysical properties strongly dependent on the functional group. 173 The added halogenated group serves as a highly active chemically reactive center, which allows its substitution by phenyl and tert-butyl propionate groups via Suzuki and reductive-Heck cross-coupling reactions, respectively. Other complex modications of CN nanosheets promote their exfoliation and dispersibility in common solvents and furthermore enhance their photocatalytic activity towards the oxidation of benzyl alcohol as a model reaction. 556 The capability of the C]N bond in the heterocyclic ring to act as a radical acceptor in intermolecular alkyl radical additions allows the formation of CN-based hydrogels (CN-H) through the photoinduced generation of radicals and introduction of cross-linkers, functional groups, etc. The photoinduced graing of molecules over CN polymers has been proven to permit the introduction of moieties such as uoride or sulfonic groups as well as polymeric chains that modify the electronic structure, texture and colloidal properties of CN, toward its application in multiple elds. [557][558][559][560][561][562] Furthermore, the formation of CN-based hydrogels with a dened 3D shape which maintain the semiconducting features of the matrix while surpassing its intrinsic drawbacks (grain boundaries or fast recombination) is an approach that has lately gathered attention. The tunability of the morphology, mechanical strength and photophysical properties of CN-based hydrogels through the selection of functional groups and cross-linkers may permit their application on an industrial scale in a wide range of elds. [563][564][565] Thus far, the reports on CN-H were mostly based on noncovalent interactions with external agents, such as peptides, 566 ionic liquids, 567 graphitic materials 568-571 and others. 572-574 Typically, they involve the self-assembly of CN nanosheets by pp or hydrogen-bonding interactions to form the desired 3D networks. Photopolymerization in the presence of cross-linkers has been used to covalently functionalize the surface of CN networks and form 3D structures; it yields robust CN-H with remarkable mechanical and photocatalytic properties. In 2017, Sun et al. have shown that CN generates surface radicals that induce in situ polymerization of acrylamide derivatives that yield photoactive CN-H. The resulting materials show strong mechanical strength and deformation restorability; these hydrogels were applied for the adsorption and degradation of organic dyes and the photocatalytic HER (Fig. 16). 575 Liu et al. used poly(N-isopropylacrylamide) (NIPA) and CN for the formation of CN-H; the gelation occurred by photocatalytic generation of hydroxyl radicals, which initiate the polymerization. Furthermore, the temperature-responsive character of NIPA allowed the formation of smart coatings with tailorable turbidity by temperature control. 576 The colloidal properties of the CN used for the formation of CN-H has been proven to be crucial for the modulation of the nal mechanical properties. For example, Kumru et al. showed that CN-H derived from urea-CN with a zeta potential of À40.9 mV displays a storage modulus at 0.1% strain of 8320 Pa. 577 Sulfonic acid was also graed on CN and served both as the reinforcer and the initiator, resulting in CN-H with enhanced compressibility, tissue adhesive properties and moderate exibility. 578 The same authors also reported the effect of the amount of CN used in the preparation of CN-H in an ethylene glycol (EG) dispersant. Thus, they could achieve dispersions with up to 4 wt% of CN, yielding hydrogels with a remarkably high storage modulus of 720 kPa. 579 Ye et al. showed a wide range of novel applications for CN-H. Specically, they used CN-H obtained through photopolymerization of CN with acrylamide. The prepared hydrogels showed good mechanical properties as well as self-healing capabilities, and their performance as a UV irradiation protective lm was tested for the rst time and showed 95% ltered UV radiation (315-400 nm). 580

Exfoliation
The exfoliation of layered materials is an established approach for the obtention of isolated akes or 2D nanosheets. The exfoliation of a bulk layered material into thin sheets increases the number of active sites and therefore its reactivity. Furthermore, the choice of the exfoliation technique, namely mechanical, thermal or chemical (in a liquid phase), denes the yield and the morphology of the nanosheets, thus determining their performance in a given application. 581 In particular, liquidphase exfoliation has been one of the most widespread techniques due to the possibility of weakening the van der Waals (vdW) interactions between the 2D sheets in layered materials through the insertion of surfactants and ions, and the possibility of modulating the exfoliation degree by controlling parameters such as shear force, temperature or ultrasonic frequency. 582 Various 2D layered materials (graphene, 583 BN, 584 transition metal dichalcogenides, 585 and others [586][587][588] ) have been successfully exfoliated using such techniques.
The exfoliation of CN is of great interest given the potential synthetic prospects and applications of nanosheet-based devices. CN layers interact by weak vdW forces, which can be easily disturbed by mechanical means. CN in the form of nanosheets is typically endowed with a signicantly higher S A and more abundant surface active sites, a larger E g thanks to quantum connement effects, and improved electron transport along the in-plane direction, which allows the enhancement of intrinsic properties, such as photoresponse. 589,590 Zhang et al. showed the exfoliation of CN in solvents with various polarities and observed that the relatively higher polarity of water beneted the exfoliation; ultrathin sheets were obtained at a concentration of 0.15 mg mL À1 and with a zeta potential of À30.3 mV. Furthermore, the CN layers in solution had diameters of 70-160 nm and a thickness of 2.5 nm. This suspension remained stable for months even at pH values ranging from 3 to 11, with the electronic structure strongly altered compared to the bulk counterpart. DFT calculations conrmed that single-layered CN has an increased density of states at the CB edge compared to the bulk-an indication of a higher charge-carrier concentration-which supports the measurement of an increased photoresponse. 591 Yang et al. further studied the liquid-phase exfoliation of CN in solvents (including 2-propanol (IPA), NMP, water, ethanol and acetone) and the inuence of sonication time, as well as solvent-material interactions. They found that NMP and IPA were the most appropriate solvents, given their surface energies (40 mJ cm À2 vs. 70 mJ cm À2 for vdW-bonded surfaces). Aer 10 h of sonication, the CN dispersion consisted of 2 nm-thick nanosheets that remained stable up to 4 months. The XRD pattern of the thin-layered material slightly differs from that of the bulk counterpart; the relative intensity of the (002) diffraction peak, corresponding to the interplanar stacking, signicantly decreases. Additionally, the CN nanosheets showed a band gap of 2.65 eV and a 3.75% AQY in the HER owing to the high S A and the resulting larger number of exposed catalytic sites. 592 Since the pioneering reports of liquid-phase exfoliation of CN, different groups have established relationships between the utilization of different solvents, including alcohols, 593 sulfonic group-containing solvents, 594,595 hydrogen peroxide, 596 and others 597,598 with the nanoscale features of the prepared sheets. 599 The polymerization degree of the CN used in the exfoliation strongly determines the photophysical behavior of the prepared nanosheets, as shown by Zhou et al., who developed electrochemiluminescent sensors for the detection of multiple metal ions based on CN nanosheets with different condensation degrees that display different responses to each metal ion. 600 The thermal exfoliation of CN can also yield 2 nmthick nanosheets with S A $300 m 2 g À1 . This procedure can be carried out by the thermal condensation of pre-formed CN at high temperatures and in air, which typically results in the oxidation of exposed nitrogen atoms. 601,602 Niu et al. conrmed that the electronic properties of such nanosheets are also strongly altered as shown by a 0.2 eV increase of E g (2.97 vs. 2.77), which correlated with a blue shi of the uorescence emission maximum of 20 nm. These quantum connementderived effects are also reected in the good electron conductivity along the in-plane direction of the nanosheet compared to its bulk counterpart and the enhanced photocatalytic activity for the generation of hydroxyl radicals. 603 Additionally, Xia et al.
established that the atmosphere used during the thermal exfoliation can induce chemical modications in the nanosheets, for example, amine functionalization by thermal exfoliation of bulk CN under a continuous NH 3 ow. 604 In order to reduce the thickness of the discussed 2 nm-thick CN nanosheets and obtain single atomic monolayers, a chemical exfoliation of bulk CN can be performed, as reported in 2013 by Xu et al.; bulk CN was stirred in the presence of H 2 SO 4 (98 wt%) for 8 h, followed by a liquid-phase exfoliation in water and reux in methanol at 65 C for 6 h. The intercalation of H 2 SO 4 within the CN layers resulted in a shi of the (002) diffraction peak down to 25.0 indicating the expansion of the inter layer distance to 0.356 nm; the latter exfoliation yielded 0.4 nm-thick layers with tens of nanometers lateral size. The modication of the dimensionality strongly affected the optical properties, as the E g increases from 2.64 to 2.92 eV given the decrease in conjugation and the quantum connement effect (also conrmed by a uorescence emission peak blue shi from 464 in the bulk to 438 nm). The modication of the nanosheet morphology and electronic properties resulted in an enhanced photocatalytic HER and photodegradation of phenol. 605 The utilization of strong acids has been further studied by several groups, which reported the chemical cleavage of the CN framework, thus enhancing its solubility, which even allowed recording liquid-state NMR spectra. 606,607 The exfoliation of layered materials by mechanical means, e.g., scotch tape, which has been widely utilized, 608-611 was also applied for CN. For example, Bojdys et al. showed the mechanical and chemical exfoliation of poly(triazine imide) with intercalated potassium metal that resulted in thin layers, scrolls and bundles with macroscopic lateral dimensions. Furthermore, the reported liquid-phase exfoliation resulted in atomically thin PTI sheets with E g ¼ 2.6 eV. 612 The liquid-phase exfoliation of crystalline PTI materials was later studied by Schwinghammer et al., who showed that 1-2 nm-thick nanosheets of PTI/Li + Cl À could be obtained by simple sequential ultrasonication in water (Fig. 17). The well-dispersed PTI nanosheets remained stable in both acidic and alkaline environments and showed improved photocatalytic HER performance. 613 Further work on the exfoliation of PTI materials resulted in the complete dissolution of PTI$Li + Br À in the presence of polar aprotic organic solvents such as NMP, DMF or DMSO, with mass concentrations ca. 0.8 AE 0.05 mg mL À1 . The spontaneous dissolution occurred as a result of a free energy gain upon solvent coordination, where the energies of the interlayer interactions remain similar to that of the solvent-nanosheet interface. 614 Utilizing intercalating agents to promote the separation of CN layers is a very effective approach to enhancing the yield of the nanosheets prepared via liquid-phase exfoliation. Xu et al. carried out the liquid-phase exfoliation of CN in the presence of ammonium chloride (NH 4 Cl); the thermal treatment of CN/ NH 4 Cl resulted in the decomposition of ammonium ions, which distorted the vdW interactions between layers, resulting in 2-3 nm sheets with enhanced S A and performance in the photoelectrochemical detection of copper(II) ions. 615 Melamine has been utilized as an intercalating agent as well; Ma et al. treated CN with DMF and subsequently added melamine to achieve an optimal enlargement of the interlayer distance of CN. The resulting material possessed an enhanced S A (116.76 m 2 g À1 ), a larger bandgap (by 0.13 eV) and higher electron-hole mobility, which promoted the photocatalytic activity in a visible light-driven HER. 616 Ji et al. made the most of a planar conjugated molecule, such as 1-pyrene-butyrate, to exfoliate and modify the CN's surface via p-p interactions. The latter was anchored to a DNA probe and used as an electrochemiluminescent DNA biosensor. 617 Reversible chemical exfoliation was achieved by the intercalation of alkaline metal hydroxides and the re-assembly of CN layers. Li et al. utilized OH-modied CN 618 for the in situ generation of water molecules upon acidic treatment, which promoted the exfoliation into thin nanosheets of 1-2 nm thickness and a yield of 48% at pH ¼ 1.3. They were able to re-assemble the thin layers using a dilute alkali treatment; they exhibited a superior photocatalytic performance for IPA degradation and the HER thanks to their improved visible light absorption and hydrophilicity induced by the hydroxyl groups at the surface. 619

Hybrid composites based on CN
A hybrid composite (HC) combines the functionalities of its individual constituent domains. In our context, the novel properties result from the coupling between CN and the other domain(s). A metal domain may exhibit plasmonic effects and catalytic activities, while a semiconductor absorbs light, produces charge carriers and, depending on the band alignment at the SC-SC interface, can facilitate charge separation (in photovoltaics and photocatalysis) or recombination (in enhanced photoluminescence or light-emitting diodes). Such interfaces can exist on the macroscale, e.g., in CN lms deposited on highly doped metal oxides or in the case of CN lms deposited on various substrates with nanostructured features (vertically aligned ZnO nanorods, 620 for example), or on the nanoscale as a post-synthetic modication of CN, as discussed in this subsection (for example we refer the reader to a recent review from Liao et al., which summarizes many HCs used for the HER). 146 5.3.1. Electronic coupling rationale in CN-based hybrid composites. Fig. 18 presents the relevant possible electronic alignments (in the dark) of CN with another SC or metal. For the common application that is photocatalysis, a longer exciton lifetime increases the probability of the photoexcited charges to react with a given molecule; forming a heterojunction with suitable materials of different dimensionalities and band alignments has been shown to successfully quench the radiative recombination of electron-hole (e À -h + ) pairs and therefore increase the yield in photocatalytic scenarios. 621 In type-I heterojunctions, the CB and VB of one SC engulf the bands of the other (Fig. 18a, 'straddling gap'). Though this band alignment favors radiative recombination in the narrow-E g SC, redox reactions can still take place, e.g., CN/antimonene, 622 CN/ ZnV 2 O 5 (ref. 623) and CN/ZnIn 2 S 4 . 624 In type-II heterojunctions, e À and h + spatial separation is favored across the formed interface, which is effective in enhancing the lifetime of photogenerated charges (see photocatalytic examples in a recent review by Shen and co-workers). 625 As CN is an n-type SC, the construction of a heterojunction with a p-type SC results in a built-in internal electric eld, which helps drive charge separation, 626 as was demonstrated using BiOCl/CN 627 and Cu 2 O/CN. 628 Despite their efficiency in promoting charge separation, aer the migration across the interface, the redox potential difference for a reaction at the surface is weakened in a type-II alignment (Fig. 18b, CB of the orange particle and VB of the blue SC). In order to maintain optimal reduction and oxidation potentials, while at the same time achieving the spatial charge separation of the photogenerated excitons, a Z-scheme charge transfer pathway between two semiconductors has emerged as an efficient strategy. 629 In this case (Fig. 18c), 630 photoexcited electrons from the 'purple' CB recombine with photogenerated holes of the 'blue' SC. In this manner, the remaining, spatially separated charges display optimal reduction and oxidation potentials as shown for various systems of CN with metal oxides, 631-633 suldes, 634 etc. of different morphologies, where a continuous interface is present. The described Z-scheme can also be supplemented by a third material at the interface, an electron mediator such as metal NPs or reduced graphene oxide (rGO). 630,635 An interesting combination of materials was achieved by Li and coworkers, who formed a Z-scheme catalyst where CN is the light absorber, meso-tetra(4-carboxyphenyl) porphyrin (TCPP) both acts as an antenna and provides excited electrons to perform the HER, and the third component of this hybrid is a Cu NP, which acts as the mediator. 636 In this work, the intimate connection between CN and porphyrin, which is usually very weak owing to p-p stacking and H bonding, was more robust thanks to the Cu linker.
Besides SC/SC junctions, interfacing CN with metal NPs, also known as Mott-Schottky junctions, has a catalytic effect in part due to a charge transfer between the SC and the metal. The metal NP, in turn, acts as a reactive binding site for a reduction or oxidation process. We recommend a thorough review by Li and Antonietti on this subject, where they discuss the different possible N-doped carbon/metal and CN/metal Mott-Schottky heterojunctions. 637 Since CN is n-type, we limit our discussion to CN-to-metal electron transfer, which serves as an electron sink (Fig. 18d). This is relevant also for Z-scheme interfaces, where a Pt NP, for example, can catalyze the HER process using electrons from a CN, thus enhancing the interfacial recombination at the direct Z-scheme interface (2D CN sheets/3D TiO 2 microowers), leaving behind holes in TiO 2 that can oxidize water and/or hole scavengers as suggested by Wang et al. 638 5.3.2. Interfacing CN with nanostructures. Metal-free carbon/carbon nitride junctions have attracted much attention due to the remarkable physicochemical properties of carbon allotropes such as high conductivity, signicant S A , chemical stability and low price. 639 Numerous composites of a conductive porous carbon matrix and CN have been reported. For example, a 3D carbon was prepared by chemical vapor deposition, followed by impregnation with urea and thermal Type-II, and (c) Z-scheme. (d) n-type SC interfaced with a metal (E F is the Fermi level), serving as the e À sink. In all cases, CN serves as one SC (blue) and upon photoexcitation the electrons from its VB and holes from its CB may migrate according to the band alignment. On the surface, electrons may perform a reduction reaction while holes perform an oxidation one. polymerization, allowing the porous carbon to act as a template. 640 Graphene, carbon nanotubes or fullerenes can act as electron acceptors, promoting charge separation upon photoexcitation; they also successfully transfer the excited electrons to the reactant molecules. An intimate contact between the two counterparts can result in specic chemical bonds, such as covalent C-O-C moieties in the case of reduced graphene oxide (rGO) and CN, which results in a narrowing of the band gap and an improvement in light-harvesting properties. 641 Simple ultrasonication in toluene of CN powder and C 60 results in a CN/ C 60 HC tested for photocatalytic oxidation of (aromatic) suldes to sulfoxides. 642 Other composites, which incorporate CN, are constantly explored including different metal-free non-carbon-based 2D materials such as phosphorene 643 and antimonene, 622 due to their strong vdW interactions. 621 Many other hybrids between CN and quasi-2D and other functional materials such as MOFs are reported; see for example, a review by Wang et al. 644 Metal-containing compounds can exhibit semiconductor or catalytic properties (or both). Here, we briey survey some SC/ SC heterojunctions, while the catalysts are in the next subsection. The use of metal oxide materials is driven by their generally superior stability.  648 Type II interfaces based on CN and metal chalcogenides are also common. A recent example of a complex morphology was demonstrated in the form of an octahedral CdS/CN hybrid for the HER and oxidation of toluene and other aromatic alkanes. In this case, rst, a hydrothermal synthesis exploiting a coordination polymer with Cd-S bonds was used as the precursor for the formation of mm-sized porous CdS octahedra, which was then modied with melamine in an alkaline hydrothermal environment, nally forming a porous core-shell CdS structure with an external octahedral porous CdS shell/CN HC. 649 5.3.3. Catalysts and co-catalysts: single atoms, molecular complexes, and metallic and other related NPs. As with other SC-based photocatalytic systems, a thermodynamic tendency towards charge separation is not sufficient. Since a signicant kinetic barrier exists for most catalytic reactions occurring on a catalyst's surface (OER, various dissociation reactions, etc.), the SC (and SC/SC HCs) needs another catalyst or co-catalyst. 162 Inspired by homogeneous organo-catalysis, various metalcontaining complexes have been coupled to SCs. Examples inspired by nature include hydrogenase enzymes, 650,651 and horseradish peroxidase (HRP), which has an iron center that switches between Fe(III) and Fe(II) during a catalytic cycle was coupled to CN to enable the degradation of various phenolbased pollutants, doing so by increasing the concentration of cOH, cO 2 À and H 2 O 2 . 652,653 Specically, a photoexcited e À from the CN can produce cO 2 À from dissolved oxygen, which reacts with 2H + (aq.) and dissolved oxygen to produce H 2 O 2 (via 1 and 2-electron transfer processes, respectively), while a h + can oxidize the pollutant phenol. The iron in HRP is reduced upon accepting an e À and regenerates to Fe(III) via a reaction with H 2 O 2 with the release of cOH and OH À (HRP-Fe(II) + H 2 O 2 / HRP-Fe(III) + cOH + OH À ). 652 Molecular complexes can be combined with CN in the liquid phase; for example, the boron-containing dye 4,4-diuoro-8phenyl-4-bora-3a,4adiaza-s-indacene (BODIPY) effectively extracts holes from CN in an OER scenario. 531 Metal-containing catalysts such as Ni(II) bis(diphosphine) can act as H 2 -evolution catalysts in a photocatalytic system, where they are coupled to a CN (specically, with a cyanamide surface functionalization), which performs selective oxidation of benzylic alcohols to aldehydes in water. 654 CO 2 reduction and the HER using molecular catalysts such as Co(bpy) 3 2+ connected to CN using a molecular bridge were also reported. 655 The extreme case of minimization would be the use of single atoms on the CN's surface. [656][657][658][659][660] In this architecture, the CN acts as the support for the metal. It is extremely hard to prove the dispersion of single atoms and their actual oxidation state. For example, the previously mentioned silver incorporation through copolymerization by Chen et al. has shown incorporation of an Ag + -complex into the CN matrix, but XPS measurements indicate Ag(0) to Ag + atomic ratios from 61% to 39%. 246 To successfully incorporate metal atoms, the CN matrix may be altered, as exemplied by Pérez-Ramírez and co-workers, who hosted Pd in CN by forming phosphorous doping (P was better than other heteroatoms due to increased electron density). 657 Recent theoretical calculations for different transition metals on the surface of CN for the electrocatalytic nitrogen reduction reaction (NRR) were performed by Zhang et al.; they predicted that Mo and V would be the best non-precious metal atomic dopant based on the nitrogen adsorption geometry (standingon and lying-on, respectively). 661 Chen et al. have also performed a calculational screening, reaching the conclusion that a W atom supported over a single CN layer would be a better catalyst than a stepped Ru(0001) surface, which has the best activity towards the NRR amongst bulk single-metal catalysts. 662 Already, in the rst reports of the photocatalytic activity of CN published a decade ago, two distinct approaches were demonstrated by Wang and co-workers: in the rst, Pt NPs were photodeposited on CN to improve the HER. 96 In this synthetic mechanism, photoexcited electrons reduce a Pt source in the surrounding solution, forming a CN/Pt NP HC; in the second, a photocatalytic activity enhancement is achieved through metal doping, an approach that was discussed in Section 4.2.1. In this approach (for example, Fe(III) species within a CN matrix 663 ), metal-nitrogen bonds at the surface are responsible for the catalytic activity. The latter approach can be extended from metal-ion-containing motifs to metal-based materials.
Zhang et al. have reported using a core@shell Ni@NiO/CN hybrid for the HER. 664 Liao et al. have used a simple in situ thermal decomposition in air of a Ni(II) precursor physically adsorbed from a solution on CN to achieve a uniform distribution of NiO NPs throughout CN sheets. This hybrid material exhibits high OER activity due to the formation of a conductive interface and the existence of Ni-N bonds at the interface, which are responsible for charge accumulation on the Ni atom, lowering the adsorption free energy of the OER intermediates. 665 This is an example of how a doping-based catalytic mechanism can exist in CN/NP HCs.
The photodeposition of metals is very common, as mentioned for the case of Pt: when a solution with a metal complex is illuminated in the presence of CN, the photogenerated electrons reduce the metal on its surface, typically forming metal NPs on the CN's surface (as Cu 636 ). Recently, Wang et al. have shown that gold can not only be photodeposited, but can also be deposited via piezo-catalytic electron excitation. 666 This mechanism allows the excitation of electrons following an external ultrasonic stimulus; the excited electrons can be used for H 2 O 2 generation, and this effect is stronger when the CN has fewer vacancies.
Other ways of forming metal/CN HCs include reduction of the metal by combination of a reducing agent and high temperature (e.g., reuxing CN with RuCl 3 and ascorbic acid). 667 or thermal reduction with H 2 (g) aer a wet impregnation with a metal salt, as in the case of the Ni 0 NP/CN HC, which was reported for successful photocatalytic CO 2 methanation (Sabatier reaction), 668 in part due to better charge transfer in the hybrid.
The HC combinations are not limited to single junctions, and the formation of multicomponent structures shows great promise, which augment the HC with high S A , charge separation, catalytically active sites and so forth. For example, ternary CN/NiCoP 2 MOF/porous carbon HCs were demonstrated for the HER; they take advantage of an improved charge separation at the metal-phosphide/CN interface, the low overpotential of the NiCoP 2 cocatalyst, the support functionality of the porous MOF and the improved conductivity of the carbon mediator. 669 Other examples include combination of a metal/SC junction in addition to a SC/SC junction (e.g., CuInS 2 /Au/CN, 670 which is useful amongst other applications for the previously discussed Zscheme photocatalysts) or to a SC/enzyme. 671

Deposition on substrates
One of the main obstacles for the widespread application of CN is the difficulty in depositing CN materials on electrodes while at the same time maintaining their advantageous properties developed in powder. A successful CN or CN-based hybrid composite on a substrate would continue fullling its function under operating conditions (in acidic/alkaline environments, under illumination, under applied voltage bias, etc.). Because of the high importance of this challenging mission, much research has been dedicated towards such an achievement. Our group and others (e.g., Mat Teridi, Zhang, Xue and Pang, Yang, Bian and their co-workers) have recently published review papers discussing deposition techniques and properties of CN lms for photoelectrochemical (PEC) and related applications, such as electrocatalysts, photovoltaics, and energy storage. 135,136,[672][673][674][675] For this reason, we will focus only on the most recent progress and refer the reader to the abovementioned reviews for further information regarding performance, mechanisms, and application-specic prospects.
When discussing deposition techniques, the main distinction is whether the CN is formed on the substrate itself or rst synthesized ex situ and then deposited using a given casting technique. Generally, the latter results in an inferior electrical connection and poor mechanical stability due to uncontrolled adhesion of exfoliated CN onto substrates. A good demonstration of this fact is the comparison Ruan et al. performed for CN on uorine-doped tin oxide (FTO), where a bulk CN lm (obtained by ultrasonication in water and IPA, followed by dropcasting a CN suspension in Naon resin) was compared to a compact and dense lm prepared by other methods (discussed later) and was shown to display inferior crystallinity and performance. 676 For this reason, high-performance CN lms are usually not prepared using this method. Nevertheless, advances in the eld of functionalization and heterojunction formation can still be successfully measured (recent examples are the studies of Zhang and co-workers who formed a CN/Cucontaining complex hybrid via ball milling and tested it for IR biosensing; 677 another is the solar aqueous battery 678 demonstrated by Lotsch and co-workers). Furthermore, the deposition of ex situ synthesized material by casting can be used for the facile electrochemical test of changes of CN properties (e.g., the inuence of exposure to g-radiation). 679 Exceptions include physical deposition techniques, where a simple precursor dispersion is needed (spray coating composites 680 and electrospinning 681 are representative examples).
Some recent progress of note was achieved by the (photo) functionalization of CN sheets, improving their dispersibility in organic solvents for further spray coating 682 (opening the exciting practical path of inkjet printing) and casting. The latter was used to fabricate thermoset CN-in-polyester lms 558 and also to incorporate a thin CN layer as an electron transporting layer in an inverted perovskite solar cell by spin-casting. 683 Related reports of CN incorporation described treatment with a functionalizing acid 684 and iodine doping, 685 but in these cases the CN was cast as an additive and not as a standalone lm. Similarly, CN was blended with mesoporous TiO 2 in a polymeric matrix (polyvinylidene uoride and N-phenethyl-4-piperidone), which was then doctor-bladed. 686 For further insight, we refer the reader to a recent review by Schmidt and co-workers on the combination of CN with polymers. 687 Our group has also recently demonstrated that covalent modication of CN precursors with polycyclic aromatic hydrocarbons (PAH, such as anthracene and pyrene) amongst other advantages also improves the casting (i.e., drop-casting or spin-coating) of the resulting CNs (aer calcination) on both rigid and exible substrates, thereby allowing the use of such materials in applications such as electropolymerization and photoanodes in PECs. 688 The 'direct' growth methods of CN on electrodes include variations of gas-phase and liquid-phase syntheses: 135 the thermal vapor of various subliming/evaporating CN precursors can condense on the surface of the substrate or nucleate on preformed 'seeds'; liquid-phase methods rely on the immersion of the substrate into liquid media which include molten CN precursors, other molten phases (e.g., sulfur 689 ) and solvothermal solutions. 690,691 An intermediate situation occurs when a CN-precursor layer is in intimate contact with the substrate and is being thermally condensed, with (strong) CNsubstrate interactions present, as is the case of soaking precursors 692 and for the method reported by our group, where a paste of supramolecular precursors is doctor-bladed on a substrate prior to its thermal condensation at elevated temperatures in a closed (not sealed) tube. 494,693,694 The facility and scalability of the doctor-blade method along with the benets of using supramolecular aggregates (e.g., precise control over composition) as precursors are its most appealing features. Furthermore, it allows the incorporation of conductive elements, such as rGO, to improve the electron diffusion length within the lm (up to ca. 36 mm). 693 We have found that to improve the packing and order of the CN layer (motivated by Durrant and co-workers' report on electron trap states at the surface 695 and the electron transport properties of crystalline CN. See discussion in Section 4.4) it is better to use a molecular precursor rather than a supramolecular precursor. To this end, we have dipped the substrate into a hot supersaturated melamine solution to deposit a melamine lm, which aer calcination formed a crystalline CN layer. 696 Melamine alone cannot be doctor-bladed, but upon addition of GO, a viscous powder is formed, which allows the deposition. 694 Recent advances achieved using vapor-based methods include multi-step deposition resulting in pinhole-free layers, 697 heteroatom-incorporation 698 and heterojunctions of CN containing different heteroatoms, 699 metal-ion incorporation 700 and control over crystallinity in $0.2 mm-thick formaldehyde-doped CN layers. 701 It is important to note that the discussion in this section focused on the deposition of thin CN layers over substrates with relatively low roughness (as is the case for the standard transparent conductive oxides (TCOs), which are coated on rigid glass or exible polymer-based substrates in photoelectronic devices thanks to their combination of electronic conductance and optical transparency). However, the same principles can be applied to interface CN with different (porous) materials, such as carbon-based materials, membranes (serving as a hard template), 702,703 inorganic nanostructures, 620,692,704 etc. All the above-mentioned approaches can be used for the formation of semiconductor heterojunctions 704,705 between CN and other materials (to improve photoelectrode performance, for example, by improving light harvesting, charge separation and charge carrier migration paths). An elegant demonstration of a complex HC for PECs was shown by Qin et al., who thermally polymerized CN over a substrate with vertically aligned TiO 2 nanorods, followed by metal ion soaking and gas-phase phosphidation, which both dopes the CN with P and forms metal (M ¼ Fe, Cu) phosphide oxidation catalysts. This synthesis yields FTO/TiO 2 /(P-doped)CN/M x P HC photoanodes. 706 For some applications, such as photocatalysis, free-standing lms are of value. To this end, on top of common synthetic pathways such as ltration or freeze-drying, 707 the deposition on substrates can be used as a rst step before peeling-off 700,708 or before the transformation of the substrate itself into an electrode, as our group has demonstrated by the calcination of a lter paper coated with CN precursors, transforming it into a free-standing C/CN hybrid. 709 Signicant progress is underway in the application of CN as a photoelectrode in the emerging organic PEC devices 710 or in hybrid scenarios where CN complements the better-established inorganic layers, 711 with possible metal-based cocatalysts. 712 In addition, the ability to deposit large-scale porous lms 713 of CN paves the way also for its application as a particulate photocatalyst, 714 i.e., a lm of photoactive material (composite) that can perform energy conversion reactions, such as hydrogen production, without connection to an external electric bias, as demonstrated by the Domen group for other materials. 715-717

Prospects and concluding remarks
In this review, we summarized the recent developments in the synthesis, growth methods and applications of carbon nitridebased materials, ranging from carbons, N-doped carbons, C 2 N, C 3 N 4 to other C-N containing polymers. We have mainly focused on melon carbon nitrides (commonly referred to in the literature as C 3 N 4 ) owing to their attractive properties, e.g., tunable band gap, low-price, stability under harsh conditions and suitable energy band positions, enabling various reduction and oxidation reactions along with a wide range of applications.
The exploration and development of synthetic routes, characterization techniques and fundamental understanding of structural features play an essential role in opening the path towards the utilization of these materials in practical applications. We discussed the synthetic methods in detail, including templating and doping techniques, as well as emerging approaches, such as the use of supramolecular chemistry and covalent functionalization, with a special emphasis on the rational design of a modied-CN with controlled chemical, photophysical and catalytic properties. The methods to affect and study their electronic and optical properties and their photo-, electro-and photoelectro-catalytic performance for various energy-related applications were elaborated upon. The manipulation of the electronic and catalytic properties by interfacing with other materials, by single atom doping and by molecular modication was shown. A special emphasis was placed on the correlation between their structural properties and their activity in a given reaction. In the last part, the recent progress in the growth and deposition of carbon nitride materials on surfaces and their utilization as photoelectrodes were briey introduced, with a focus on the deposition techniques and the subsequent use of CN lms as photoelectrodes for water splitting. Based on the current status and challenges in the synthesis and incorporation of (modied) CN materials into practical devices, in our opinion, future research should pay attention to the following: 1. The synthetic paths should be further improved, to allow a better design of the nal properties, such as the specic surface area, morphology, optical band gap, crystallinity and reaction yield. Moreover, the development of alternative synthetic methods (low temperature reaction, solvothermal, etc.) may lead to the reduction of the costs inherent to the required high-temperature synthesis.
2. A thorough evaluation of the chemical processes occurring during thermal condensation by in situ techniques and operando methods would improve both mechanistic understanding and reproducibility. Specically, spectroscopic means coupled to thermogravimetric analysis or electrochemical means, in situ heating electronic microscopy and other techniques could bring about a deeper understanding of the chemical, electronic and morphological transformations occurring during the thermal condensation and polymerization, which form C x N y (H z ) polymers.
3. The understanding of the photophysical properties, i.e., charge separation and transfer properties as well as energy band structure is crucial for the further integration of CN materials as practical absorbers and catalysts.
4. For photodriven reactions, the effective optical band gap should be reduced to about 2 eV to permit an effective utilization of the solar spectrum and achieve higher overall efficiencies. 5. We envision the emergence of CN materials in related research elds, such as solar cells, photoelectrochemical cells, imaging, biomedical and others, especially in conjugation with other organic and inorganic materials as hybrid nanostructures and composites, where control over the interface morphology and defects has room for further improvement without increasing complexity.
6. For practical applications, the scalability of the preparation protocols and the long-term stability under operational conditions will dene the real-world feasibility of the material utilization in a given application.
All these efforts together with the substantial ongoing progress in the eld will make CN materials competitive candidate semiconductors for many energy-related applications and other elds spanning photo-and electro-catalysis, organic transformation, sensors and more in the future.

Conflicts of interest
The authors declare no conicts of interest.