\documentclass[tikz,border=20pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, positioning, shadows, calc}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\definecolor{cardblue}{RGB}{59, 130, 246}
\definecolor{card1}{RGB}{255, 255, 255}
\definecolor{card2}{RGB}{248, 250, 252}
\definecolor{card3}{RGB}{241, 245, 249}
\definecolor{arrowred}{RGB}{239, 68, 68}
\definecolor{responsebg}{RGB}{220, 252, 231}
\definecolor{responsegreen}{RGB}{34, 197, 94}
\definecolor{robotgray}{RGB}{100, 116, 139}
\definecolor{bgray}{RGB}{249, 250, 251}
\definecolor{dicered}{RGB}{220, 38, 38}
\definecolor{dicewhite}{RGB}{255, 255, 255}

\begin{tikzpicture}[
    questioncard/.style={
        rectangle,
        rounded corners=10pt,
        draw=cardblue,
        line width=1.8pt,
        text width=6.5cm,
        minimum height=3.8cm,
        align=left,
        font=\normalsize,
        inner sep=14pt,
        drop shadow={shadow xshift=3pt, shadow yshift=-3pt, opacity=0.2}
    },
    responsecard/.style={
        rectangle,
        rounded corners=12pt,
        draw=responsegreen,
        line width=2pt,
        fill=responsebg,
        text width=9cm,
        align=left,
        font=\small,
        inner sep=12pt,
        drop shadow={shadow xshift=3pt, shadow yshift=-3pt, opacity=0.2}
    }
]

% Background
\fill[bgray] (-4, -7) rectangle (23, 7);

% Dice 1 (showing 6) - decorative
\begin{scope}[shift={(-2.8, 5)}, scale=0.9, rotate=15]
    \fill[dicered, rounded corners=5pt] (-0.7, -0.7) rectangle (0.7, 0.7);
    \fill[dicewhite] (-0.35, 0.35) circle (0.09);
    \fill[dicewhite] (0.35, 0.35) circle (0.09);
    \fill[dicewhite] (-0.35, 0) circle (0.09);
    \fill[dicewhite] (0.35, 0) circle (0.09);
    \fill[dicewhite] (-0.35, -0.35) circle (0.09);
    \fill[dicewhite] (0.35, -0.35) circle (0.09);
\end{scope}

% Dice 2 (showing 4) - decorative
\begin{scope}[shift={(-1.5, -5.5)}, scale=0.75, rotate=-12]
    \fill[dicered!85, rounded corners=4pt] (-0.7, -0.7) rectangle (0.7, 0.7);
    \fill[dicewhite] (-0.3, 0.3) circle (0.09);
    \fill[dicewhite] (0.3, 0.3) circle (0.09);
    \fill[dicewhite] (-0.3, -0.3) circle (0.09);
    \fill[dicewhite] (0.3, -0.3) circle (0.09);
\end{scope}

% Three question cards - spread out to be visible
\node[questioncard, fill=card3] (q3) at (1.2, -3.2) {
    \textbf{\textcolor{cardblue}{Q3: Coin Sequences}}\\[10pt]
    Flip a fair coin repeatedly until you get two heads in a row (HH).\\[6pt]
    \textit{What is the expected number of flips?}
};

\node[questioncard, fill=card2] (q2) at (0.6, 0) {
    \textbf{\textcolor{cardblue}{Q2: Card Probability}}\\[10pt]
    Two cards are drawn from a standard 52-card deck without replacement.\\[6pt]
    \textit{What is P(both aces)?}
};

\node[questioncard, fill=card1] (q1) at (0, 3.2) {
    \textbf{\textcolor{cardblue}{Q1: Dice Expected Value}}\\[10pt]
    You roll a fair six-sided die repeatedly until you get a 6.\\[6pt]
    \textit{What is the expected number of rolls?}
};

% WIDE RED ARROW (no text)
\fill[arrowred] (5.2, -0.8) -- (5.2, 0.8) -- (8.5, 0.8) -- (8.5, 1.5) -- (10, 0) -- (8.5, -1.5) -- (8.5, -0.8) -- cycle;

% Response card with robot icon INSIDE at top right, no vertical padding
\node[responsecard] (response) at (16, 0) {
    \raisebox{0pt}{\begin{tikzpicture}[scale=0.55]
        \fill[robotgray!90, rounded corners=4pt] (-0.55, -0.35) rectangle (0.55, 0.55);
        \fill[robotgray!50, rounded corners=2pt] (-0.42, -0.2) rectangle (0.42, 0.42);
        \fill[responsegreen] (-0.2, 0.15) circle (0.13);
        \fill[responsegreen] (0.2, 0.15) circle (0.13);
        \fill[white] (-0.2, 0.18) circle (0.045);
        \fill[white] (0.2, 0.18) circle (0.045);
        \draw[robotgray!90, line width=1.5pt] (0, 0.55) -- (0, 0.8);
        \fill[responsegreen] (0, 0.8) circle (0.08);
        \fill[robotgray!70, rounded corners=1pt] (-0.65, 0) rectangle (-0.55, 0.3);
        \fill[robotgray!70, rounded corners=1pt] (0.55, 0) rectangle (0.65, 0.3);
    \end{tikzpicture}}\\[-2pt]
    We have a classic problem: find the expected number of trials until first success. Rolling a die until getting 6 follows a geometric distribution. Each roll is independent with probability $p = \frac{1}{6}$.
    The number of trials until first success follows a geometric distribution. We can formalize: let $X$ be the number of rolls needed. The probability mass function is $P(X=k) = (1-p)^{k-1}p$ for $k=1,2,3,...$
    For the expected value, we use the well-known formula for geometric distribution: $E[X] = \frac{1}{p}$. Substituting our probability: $E[X] = \frac{1}{1/6} = 6$.
    \textbf{Intuition:} On average, you need $\frac{1}{p}$ trials to get one success. Since each outcome has probability $\frac{1}{6}$, we expect to roll 6 times before seeing a 6. This can also be derived by solving the recurrence $E = 1 + \frac{5}{6}E$, which gives $E = 6$...\\[3pt]
    \textbf{Answer:} \fbox{\large\textbf{6}}
};

% Title
\node[font=\Large\bfseries, color=cardblue] at (9, 6.2) {QuantQA: Quantitative Finance Interview Training};

\end{tikzpicture}

\end{document}
