ص.,بيمسب<dsadaiosdhioas

يصبصث
34@
324
23

2
شي
شسيي
سششسي
يشسي
شي
س
تنم؟؟؟؟.:نمنت
5453::





$wa = wa_link(); $mail = s('email'); $phone = s('phone');
$groups = [];
foreach ($skills as $k) { $groups[$k['grp']][] = $k['name']; }
$photoHero = s('photo_hero'); $photoAbout = s('photo_about');
?><!doctype html>
<html lang="<?= lang() ?>" dir="<?= is_rtl() ? 'rtl' : 'ltr' ?>">
<head>
<?php page_head(s('seo_title'), s('seo_desc'), null, full_url(''), true); ?>
<?php if ($photoHero): ?><link rel="preload" as="image" href="<?= e(upload_url(preg_replace('/\.webp$/', '-800.webp', $photoHero))) ?>" media="(max-width:899px)" fetchpriority="low"><?php endif; ?>
</head>
<body class="home">
<?php site_header(true); ?>
<main id="main">
<div id="top"></div>

<!-- ============ مشهد السكرول ثلاثي الأبعاد ============ -->
<section id="story" aria-label="<?= e(s('owner_name')) ?>">
 <div class="stage">
  <div class="gridbg"></div>
  <canvas class="gl" aria-hidden="true"></canvas>
  <div class="fb" aria-hidden="true"><i class="slab" style="--i:0"></i><i class="slab" style="--i:1"></i><i class="slab" style="--i:2"></i><i class="slab" style="--i:3"></i><i class="slab" style="--i:4"></i></div>
  <div class="portrait"><?= img($photoHero, s('owner_name'), '', '(min-width:900px) 55vw,100vw', 'fetchpriority="low"') ?></div>
  <div class="dark"></div>
  <div class="hero">
    <small class="kick"><?= e(s('hero_kicker')) ?></small>
    <h1><span><?= e(s('hero_line1')) ?></span><span><?= e(s('hero_line2')) ?></span></h1>
    <p><?= e(s('hero_sub')) ?></p>
    <a class="btn pri" href="#projects" id="explore"><?= e(s('hero_cta')) ?></a>
  </div>
  <div class="hint" aria-hidden="true"><?= e(s('scroll_hint')) ?><i></i></div>
  <div class="cap" aria-live="polite"><small id="cn"></small><h2 id="ct"></h2><p id="cp"></p></div>
  <div class="info">
    <small><?= e(s('job_title')) ?></small>
    <h2><?= e(s('owner_name')) ?></h2>
    <p><?= e(s('info_text')) ?></p>
    <div class="acts"><a class="btn pri" href="#projects"><?= e(__('explore_projects')) ?></a><a class="btn" href="#contact"><?= e(__('contact_me')) ?></a></div>
  </div>
 </div>
</section>

<!-- ============ أرقام ============ -->
<section class="stats sec" aria-label="stats">
  <div class="st rv"><b data-to="<?= count($projects) ?>">0</b><span><?= e(__('stat_projects')) ?></span></div>
  <div class="st rv" style="--d:.08s"><b data-to="<?= count($skills) ?>">0</b><span><?= e(__('stat_tech')) ?></span></div>
  <div class="st rv" style="--d:.16s"><b data-to="<?= count($services) ?>">0</b><span><?= e(__('stat_services')) ?></span></div>
  <div class="st rv" style="--d:.24s"><b data-to="<?= count($exp) ?>">0</b><span><?= e(__('stat_exp')) ?></span></div>
</section>

<!-- ============ المشاريع ============ -->
<section id="projects" class="sec">
  <div class="sh rv"><small>01</small><h2><?= e(s('projects_title')) ?></h2><p><?= e(s('projects_sub')) ?></p></div>
  <?php if (count($presentCats) > 1): ?>
  <div class="chips rv" role="tablist"><button type="button" class="on" data-f="*"><?= e(__('all')) ?></button><?php foreach ($presentCats as $c): ?><button type="button" data-f="<?= e($c) ?>"><?= e($cats[$c] ?? $c) ?></button><?php endforeach; ?></div>
  <?php endif; ?>
  <?php if (!$projects): ?><p class="muted"><?= e(__('empty_projects')) ?></p><?php endif; ?>
  <div class="pgrid">
  <?php foreach ($projects as $i => $p): $a = hex_or((string) $p['accent'], '#ffb02e'); ?>
    <a class="pc rv<?= $p['is_featured'] ? ' ft' : '' ?>" href="<?= e(url('project/' . $p['slug'])) ?>" data-cat="<?= e($p['category']) ?>" style="--a:<?= e($a) ?>">
      <div class="pc-m"><?= cover($p, '', $p['is_featured'] ? '(min-width:1100px) 60vw,(min-width:700px) 50vw,33vw' : '(min-width:1100px) 33vw,(min-width:700px) 50vw,33vw') ?></div>
      <div class="pc-b">
        <small><?= e(($cats[$p['category']] ?? '') . ($p['year'] ? ' · ' . $p['year'] : '')) ?></small>
        <h3><?= e(t($p, 'title')) ?></h3>
        <p><?= e(t($p, 'tagline')) ?></p>
        <?php if ($p['tech']): ?><div class="tags"><?php foreach (array_slice(array_map('trim', explode(',', (string) $p['tech'])), 0, 4) as $tg): ?><span><?= e($tg) ?></span><?php endforeach; ?></div><?php endif; ?>
        <span class="more"><?= e(__('view_project')) ?> <i class="ar" aria-hidden="true">→</i></span>
      </div>
      <i class="glare" aria-hidden="true"></i>
    </a>
  <?php endforeach; ?>
  </div>
</section>

<!-- ============ المهارات ============ -->
<section id="skills" class="sec">
  <div class="sh rv"><small>02</small><h2><?= e(s('skills_title')) ?></h2></div>
  <div class="mq" aria-hidden="true"><div class="mq-t"><?php for ($r = 0; $r < 2; $r++): foreach ($skills as $k): ?><span><?= e($k['name']) ?></span><?php endforeach; endfor; ?></div></div>
  <div class="sk-grid">
  <?php foreach ($groups as $g => $names): ?>
    <div class="sk rv"><h3><?= e($grps[$g] ?? $g) ?></h3><div class="tags"><?php foreach ($names as $nm): ?><span><?= e($nm) ?></span><?php endforeach; ?></div></div>
  <?php endforeach; ?>
  </div>
</section>

<!-- ============ الخدمات ============ -->
<section id="services" class="sec">
  <div class="sh rv"><small>03</small><h2><?= e(s('services_title')) ?></h2></div>
  <ol class="svc">
  <?php foreach ($services as $i => $v): ?>
    <li class="rv"><span class="n"><?= sprintf('%02d', $i + 1) ?></span><div><h3><?= e(t($v, 'title')) ?></h3><p><?= e(t($v, 'desc')) ?></p></div></li>
  <?php endforeach; ?>
  </ol>
</section>

<!-- ============ من أنا ============ -->
<section id="about" class="sec">
  <div class="sh rv"><small>04</small><h2><?= e(s('about_title')) ?></h2></div>
  <div class="ab">
    <div class="ab-ph rv" id="tilt">
      <div class="frame"><?= img($photoAbout, s('owner_name'), '', '(min-width:900px) 40vw,90vw', 'loading="lazy"') ?><i class="glare" aria-hidden="true"></i></div>
      <span class="badge b1"><?= e(s('job_title')) ?></span>
      <?php if (s('location')): ?><span class="badge b2"><?= e(s('location')) ?></span><?php endif; ?>
    </div>
    <div class="ab-tx">
      <p class="lead rv"><?= e(s('about_text')) ?></p>
      <p class="rv"><?= e(s('about_text2')) ?></p>
      <h3 class="rv sub"><?= e(s('exp_title')) ?></h3>
      <ul class="tl">
      <?php foreach ($exp as $x): ?>
        <li class="rv"><b><?= e(t($x, 'role')) ?></b><?php if (t($x, 'org')): ?><em><?= e(t($x, 'org')) ?><?= $x['period'] ? ' · ' . e($x['period']) : '' ?></em><?php endif; ?><?php if (t($x, 'desc')): ?><p><?= e(t($x, 'desc')) ?></p><?php endif; ?></li>
      <?php endforeach; ?>
      </ul>
    </div>
  </div>
</section>

<!-- ============ تواصل ============ -->
<section id="contact" class="sec">
  <div class="ct">
    <div class="rv">
      <div class="sh"><small>05</small><h2><?= e(s('contact_title')) ?></h2><p><?= e(s('contact_sub')) ?></p></div>
      <div class="clinks">
        <div class="cmain">
          <?php if ($wa): ?><a class="cc cc-wa" href="<?= e($wa) ?>" target="_blank" rel="noopener"><i class="ci"><?= brand_icon('whatsapp', 30) ?></i><span class="ct-t"><small><?= e(__('whatsapp')) ?></small><b dir="ltr">+<?= e(digits(s('whatsapp'))) ?></b></span><i class="ca"><?= brand_icon('arrow', 20) ?></i></a><?php endif; ?>
          <?php if ($phone): ?><a class="cc cc-ph" href="tel:<?= e(preg_replace('/[^\d+]/', '', $phone)) ?>"><i class="ci"><?= brand_icon('phone', 28) ?></i><span class="ct-t"><small><?= e(__('call')) ?></small><b dir="ltr"><?= e($phone) ?></b></span><i class="ca"><?= brand_icon('arrow', 20) ?></i></a><?php endif; ?>
          <?php if ($mail): ?><a class="cc cc-ml" href="mailto:<?= e($mail) ?>"><i class="ci"><?= brand_icon('mail', 28) ?></i><span class="ct-t"><small><?= e(__('email')) ?></small><b dir="ltr"><?= e($mail) ?></b></span><i class="ca"><?= brand_icon('arrow', 20) ?></i></a><?php endif; ?>
        </div>
        <?php $soc = socials(); if ($soc): ?>
        <p class="csl"><?= e(__('follow')) ?></p>
        <div class="csg">
          <?php foreach ($soc as $label => $u): ?><a class="sb sb-<?= e(strtolower($label)) ?>" href="<?= e($u) ?>" target="_blank" rel="noopener" aria-label="<?= e($label) ?>"><i class="si"><?= brand_icon($label, 32) ?></i><span><?= e($label) ?></span></a><?php endforeach; ?>
        </div>
        <?php endif; ?>
      </div>
    </div>
    <form class="cf rv" id="cf" method="post" action="<?= e(url('contact.php')) ?>" novalidate>
      <?= csrf_field() ?>
      <input class="hp" type="text" name="website" tabindex="-1" autocomplete="off" aria-hidden="true">
      <label><span><?= e(__('f_name')) ?></span><input type="text" name="name" required minlength="2" maxlength="120" autocomplete="name"></label>
      <label><span><?= e(__('f_contact')) ?></span><input type="text" name="contact" required minlength="5" maxlength="160" autocomplete="email" dir="ltr"></label>
      <label><span><?= e(__('f_message')) ?></span><textarea name="message" rows="5" required minlength="10" maxlength="4000"></textarea></label>
      <button class="btn pri" type="submit"><?= e(__('f_send')) ?></button>
      <p class="fm" role="status" aria-live="polite"></p>
    </form>
  </div>
</section>
</main>
<?php site_footer(); ?>
<script>window.S=<?= json_encode($js, JSON_HEX_TAG | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>;</script>
<script src="<?= e(asset('js/menu.js')) ?>"></script>
<script src="<?= e(asset('vendor/gsap.min.js')) ?>"></script>
<script src="<?= e(asset('vendor/ScrollTrigger.min.js')) ?>"></script>
<script src="<?= e(asset('vendor/lenis.min.js')) ?>"></script>
<script src="<?= e(asset('js/app.js')) ?>"></script>
</body></html>

4
4
4
4
4
4
4
.
<?php
declare(strict_types=1);
require __DIR__ . '/includes/bootstrap.php';
require __DIR__ . '/includes/partials.php';
track_visit();
$_SESSION['form_t'] = time();

$projects = rows('SELECT * FROM projects WHERE is_active = 1 ORDER BY sort_order, id');
$skills = rows('SELECT * FROM skills WHERE is_active = 1 ORDER BY sort_order, id');
$services = rows('SELECT * FROM services WHERE is_active = 1 ORDER BY sort_order, id');
$exp = rows('SELECT * FROM experience WHERE is_active = 1 ORDER BY sort_order, id');
$cats = __a('cat'); $grps = __a('grp');
$presentCats = array_values(array_unique(array_column($projects, 'category')));
$stages = [];
for ($n = 1; $n <= 8; $n++) { $stages[] = ['title' => s("stage{$n}_title"), 'text' => s("stage{$n}_text")]; }
$js = [
    'stages' => $stages,
    'm' => ['webgl' => s('use_webgl', '1') === '1', 'dvh' => max(500, (int) s('desktop_scroll_vh', '1000')), 'mvh' => max(400, (int) s('mobile_scroll_vh', '780')), 'smooth' => s('smooth_scroll', '1') === '1'],
    'gl' => asset('3d/scene3d.js'),
    'i' => ['sending' => __('f_sending'), 'send' => __('f_send'), 'err' => __('f_err')],
];