/* =========================================================
   UI Refinement Layer — Mobile Glassmorphism (Poppins)
   Loaded after app.css. Pure CSS, no build step required.
   ========================================================= */

:root{
  --ui-primary:#3B82F6;
  --ui-grad-from:#60A5FA;
  --ui-grad-to:#2563EB;
  --ui-bg:#F8FAFF;
  --ui-text:#111827;
  --ui-ink:#0F172A;
  --ui-sub:#64748B;
  --ui-line:rgba(255,255,255,.7);
  --ui-glass:rgba(255,255,255,.55);
  --ui-shadow:0 15px 40px rgba(66,133,244,.12);
  --ui-shadow-sm:0 8px 22px rgba(66,133,244,.10);
  --ui-shadow-lg:0 22px 55px rgba(66,133,244,.16);
  --ui-glow:0 0 0 1px rgba(255,255,255,.6), 0 10px 30px rgba(59,130,246,.22);
  --r-nav:24px;
  --r-card:28px;
  --r-icon:20px;
}

html{ -webkit-text-size-adjust:100%; }
body{
  font-family:"Poppins",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-weight:400;
  color:var(--ui-text);
  background:var(--ui-bg);
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(38rem 26rem at 12% -6%, rgba(96,165,250,.30) 0%, rgba(96,165,250,0) 62%),
    radial-gradient(30rem 24rem at 100% 8%, rgba(147,197,253,.32) 0%, rgba(147,197,253,0) 60%),
    radial-gradient(34rem 26rem at 50% 108%, rgba(96,165,250,.22) 0%, rgba(96,165,250,0) 62%),
    linear-gradient(180deg,#F8FAFF 0%,#EEF4FF 45%,#F8FAFF 100%);
}
body.bg-mesh{ background:var(--ui-bg); }

/* ---------- Glass primitives ---------- */
.glass-card{
  background:var(--ui-glass);
  border:1px solid rgba(255,255,255,.8);
  backdrop-filter:blur(25px) saturate(160%);
  box-shadow:var(--ui-shadow);
  border-radius:var(--r-card);
  position:relative;
  overflow:hidden;
}
.glass-card::after{ /* glass reflection */
  content:"";
  position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(140deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,0) 38%);
  opacity:.7;
}
.glass-card > *{ position:relative; z-index:1; }

/* ---------- Header / Navbar ---------- */
header.sticky{ padding:14px 16px 0; }
header.sticky > nav.glass-card{
  border-radius:var(--r-nav);
  padding:12px 14px;
  gap:10px;
  min-height:60px;
  box-shadow:0 12px 34px rgba(66,133,244,.13);
}
.logo-badge{
  width:38px;height:38px;flex:0 0 38px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:14px;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 6px 18px rgba(59,130,246,.25);
}
.logo-letter{
  font-weight:700;font-size:20px;line-height:1;
  background:linear-gradient(135deg,var(--ui-grad-from),var(--ui-grad-to));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
header.sticky nav a > span.truncate{
  font-size:20px;font-weight:700;letter-spacing:-.01em;
  color:var(--ui-grad-to);
}
.icon-btn{
  width:44px;height:44px;flex:0 0 44px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.85);
  color:var(--ui-primary);
  box-shadow:var(--ui-shadow-sm);
  transition:transform .2s ease, box-shadow .2s ease;
}
.icon-btn:active{ transform:scale(.94); }
.icon-btn:hover{ box-shadow:var(--ui-glow); }

/* ---------- Main spacing ---------- */
main#main{ padding-left:16px; padding-right:16px; padding-top:14px; padding-bottom:120px; }
main#main > section{ margin-top:16px; }
main#main > section:first-of-type{ margin-top:14px; }

/* ---------- Hero ---------- */
.hero-card{ border-radius:30px; padding:18px; text-align:left; }
.hero-card > .grid{ display:block; position:relative; }
.hero-card > .grid > .min-w-0{ position:relative; z-index:2; }
.hero-card > .grid > .flex.justify-center{
  position:absolute; top:6px; right:0; z-index:1;
}
.hero-badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 13px;border-radius:999px;
  background:rgba(255,255,255,.75);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 8px 20px rgba(59,130,246,.16);
  font-size:12px;font-weight:500;color:#475569;
}
#hero-title{
  margin-top:12px;max-width:100%;
  font-size:21px;line-height:1.2;font-weight:700;letter-spacing:-.02em;
  color:var(--ui-ink);
  gap:6px;flex-wrap:nowrap;white-space:nowrap;
}
.verified-badge{ color:var(--ui-primary); display:inline-flex;flex:0 0 auto; filter:drop-shadow(0 4px 10px rgba(59,130,246,.45)); }
.verified-badge svg{ width:19px;height:19px; }
.hero-card .text-brand-500{
  margin-top:5px;
  font-size:13.5px;font-weight:600;white-space:nowrap;
  background:linear-gradient(90deg,var(--ui-grad-from),var(--ui-grad-to));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero-card p.text-slate-500{
  margin-top:12px;max-width:215px;
  font-size:13px;line-height:1.6;color:var(--ui-sub);font-weight:400;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}

/* Buttons */
.btn-primary,.btn-outline{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  border-radius:999px;font-weight:600;font-size:13px;white-space:nowrap;
  padding:12px 18px;line-height:1;
  transition:transform .18s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-primary{
  background:linear-gradient(135deg,var(--ui-grad-from),var(--ui-grad-to));
  color:#fff;border:1px solid rgba(255,255,255,.35);
  box-shadow:0 12px 26px rgba(37,99,235,.38);
}
.btn-primary:hover{ box-shadow:0 16px 34px rgba(37,99,235,.5); filter:brightness(1.04); }
.btn-primary:active{ transform:scale(.96); }
.btn-outline{
  background:rgba(255,255,255,.85);
  color:#334155;border:1px solid rgba(255,255,255,.9);
  box-shadow:var(--ui-shadow-sm);
}
.btn-outline:hover{ box-shadow:var(--ui-glow); }
.btn-outline:active{ transform:scale(.96); }
.btn-lg{ padding:12px 18px;font-size:13px; }
.hero-card .btn-primary svg,.hero-card .btn-outline svg{ width:17px;height:17px; }
.hero-card .mt-6{ margin-top:16px;gap:9px;flex-wrap:nowrap; }
.hero-card ul.mt-4{ margin-top:16px;gap:9px;flex-wrap:nowrap; }

/* Social */
.social-btn{
  width:44px;height:44px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.85);
  color:#475569;
  box-shadow:0 8px 20px rgba(66,133,244,.13);
  transition:transform .2s ease, box-shadow .25s ease, color .2s ease;
}
.social-btn:hover{ color:var(--ui-primary); box-shadow:0 10px 26px rgba(59,130,246,.3); transform:translateY(-2px); }
.social-btn:active{ transform:scale(.94); }

/* Avatar */
.avatar-ring{
  position:relative;
  width:126px;height:126px;flex:0 0 126px;
  border-radius:999px;
  padding:6px;
  background:linear-gradient(160deg,rgba(255,255,255,.95),rgba(219,234,254,.85));
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 0 0 6px rgba(219,234,254,.45), 0 18px 40px rgba(59,130,246,.35);
  animation:ui-float 5.5s ease-in-out infinite;
}
.avatar-img{
  width:100%;height:100%;border-radius:999px;object-fit:cover;
  border:3px solid #fff;
  background:#eaf1ff;
}
.online-dot{
  position:absolute;right:6px;bottom:10px;
  width:18px;height:18px;border-radius:999px;
  background:#22C55E;border:3px solid #fff;
  box-shadow:0 0 0 3px rgba(34,197,94,.22), 0 4px 10px rgba(34,197,94,.45);
}
@keyframes ui-float{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* ---------- Stats ---------- */
.stats-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
}
.stats-grid > *{ position:relative; padding:2px 4px; }
.stats-grid > * + *::before{
  content:"";position:absolute;left:0;top:8%;height:84%;width:1px;
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(148,163,184,.35),rgba(255,255,255,0));
}
.soft-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:var(--r-icon);
  background:rgba(255,255,255,.85);
  border:1px solid rgba(255,255,255,.9);
  color:var(--ui-primary);
  box-shadow:0 8px 20px rgba(66,133,244,.18);
}
.soft-icon svg{ width:20px;height:20px; }
.soft-icon-lg{ width:44px;height:44px; }
.accent-green{ color:#22C55E; box-shadow:0 8px 20px rgba(34,197,94,.18); }
.accent-violet{ color:#8B5CF6; box-shadow:0 8px 20px rgba(139,92,246,.18); }
.accent-amber{ color:#F59E0B; box-shadow:0 8px 20px rgba(245,158,11,.18); }
.accent-rose{ color:#F43F5E; box-shadow:0 8px 20px rgba(244,63,94,.18); }
.accent-cyan{ color:#06B6D4; box-shadow:0 8px 20px rgba(6,182,212,.18); }
.stat-value{ font-size:21px;font-weight:700;color:var(--ui-grad-to);line-height:1.1;letter-spacing:-.01em; }
.stat-label{ font-size:9.5px;text-transform:none;letter-spacing:0;overflow-wrap:anywhere;color:var(--ui-sub);font-weight:400;text-align:center;line-height:1.3; }

/* ---------- Section head ---------- */
main#main section > .mb-4 h2,
main#main section h2{ font-size:19px;font-weight:700;color:var(--ui-ink);letter-spacing:-.01em; }
.btn-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:9px 14px;border-radius:999px;font-size:12.5px;font-weight:500;color:#475569;
  background:rgba(255,255,255,.8);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:var(--ui-shadow-sm);
  transition:transform .2s ease, box-shadow .25s ease;
}
.btn-pill svg{ width:15px;height:15px;color:var(--ui-primary); }
.btn-pill:hover{ box-shadow:var(--ui-glow); }
.btn-pill:active{ transform:scale(.96); }

/* ---------- Horizontal scroller ---------- */
.h-scroll{
  display:flex;gap:12px;
  overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding-bottom:4px;
  margin:0 -4px;padding-left:4px;padding-right:4px;
}
.h-scroll::-webkit-scrollbar{ display:none; }
.h-scroll{ scrollbar-width:none; }
.h-scroll > *{ scroll-snap-align:start;flex:0 0 auto; }

/* ---------- Service card ---------- */
.service-card{
  width:100%;
  border-radius:22px;padding:16px;
  background:rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.9);
  backdrop-filter:blur(18px);
  box-shadow:0 12px 30px rgba(66,133,244,.12);
  transition:transform .25s ease, box-shadow .3s ease;
}
.service-card:hover{ transform:translateY(-3px); box-shadow:0 18px 40px rgba(59,130,246,.22); }
.service-card h3{ margin-top:14px;font-size:14.5px;font-weight:600;color:var(--ui-ink); }
.service-card p{ margin-top:8px;font-size:12.5px;line-height:1.6;color:var(--ui-sub); }
.link-more{
  display:inline-flex;align-items:center;gap:6px;margin-top:14px;
  font-size:12.5px;font-weight:600;color:var(--ui-primary);
}
.link-more svg{ width:14px;height:14px;transition:transform .2s ease; }
.link-more:hover svg{ transform:translateX(3px); }

/* ---------- Project card ---------- */
.project-card{
  display:flex;align-items:stretch;gap:0;
  width:100%;
  border-radius:22px;overflow:hidden;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.9);
  backdrop-filter:blur(18px);
  box-shadow:0 12px 30px rgba(66,133,244,.12);
  transition:transform .25s ease, box-shadow .3s ease;
}
.project-card:hover{ transform:translateY(-3px); box-shadow:0 18px 42px rgba(59,130,246,.2); }
.project-thumb{ width:132px;flex:0 0 132px;overflow:hidden;background:#e8eefc; }
.project-thumb img{ width:100%;height:100%;object-fit:cover; }
.project-card > div.min-w-0{ padding:12px 14px; }
.chip-cat{
  display:inline-block;padding:5px 10px;border-radius:999px;
  font-size:9.5px;font-weight:600;letter-spacing:.06em;
  color:var(--ui-grad-to);background:rgba(219,234,254,.85);
}
.project-card h3{ margin-top:8px;font-size:14.5px;font-weight:600;color:var(--ui-ink); }
.project-card p{ margin-top:5px;font-size:12px;line-height:1.55;color:var(--ui-sub); }
.btn-demo{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 12px;border-radius:999px;
  font-size:12px;font-weight:600;color:var(--ui-grad-to);
  background:rgba(219,234,254,.7);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:0 6px 16px rgba(59,130,246,.16);
  transition:transform .2s ease, box-shadow .25s ease;
}
.btn-demo svg{ width:14px;height:14px; }
.btn-demo:active{ transform:scale(.96); }
.btn-ghost-sm{
  display:inline-flex;align-items:center;
  padding:8px 12px;border-radius:999px;font-size:12px;font-weight:500;color:#64748B;
  background:rgba(255,255,255,.8);border:1px solid rgba(255,255,255,.9);
}

.h-scroll > .service-card{ width:214px; }
.h-scroll > .project-card{ width:300px; }

/* ---------- Testimonial / misc cards ---------- */
.testimonial-card,.cta-card{
  border-radius:22px;
}
.testimonial-card{
  background:rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.9);
  padding:16px;
  box-shadow:0 12px 30px rgba(66,133,244,.12);
}

/* ---------- Bottom navigation ---------- */
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  padding:0 14px calc(12px + env(safe-area-inset-bottom));
  pointer-events:none;
}
.bottom-nav > .glass-card{
  pointer-events:auto;
  border-radius:28px;
  padding:10px 6px;
  box-shadow:0 -6px 30px rgba(66,133,244,.14), 0 15px 40px rgba(66,133,244,.12);
}
.bottom-item{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  flex:1 1 0;min-width:0;
  font-size:10.5px;font-weight:500;color:#94A3B8;
  border-radius:18px;padding:4px 2px;
  transition:color .2s ease, transform .2s ease;
}
.bottom-item svg{ width:22px;height:22px; }
.bottom-item:active{ transform:scale(.94); }
.bottom-item.is-active{ color:var(--ui-primary);font-weight:600; }
.bottom-item.is-active svg{
  color:var(--ui-primary);
  fill:rgba(59,130,246,.16);
  filter:drop-shadow(0 6px 14px rgba(59,130,246,.5));
}

/* ---------- Animations ---------- */
.reveal{ opacity:0;transform:translateY(16px);transition:opacity .6s ease,transform .6s ease; }
.reveal.is-visible,.reveal.revealed,.no-js .reveal{ opacity:1;transform:none; }
@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none}
  .avatar-ring{animation:none}
}

/* ---------- Desktop upgrades ---------- */
@media (min-width:640px){
  main#main{ padding-left:24px;padding-right:24px; }
  .hero-card > .grid > .flex.justify-center{ position:static; }
  #hero-title{ font-size:36px;white-space:normal;flex-wrap:wrap; }
  .hero-card .text-brand-500{ font-size:18px; }
  .hero-card p.text-slate-500{ font-size:15px; }
  .hero-card > .grid{ display:flex;align-items:center;gap:28px; }
  .hero-card p.text-slate-500{ max-width:28rem; }
  .stat-label{ font-size:12px; }
  .hero-card{ padding:28px; }
  #hero-title{ font-size:40px; }
  .avatar-ring{ width:180px;height:180px;flex-basis:180px; }
  .service-card{ width:auto; }
  .project-card{ width:auto; }
  .h-scroll{ display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:16px; }
  .stat-value{ font-size:26px; }
}
@media (min-width:1024px){
  main#main{ padding-bottom:64px; }
  .h-scroll{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hero-card > .grid{ grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:32px; }
  .avatar-ring{ width:300px;height:300px;flex-basis:300px;margin-inline:auto; }
  #hero-title{ font-size:48px; }
}

/* =========================================================
   Motion Layer — Fade In, Floating, Hover Glow, Scale,
   Glass Reflection, Scroll Reveal
   ========================================================= */

/* --- Fade in on load (above the fold, no observer needed) --- */
@keyframes ui-fade-in-up{ from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }
@keyframes ui-fade-in{ from{opacity:0} to{opacity:1} }
@keyframes ui-fade-in-down{ from{opacity:0;transform:translateY(-12px)} to{opacity:1;transform:none} }

header.sticky > nav.glass-card{ animation:ui-fade-in-down .5s ease-out both; }
.hero-card{ animation:ui-fade-in-up .6s ease-out both; }
.bottom-nav > .glass-card{ animation:ui-fade-in-up .5s ease-out .12s both; }
.hero-card .hero-badge{ animation:ui-fade-in-up .5s ease-out .1s both; }
.hero-card #hero-title{ animation:ui-fade-in-up .5s ease-out .18s both; }
.hero-card .mt-6, .hero-card ul.mt-4{ animation:ui-fade-in-up .5s ease-out .26s both; }

/* --- Scroll reveal (observer adds .is-visible) --- */
.reveal{
  opacity:0;
  transform:translateY(22px) scale(.985);
  transition:opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
  will-change:opacity, transform;
}
.reveal.is-visible,.reveal.revealed,.no-js .reveal{ opacity:1;transform:none; }
/* stagger children of a revealed grid/scroller */
.reveal.is-visible .h-scroll > *,
.reveal.is-visible .stats-grid > *,
.reveal.is-visible .grid > *{ animation:ui-fade-in-up .5s ease-out both; }
.reveal.is-visible .h-scroll > *:nth-child(1),
.reveal.is-visible .stats-grid > *:nth-child(1),
.reveal.is-visible .grid > *:nth-child(1){ animation-delay:.05s; }
.reveal.is-visible .h-scroll > *:nth-child(2),
.reveal.is-visible .stats-grid > *:nth-child(2),
.reveal.is-visible .grid > *:nth-child(2){ animation-delay:.12s; }
.reveal.is-visible .h-scroll > *:nth-child(3),
.reveal.is-visible .stats-grid > *:nth-child(3),
.reveal.is-visible .grid > *:nth-child(3){ animation-delay:.19s; }
.reveal.is-visible .h-scroll > *:nth-child(n+4),
.reveal.is-visible .stats-grid > *:nth-child(n+4),
.reveal.is-visible .grid > *:nth-child(n+4){ animation-delay:.26s; }
/* hero grid must not be re-animated (it owns absolute positioning on mobile) */
.hero-card .grid > *{ animation:none !important; }

/* --- Floating avatar (+ soft aura pulse) --- */
.avatar-ring{ animation:ui-float 5.5s ease-in-out infinite; will-change:transform; }
.avatar-ring::before{
  content:"";position:absolute;inset:-14px;border-radius:999px;z-index:-1;
  background:radial-gradient(circle,rgba(59,130,246,.28) 0%,rgba(59,130,246,0) 70%);
  animation:ui-aura 4.5s ease-in-out infinite;
}
@keyframes ui-aura{ 0%,100%{opacity:.55;transform:scale(1)} 50%{opacity:.95;transform:scale(1.07)} }
.online-dot{ animation:ui-pulse-dot 2.4s ease-in-out infinite; }
@keyframes ui-pulse-dot{
  0%,100%{ box-shadow:0 0 0 3px rgba(34,197,94,.22), 0 4px 10px rgba(34,197,94,.45); }
  50%{ box-shadow:0 0 0 7px rgba(34,197,94,.10), 0 4px 14px rgba(34,197,94,.55); }
}

/* --- Hover glow (works on touch via :active too) --- */
.glass-card,.service-card,.project-card,.testimonial-card,.soft-icon,.chip-cat{
  transition:transform .28s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, filter .3s ease;
}
.service-card:hover,.project-card:hover,.testimonial-card:hover,
.service-card:focus-within,.project-card:focus-within{
  transform:translateY(-4px);
  box-shadow:0 20px 44px rgba(59,130,246,.26);
  border-color:rgba(147,197,253,.9);
}
.service-card:active,.project-card:active{ transform:scale(.985); }
.service-card:hover .soft-icon,.project-card:hover .chip-cat{
  box-shadow:0 10px 26px rgba(59,130,246,.36);
}
.btn-primary:hover{ box-shadow:0 18px 38px rgba(37,99,235,.52), 0 0 0 4px rgba(59,130,246,.14); }
.btn-outline:hover,.btn-pill:hover,.icon-btn:hover,.btn-demo:hover{
  box-shadow:0 12px 28px rgba(59,130,246,.30), 0 0 0 3px rgba(59,130,246,.10);
  color:var(--ui-primary);
}
a:focus-visible,button:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(59,130,246,.35);
  border-radius:14px;
}

/* --- Scale on press (all interactive elements) --- */
.btn-primary,.btn-outline,.btn-pill,.btn-demo,.btn-ghost-sm,.icon-btn,
.social-btn,.bottom-item,.link-more,.chip-cat,.mobile-link{
  transition:transform .16s cubic-bezier(.34,1.4,.64,1), box-shadow .25s ease, color .2s ease, background .25s ease;
  -webkit-tap-highlight-color:transparent;
}
.btn-primary:active,.btn-outline:active,.btn-pill:active,.btn-demo:active,
.btn-ghost-sm:active,.icon-btn:active,.social-btn:active,.mobile-link:active{ transform:scale(.94); }
.bottom-item:active{ transform:scale(.9); }
.link-more:active{ transform:scale(.96); }

/* --- Glass reflection sweep --- */
.glass-card::before{
  content:"";
  position:absolute;top:0;bottom:0;left:-60%;width:45%;
  pointer-events:none;z-index:0;
  background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 100%);
  transform:skewX(-18deg);
  opacity:0;
}
.glass-card.is-visible::before,
.hero-card::before,
.bottom-nav > .glass-card::before{
  animation:ui-sheen 4.8s ease-in-out .6s infinite;
}
@keyframes ui-sheen{
  0%{ left:-60%;opacity:0 }
  12%{ opacity:.85 }
  38%{ left:120%;opacity:0 }
  100%{ left:120%;opacity:0 }
}
.service-card:hover::after,.project-card:hover::after{ opacity:1; }

/* --- Bottom navigation active state --- */
.bottom-item{ position:relative; }
.bottom-item.is-active{ color:var(--ui-primary);font-weight:600; }
.bottom-item.is-active::before{
  content:"";
  position:absolute;inset:-2px 2px;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(219,234,254,.95),rgba(191,219,254,.55));
  box-shadow:0 8px 20px rgba(59,130,246,.28), inset 0 1px 0 rgba(255,255,255,.9);
  z-index:0;
  animation:ui-fade-in .25s ease-out both;
}
.bottom-item.is-active > *{ position:relative;z-index:1; }
.bottom-item.is-active svg{
  color:var(--ui-primary);
  stroke:var(--ui-primary);
  fill:rgba(59,130,246,.14);
  filter:drop-shadow(0 5px 12px rgba(59,130,246,.55));
}
.bottom-item.is-active span{ color:var(--ui-grad-to); }

/* --- Reduced motion --- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation:none !important;transition:none !important; }
  .reveal{ opacity:1 !important;transform:none !important; }
}

/* =========================================================
   Responsive hardening — 360px, 414px, landscape
   ========================================================= */
main#main,header.sticky,.bottom-nav{ max-width:100vw; }
img,svg,video{ max-width:100%; }
.stat-value,.stat-label,#hero-title,.service-card h3,.project-card h3{ overflow-wrap:anywhere; }

@media (max-width:374px){
  main#main{ padding-left:12px;padding-right:12px; }
  header.sticky{ padding:10px 12px 0; }
  .bottom-nav{ padding:0 10px calc(10px + env(safe-area-inset-bottom)); }
  #hero-title{ font-size:18px; }
  .hero-card p.text-slate-500{ max-width:180px;font-size:12px; }
  .avatar-ring{ width:104px;height:104px;flex-basis:104px; }
  .btn-primary,.btn-outline{ padding:10px 14px;font-size:12px; }
  .stat-value{ font-size:17px; }
  .stat-label{ font-size:8.5px; }
  .soft-icon{ width:36px;height:36px; }
  .soft-icon svg{ width:17px;height:17px; }
  .bottom-item{ font-size:9px; }
  .bottom-item svg{ width:20px;height:20px; }
  .h-scroll > .service-card{ width:190px; }
  .h-scroll > .project-card{ width:262px; }
  .project-thumb{ width:104px;flex-basis:104px; }
}

@media (min-width:375px) and (max-width:413px){
  .avatar-ring{ width:118px;height:118px;flex-basis:118px; }
  .hero-card p.text-slate-500{ max-width:198px; }
}

@media (min-width:414px) and (max-width:639px){
  #hero-title{ font-size:23px; }
  .avatar-ring{ width:136px;height:136px;flex-basis:136px; }
  .hero-card p.text-slate-500{ max-width:238px; }
  .h-scroll > .service-card{ width:236px; }
  .h-scroll > .project-card{ width:330px; }
  .stat-value{ font-size:22px; }
  .stat-label{ font-size:10.5px; }
}

/* Landscape phones: short viewport, wide screen */
@media (max-height:500px) and (orientation:landscape){
  header.sticky{ position:static; }
  main#main{ padding-bottom:96px; }
  .hero-card > .grid{ display:flex;align-items:center;gap:20px; }
  .hero-card > .grid > .flex.justify-center{ position:static; }
  .hero-card p.text-slate-500{ max-width:100%; }
  #hero-title{ white-space:normal;flex-wrap:wrap;font-size:22px; }
  .avatar-ring{ width:112px;height:112px;flex-basis:112px;animation:none; }
  .bottom-nav{ padding:0 12px calc(8px + env(safe-area-inset-bottom)); }
  .bottom-nav > .glass-card{ padding:6px 6px; }
  .bottom-item{ flex-direction:row;gap:7px;font-size:11px;padding:7px 8px; }
  .bottom-item svg{ width:18px;height:18px; }
  main#main > section{ margin-top:12px; }
}

/* Safety net: never leave content invisible on short landscape viewports */
@media (max-height:520px) and (orientation:landscape){
  .reveal{ opacity:1;transform:none;transition:none; }
}
