\documentclass[10pt,letterpaper]{article}

% =================================================================
% PROFESSIONAL CV TEMPLATE - Not fancy, but GOOD
% =================================================================

% --- PACKAGES ---
\usepackage[top=0.7in, bottom=0.7in, left=0.7in, right=0.7in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}            % Palatino - professional serif
\usepackage[scaled=0.95]{helvet} % Helvetica - professional sans
\usepackage{enumitem}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{titlesec}
\usepackage{tcolorbox}
\usepackage{microtype}           % Better typography

% --- COLOR PALETTE (professional, not flashy) ---
\definecolor{NameColor}{HTML}{1a1a2e}       % Deep blue-black for name
\definecolor{TitleColor}{HTML}{16213e}      % Dark blue for title
\definecolor{ContactColor}{HTML}{4a5568}    % Medium gray for contact
\definecolor{SectionColor}{HTML}{2c3e50}    % Dark blue-gray for sections
\definecolor{PrimaryText}{HTML}{2d3748}     % Dark gray for body
\definecolor{SecondaryText}{HTML}{4a5568}   % Medium gray for secondary
\definecolor{AccentColor}{HTML}{2563eb}     % Professional blue for links
\definecolor{SummaryBg}{HTML}{f7fafc}       % Very light blue-gray

% --- TYPOGRAPHY SETTINGS ---
\pagestyle{empty}
\setlength{\parindent}{0pt}
\raggedright
\linespread{1.08}                % Slightly increased line spacing
\setlength{\parskip}{0pt}
\frenchspacing                   % Single space after periods
\microtypesetup{protrusion=true, expansion=true}

% --- HYPERLINKS ---
\hypersetup{
  colorlinks=true,
  linkcolor=AccentColor,
  urlcolor=AccentColor,
  pdfborder={0 0 0}
}

% --- FONTS ---
\newcommand{\headerfont}{\fontfamily{phv}\selectfont\bfseries}  % Sans for name
\newcommand{\sectionfont}{\fontfamily{phv}\selectfont\bfseries} % Sans for sections
\renewcommand{\familydefault}{\rmdefault}  % Serif for body

% --- SECTION FORMATTING ---
\titleformat{\section}
  {\sectionfont\large\color{SectionColor}}
  {}{0pt}{}[\vspace{2pt}{\color{SectionColor}\titlerule[0.8pt]}\vspace{6pt}]
\titlespacing*{\section}{0pt}{16pt}{8pt}

% --- CUSTOM ENVIRONMENTS ---

% Summary box
\newtcolorbox{summarybox}{
  colback=SummaryBg,
  colframe=SummaryBg,
  boxrule=0pt,
  arc=2pt,
  left=10pt,
  right=10pt,
  top=8pt,
  bottom=8pt,
  boxsep=0pt,
  fontupper=\color{PrimaryText}
}

% Job header
\newcommand{\jobheader}[4]{%
  \noindent
  \begin{minipage}[t]{0.68\textwidth}
    {\bfseries\color{PrimaryText}#1} \\[2pt]
    {\small\color{SecondaryText}#2 \textbar\ #3}
  \end{minipage}%
  \hfill
  \begin{minipage}[t]{0.28\textwidth}
    \raggedleft
    {\small\color{SecondaryText}#4}
  \end{minipage}
  \vspace{4pt}
}

% Education header
\newcommand{\educationheader}[4]{%
  \noindent
  \begin{minipage}[t]{0.72\textwidth}
    {\bfseries\color{PrimaryText}#1} \\[2pt]
    {\small\color{SecondaryText}#2 \textbar\ #3}
  \end{minipage}%
  \hfill
  \begin{minipage}[t]{0.24\textwidth}
    \raggedleft
    {\small\color{SecondaryText}#4}
  \end{minipage}
  \vspace{2pt}
}

% Achievements list
\newenvironment{achievements}{
  \vspace{2pt}
  \begin{itemize}[
    leftmargin=1.1em,
    itemsep=3pt,
    parsep=0pt,
    topsep=2pt,
    label={\color{SecondaryText}\small\textbullet}
  ]
  \small\color{PrimaryText}
}{
  \end{itemize}
}

% Skill category
\newcommand{\skillcategory}[1]{%
  \noindent{\bfseries\color{PrimaryText}#1}\\[2pt]
}

% Skill items
\newenvironment{skillitems}{
  \begin{itemize}[
    leftmargin=1em,
    itemsep=2pt,
    parsep=0pt,
    topsep=2pt,
    label={\color{SecondaryText}\tiny\textbullet}
  ]
  \small\color{PrimaryText}
}{
  \end{itemize}
}

\begin{document}

% HEADER
\begin{center}
  {\fontsize{32}{38}\selectfont\headerfont\color{NameColor}PAVEL VASILYEV}\\[5pt]
  {\large\color{TitleColor}LLM Engineer / AI Infrastructure Specialist}\\[8pt]
  {\small\color{ContactColor}
    Jerusalem, Israel    \ \textbar\ \     +972-54-343-1123    \ \textbar\ \     \href{mailto:marchdown@gmail.com}{marchdown@gmail.com}
    \ \textbar\ \ \href{https://github.com/marchdown}{github.com/marchdown}
    \ \textbar\ \ \href{https://linkedin.com/in/pavel--vasilyev}{linkedin.com/in/pavel--vasilyev}
    \ \textbar\ \ \href{http://5.189.145.105:9000}{Live Demos}
  }
\end{center}

\vspace{8pt}

% PROFESSIONAL SUMMARY
\begin{summarybox}
  LLM Engineer specializing in production systems: RAG pipelines, safety guardrails, prompt optimization. Built AI infrastructure for healthcare chatbots (GPT-3.5/4, Claude) and ML/NLP systems across fintech and quantitative research. Strong functional programming background (Python, Clojure, Elixir, \href{https://github.com/marchdown/rag-production-demos}{Rust/Go}).
\end{summarybox}

\vspace{8pt}

% KEY ACHIEVEMENTS
\section{Key Achievements}

\begin{achievements}
  \item Production \href{https://github.com/marchdown/rag-production-demos}{RAG systems (Rust/Go)}: <200ms latency, 600+ embeddings/sec, 90+ tests, 68\% coverage
  \item \href{https://github.com/marchdown/llm-safety-playground}{LLM safety infrastructure}: 8-layer defense, <100ms detection, 19 attack patterns documented
  \item Cost optimization: 40\% reduction in LLM inference costs while maintaining 98\% quality (quantization + caching)
  \item Cloud architecture: Led GCP→AWS migration for volunteer platform (LevEhat NGO)
\end{achievements}

\vspace{10pt}

\section{Experience}

\jobheader{AI Architect}
  {Stamina AI}
  {Remote}
  {Jan 2023 – Dec 2023}

\begin{achievements}
  \item Architected production LLM pipeline for healthcare chatbots: RAG, prompt optimization, safety guardrails
  \item Built custom safety layers for GPT-3.5/4 APIs: content filtering, prompt injection detection, context validation
  \item Optimized inference costs: 40\% reduction via quantization and caching while maintaining 98\% quality
  \item Designed vector-based knowledge system with ontology mapping for semantic search
\end{achievements}

\vspace{6pt}

\jobheader{Independent Consultant}
  {Various Clients}
  {Remote}
  {2022 – 2024}

\begin{achievements}
  \item \textbf{LevEhat NGO (CTO):} Led GCP→AWS migration for volunteer management platform
  \item \textbf{Fintilligence (Lead):} Market microstructure analytics: PIN/VPIN algorithms, Level 2 data pipelines
  \item \textbf{RAG Systems:} Dual implementation (Rust/Go) with <200ms latency, ONNX Runtime, comprehensive testing
  \item \textbf{ML/NLP:} Time-series forecasting, text classification, infrastructure design
\end{achievements}

\vspace{6pt}

\jobheader{Senior Researcher}
  {Spring Research}
  {Remote}
  {2020 – 2021}

\begin{achievements}
  \item Developed ML models for trading signal generation using time-series analysis and statistical methods
  \item Built data pipelines processing Level 2 market data (tick-by-tick, order book, market depth)
  \item Researched topology-inspired approaches to market microstructure modeling
\end{achievements}

\vspace{6pt}

\jobheader{Data Scientist}
  {Nestlogic}
  {Remote}
  {2019}

\begin{achievements}
  \item Built computer vision models for advertising creative optimization (image feature extraction)
  \item Implemented A/B testing infrastructure using statistical hypothesis testing (t-tests, chi-square)
  \item Deployed ML models to production on Google Cloud Platform with Kubernetes
\end{achievements}

\vspace{6pt}

\section{Technical Skills}

\skillcategory{LLM \& AI}

\begin{skillitems}
  \item \textbf{Engineering:} RAG Pipelines, Prompt Optimization, Safety Guardrails, Vector Search
  \item \textbf{APIs:} OpenAI GPT-3.5/4, Anthropic Claude, ONNX Runtime
  \item \textbf{ML/DL:} PyTorch, TensorFlow, Transformers, CNNs, RNNs, LSTMs, Transfer Learning
  \item \textbf{NLP:} spaCy, NLTK, Hugging Face, Named Entity Recognition, Text Classification
\end{skillitems}

\vspace{4pt}

\skillcategory{Engineering}

\begin{skillitems}
  \item \textbf{Languages:} Python, SQL | Clojure, \href{https://github.com/marchdown/rag-production-demos}{Rust}, \href{https://github.com/marchdown/rag-production-demos}{Go}, Elixir, Java, R
  \item \textbf{Infrastructure:} AWS (EC2, S3, SageMaker, Lambda), GCP (Compute, GKE), Docker, Kubernetes
  \item \textbf{Databases:} PostgreSQL, MongoDB, Redis, Neo4j, \href{https://github.com/marchdown/rag-production-demos}{ChromaDB}, SQLite, MySQL
\end{skillitems}

\vspace{8pt}

\section{Featured Projects}

\noindent\textbf{Production RAG Systems} \hfill \href{https://github.com/marchdown/rag-production-demos}{\small github.com/marchdown/rag-production-demos}

\begin{achievements}
\item Dual implementation: Rust (3,661 LOC) and Go (2,827 LOC) with ONNX Runtime
\item Two-stage retrieval (bi-encoder → cross-encoder) achieving <200ms end-to-end latency
\item Production deployment: Docker, health checks, 90+ tests, 68\% coverage
\end{achievements}

\vspace{4pt}

\noindent\textbf{LLM Safety Playground} \hfill \href{http://5.189.145.105:47200}{\small Live API} | \href{https://github.com/marchdown/llm-safety-playground}{\small GitHub}

\begin{achievements}
\item 8-layer defense (4 input + 4 output) with 19 documented attack patterns
\item <100ms detection, zero ML dependencies, 17/17 tests passing, production monitoring
\end{achievements}

\vspace{8pt}

\section{Education}

\educationheader{MSc Computational Linguistics}
  {Russian State University for the Humanities (RSUH)}
  {Moscow, Russia}
  {2016}

{\small\color{SecondaryText}\itshape Statistical NLP, Machine Translation, Information Extraction}

\vspace{6pt}

\educationheader{MSc Nuclear Physics}
  {Czech Technical University (CTU)}
  {Prague, Czech Republic}
  {2011}

{\small\color{SecondaryText}\itshape Mathematical Modeling, Statistical Analysis, Computational Physics}

\vspace{6pt}

\section{Languages}

\textbf{English} Fluent \textbullet\ \textbf{Russian} Native \textbullet\ \textbf{French} Conversational \textbullet\ \textbf{German} Conversational \textbullet\ \textbf{Czech} Conversational \textbullet\ \textbf{Hebrew} Basic

\end{document}
