/* DAGHAZAHAV upgrade layer: additive only. Remove the two link/script tags in index.html to roll back. */

/* ── floating pill navigation ── */
.nav { top: 12px; padding: 0 !important; background: transparent !important; border: 0 !important; backdrop-filter: none !important; }
.nav.on { padding: 0 !important; }
.nav .nav-in {
  max-width: 1180px; margin-inline: auto;
  padding: 8px 20px; border-radius: 999px;
  background: rgba(19, 19, 31, .55); border: 1px solid rgba(0, 212, 255, .14);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.nav.on .nav-in { background: rgba(13, 13, 20, .88); border-color: rgba(240, 165, 0, .22); }
.nav .nav-logo img { height: 54px; }
.nav.dz-hide { transform: translateY(-140%); transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.nav { transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.nav-links a.dz-active { color: var(--text) !important; }
.nav-links a.dz-active::after { width: 100%; }
@media (max-width: 860px) { .nav .nav-in { padding: 6px 14px; } .nav .nav-logo img { height: 44px; } }

/* ── scroll progress ── */
#dz-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 300; transform-origin: 100% 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--cyan), var(--gold)); pointer-events: none; }

/* ── section tags get a pulsing dot ── */
.tag::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-inline-end: 8px; vertical-align: middle; animation: dz-pulse 2.4s ease-out infinite; }
@keyframes dz-pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 165, 0, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(240, 165, 0, 0); } }

/* ── cards: lift, border glow and a spotlight that follows the cursor ── */
.svc, .proj, .tech-item, .val { position: relative; --mx: 50%; --my: 50%; transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s, border-color .35s; will-change: transform; }
.svc::before, .proj::before, .tech-item::before, .val::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 1;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(0, 212, 255, .13), transparent 60%);
}
.svc:hover::before, .proj:hover::before, .tech-item:hover::before, .val:hover::before { opacity: 1; }
.svc:hover, .tech-item:hover, .val:hover { transform: translateY(-6px); border-color: rgba(240, 165, 0, .45); box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 30px rgba(240, 165, 0, .12); }
.svc:hover .svc-icon, .tech-item:hover .t-ico { transform: rotate(-6deg) scale(1.1); }
.svc-icon, .t-ico { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.proj { transform-style: preserve-3d; }
.proj:hover { border-color: rgba(0, 212, 255, .4); box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 34px rgba(0, 212, 255, .14); }

/* ── technologies strip, sliding left to right ── */
#dz-strip { position: relative; overflow: hidden; direction: ltr; border-block: 1px solid rgba(0, 212, 255, .12); background: linear-gradient(180deg, rgba(15, 15, 26, .9), rgba(13, 13, 20, .9)); padding: 18px 0; }
#dz-strip .dz-track { display: flex; width: max-content; gap: 14px; padding-inline-end: 14px; direction: ltr; animation: dz-slide-right 60s linear infinite; }
#dz-strip:hover .dz-track { animation-play-state: paused; }
#dz-strip::before, #dz-strip::after { content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none; }
#dz-strip::before { left: 0; background: linear-gradient(to right, #0d0d14, transparent); }
#dz-strip::after { right: 0; background: linear-gradient(to left, #0d0d14, transparent); }
.dz-chip { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid rgba(255, 255, 255, .07); color: #cfd3ea; font-weight: 600; font-size: .92rem; white-space: nowrap; transition: border-color .3s, transform .3s; }
.dz-chip:hover { border-color: rgba(240, 165, 0, .5); transform: translateY(-3px); }
.dz-chip svg { width: 22px; height: 22px; fill: var(--cyan); flex: none; }
@keyframes dz-slide-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ── back to top ── */
#dz-top { position: fixed; inset-inline-end: 22px; bottom: 96px; z-index: 120; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(240, 165, 0, .4); background: rgba(19, 19, 31, .85); color: var(--gold); font-size: 1.2rem; cursor: pointer; opacity: 0; transform: translateY(14px); pointer-events: none; transition: all .35s cubic-bezier(.22, 1, .36, 1); backdrop-filter: blur(8px); }
#dz-top.show { opacity: 1; transform: none; pointer-events: auto; }
#dz-top:hover { background: var(--gold); color: #0d0d14; }

/* ── hero: cursor glow ── */
.hero-glow { transition: transform .25s ease-out; }

@media (prefers-reduced-motion: reduce) {
  #dz-strip .dz-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .tag::before { animation: none; }
  .nav, .nav.dz-hide { transition: none; }
}

/* ── project cards with an outbound link ── */
.proj-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(0, 212, 255, .35); color: var(--cyan); font-weight: 700; font-size: .9rem; text-decoration: none; position: relative; z-index: 2; transition: background .3s, color .3s, border-color .3s, transform .3s; }
.proj-link::after { content: '↗'; font-size: 1rem; }
.proj-link:hover { background: var(--gold); border-color: var(--gold); color: #0d0d14; transform: translateY(-2px); }

/* ── systems carousel: JS adds .dz-row to the grid. Without JS the full grid stays as it was. ── */
.proj[hidden], .dz-filters[hidden], .dz-car-ctl[hidden] { display: none !important; }
.dz-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -26px 0 30px; }
.dz-filter { font: inherit; font-weight: 700; font-size: .92rem; line-height: 1.2; min-height: 40px; padding: 8px 18px; border-radius: 999px; border: 2px solid rgba(29, 79, 163, .3); background: var(--card); color: #1d4fa3; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s; }
.dz-filter:hover { border-color: #1d4fa3; transform: translateY(-2px); }
.dz-filter.on { background: #1d4fa3; border-color: #1d4fa3; color: #fff; }
.dz-filter:focus-visible, .dz-car-btn:focus-visible, .dz-car-all:focus-visible { outline: 3px solid #0a8fb5; outline-offset: 2px; }

.proj-grid.dz-row {
  display: flex; gap: 22px; overflow-x: auto; overflow-y: hidden;
  padding: 16px 8px 40px; margin: -16px -8px -14px;
  scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.proj-grid.dz-row::-webkit-scrollbar { display: none; }
.proj-grid.dz-row > .proj { flex: 0 0 calc((100% - 44px) / 3); grid-column: auto; min-height: var(--dz-card-h, 0); }
.proj-grid.dz-row.dz-static { justify-content: center; overflow-x: hidden; -webkit-mask-image: none; mask-image: none; }
.proj-grid.dz-filtered > .proj { grid-column: auto !important; }
@media (max-width: 1024px) { .proj-grid.dz-row > .proj { flex-basis: calc((100% - 22px) / 2); } }
@media (max-width: 768px) {
  .dz-filters { gap: 8px; margin: -34px 0 22px; }
  .dz-filter { font-size: .85rem; padding: 7px 14px; }
  .proj-grid.dz-row { gap: 14px; -webkit-mask-image: none; mask-image: none; }
  .proj-grid.dz-row > .proj { flex-basis: 82%; }
}

.dz-car-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 22px; }
.dz-car-nav { display: flex; gap: 10px; direction: ltr; }
.dz-car-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid rgba(29, 79, 163, .35); background: var(--card); color: #1d4fa3; display: grid; place-items: center; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.dz-car-btn svg { width: 18px; height: 18px; }
.dz-car-btn:hover, .dz-car-all:hover { background: #1d4fa3; border-color: #1d4fa3; color: #fff; }
.dz-car-pause .i-play, .dz-car-pause[aria-pressed="true"] .i-pause { display: none; }
.dz-car-pause[aria-pressed="true"] .i-play { display: block; }
.dz-car-all { font: inherit; font-weight: 700; font-size: .95rem; min-height: 44px; padding: 9px 24px; border-radius: 999px; border: 2px solid rgba(29, 79, 163, .55); background: var(--card); color: #1d4fa3; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.dz-car-all .dz-all-close, .dz-car-ctl.is-open .dz-all-open, .dz-car-ctl.is-open .dz-car-nav, .dz-car-ctl.is-static .dz-car-nav, .dz-car-ctl.no-motion .dz-car-pause { display: none; }
.dz-car-ctl.is-open .dz-all-close { display: inline; }
.dz-car-ctl.is-open { margin-top: 36px; }
/* in the row every card has the same height, so the button sits on one line across cards */
.proj-grid.dz-row > .proj { display: flex; flex-direction: column; }
.proj-grid.dz-row .proj-img { flex: none; }
.proj-grid.dz-row .proj-body { flex: 1; display: flex; flex-direction: column; }
.proj-grid.dz-row .proj-body > .proj-link, .proj-grid.dz-row .proj-body > .proj-actions { margin-top: auto; align-self: flex-start; }
.proj-grid.dz-row .proj-title { text-wrap: balance; }
@media (max-width: 768px) { .proj-grid.dz-row > .proj { flex-basis: 86%; } .proj-grid.dz-row .proj-title { font-size: 1rem; } }
@media (max-width: 480px) { .proj-grid.dz-row .proj-body { padding-inline: 6px; } }
