% Colors
\definecolor{pagebackground}{HTML}{FFFFFF}
\definecolor{sidebarbackground}{HTML}{353839}
\definecolor{sidebartitle}{HTML}{FFFFFF}
\definecolor{sidebartext}{HTML}{FFFFFF}
\definecolor{contbackground}{HTML}{DCAE71}
\definecolor{altconttext}{HTML}{353839}
\definecolor{bodytitle}{HTML}{353839}
\definecolor{bodytext}{HTML}{353839}
\definecolor{bulletcolor}{HTML}{353839}
\definecolor{linkcolor}{HTML}{353839}
\definecolor{linecolor}{HTML}{353839}
\definecolor{name}{HTML}{353839}
\definecolor{jobtitle}{HTML}{353839}
\RequirePackage[pagecolor=pagebackground, nopagecolor=pagebackground]{pagecolor}

% Defining font styles
\newcommand{\sname}{\color{name}\fontsize{36pt}{36pt}\sffamily\addfontfeature{LetterSpace=3}\MakeUppercase}
\newcommand{\sjobtitle}{\color{jobtitle}\fontsize{18pt}{18pt}\sffamily\addfontfeature{LetterSpace=5}\MakeUppercase}

% Defining page styles
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[C]{%
    \begin{tikzpicture}[remember picture,overlay]
        \node [rectangle, fill=sidebarbackground, anchor=north west, minimum width=2cm, minimum height=\paperheight+2cm] at ($(current page.north west)-(1cm,-1cm)$) {};
    \end{tikzpicture}
}

% Default text color
\AtBeginDocument{\colorlet{defaultcolor}{.}}
\color{bodytext}

% Layout for name, job title and sidebar
\newcommand{\makeprofile}{%
    \vspace*{-1cm}
    {\setstretch{3}
    \begin{adjustbox}{minipage=[c][2cm]{.9\textwidth}}
        {\sname\name}
    \end{adjustbox}}

    {\setstretch{1.8}
    \begin{adjustbox}{minipage=[c][1cm]{.9\textwidth}}
        {\sjobtitle\jobtitle}
    \end{adjustbox}}

    \vspace{3.5cm}
}

\newcommand{\makecontact}{%
    \begin{tikzpicture}[remember picture, overlay]
        \node[rectangle, fill=contbackground, anchor=north, minimum height=1.8cm, minimum width=\paperwidth+3cm] at ($(current page.north)-(0cm,4.75cm)$) {%
            \renewcommand{\arraystretch}{1.3}
            \centering
            {\color{altconttext}
                \begin{tabularx}{\textwidth}{CCC}
                    \ifthenelse{\equal{\location}{}}{}{\locicon\quad \location} &
                    \ifthenelse{\equal{\phone}{}}{}{\phoneicon\quad \phone} &
                    \ifthenelse{\equal{\mail}{}}{}{\mailicon\quad \href{mailto:\mail}{\mail}} \\
                \end{tabularx}
            }
        };
    \end{tikzpicture}
}

% Margins
\RequirePackage[left=1.5cm, right=1.5cm, top=1.5cm, bottom=1.5cm, footskip=0.5cm, headheight=0.5cm]{geometry}
