11. (20 points) As shown in Figure 4, the three sides of $\triangle ABC$ are all positive integers, and the perimeter is 35. $G$ and $I$ are the centroid and incenter of $\triangle ABC$, respectively, and $\angle GIC = 90^{\circ}$. Find the length of side $AB$.

Figure 4
11. Extend $G I$, intersecting $C B$ and $C A$ (or their extensions) at points $P$ and $Q$ respectively.

Since $C I$ is the angle bisector of $\angle C$ and $\angle G I C=90^{\circ}$, we know that $\triangle C P Q$ is an isosceles triangle.

Draw $G E \perp P C$ and $G F \perp C Q$ from point $G$, and draw $I R \perp Q C$ from point $I$.
Let the inradius of $\triangle A B C$ be $r$, then $I R=r$.
Since $G$ is a point on the base of the isosceles $\triangle C P Q$, and $I$ is the midpoint of the base, then
$$
G E+G F=2 I R=2 r .
$$

Since $G$ is the centroid of $\triangle A B C$, we have
$$
G E=\frac{1}{3} h_{a}, G F=\frac{1}{3} h_{b} \text {. }
$$

Thus, $S_{\triangle A B C}=\frac{1}{3}\left(h_{a}+h_{b}\right)=2 r$
$$
\begin{array}{l}
\Rightarrow \frac{1}{3}\left(\frac{S}{\frac{1}{2} a}+\frac{S}{\frac{1}{2} b}\right)=2 \times \frac{S}{\frac{1}{2}(a+b+c)} \\
\Rightarrow 6 a b=(a+b)(a+b+c) \\
\Rightarrow 6 a b=35(a+b) \Rightarrow 61(a+b) .
\end{array}
$$

Given $18 \leqslant a+b<35$, thus $a+b$ can take the values $18, 24, 30$.
Upon verification, only when $(a+b, a b)=(24,140)$, $a$ and $b$ have positive integer solutions.
Therefore, $c=35-(a+b)=11$, i.e., $A B=11$.