%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INNER THEME - The meat and potatoes of your slides
% Defines: title page, blocks, itemized lists
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mode<presentation>

%%%% TEXT THINGS
    %Itemized Lists / Enumerated Lists
    \setbeamertemplate{items}[square]

    %Blocks
    \setbeamertemplate{blocks}[shadow=true]

%%%% TITLE PAGE
\defbeamertemplate*{title page}{dane}[1][]{
    \begin{beamercolorbox}[wd = \paperwidth, ht = \paperheight]{title page}
        \begin{tikzpicture}
            \useasboundingbox (0,0) rectangle(\paperwidth,\paperheight);

            %title
            \node(title)[anchor = north west] at (0,11.75) {\parbox[t]{16cm}{\raggedright\LARGE\textbf\inserttitle}};

            %Title Image - Engineer and Digital Twin
            \node(title_image)[anchor = center] at (11,5) {
                \begin{tikzpicture}
                    % Define positions
                    \coordinate (engineer_pos) at (0,0);
                    \coordinate (twin_pos) at (6,0);

                    % Engineer icon
                    \node[anchor=center] (engineer) at (engineer_pos) {
                        \includegraphics[width=2cm]{images/5_metrics_of_success/engineer.png}
                    };
                    \node[below=0.1cm of engineer, text width=2cm, align=center] {\small Engineer};

                    % Computer with nuclear plant overlay (digital twin concept)
                    \node[anchor=center] (computer) at (twin_pos) {
                        \includegraphics[width=2.8cm]{images/5_metrics_of_success/computer.png}
                    };

                    % Nuclear plant logo overlaid on computer
                    \node[anchor=center] at ([yshift=0.3cm, xshift=-0.3cm]computer.center) {
                        \includegraphics[width=1.0cm]{images/5_metrics_of_success/nuclear-plant.png}
                    };

                    \node[below=0.1cm of computer, text width=3cm, align=center] {\small Digital Twin};

                    % Bidirectional arrows
                    \draw[->, >=stealth, very thick, draw=textcolor]
                        ([yshift=0.3cm]engineer.east) -- ([yshift=0.3cm]computer.west)
                        node[midway, above, text width=2cm, align=center] {\scriptsize Design};
                    \draw[->, >=stealth, very thick, draw=textcolor]
                        ([yshift=-0.3cm]computer.west) -- ([yshift=-0.3cm]engineer.east)
                        node[midway, below, text width=2cm, align=center] {\scriptsize Validate};
                \end{tikzpicture}
            };

            %Author Block
            \node(author)[anchor = west] at (0,6) {\parbox[c]{5cm}{\raggedright\insertauthor}};

            \node(institute)[anchor = north, below = 0.1cm of author] {\parbox[c]{5cm}{\raggedright\small\insertinstitute}};

            \node(date)[anchor = north, below = 0.25cm of institute] {\parbox[c]{5cm}{\raggedright\small\insertdate}};

            %logo
            \node(logo)[anchor = south west] at (0,.75) {\includegraphics[width = 3cm]{images/logo.png}};

            %Surrounding Structure
            \fill[secondary] (0,0) rectangle(\paperwidth, 0.5);
        \end{tikzpicture}
    \end{beamercolorbox}
}

\mode<all>
