\RequirePackage{lettrine}

% Font
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes} % Times New Roman alternative
\usepackage[onehalfspacing]{setspace} % 1.5 interline spacing
\defaultfontfeatures[\rmfamily,\sffamily]{Ligatures=TeX}
\setkomafont{disposition}{\bfseries}

% Float
\RequirePackage{graphicx}
\RequirePackage{float}
\RequirePackage{caption}
\RequirePackage{subcaption}
\RequirePackage{csquotes}
\RequirePackage[english]{babel}
%% Caption
\captionsetup{
    labelfont={color=black, bf},
    figurename=Figure,
    tablename=Table,
    font={sf},
    labelsep=period,
    justification=raggedright,
    singlelinecheck=false
}

% Colors
\RequirePackage{xcolor}
 \definecolor{lamme2024-blue}{HTML}{008682}
 \colorlet{primary}{lamme2024-blue}
 \colorlet{primaryLink}{primary!60!blue}
 \colorlet{primaryCite}{red!70!primary}


% Math
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amssymb}

\usepackage{enumitem}

\usepackage{lipsum}

% References
\usepackage[
	maxcitenames=2,
	maxbibnames=99, % show all authors in the cited part
	style=authoryear-comp,
	citestyle=authoryear-comp,
	backend=biber,
	natbib=true
    ]{biblatex}

\renewcommand\bibname{References}

\RequirePackage{doi}
\RequirePackage{xurl}
\RequirePackage{orcidlink}

\RequirePackage[
	type={CC},
	modifier={by-sa},
	version={4.0},
]{doclicense}

\RequirePackage[
	%nameinlink,
	noabbrev
	]{cleveref}



\usepackage[
	abbreviations,         % create "abbreviations" glossary
	%nomain,                % don't create "main" glossary
	stylemods=longbooktabs, % do the adjustments for the longbooktabs styles,
	automake
]{glossaries-extra}
\setabbreviationstyle[acronym]{long-short}

\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  urlcolor=primaryLink,
  linkcolor=primaryLink,
  anchorcolor=primaryLink,
  citecolor=primaryCite,
  %linktoc=page
}
\newcommand*{\glsplainhyperlink}[2]{%
    \begingroup%
      \hypersetup{hidelinks}%
      \hyperlink{#1}{#2}%
    \endgroup%
  }

\let\oldgls=\gls
\renewcommand{\gls}[1]{{\hypersetup{hidelinks}%
	\oldgls{#1}}}%

\let\oldGls=\Gls
\renewcommand{\Gls}[1]{{\hypersetup{hidelinks}%
    \oldGls{#1}}}%

\let\oldglspl=\glspl
\renewcommand{\glspl}[1]{{\hypersetup{hidelinks}%
    \oldglspl{#1}}}%}

\let\oldGlspl=\Glspl
\renewcommand{\Glspl}[1]{{\hypersetup{hidelinks}%
    \oldGlspl{#1}}}%}


%\renewcommand*{\glstextformat}[1]{\begingroup\hypersetup{hidelinks}#1\endgroup}
%\renewcommand*{\glsdohyperlink}[2]{%
% {\hypersetup{hidelinks=true}\hyperlink{#1}{#2}}}
\renewcommand*{\glsentryfmt}{%
  \hypersetup{hidelinks}\glshyperlink[\glsgenentryfmt]{\glslabel}%
}

% Force text on right side, float on left side (does not work well)
\usepackage{sty/floatlefttextright}

\renewcommand\maketitle{\include{titlepage}}

\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}}

% Ensure summary is on even page
\newcommand*\cleartoleftpage{
	\clearpage\ifodd\c@page
		\hbox{}
		\vspace*{\fill}
		\thispagestyle{empty}
		\newpage
	\fi
  }

\usepackage{scrhack}

\usepackage{sty/cleanthesis-footer}
\usepackage{sty/scr-legrand-heading}
