<?php

/*
 * Case Study Header Partial
 * ─────────────────────────────────────────────────────────────────
 * Requires the following variables set by the calling page BEFORE
 * requiring this file:
 *
 *   $cs_slug   string   Key into $projects, e.g. 'thompson'
 *
 * Everything else ($title, $description, hero content) is read from
 * $projects[$cs_slug] in data/projects.php.
 * ─────────────────────────────────────────────────────────────────
 */

$extra_css   = '/css/portfolio.css';
require __DIR__ . '/../data/projects.php';
$p           = $projects[$cs_slug];
$title       = $p['page_title'];
$description = $p['page_desc'];
require __DIR__ . '/header.php';
?>

<div class="cs-breadcrumb">
	<a href="/portfolio" class="cs-back">← All Work</a>
	<span class="cs-breadcrumb-label">[<?= htmlspecialchars($p['num']) ?> / <?= htmlspecialchars($p['code']) ?>]</span>
</div>

<header class="hero">
	<div class="hero-label">Case Study — <?= htmlspecialchars($p['num']) ?></div>
	<h1><?= htmlspecialchars($p['h1'][0]) ?><br><span class="h1-sub"><?= htmlspecialchars($p['h1'][1]) ?></span></h1>
	<p class="hero-sub"><?= htmlspecialchars($p['sub']) ?></p>
	<ul class="cs-meta-bar">
		<li><?= htmlspecialchars($p['stack']) ?></li>
		<li><?= htmlspecialchars($p['location']) ?></li>
		<li><?= htmlspecialchars($p['year']) ?></li>
	</ul>
</header>
