/* ---------- Local icon set ---------- */
.asset-icon {
  --icon-size: 24px;
  display: inline-block;
  width: var(--icon-size);
  height: var(--icon-size);
  flex: 0 0 var(--icon-size);
  overflow: visible;
  color: inherit;
  background: none;
  vertical-align: middle;
}
.asset-icon path,
.asset-icon circle,
.asset-icon rect { vector-effect: non-scaling-stroke; }

/* ---------- Ambient motion ---------- */
.cursor-glow {
  position: fixed;
  z-index: 0;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  opacity: .24;
  background: radial-gradient(circle, rgba(92, 101, 255, .22), rgba(73, 205, 255, .08) 38%, transparent 70%);
  filter: blur(10px);
  transform: translate3d(calc(var(--cursor-x, -500px) - 50%), calc(var(--cursor-y, -500px) - 50%), 0);
  pointer-events: none;
  will-change: transform;
}

main,
.footer,
.navbar-wrap { position: relative; z-index: 1; }

.hero__stars {
  animation: starDrift 22s linear infinite alternate;
}

.hero__aurora--one { animation: auroraOne 12s ease-in-out infinite alternate; }
.hero__aurora--two { animation: auroraTwo 15s ease-in-out infinite alternate; }

@keyframes starDrift {
  to { transform: translate3d(-18px, 14px, 0) scale(1.03); }
}
@keyframes auroraOne {
  to { transform: translate3d(70px, 36px, 0) scale(1.16) rotate(8deg); opacity: .62; }
}
@keyframes auroraTwo {
  to { transform: translate3d(-65px, -28px, 0) scale(1.12) rotate(-7deg); opacity: .52; }
}

.code-card__body > div {
  opacity: 0;
  transform: translateX(-16px);
  animation: codeLine .55s cubic-bezier(.2,.75,.25,1) forwards;
}
.code-card__body > div:nth-child(1) { animation-delay: .25s; }
.code-card__body > div:nth-child(2) { animation-delay: .37s; }
.code-card__body > div:nth-child(3) { animation-delay: .49s; }
.code-card__body > div:nth-child(4) { animation-delay: .61s; }
.code-card__body > div:nth-child(5) { animation-delay: .73s; }
.code-card__body > div:nth-child(6) { animation-delay: .85s; }
.code-card__body > div:nth-child(7) { animation-delay: .97s; }
@keyframes codeLine { to { opacity: 1; transform: translateX(0); } }

/* ---------- More expressive scroll reveals ---------- */
.reveal {
  --reveal-x: 0px;
  --reveal-y: 44px;
  --reveal-scale: .96;
  --reveal-rotate: 0deg;
  opacity: 0;
  filter: blur(9px);
  transform: translate3d(var(--reveal-x), calc(var(--reveal-y) + var(--parallax-y, 0px)), 0) scale(var(--reveal-scale)) rotate(var(--reveal-rotate));
  transition:
    opacity .82s cubic-bezier(.16,1,.3,1) var(--reveal-delay, 0ms),
    transform .9s cubic-bezier(.16,1,.3,1) var(--reveal-delay, 0ms),
    filter .72s ease var(--reveal-delay, 0ms);
}
.reveal[data-reveal='right'] { --reveal-x: 55px; --reveal-y: 10px; --reveal-rotate: 1.2deg; }
.reveal[data-reveal='left'] { --reveal-x: -55px; --reveal-y: 10px; --reveal-rotate: -1.2deg; }
.reveal[data-reveal='zoom'] { --reveal-y: 15px; --reveal-scale: .87; }
.reveal[data-reveal='flip'] { --reveal-y: 28px; --reveal-scale: .93; --reveal-rotate: 2deg; }
.reveal.is-visible {
  --reveal-x: 0px;
  --reveal-y: 0px;
  --reveal-scale: 1;
  --reveal-rotate: 0deg;
  opacity: 1;
  filter: blur(0);
}

/* ---------- Magnetic and luminous cards ---------- */
.interactive-card {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform;
}

.interactive-card.reveal.is-visible,
.interactive-card:not(.reveal) {
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(0, var(--lift), 0);
}

.interactive-card::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  background:
    radial-gradient(270px circle at var(--spot-x) var(--spot-y), rgba(116, 225, 255, .22), transparent 44%),
    linear-gradient(125deg, rgba(148, 87, 255, .36), transparent 34%, rgba(35, 211, 255, .2));
  transition: opacity .28s ease;
  pointer-events: none;
}

.interactive-card:hover {
  --lift: -10px;
  border-color: rgba(117, 139, 255, .5) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.38), 0 0 0 1px rgba(122, 84, 255, .1), inset 0 1px rgba(255,255,255,.07) !important;
}
.interactive-card > * { position: relative; z-index: 1; }
.interactive-card:hover::after { opacity: 1; }

.service-card,
.project-card,
.testimonial-card,
.post-card,
.faq-item,
.about-window,
.code-card,
.cta-card {
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease;
}

.service-card:hover .service-card__icon,
.project-card:hover .project-card__title-row button,
.post-card:hover .post-card__symbol {
  transform: translateY(-3px) rotate(-5deg) scale(1.08);
  box-shadow: 0 14px 36px rgba(83, 78, 236, .36);
}

.service-card__icon,
.project-card__title-row button,
.post-card__symbol { transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease; }

.project-card:hover .project-card__media img { transform: scale(1.075) translateY(-4px); }
.project-card__media::before {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.13) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: opacity .2s ease;
  pointer-events: none;
}
.project-card:hover .project-card__media::before {
  opacity: 1;
  animation: mediaShine .9s ease forwards;
}
@keyframes mediaShine { to { transform: translateX(120%); } }

/* ---------- Trust strip ---------- */
.trust-section {
  position: relative;
  z-index: 4;
  margin-top: -32px;
  padding-bottom: 24px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(166, 186, 238, .16);
  border-radius: 22px;
  background: rgba(8, 14, 29, .72);
  box-shadow: 0 25px 75px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(20px);
}
.trust-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
}
.trust-card__icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border: 1px solid rgba(118, 148, 255, .25);
  border-radius: 13px;
  color: #82e7ff;
  background: linear-gradient(135deg, rgba(92, 76, 238, .25), rgba(38, 179, 229, .12));
}
.trust-card:nth-child(2n) .trust-card__icon { color: #c792ff; }
.trust-card strong,
.trust-card small { display: block; }
.trust-card strong { margin-bottom: 2px; font-size: 12px; }
.trust-card small { overflow: hidden; color: var(--muted-2); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Supplied icons inside existing cards ---------- */
.service-card__icon .asset-icon { --icon-size: 25px; }
.text-link .asset-icon { --icon-size: 17px; transition: transform .22s ease; }
.text-link:hover .asset-icon { transform: translateX(-4px); }
.testimonial-card__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(141, 108, 246, .22);
  border-radius: 12px;
  color: #b99cff;
  background: rgba(111, 72, 209, .12);
}
.testimonial-card__badge .asset-icon { --icon-size: 19px; }


.about-content.is-visible .skills-cloud span {
  animation: skillPop .55s cubic-bezier(.16,1,.3,1) both;
  animation-delay: calc(var(--skill-delay, 0ms) + 160ms);
}
@keyframes skillPop {
  from { opacity: 0; transform: translateY(10px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Contact dock ---------- */
.contact-dock {
  position: fixed;
  z-index: 55;
  right: 18px;
  top: 50%;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(166, 186, 238, .16);
  border-radius: 17px;
  background: rgba(7, 12, 25, .74);
  box-shadow: 0 20px 55px rgba(0,0,0,.3);
  backdrop-filter: blur(17px);
  transform: translateY(-50%);
}
.contact-dock a {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: #bac5e3;
  background: rgba(255,255,255,.025);
  transition: transform .22s ease, color .22s ease, background .22s ease;
}
.contact-dock a:hover { color: white; background: linear-gradient(135deg, rgba(116,73,238,.5), rgba(35,174,226,.34)); transform: translateX(-4px) scale(1.04); }
.contact-dock .asset-icon { --icon-size: 20px; }

/* ---------- Active navigation ---------- */
.navbar__links a { position: relative; }
.navbar__links a::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(.35);
  transition: .25s ease;
}
.navbar__links a.is-active { color: white; background: rgba(111, 79, 231, .1); }
.navbar__links a.is-active::after { opacity: 1; transform: scaleX(1); }

/* ---------- Buttons ---------- */
.button { overflow: hidden; position: relative; }
.button::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.17), transparent 72%);
  transform: translateX(-120%);
  transition: opacity .2s ease;
}
.button:hover::before { opacity: 1; animation: buttonShine .75s ease forwards; }
@keyframes buttonShine { to { transform: translateX(120%); } }
.button > * { position: relative; z-index: 1; }

/* ---------- Responsive refinements ---------- */
@media (max-width: 1180px) {
  .contact-dock { right: 9px; }
  .trust-card { padding-inline: 12px; }
}

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-dock { top: auto; right: 50%; bottom: 13px; grid-auto-flow: column; transform: translateX(50%); }
  .back-to-top { bottom: 76px; }
  .hero__grid { align-items: center; }
  .section-heading h2 { max-width: 700px; margin-inline: auto; }
  .section-heading--right h2 { margin-inline: 0; }
}

@media (max-width: 620px) {
  .cursor-glow { display: none; }
  .trust-section { margin-top: -12px; }
  .trust-grid { gap: 8px; padding: 9px; border-radius: 18px; }
  .trust-card { gap: 10px; padding: 12px 10px; }
  .trust-card__icon { width: 38px; height: 38px; flex-basis: 38px; }
  .trust-card strong { font-size: 11px; }
  .trust-card small { font-size: 9px; }
  .interactive-card:hover { --lift: -4px; }
  .contact-dock { bottom: 9px; padding: 6px; border-radius: 15px; }
  .contact-dock a { width: 36px; height: 36px; }
  .back-to-top { bottom: 66px; }
  .section-heading h2 { font-size: clamp(27px, 8vw, 36px); }
  .service-card { min-height: auto; }
}

@media (max-width: 430px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-card small { white-space: normal; }
  .contact-dock { width: calc(100% - 92px); justify-content: center; }
  .hero__visual { min-height: 370px; }
  .tech-dock { width: max-content; max-width: calc(100% - 24px); }
  .stats-panel { border-radius: 16px; }
}

@media (hover: none), (pointer: coarse) {
  .interactive-card { --rx: 0deg !important; --ry: 0deg !important; }
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__stars,
  .hero__aurora--one,
  .hero__aurora--two,
  .code-card__body > div { animation: none !important; opacity: 1; transform: none; }
  .reveal { filter: none; }
  .cursor-glow { display: none; }
}

/* Keep transformed reveal items from creating an RTL horizontal canvas. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}

@media (max-width: 620px) {
  .reveal[data-reveal='right'] { --reveal-x: 20px; }
  .reveal[data-reveal='left'] { --reveal-x: -20px; }
}

@media (max-width: 900px) {
  body { padding-bottom: 68px; }
}
