  Complex nitriles, such as HC3N, and CH3CN, are observed in a wide variety of
astrophysical environments, including at relatively high abundances in
photon-dominated regions (PDR) and the UV exposed atmospheres of planet-forming
disks. The latter have been inferred to be oxygen-poor, suggesting that these
observations may be explained by organic chemistry in C-rich environments. In
this study we first explore if the PDR complex nitrile observations can be
explained by gas-phase PDR chemistry alone if the elemental C/O ratio is
elevated. In the case of the Horsehead PDR, we find that gas-phase chemistry
with C/O $\gtrsim$ 0.9 can indeed explain the observed nitrile abundances,
increasing predicted abundances by several orders of magnitude compared to
standard C/O assumptions. We also find that the nitrile abundances are
sensitive to the cosmic ray ionization treatment, and provide constraints on
the branching ratios between CH3CN and CH3NC productions. In a fiducial disk
model, an elevated C/O ratio increases the CH3CN and HC3N productions by more
than an order of magnitude, bringing abundance predictions within an order of
magnitude to what has been inferred from observations. The C/O ratio appears to
be a key variable in predicting and interpreting complex organic molecule
abundances in photon-dominated regions across a range of scales.
