% Modern LaTeX Resume Pandoc Template
%
% Based on jb2resume.latex by John Bokma (2016-2017)
% Improved version with better spacing, typography, and visual hierarchy
% Enhanced for modern resumes while maintaining ATS compatibility

\documentclass[$if(fontsize)$$fontsize$$else$11pt$endif$,letterpaper]{article}

\usepackage{hyperref}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{underscore}
\usepackage[parfill]{parskip}
\usepackage{lmodern}
\usepackage[svgnames]{xcolor}
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc}

% Your name on the resume
\def\name{$name$}

% The following metadata will show up in the PDF properties
\hypersetup{
  colorlinks = true,
  urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$,
  linkcolor=$if(linkcolor)$$linkcolor$$else$blue$endif$,
  pdfauthor = {\name},
  pdfkeywords = {$keywords$},
  pdftitle = {\name: Resume},
  pdfsubject = {Resume},
  pdfpagemode = UseNone
}

\geometry{
  body={6.5in, 9.0in},
  left=0.75in,
  top=0.75in,
  right=0.75in,
  bottom=0.75in
}

% Fix for "! Undefined control sequence. <recently read> \tightlist"
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

% Page styling
\pagestyle{myheadings}
\markright{\name}
\thispagestyle{empty}

% Custom section fonts - modern look with subtle color
\usepackage{sectsty}
$if(section-color)$
\sectionfont{\color{$section-color$}\sffamily\bfseries\Large\vspace{0.3em}}
$else$
\sectionfont{\color{darkgray}\sffamily\bfseries\Large\vspace{0.3em}}
$endif$
\subsectionfont{\rmfamily\bfseries\normalsize\vspace{0.1em}}

% Section numbers or not (default)
$if(numbersections)$
\setcounter{secnumdepth}{5}
$else$
\setcounter{secnumdepth}{0}
$endif$

% Better bullet points and list formatting
\setlist[itemize]{leftmargin=0.5em, label={\textbullet}, itemsep=0.3em}
\setlist[description]{leftmargin=0em, style=sameline}

% Don't use monospace font for URLs
\urlstyle{same}

% Better spacing control
\setlength{\parskip}{0.4em}
\setlength{\parindent}{0em}

\begin{document}

% Name - larger, modern
$if(name-color)$
{\fontsize{16}{19}\selectfont\color{$name-color$}\sffamily\bfseries \name}
$else$
{\fontsize{16}{19}\selectfont\color{black}\sffamily\bfseries \name}
$endif$

\vspace{0.2em}

% Contact info in two columns
$if(left-column)$
\begin{minipage}[t]{0.495\textwidth}
  \small
  $for(left-column)$$left-column$$sep$ \\ $endfor$
\end{minipage}%
$endif$
$if(right-column)$
\begin{minipage}[t]{0.495\textwidth}
  \small
  \raggedleft
  $for(right-column)$$right-column$$sep$ \\ $endfor$
\end{minipage}
$endif$

\vspace{0.3em}
\noindent\rule{\textwidth}{0.5pt}
\vspace{0.2em}

$body$

\end{document}
