<?php
require_once __DIR__ . '/../../config/db.php';
$pdo = db();
$p = $pdo->query("SELECT * FROM profile ORDER BY id DESC LIMIT 1")->fetch();
?>
<section class="hero bg-body">
  <div class="container py-5">
    <div class="row align-items-center g-4">
      <div class="col-md-4 text-center">
        <img class="rounded-4 shadow card-cover w-100" src="<?php echo e($p['photo'] ?: 'https://picsum.photos/600/400'); ?>" alt="Foto">
      </div>
      <div class="col-md-8">
        <h1 class="display-5 fw-bold"><?php echo e($p['full_name'] ?? 'Nama Anda'); ?></h1>
        <p class="lead text-muted"><?php echo e($p['headline'] ?? 'Headline singkat'); ?></p>
        <p class="fs-5" style="text-align:justify;"><?php echo nl2br(e($p['bio'] ?? 'Tuliskan bio singkat Anda.')); ?></p>
        <a href="<?php echo e(base_url('../admin/login.php')) ?>" class="btn btn-outline-primary btn-lg">Kelola Konten</a>
      </div>
    </div>
  </div>
</section>
