% Colors
\definecolor{pagebackground}{HTML}{FFFFFF}
\definecolor{bodytitle}{HTML}{484849}
\definecolor{bodytext}{HTML}{484849}
\definecolor{bulletcolor}{HTML}{484849}
\definecolor{linkcolor}{HTML}{5F80A0}
\definecolor{linecolor}{HTML}{484849}
\definecolor{name}{HTML}{484849}
\definecolor{jobtitle}{HTML}{484849}
\RequirePackage[pagecolor=pagebackground, nopagecolor=pagebackground]{pagecolor}

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

% Defining page styles
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[C]{%
    \begin{tikzpicture}[remember picture,overlay]
        \draw [line width=3pt, color=linecolor] ($(current page.north west)-(0,5.5cm)$) -- ($(current page.north east)-(0,5.5cm)$);
    \end{tikzpicture}
}

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

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

        {\setstretch{1.8}
        \begin{adjustbox}{minipage=[c][1.5cm]{.9\textwidth}}
            \centering
            {\sjobtitle\jobtitle}
        \end{adjustbox}}
    \end{center}
    \bigskip
}

\newcommand{\makecontact}{%
    %\smallskip
    \begin{tikzpicture}[ampersand replacement=\&]
        \node [rectangle, anchor=center, minimum width=\textwidth, text width=\textwidth, inner ysep=10pt, inner xsep=0pt, minimum height=1.5cm] (contact) at ($(current page.north)-(0cm,5.5cm)$) {%
            \begin{tabularx}{\textwidth}{CCC}%
                \ifthenelse{\equal{\location}{}}{}{\locicon\ \location } &
                \ifthenelse{\equal{\phone}{}}{}{\phoneicon\ \phone } &
                \ifthenelse{\equal{\mail}{}}{}{\mailicon\ \href{mailto:\mail}{\mail} } \\
            \end{tabularx}
        };
        \draw[line width=1pt, draw=linecolor] ($(contact.south west)$) -- ($(contact.south east)$);
    \end{tikzpicture}
    \vspace{2\bigskipamount}
}

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