Projecting the function $f(x)$ onto the sine and cosine functions simultaneously is done by projecting it onto $e^{i k x}$:
$\begin{array}{rcl} F(k) & = & \displaystyle { \int_0^{2\pi} f(t)\ e^{-i k t}\ dt \over \int_0^{2\pi} e^{ikt}\ e^{-ikt}\ dt } \\ & = & \displaystyle {1 \over 2 \pi } \int_0^{2\pi} f(t)\ e^{-i k t}\ dt \\ & = & \displaystyle c_k \end{array}$
Recall from the axioms of the dot product that an inner product of complex functions must use the complex conjugate of the second function, so projecting onto $e^{ikt}$ uses the complex conjugate, $e^{-ikt}$, as the second factor.
So $F(k)$ provides the parameters of the shifted, modulated sinusoid of frequency ${ k \over 2\pi }$ onto which $f(x)$ projects.
The integrals above are taken over $[0,2\pi]$ since we assume that the period of the function is $2\pi$.
From the coefficients $c_k$, we can reconstruct $f$ by multiplying the $c_k$ by the $e^{i k t}$:
$\displaystyle f(x) = \sum_{k=-\infty}^\infty c_k\ e^{i k t}$
for integer values of $k$ in the sum.
More generally, let the period of $f$ be $T$. Then the exponential must be stretched over the same period, so we use
$\displaystyle e^{-i k {2\pi \over T} t}$
so that, as $t$ varies in $[0,T]$, ${2\pi \over T} t$ varies in $[0, 2\pi]$. Note that a period of $T = 2\pi$ gives the exponential that we're familiar with.
Then the Fourier Transform becomes
$\begin{array}{rcl} F(k) & = & \displaystyle { \int_0^{T} f(t)\ e^{-i k {2\pi\over T} t}\ dt \over \int_0^{T} e^{i k {2\pi\over T} t}\ e^{-i k {2\pi\over T} t}\ dt } \\ & = & \displaystyle {1 \over T } \int_0^{T} f(t)\ e^{-i k {2\pi\over T} t}\ dt \\ & = & c_k \end{array}$
For intuition about the decomposition of $f(t)$ into sin/cos
coefficients $(a_k,b_k)$, or into the corresponding
amplitude/phase of a modulated and shifted sinusoid,
see www.falstad.com/fourier
up to Schedule & Notes