% =====================================================================
% AYBU - Yazılım Mühendisliği / Software Engineering
% Summer Practice (Staj) Report - Reusable LaTeX Template
% ---------------------------------------------------------------------
% Compile: pdflatex main.tex  (run twice for TOC)
%      or: latexmk -pdf main.tex
%      or: make build
% License: MIT
% =====================================================================
\documentclass[11pt,a4paper]{article}

% -------- packages --------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[a4paper,margin=2.5cm]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{array}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{enumitem}
% Helvetica (closest free metric-compatible Arial substitute).
% Requires `psnfss` (helvet.sty) — ships with texlive-fontsrecommended.
% Fallback: comment the next line out to use Computer Modern Sans Serif.
\usepackage{helvet}
\usepackage{titlesec}
\usepackage{tocloft}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{hyperref}
\usepackage{float}
\usepackage{lipsum}
\usepackage{etoolbox}

\hypersetup{hidelinks}

% AYBU writing-rules compliance:
%   - Font: sans-serif (Helvetica via helvet, close to Arial)
%   - Body size: 11pt, line spacing 1.5
%   - Margins: 2.5 cm on every side
%   - Page numbers: bottom-center, every page except cover
\renewcommand{\familydefault}{\sfdefault}
\onehalfspacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{0.5em}

% section headings - sans-serif, bold
\titleformat{\section}{\large\bfseries\sffamily\MakeUppercase}{\thesection}{1em}{}
\titleformat{\subsection}{\normalsize\bfseries\sffamily}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalsize\bfseries\sffamily}{\thesubsubsection}{1em}{}

% TOC tweaks
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\setcounter{tocdepth}{3}

% page footer: centered page number
\pagestyle{plain}

% =====================================================================
% STUDENT INFORMATION  --  EDIT THESE FIELDS
% =====================================================================
\newcommand{\StudentName}{Your Name Surname}
\newcommand{\StudentDept}{Software Engineering}
\newcommand{\StudentID}{00000000000}
\newcommand{\StudentEmail}{your.email@example.com}
\newcommand{\StudentPhone}{0000 000 00 00}

\newcommand{\InternshipPlace}{Company Name, City}
\newcommand{\InternshipStart}{DD / MM / YYYY}
\newcommand{\InternshipEnd}{DD / MM / YYYY}
\newcommand{\InternshipSupervisor}{Supervisor Name, Title}

% =====================================================================
% WEEKLY REPORT MACROS
% =====================================================================
% Signature block - italic labels with dotted leaders
\newcommand{\SigLine}[1]{%
  \makebox[10cm][l]{\textit{#1}}\,:\,\dotfill\par
}
\newcommand{\SigBlock}{%
  \vspace{3em}
  \SigLine{Signature of trainee}
  \SigLine{Work place}
  \SigLine{Name and title of the controlling superior}
  \SigLine{Signature and Stamp}
}

% One daily row: \DailyRow{Day}{Date}{Work}{Hours}
\newcommand{\DailyRow}[4]{%
  \makecell{\textit{#1}\\\textit{#2}} & #3 & #4 \\ \hline
}

% Weekly report environment with thick outer frame.
% Usage:
%   \begin{weekreport}{Week 1}{start}{end} ... rows ... \end{weekreport}
% Thick outer / thin inner rules.
\newcolumntype{I}{!{\vrule width 1.4pt}}
\newcommand{\ThickHRule}{\noalign{\hrule height 1.4pt}}

\newsavebox{\weekbox}

% Fixed weekly-page frame height so every week page has identical layout.
\newlength{\weekframeheight}
\setlength{\weekframeheight}{20.5cm}

\newenvironment{weekreport}[3]{%
  \subsection*{\thesection.\arabic{weekcounter}\quad #1}%
  \addcontentsline{toc}{subsection}{\protect\numberline{\thesection.\arabic{weekcounter}}#1}%
  \stepcounter{weekcounter}%
  \vspace{0.6em}%
  \setlength{\fboxrule}{1.4pt}%
  \setlength{\fboxsep}{20pt}%
  \begin{lrbox}{\weekbox}%
  \begin{minipage}[t][\weekframeheight][t]{\dimexpr\textwidth-2\fboxsep-2\fboxrule\relax}%
  \renewcommand{\arraystretch}{2.8}%
  \setlength{\arrayrulewidth}{0.5pt}%
  \centering
  \begin{tabular}{|>{\centering\arraybackslash}p{2.6cm}|p{7.4cm}|>{\centering\arraybackslash}p{2.8cm}|}
  \hline
  \multicolumn{1}{|c|}{\textit{DAYS}} &
  \multicolumn{1}{c|}{\textit{WORK ACCOMPLISHED}} &
  \multicolumn{1}{c|}{\textit{WORKING HOURS}} \\ \hline
}{%
  \end{tabular}\par
  \vspace{1em}%
  \raggedright\SigBlock
  \vfill
  \end{minipage}%
  \end{lrbox}%
  \noindent\fbox{\usebox{\weekbox}}\par
  \setlength{\arrayrulewidth}{0.4pt}%
  \newpage
}

\newcounter{weekcounter}
\setcounter{weekcounter}{1}

% =====================================================================
\begin{document}

% --------------------- COVER PAGE ---------------------
\begin{titlepage}
\thispagestyle{empty}
\begin{center}
    \vspace*{0.4cm}
    \includegraphics[width=6.5cm]{images/aybu-logo.png}\\[1.2cm]

    {\Large\bfseries ANKARA YILDIRIM BEYAZIT UNIVERSITY}\\[0.4cm]
    {\Large\bfseries FACULTY OF ENGINEERING \& NATURAL SCIENCES}\\[0.4cm]
    {\Large\bfseries SUMMER PRACTICE REPORT}\\[2.4cm]
\end{center}

\noindent\textbf{STUDENT'S}\\[-0.4em]
\noindent\rule{\textwidth}{0.4pt}\\[1.2em]

\renewcommand{\arraystretch}{1.9}
\noindent\begin{tabular}{@{}p{4.5cm}p{\dimexpr\textwidth-4.7cm\relax}@{}}
\textbf{NAME SURNAME:}   & \StudentName  \\
\textbf{DEPARTMENT:}     & \StudentDept  \\
\textbf{STUDENT ID:}     & \StudentID    \\
\textbf{E-MAIL ADRESS:}  & \StudentEmail \\
\textbf{PHONE NUMBER:}   & \StudentPhone \\
\end{tabular}

\vfill
\end{titlepage}

% --------------------- TOC ---------------------
\pagenumbering{roman}
\tableofcontents
\newpage
\pagenumbering{arabic}

% =====================================================================
\section{DAILY REPORT}
% Add or remove weeks as needed. Each week is one page.

\begin{weekreport}{Week 1}{DD/MM/YYYY}{DD/MM/YYYY}
  \DailyRow{Monday}{DD/MM/YYYY}{}{}
  \DailyRow{Tuesday}{DD/MM/YYYY}{}{}
  \DailyRow{Wednesday}{DD/MM/YYYY}{}{}
  \DailyRow{Thursday}{DD/MM/YYYY}{}{}
  \DailyRow{Friday}{DD/MM/YYYY}{}{}
\end{weekreport}

\begin{weekreport}{Week 2}{DD/MM/YYYY}{DD/MM/YYYY}
  \DailyRow{Monday}{DD/MM/YYYY}{}{}
  \DailyRow{Tuesday}{DD/MM/YYYY}{}{}
  \DailyRow{Wednesday}{DD/MM/YYYY}{}{}
  \DailyRow{Thursday}{DD/MM/YYYY}{}{}
  \DailyRow{Friday}{DD/MM/YYYY}{}{}
\end{weekreport}

\begin{weekreport}{Week 3}{DD/MM/YYYY}{DD/MM/YYYY}
  \DailyRow{Monday}{DD/MM/YYYY}{}{}
  \DailyRow{Tuesday}{DD/MM/YYYY}{}{}
  \DailyRow{Wednesday}{DD/MM/YYYY}{}{}
  \DailyRow{Thursday}{DD/MM/YYYY}{}{}
  \DailyRow{Friday}{DD/MM/YYYY}{}{}
\end{weekreport}

\begin{weekreport}{Week 4}{DD/MM/YYYY}{DD/MM/YYYY}
  \DailyRow{Monday}{DD/MM/YYYY}{}{}
  \DailyRow{Tuesday}{DD/MM/YYYY}{}{}
  \DailyRow{Wednesday}{DD/MM/YYYY}{}{}
  \DailyRow{Thursday}{DD/MM/YYYY}{}{}
  \DailyRow{Friday}{DD/MM/YYYY}{}{}
\end{weekreport}

\begin{weekreport}{Week 5}{DD/MM/YYYY}{DD/MM/YYYY}
  \DailyRow{Monday}{DD/MM/YYYY}{}{}
  \DailyRow{Tuesday}{DD/MM/YYYY}{}{}
  \DailyRow{Wednesday}{DD/MM/YYYY}{}{}
  \DailyRow{Thursday}{DD/MM/YYYY}{}{}
  \DailyRow{Friday}{DD/MM/YYYY}{}{}
\end{weekreport}

% =====================================================================
\section{GENERAL REPORT}

\subsection{Introduction}

\subsubsection{Information about the Institution}
% TODO: Write 2-4 paragraphs about the company / institution where you did
% the internship: sector, products, team structure, work culture.
\lipsum[1]

\subsubsection{Overview of the Internship}
% TODO: High-level summary of what you worked on, what you learned, the
% main projects you contributed to, and the technologies involved.
\lipsum[2]

\subsection{Internship Description}

\subsubsection{Onboarding and Environment Setup}
% TODO: Describe accounts/access granted, repository setup, internal tools
% (issue tracker, code review, communication), coding standards introduced.
\lipsum[3]

\subsubsection{Project 1: \textit{Project Title}}
% TODO: Goal, your role, technologies used, what you built/changed, results.
\lipsum[4]

\subsubsection{Project 2: \textit{Project Title}}
% TODO: As above.
\lipsum[5]

\subsubsection{Project 3: \textit{Project Title}}
% TODO: As above.
\lipsum[6]

\subsubsection{Additional Tasks and Contributions}
% TODO: Bug fixes, research spikes, small features, code reviews you did.
\lipsum[7]

\subsection{Conclusion}
% TODO: What you learned, soft skills, hard skills, how it relates to the
% curriculum, what you would do differently next time.
\lipsum[8]

\newpage
\subsection{Appendices}
% Put screenshots, diagrams and supporting files here. Reference them
% from the body with \autoref{fig:label}.

\subsubsection*{Appendix A — Architecture Diagram}
% TODO: replace placeholder with your own diagram.
\begin{figure}[H]
  \centering
  \fbox{\rule{0pt}{6cm}\rule{12cm}{0pt}}
  \caption{Placeholder — replace with system / architecture diagram.}
  \label{fig:architecture}
\end{figure}

\subsubsection*{Appendix B — Screenshots}
% TODO: paste application screenshots here.
\begin{figure}[H]
  \centering
  \fbox{\rule{0pt}{5cm}\rule{10cm}{0pt}}
  \caption{Placeholder — replace with screenshot of feature X.}
  \label{fig:screenshot-x}
\end{figure}

\subsubsection*{Appendix C — Code Listings}
% TODO: include short code snippets relevant to the report.
\begin{verbatim}
// Replace with your own snippet.
function example() {
  return "Hello from AYBU SENG internship!";
}
\end{verbatim}

\subsubsection*{Appendix D — Links \& References}
\begin{itemize}
  \item Project repository: \texttt{https://github.com/your-org/your-repo}
  \item Live demo (if any): \texttt{https://example.com}
  \item Internal docs / wiki: \texttt{https://example.com/wiki}
\end{itemize}

\end{document}
