  We associate with every pure flag simplicial complex $\Delta$ a standard
graded Gorenstein $\mathbb{F}$-algebra $R_{\Delta}$ whose homological features
are largely dictated by the combinatorics and topology of $\Delta$. As our main
result, we prove that the residue field $\mathbb{F}$ has a $k$-step linear
$R_{\Delta}$-resolution if and only if $\Delta$ satisfies Serre's condition
$(S_k)$ over $\mathbb{F}$, and that $R_{\Delta}$ is Koszul if and only if
$\Delta$ is Cohen-Macaulay over $\mathbb{F}$. Moreover, we show that
$R_{\Delta}$ has a quadratic Gr\"{o}bner basis if and only if $\Delta$ is
shellable. We give two applications: first, we construct quadratic Gorenstein
$\mathbb{F}$-algebras which are Koszul if and only if the characteristic of
$\mathbb{F}$ is not in any prescribed set of primes. Finally, we prove that
whenever $R_{\Delta}$ is Koszul the coefficients of its $\gamma$-vector
alternate in sign, settling in the negative an algebraic generalization of a
conjecture by Charney and Davis.
