<?php

$title = 'Portfolio — Ovidiu Ungureanu';
$description = 'Selected web development projects by Ovidiu Ungureanu.';
$extra_css = '/css/portfolio.css';
require __DIR__.'/includes/header.php';

require __DIR__ . '/data/projects.php';
?>

<header class="hero">
	<div class="hero-label">Portfolio — Selected Work</div>
	<h1>Selected<br>Work</h1>
	<p class="hero-sub">Client projects and builds.</p>
</header>

<section class="section">
	<div class="section-label">001 — <?php
		echo count($projects); ?> Projects
	</div>
	<div class="portfolio-grid">
		<?php
		foreach ($projects as $slug => $p): ?>
			<a href="/portfolio/<?php
			echo htmlspecialchars($slug); ?>/"
			   class="project-card<?php
			   echo $p['live'] ? '' : ' project-card--wip'; ?>">

				<div class="project-card__thumb">
					<span class="project-card__label">[<?php
						echo htmlspecialchars($p['num']); ?> / <?php
						echo htmlspecialchars($p['code']); ?>]</span>
					<?php
					if ($p['thumb']): ?>
						<img src="<?php
						echo htmlspecialchars($p['thumb']); ?>"
							 alt="<?php
							 echo htmlspecialchars($p['title']); ?>"
							 loading="lazy">
					<?php
					endif; ?>
				</div>

				<div class="project-card__body">
					<h3 class="project-card__title"><?php
						echo htmlspecialchars($p['title']); ?></h3>
					<p class="project-card__desc"><?php
						echo htmlspecialchars($p['desc']); ?></p>
					<div class="project-card__footer">
						<span class="project-card__year"><?php
							echo htmlspecialchars($p['year']); ?></span>
						<span class="project-card__arrow">→</span>
					</div>
				</div>

			</a>
		<?php
		endforeach; ?>
	</div>
</section>

<section class="section section-cta">
	<div class="section-label">002 — Contact</div>
	<div class="section-content">
		<p class="large-text">Got a project in mind?</p>
		<a href="mailto:hello@uovidiu.com" class="btn">Let's Talk →</a>
	</div>
</section>

<?php
require __DIR__.'/includes/footer.php'; ?>
