/* =============================================================
   ZHEER PS — Main Stylesheet
   Premium dark portfolio. Palette extracted from the logo:
   navy/black base + cyan, electric blue, pink, magenta, purple, orange.
   ============================================================= */

:root {
  /* Base */
  --bg:          #070a14;
  --bg-2:        #0b1020;
  --surface:     #10162a;
  --surface-2:   #151d36;
  --border:      rgba(255,255,255,.09);
  --border-str:  rgba(255,255,255,.16);

  /* Text */
  --text:        #eaf0ff;
  --text-soft:   #b6c0da;
  --text-dim:    #7c88a8;

  /* Accents (from logo) */
  --cyan:    #22d3ee;
  --blue:    #3b82f6;
  --purple:  #8b5cf6;
  --magenta: #d946ef;
  --pink:    #ec4899;
  --orange:  #f97316;

  --accent:  var(--blue);

  /* Gradients */
  --grad-brand: linear-gradient(120deg, #22d3ee 0%, #3b82f6 30%, #8b5cf6 60%, #ec4899 100%);
  --grad-warm:  linear-gradient(120deg, #ec4899, #f97316);
  --grad-cool:  linear-gradient(120deg, #22d3ee, #3b82f6);
  --grad-text:  linear-gradient(100deg, #22d3ee, #8b5cf6 55%, #ec4899);

  /* Layout */
  --container: 1200px;
  --radius:    18px;
  --radius-sm: 12px;
  --gap:       clamp(1rem, 2.5vw, 2rem);

  /* Typography */
  --font-head: 'Space Grotesk', 'Noto Kufi Arabic', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;

  --shadow:    0 20px 60px -20px rgba(0,0,0,.6);
  --shadow-sm: 0 8px 30px -12px rgba(0,0,0,.5);
  --ease:      cubic-bezier(.22,.61,.36,1);
  --header-h:  74px;
}

/* Light theme override */
[data-theme="light"] {
  --bg: #f4f6fc; --bg-2: #eef1fa; --surface: #ffffff; --surface-2: #f7f9ff;
  --border: rgba(10,20,40,.10); --border-str: rgba(10,20,40,.18);
  --text: #10162a; --text-soft:#41506e; --text-dim:#6b7796;
  --shadow: 0 20px 50px -24px rgba(30,40,80,.25);
}

/* RTL font tuning */
html[dir="rtl"] { --font-head: 'Noto Kufi Arabic', 'Space Grotesk', sans-serif;
                  --font-body: 'Noto Kufi Arabic', 'Inter', sans-serif; }

/* --------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100%;
  min-height: 100vh;
  position: relative;
}
/* Long unbreakable strings (URLs, emails) must never force horizontal scroll */
p, h1, h2, h3, h4, h5, a, span, li, td { overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4,h5 { font-family: var(--font-head); line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

::selection { background: var(--purple); color: #fff; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue), var(--purple)); border-radius: 20px; border: 2px solid var(--bg-2); }

/* --------------------------------------------------------------- Layout */
.container { width: min(100% - 2.4rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; position: relative; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: .8rem;
}
.section-head { max-width: 640px; margin-bottom: clamp(2rem,4vw,3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section-sub { color: var(--text-soft); margin-top: .6rem; font-size: 1.05rem; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-family: var(--font-head);
  font-weight: 600; font-size: .95rem; border: 1px solid transparent;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  will-change: transform; position: relative; white-space: nowrap;
}
.btn-sm { padding: .6rem 1.15rem; font-size: .85rem; }
.btn-primary { background: var(--grad-cool); color: #fff; box-shadow: 0 10px 30px -8px rgba(59,130,246,.6); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(139,92,246,.7); }
.btn-warm { background: var(--grad-warm); color: #fff; box-shadow: 0 10px 30px -8px rgba(236,72,153,.5); }
.btn-warm:hover { transform: translateY(-3px); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border-str); }
.btn-ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-3px); }
.btn-block { width: 100%; justify-content: center; }

/* --------------------------------------------------------------- Ambient + cursor */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.blob-1 { width: 420px; height: 420px; background: var(--blue);    top: -120px; inset-inline-start: -80px; }
.blob-2 { width: 380px; height: 380px; background: var(--magenta); top: 40%; inset-inline-end: -100px; }
.blob-3 { width: 340px; height: 340px; background: var(--cyan);    bottom: -140px; inset-inline-start: 30%; opacity:.25; }

.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); mix-blend-mode: difference; }
.cursor-dot { width: 7px; height: 7px; background: #fff; transition: transform .1s; }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid rgba(255,255,255,.6); transition: transform .18s var(--ease), width .2s, height .2s; }
.cursor-ring.hovering { width: 54px; height: 54px; border-color: var(--cyan); }
@media (hover: none), (max-width: 900px) { .cursor-dot, .cursor-ring { display: none; } }

/* --------------------------------------------------------------- Preloader */
#preloader { position: fixed; inset: 0; z-index: 10000; background: var(--bg);
  display: grid; place-items: center; transition: opacity .6s ease, visibility .6s; }
#preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { display: grid; place-items: center; gap: 1.4rem; }
.preloader-logo { width: 120px; animation: floaty 2.4s var(--ease) infinite; filter: drop-shadow(0 10px 30px rgba(59,130,246,.5)); }
.preloader-bar { width: 180px; height: 4px; background: rgba(255,255,255,.1); border-radius: 10px; overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 40%; background: var(--grad-brand); border-radius: 10px; animation: loadbar 1.1s var(--ease) infinite; }
@keyframes loadbar { 0% { transform: translateX(-120%);} 100% { transform: translateX(360%);} }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* --------------------------------------------------------------- Header / nav */
.skip-link { position: fixed; top: .5rem; inset-inline-start: .5rem; background: var(--surface); color: var(--text); padding: .6rem 1rem; z-index: 10001; border-radius: 8px; transform: translateY(-200%); transition: transform .2s var(--ease); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 900; height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(7,10,20,.55); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, box-shadow .3s;
}
[data-theme="light"] .site-header { background: rgba(244,246,252,.7); }
.site-header.scrolled { background: rgba(7,10,20,.85); border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
[data-theme="light"] .site-header.scrolled { background: rgba(244,246,252,.92); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(100% - 2.4rem, var(--container)); }
.brand-logo { height: 46px; width: auto; transition: transform .3s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.05); }

.main-nav ul { display: flex; gap: .3rem; align-items: center; }
.main-nav a { position: relative; padding: .55rem .9rem; border-radius: 10px; font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--text-soft); transition: color .25s; }
.main-nav a::after { content: ""; position: absolute; inset-inline: .9rem; bottom: .3rem; height: 2px; background: var(--grad-cool); transform: scaleX(0); transform-origin: inline-start; transition: transform .3s var(--ease); border-radius: 2px; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active::after, .main-nav a:hover::after { transform: scaleX(1); }

/* Nav item icons: hidden on desktop (text-only bar), shown in the mobile menu */
.main-nav a { display: inline-flex; align-items: center; }
.nav-icon { display: none; }

.nav-actions { display: flex; align-items: center; gap: .6rem; }
.lang-switch { font-family: var(--font-head); font-weight: 600; font-size: .85rem; padding: .45rem .8rem; border: 1px solid var(--border-str); border-radius: 999px; color: var(--text-soft); transition: all .25s; }
.lang-switch:hover { color: var(--text); border-color: var(--cyan); }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-soft); transition: all .25s; }
.theme-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg-2); border-bottom: 1px solid var(--border);
    transform: translateY(-14px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .35s var(--ease), opacity .3s var(--ease), visibility .35s;
    box-shadow: var(--shadow); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: .8rem; gap: .25rem; }

  /* Menu rows styled like the admin sidebar: icon + label, hover, active gradient */
  .main-nav a { display: flex; align-items: center; gap: .85rem; padding: .8rem .9rem; font-size: 1.02rem;
    font-weight: 500; border-radius: 12px; color: var(--text-soft); transition: background .25s, color .25s; }
  .main-nav a::after { display: none; }
  .main-nav .nav-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-soft); transition: all .25s; }
  .main-nav .nav-icon svg { width: 20px; height: 20px; }
  .main-nav a:hover { background: rgba(255,255,255,.05); color: var(--text); }
  .main-nav a:hover .nav-icon { color: var(--cyan); border-color: var(--cyan); }
  .main-nav a.active { background: var(--grad-cool); color: #fff; box-shadow: 0 8px 22px -10px rgba(59,130,246,.6); }
  .main-nav a.active .nav-icon { background: rgba(255,255,255,.18); border-color: transparent; color: #fff; }
  [data-theme="light"] .main-nav a:not(.active) { color: var(--text); }
}

/* --------------------------------------------------------------- Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--header-h); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem,5vw,4rem); align-items: center; width: 100%; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.3); color: var(--cyan); font-size: .82rem; font-weight: 600; margin-bottom: 1.4rem; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34,211,238,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,211,238,.6)} 70%{box-shadow:0 0 0 10px rgba(34,211,238,0)} }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -.02em; }
.hero-sub { color: var(--text-soft); font-size: clamp(1rem,2vw,1.2rem); margin: 1.4rem 0 2rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero-stats .num { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .lbl { font-size: .82rem; color: var(--text-dim); }

.hero-visual { position: relative; aspect-ratio: 1/1; display: grid; place-items: center; }
.hero-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--border-str); }
.hero-ring::before { content:""; position:absolute; inset:-1px; border-radius:50%; background: conic-gradient(from 0deg, transparent, var(--cyan), transparent 30%, var(--purple), transparent 60%, var(--pink), transparent); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-photo { width: 78%; aspect-ratio: 1/1; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); border: 3px solid var(--surface); background: var(--surface-2); }
.hero-chip { position: absolute; background: rgba(16,22,42,.8); color: #eaf0ff; backdrop-filter: blur(10px); border: 1px solid var(--border-str); border-radius: 14px; padding: .7rem 1rem; display: flex; align-items: center; gap: .6rem; box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 600; animation: floaty 4s var(--ease) infinite; }
[data-theme="light"] .hero-chip { background: rgba(255,255,255,.85); color: var(--text); border-color: rgba(10,20,40,.12); box-shadow: 0 10px 30px -12px rgba(30,40,80,.25); }
.hero-chip.c1 { top: 8%; inset-inline-start: -4%; }
.hero-chip.c2 { bottom: 12%; inset-inline-end: -6%; animation-delay: 1.2s; }
.hero-chip .ps { color: var(--blue); } .hero-chip .ai { color: var(--orange); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { max-width: 340px; margin: 0 auto; order: -1; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-sub { margin-inline: auto; }
}

/* --------------------------------------------------------------- Cards / glass */
.glass { background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(12px); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.card:hover { transform: translateY(-6px); border-color: var(--border-str); box-shadow: var(--shadow); }
.gradient-border { position: relative; }
.gradient-border::before { content:""; position:absolute; inset:0; border-radius: inherit; padding:1px; background: var(--grad-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity:0; transition: opacity .35s; }
.gradient-border:hover::before { opacity:1; }

/* Grids */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2,1fr);} .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- Project cards */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.project-grid.masonry { display: block; column-count: 3; column-gap: var(--gap); }
.project-grid.masonry .project-card { break-inside: avoid; margin-bottom: var(--gap); }
@media (max-width: 980px) { .project-grid { grid-template-columns: repeat(2,1fr);} .project-grid.masonry { column-count: 2; } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr;} .project-grid.masonry { column-count: 1; } }

.project-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform .4s var(--ease), box-shadow .4s, border-color .4s; }
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: var(--border-str); }
.project-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.project-grid.masonry .project-thumb { aspect-ratio: auto; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover .project-thumb img { transform: scale(1.08); }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,10,20,.75), transparent 60%); opacity: 0; transition: opacity .4s; display: grid; place-items: center; }
.project-card:hover .project-overlay { opacity: 1; }
.project-view { width: 54px; height: 54px; border-radius: 50%; background: var(--grad-cool); color: #fff; display: grid; place-items: center; font-size: 1.6rem; transform: scale(.6); transition: transform .4s var(--ease); }
.project-card:hover .project-view { transform: scale(1); }
.badge-featured { position: absolute; top: .8rem; inset-inline-start: .8rem; background: var(--grad-warm); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; z-index: 2; }
.project-meta { padding: 1.1rem 1.2rem 1.3rem; }
.project-cat { font-size: .78rem; color: var(--cyan); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.project-title { font-size: 1.15rem; margin-top: .3rem; }
.project-date { font-size: .8rem; color: var(--text-dim); }

/* --------------------------------------------------------------- Services */
.service-card { display: flex; flex-direction: column; gap: .8rem; }
.service-icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(59,130,246,.12); color: var(--cyan); }
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.2rem; }
.service-card p { color: var(--text-soft); font-size: .95rem; }
.service-price { font-family: var(--font-head); font-weight: 700; color: var(--text); }
.service-price small { color: var(--text-dim); font-weight: 500; }

/* --------------------------------------------------------------- Skills */
.skill { margin-bottom: 1.1rem; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.skill-bar { height: 8px; border-radius: 10px; background: rgba(255,255,255,.08); overflow: hidden; }
.skill-fill { height: 100%; border-radius: 10px; background: var(--grad-cool); width: 0; transition: width 1.2s var(--ease); }

/* --------------------------------------------------------------- Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap); text-align: center; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2,1fr);} }
.stat-num { font-family: var(--font-head); font-size: clamp(2.2rem,5vw,3.4rem); font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-lbl { color: var(--text-soft); font-size: .95rem; margin-top: .3rem; }

/* --------------------------------------------------------------- Testimonials */
.testi-card { display: flex; flex-direction: column; gap: 1rem; }
.testi-stars { color: var(--orange); letter-spacing: .1em; }
.testi-content { color: var(--text-soft); font-style: italic; }
.testi-author { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.testi-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display:grid; place-items:center; font-weight:700; color:var(--cyan); }
.testi-name { font-weight: 600; }
.testi-role { font-size: .82rem; color: var(--text-dim); }

/* --------------------------------------------------------------- Process */
.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap); }
@media (max-width: 820px) { .process-grid { grid-template-columns: repeat(2,1fr);} }
.process-step { position: relative; }
.process-num { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: transparent; -webkit-text-stroke: 1.5px var(--border-str); }
.process-step h3 { margin: .4rem 0; }
.process-step p { color: var(--text-soft); font-size: .92rem; }

/* --------------------------------------------------------------- Filter bar */
.portfolio-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-soft); font-size: .88rem; font-weight: 500; font-family: var(--font-head); transition: all .25s; }
.chip:hover { color: var(--text); border-color: var(--border-str); }
.chip.active { background: var(--grad-cool); color: #fff; border-color: transparent; }
.toolbar-right { display: flex; gap: .6rem; align-items: center; }
.search-box { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .45rem .9rem; }
.search-box input { background: none; border: none; color: var(--text); outline: none; width: 160px; }
.search-box svg { color: var(--text-dim); }
.select-styled { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: .55rem 1rem; font-family: var(--font-head); font-size: .88rem; outline: none; }
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.view-toggle button { padding: .5rem .7rem; background: var(--surface); color: var(--text-dim); border: none; }
.view-toggle button.active { background: var(--grad-cool); color: #fff; }

/* --------------------------------------------------------------- Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.2rem; }
@media (max-width: 640px){ .form-grid { grid-template-columns: minmax(0,1fr); } }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--text-soft); }
.field .req { color: var(--pink); }
.input, .textarea, select.input {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .85rem 1rem; color: var(--text); font: inherit; outline: none; transition: border-color .25s, box-shadow .25s;
}
.input:focus, .textarea:focus, select.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.textarea { min-height: 140px; resize: vertical; }
.field-error { color: var(--pink); font-size: .8rem; }
.input.invalid, .textarea.invalid { border-color: var(--pink); }
.checkbox-field { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--text-soft); }
.checkbox-field input { margin-top: .25rem; accent-color: var(--blue); width: 18px; height: 18px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.file-drop { border: 1.5px dashed var(--border-str); border-radius: var(--radius-sm); padding: 1.2rem; text-align: center; color: var(--text-dim); cursor: pointer; transition: border-color .25s, background .25s; }
.file-drop:hover { border-color: var(--cyan); background: rgba(34,211,238,.04); }

/* --------------------------------------------------------------- Alerts / toast */
.alert { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.4); color: #86efac; }
.alert-error   { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.alert-info    { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.4); color: #93c5fd; }
.alert-warning { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.4); color: #fdba74; }
.alert-close { background: none; border: none; color: inherit; font-size: 1.3rem; line-height: 1; opacity: .7; }
.alert-close:hover { opacity: 1; }

.toast-container { position: fixed; bottom: 1.4rem; inset-inline-end: 1.4rem; z-index: 9998; display: flex; flex-direction: column; gap: .7rem; max-width: 340px; }
.toast { padding: .9rem 1.1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-str); box-shadow: var(--shadow); font-size: .9rem; animation: toastIn .4s var(--ease); }
.toast.success { border-inline-start: 3px solid #22c55e; }
.toast.error { border-inline-start: 3px solid #ef4444; }
.toast.info { border-inline-start: 3px solid var(--blue); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --------------------------------------------------------------- Footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 4rem; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; padding: 3.5rem 0 2rem; }
@media (max-width: 820px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { height: 48px; margin-bottom: 1rem; }
.footer-brand p { color: var(--text-soft); font-size: .92rem; max-width: 34ch; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: var(--text-soft); font-size: .92rem; transition: color .2s; }
.footer-col a:hover { color: var(--cyan); }
.footer-contact li { color: var(--text-soft); font-size: .92rem; margin-bottom: .5rem; }
.social-row { display: flex; gap: .5rem; margin-top: 1.2rem; flex-wrap: wrap; }
.social-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-soft); transition: all .3s var(--ease); }
.social-btn:hover { color: #fff; transform: translateY(-4px); background: var(--grad-cool); border-color: transparent; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--border); color: var(--text-dim); font-size: .85rem; flex-wrap: wrap; gap: .5rem; }
.footer-credit { color: var(--text-dim); }
.footer-credit strong { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }

/* --------------------------------------------------------------- Floating + back to top */
.floating-contact { position: fixed; bottom: 1.4rem; inset-inline-start: 1.4rem; z-index: 800; display: flex; flex-direction: column; gap: .7rem; }
.fc-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); transition: transform .3s var(--ease); }
.fc-btn:hover { transform: scale(1.1) translateY(-2px); }
.fc-whatsapp { background: #25d366; }
.fc-mail { background: var(--grad-cool); }
.back-to-top { position: fixed; bottom: 1.4rem; inset-inline-end: 1.4rem; z-index: 800; width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-str); color: var(--text); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(14px); transition: all .3s var(--ease); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 900px){ .back-to-top { bottom: 5.6rem; } }

/* --------------------------------------------------------------- Reveal animations */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"]{ transition-delay:.08s;} .reveal[data-delay="2"]{ transition-delay:.16s;} .reveal[data-delay="3"]{ transition-delay:.24s;} .reveal[data-delay="4"]{ transition-delay:.32s;}

/* --------------------------------------------------------------- Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 9990; background: rgba(3,5,12,.94); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox-close, .lightbox-nav { position: absolute; background: rgba(255,255,255,.08); border: 1px solid var(--border-str); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; }
.lightbox-close { top: 1.4rem; inset-inline-end: 1.4rem; }
.lightbox-nav.prev { inset-inline-start: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { inset-inline-end: 1.4rem; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------- Page hero (interior) */
.page-hero { padding: calc(var(--header-h) + 3rem) 0 2rem; text-align: center; position: relative; }
.page-hero h1 { font-size: clamp(2rem,5vw,3.4rem); }
.breadcrumb { display: flex; gap: .5rem; justify-content: center; color: var(--text-dim); font-size: .88rem; margin-top: .7rem; }
.breadcrumb a:hover { color: var(--cyan); }

/* --------------------------------------------------------------- Detail page */
.detail-hero-img { width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 2rem; }
.detail-hero-img img { width: 100%; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,.8fr); gap: 2.5rem; }
@media (max-width: 860px){ .detail-layout { grid-template-columns: minmax(0,1fr); } }
.detail-main, .detail-info { min-width: 0; }
.detail-info { position: sticky; top: calc(var(--header-h) + 1rem); align-self: start; }
.info-row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.info-row .k { color: var(--text-dim); font-size: .88rem; }
.info-row .v { font-weight: 600; text-align: end; }
.gallery-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (max-width:560px){ .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid img { width: 100%; border-radius: var(--radius-sm); cursor: zoom-in; aspect-ratio: 4/3; object-fit: cover; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { padding: .35rem .8rem; border-radius: 999px; background: rgba(139,92,246,.12); color: var(--purple); font-size: .82rem; }
.share-row { display: flex; gap: .6rem; }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.prevnext a { flex: 1; }

/* --------------------------------------------------------------- FAQ / accordion */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .8rem; overflow: hidden; background: var(--surface); }
.accordion-head { width: 100%; text-align: start; padding: 1.1rem 1.3rem; background: none; border: none; color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.accordion-head .plus { transition: transform .3s; color: var(--cyan); font-size: 1.3rem; }
.accordion-item.open .plus { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.accordion-body-inner { padding: 0 1.3rem 1.2rem; color: var(--text-soft); }

/* --------------------------------------------------------------- Empty / misc */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-dim); }
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 1rem; opacity: .5; }
.error-page { min-height: 90vh; display: grid; place-items: center; text-align: center; }
.error-code { font-family: var(--font-head); font-size: clamp(6rem,20vw,12rem); font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* Skeleton */
.skeleton { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Prose (blog / descriptions) */
.prose { color: var(--text-soft); line-height: 1.8; }
.prose h2, .prose h3 { color: var(--text); margin: 1.6rem 0 .8rem; }
.prose p { margin-bottom: 1rem; }
.prose img { border-radius: var(--radius-sm); margin: 1.2rem 0; }
.prose a { color: var(--cyan); text-decoration: underline; }
.prose ul { list-style: disc; padding-inline-start: 1.4rem; margin-bottom: 1rem; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   Advanced UI additions (progress, mesh, marquee, carousel…)
   ============================================================ */

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0%; z-index: 950;
  background: var(--grad-brand); box-shadow: 0 0 12px rgba(139,92,246,.6); transition: width .1s linear; }

/* Animated ambient blobs (gentle drift for a living background) */
@media (prefers-reduced-motion: no-preference) {
  .blob-1 { animation: drift1 18s ease-in-out infinite; }
  .blob-2 { animation: drift2 22s ease-in-out infinite; }
  .blob-3 { animation: drift3 20s ease-in-out infinite; }
}
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,40px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-50px,30px)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,-50px)} }

/* Hero gradient mesh overlay */
.hero::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(600px 400px at 15% 20%, rgba(34,211,238,.14), transparent 60%),
    radial-gradient(500px 380px at 85% 30%, rgba(236,72,153,.14), transparent 60%),
    radial-gradient(500px 500px at 60% 90%, rgba(139,92,246,.12), transparent 60%);
  animation: meshShift 16s ease-in-out infinite; }
@keyframes meshShift { 0%,100%{opacity:.85; transform:scale(1)} 50%{opacity:1; transform:scale(1.08)} }

/* Tools marquee */
.marquee-section { padding: 1.6rem 0; border-block: 1px solid var(--border); background: rgba(255,255,255,.02); overflow: hidden; position: relative; z-index: 1; }
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 1.4rem; white-space: nowrap; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
html[dir="rtl"] .marquee-track { animation-direction: reverse; }
.marquee-item { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--text-soft); }
.marquee-dot { color: var(--cyan); font-size: .8rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; white-space: normal; justify-content: center; } }

/* Filter chip counts */
.chip-count { display: inline-block; min-width: 20px; text-align: center; font-size: .72rem; font-weight: 700; padding: 0 .35rem; margin-inline-start: .3rem; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-dim); }
.chip.active .chip-count { background: rgba(255,255,255,.25); color: #fff; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 2.5rem; }
.load-more-btn.loading { opacity: .6; pointer-events: none; }

/* Carousel (testimonials) */
.carousel { position: relative; overflow: hidden; }
.carousel-track { display: flex; transition: transform .5s var(--ease); }
.carousel-slide { min-width: 100%; padding: .3rem; box-sizing: border-box; }
@media (min-width: 760px) { .carousel-slide { min-width: 50%; } }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.6rem; }
.carousel-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-str); background: var(--surface); color: var(--text); font-size: 1.3rem; display: grid; place-items: center; transition: all .25s; }
.carousel-btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.carousel-dots { display: flex; gap: .5rem; }
.carousel-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-str); border: none; padding: 0; transition: all .3s; }
.carousel-dot.active { background: var(--grad-cool); width: 26px; border-radius: 6px; }
html[dir="rtl"] .carousel-track { direction: ltr; }
html[dir="rtl"] .carousel-slide { direction: rtl; }

/* PWA install button */
.install-btn { position: fixed; bottom: 1.4rem; inset-inline-start: 5.4rem; z-index: 801; display: none; }
.install-btn.show { display: inline-flex; }
@media (max-width: 900px){ .install-btn { bottom: 5.6rem; } }

/* ============================================================
   Mobile refinements (phones)
   ============================================================ */
@media (max-width: 640px) {
  /* Portfolio toolbar stacks and fills width */
  .portfolio-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { flex-wrap: wrap; width: 100%; }
  .search-box { flex: 1 1 100%; }
  .search-box input { width: 100%; }
  .select-styled { flex: 1 1 auto; }
  .filter-chips { gap: .4rem; }
  .chip { font-size: .82rem; padding: .45rem .8rem; }

  /* Detail sidebar should not stick on small screens */
  .detail-info { position: static; }

  /* Prev/next cards stack */
  .prevnext { flex-direction: column; }
}

@media (max-width: 480px) {
  :root { --header-h: 62px; }
  .brand-logo { height: 38px; }
  .nav-actions { gap: .4rem; }
  .lang-switch { padding: .4rem .6rem; font-size: .8rem; }
  .theme-toggle { width: 36px; height: 36px; }

  /* Hero: stack call-to-action buttons full width */
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-stats { gap: 1.4rem; justify-content: space-between; }
  .hero-stats .num { font-size: 1.5rem; }

  /* Section spacing a touch tighter */
  .section { padding: 3rem 0; }
  .marquee-item { font-size: 1rem; }

  /* Buttons wrap gracefully */
  .btn { font-size: .9rem; }

  /* Floating action buttons: slightly smaller, keep clear of edges */
  .fc-btn { width: 48px; height: 48px; }
  .floating-contact { bottom: 1rem; inset-inline-start: 1rem; }
  .back-to-top { bottom: 1rem; inset-inline-end: 1rem; }
  .install-btn { inset-inline-start: 4.8rem; bottom: 1rem; }

  /* Footer bottom stacks centered */
  .footer-bottom { flex-direction: column; text-align: center; gap: .3rem; }

  /* Lightbox controls a bit smaller */
  .lightbox-close, .lightbox-nav { width: 40px; height: 40px; }
}

/* ============================================================
   Light-theme colour adjustments
   Many subtle surfaces use white-alpha (great on dark, invisible
   on light). These overrides give them a soft dark-alpha instead.
   ============================================================ */
[data-theme="light"] .glass {
  background: linear-gradient(160deg, #ffffff, #f4f6fc);
  border-color: rgba(10,20,40,.10);
  box-shadow: 0 20px 50px -28px rgba(30,40,80,.28);
}
[data-theme="light"] .btn-ghost { background: rgba(10,20,40,.03); }
[data-theme="light"] .btn-ghost:hover { background: rgba(10,20,40,.07); }
[data-theme="light"] .theme-toggle,
[data-theme="light"] .nav-toggle,
[data-theme="light"] .social-btn,
[data-theme="light"] .main-nav .nav-icon,
[data-theme="light"] .chip { background: rgba(10,20,40,.04); }
[data-theme="light"] .skill-bar { background: rgba(10,20,40,.09); }
[data-theme="light"] .chip-count { background: rgba(10,20,40,.07); color: var(--text-dim); }
[data-theme="light"] .marquee-section { background: rgba(10,20,40,.02); }
[data-theme="light"] .select-styled,
[data-theme="light"] .search-box { background: #fff; }
/* Cyan accent text is too light on a light background — use a deeper teal */
[data-theme="light"] .eyebrow,
[data-theme="light"] .project-cat,
[data-theme="light"] .testi-avatar,
[data-theme="light"] .footer-col a:hover,
[data-theme="light"] .lang-switch:hover,
[data-theme="light"] .marquee-dot { color: #0e7490; }
[data-theme="light"] .hero-badge { color: #0e7490; background: rgba(14,116,144,.08); border-color: rgba(14,116,144,.3); }
[data-theme="light"] .hero-badge .dot { background: #0e7490; box-shadow: 0 0 0 0 rgba(14,116,144,.5); }
[data-theme="light"] .service-icon { color: #0e7490; }
/* Adaptive accent-text utility (cyan on dark, deep teal on light) */
.text-accent { color: var(--cyan); }
[data-theme="light"] .text-accent { color: #0e7490; }
/* Availability status colours (lighter on dark, deeper on light) */
.status-ok { color: #86efac; } [data-theme="light"] .status-ok { color: #15803d; }
.status-busy { color: #fdba74; } [data-theme="light"] .status-busy { color: #c2410c; }
/* WhatsApp send button (contact + thank-you) */
.wa-fallback, .wa-send { display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin-top: 1rem; padding: .95rem 1.5rem; border-radius: 999px; background: #25d366; color: #fff;
  font-family: var(--font-head); font-weight: 700; transition: transform .25s var(--ease), filter .25s; }
.wa-fallback:hover, .wa-send:hover { filter: brightness(1.06); transform: translateY(-2px); }
/* Header stays readable when scrolled */
[data-theme="light"] .cursor-ring { border-color: rgba(10,20,40,.4); }
/* Testimonials avatar initial + process number outlines */
[data-theme="light"] .process-num { -webkit-text-stroke-color: rgba(10,20,40,.2); }
