% Colors.
\GetEnv[\ColorMain]{RESUME_COLOR}
\definecolor{ColorBlack}{RGB}{0,0,0}
\definecolor{ColorWhite}{RGB}{255,255,255}
\definecolor{ColorLink} {RGB}{46,116,181}
\definecolor{ColorMain} {HTML}{\ColorMain}
\definecolor{ColorGray} {RGB}{127,127,127}
\definecolor{ColorLgray}{RGB}{229,229,229}
\definecolor{ColorRef}  {RGB}{53,82,105}

\definecolor{ColorCodeBackground}{RGB}{38,38,38}
\definecolor{ColorCodeText}      {RGB}{255,215,175}
\definecolor{ColorCodeString}    {RGB}{135,175,135}
\definecolor{ColorCodeLiteral}   {RGB}{215,135,175}
\definecolor{ColorCodeProperty}  {RGB}{135,95,95}
\definecolor{ColorCodeKeyword}   {RGB}{255,95,95}
\definecolor{ColorCodeComment}   {RGB}{128,128,128}

% code block.
\newtcolorbox{CodeBox}[1][]{
	colback   = ColorCodeBackground,
	colframe  = ColorCodeBackground,
	fontupper = \ttfamily,
	nobeforeafter
}
\newenvironment{Code}{\begin{CodeBox}\catcode33=12\obeylines}{\end{CodeBox}}

% styles.
\newcommand{\ResetStyle}[1]{\fontsize{12}{12}\selectfont\rm\color{ColorBlack}#1}
\newcommand{\Par}       [0]{\par}
\newcommand{\Parn}      [0]{\par\noindent}
\newcommand{\Text}      [1]{\ResetStyle{#1}}
\newcommand{\Italic}    [1]{\textit{#1}}
\newcommand{\Bold}      [1]{\textbf{#1}}
\newcommand{\Semibold}  [1]{\fontseries{sb}{\selectfont{#1}}}
\newcommand{\Underline} [1]{\underline{#1}}
\newcommand{\Link}      [2]{\href{#1}{\textcolor{ColorLink}{\Underline{#2}}}}
\newcommand{\TextName}  [1]{\fontsize{21}{21}{\selectfont{\Semibold{#1}}}}
\newcommand{\Color}     [2]{\textcolor{#1}{#2}}
\newcommand{\Icon}      [1]{\raisebox{-1mm}{\includegraphics[height=5mm]{#1}}}
\newcommand{\Href}      [1]{\hyperlink{#1}{\textcolor{ColorLink}{\Underline{#1}}}}
\newcommand{\TextRef}   [1]{\textcolor{ColorRef}{#1}}
\newcommand{\TextList}  [1]{\textcolor{ColorLgray}{#1}}
\newcommand{\Bullet}    [0]{\raisebox{0.5mm}{\bullet}\hspace{4mm}}
\newcommand{\End}       [0]{\clearpage}
\newcommand{\Title}     [1]{\hypertarget{#1}{}\fontsize{11}{11}{\selectfont{\textcolor{ColorMain}{\Semibold{#1}}}}}

\newcommand{\BlToc}    [0]{\renewcommand{\baselinestretch}{0.75}\normalsize}
\newcommand{\BlCompact}[0]{\renewcommand{\baselinestretch}{1.0}\normalsize}
\newcommand{\BlDefault}[0]{\renewcommand{\baselinestretch}{1.5}\normalsize}

\newcommand{\CodeText}     [1]{\textcolor{CodeText}{#1}}
\newcommand{\CodeString}   [1]{\textcolor{ColorCodeString}{#1}}
\newcommand{\CodeLiteral}  [1]{\textcolor{ColorCodeLiteral}{#1}}
\newcommand{\CodeProperty} [1]{\textcolor{ColorCodeProperty}{#1}}
\newcommand{\CodeKeyword}  [1]{\textcolor{ColorCodeKeyword}{#1}}
\newcommand{\CodeComment}  [1]{\textcolor{ColorCodeComment}{#1}}
\newcommand{\CodeEmptyLine}[0]{~}

\newcommand{\JLink} [1]{\Icon{IcLink}\ \href{https://#1}{\Italic{#1}}}
\newcommand{\JPlace}[2]{\ResetStyle{\Semibold{#1}}\ResetStyle\hfill\fontsize{10}{10}\selectfont\textcolor{ColorGray}{(#2)}}

% settings.
\linespread{1.5}  % Height between non-breaking lines.
\sloppy           % Correct word placement on newline.
\pagestyle{empty} % Suppress default styles, i.e. page numbers.
\BlDefault        % Default baseline size.
