/* ===== Nasim Site — 3D Scroll Laptop (standalone, no dependencies) ===== */
#nasim-laptop3d {
  position: relative;
  height: 320vh;
  background: #050818;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}
/* NOTE: an ancestor of the app uses overflow clipping, which disables native
   position:sticky here, so the panel is pinned with a JS-driven translate. */
#nasim-laptop3d .nl-sticky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  transform: translateY(var(--nl-pin, 0px));
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 96px 0 24px;
  isolation: isolate;
}
#nasim-laptop3d .nl-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(circle at 72% 68%, rgba(34, 211, 238, 0.18), transparent 55%);
  opacity: calc(0.35 + var(--nl-p, 0) * 0.65);
}
#nasim-laptop3d .nl-head {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  margin-bottom: clamp(0.75rem, 2vh, 1.75rem);
  transform: translateY(calc(var(--nl-p, 0) * -14px));
}
#nasim-laptop3d .nl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #67e8f9;
}
#nasim-laptop3d .nl-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
#nasim-laptop3d .nl-title {
  margin: 0.6rem 0 0;
  font-size: clamp(1.4rem, 3.4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.5;
  color: #fff;
}
#nasim-laptop3d .nl-sub {
  margin: 0.5rem auto 0;
  max-width: 34rem;
  color: #94a3b8;
  font-size: clamp(0.82rem, 1.6vw, 0.98rem);
  line-height: 2;
}

/* --- stage --- */
#nasim-laptop3d .nl-stage {
  position: relative;
  z-index: 2;
  width: min(660px, 80vw);
  max-width: calc((100vh - 300px) * 1.6);
  perspective: 1900px;
  perspective-origin: 50% 60%;
  transform: scale(calc(0.86 + var(--nl-p, 0) * 0.14));
  transition: transform 0.08s linear;
}
#nasim-laptop3d .nl-laptop {
  position: relative;
  transform-style: preserve-3d;
  transform: translateY(calc((1 - var(--nl-open, 0)) * -24%))
    rotateX(calc(16deg - var(--nl-p, 0) * 14deg))
    rotateZ(calc((1 - var(--nl-p, 0)) * -2deg));
}

/* lid */
#nasim-laptop3d .nl-lid {
  position: relative;
  transform-origin: 50% 100%;
  transform: rotateX(calc(-90deg + var(--nl-open, 0) * 90deg));
  transform-style: preserve-3d;
  border-radius: 14px 14px 4px 4px;
  padding: 10px 10px 14px;
  background: linear-gradient(160deg, #1b1f3a, #0a0d1f 65%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 90px -30px rgba(76, 29, 149, 0.75);
}
#nasim-laptop3d .nl-cam {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #334155;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
  transform: translateX(-50%);
}
#nasim-laptop3d .nl-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: #070b1c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
#nasim-laptop3d .nl-screen-glare {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 42%);
  opacity: calc(1 - var(--nl-open, 0) * 0.72);
}
#nasim-laptop3d .nl-screen-off {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: #04060f;
  opacity: calc(1 - var(--nl-boot, 0));
}

/* fake browser UI inside the screen */
#nasim-laptop3d .nl-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  text-align: right;
  opacity: var(--nl-boot, 0);
}
#nasim-laptop3d .nl-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
  padding: 7px 10px;
  background: #0d1330;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
#nasim-laptop3d .nl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}
#nasim-laptop3d .nl-dot:nth-child(1) {
  background: #f87171;
}
#nasim-laptop3d .nl-dot:nth-child(2) {
  background: #fbbf24;
}
#nasim-laptop3d .nl-dot:nth-child(3) {
  background: #34d399;
}
#nasim-laptop3d .nl-url {
  flex: 1;
  margin-inline-start: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: 0.04em;
  direction: ltr;
  text-align: left;
}
#nasim-laptop3d .nl-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
}
#nasim-laptop3d .nl-reel {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--nl-scrub, 0) * -200%)); /* 3 slides */
  will-change: transform;
}
#nasim-laptop3d .nl-slide {
  height: 100%;
  padding: clamp(10px, 2.4vw, 26px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1.4vw, 14px);
}
#nasim-laptop3d .nl-slide h3 {
  margin: 0;
  font-size: clamp(0.85rem, 2.1vw, 1.5rem);
  font-weight: 900;
  color: #fff;
}
#nasim-laptop3d .nl-slide p {
  margin: 0;
  font-size: clamp(0.62rem, 1.35vw, 0.9rem);
  line-height: 2;
  color: #94a3b8;
  max-width: 32ch;
}
#nasim-laptop3d .nl-s1 {
  background: radial-gradient(circle at 78% 20%, rgba(124, 58, 237, 0.35), transparent 60%), #070b1c;
}
#nasim-laptop3d .nl-s2 {
  background: radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.22), transparent 60%), #060a18;
}
#nasim-laptop3d .nl-s3 {
  background: radial-gradient(circle at 60% 80%, rgba(167, 139, 250, 0.24), transparent 60%), #070b1c;
}
#nasim-laptop3d .nl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-direction: row-reverse;
}
#nasim-laptop3d .nl-chip {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: clamp(0.55rem, 1.1vw, 0.75rem);
  font-weight: 700;
}
#nasim-laptop3d .nl-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
#nasim-laptop3d .nl-stat {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: clamp(5px, 1.1vw, 12px);
  text-align: center;
}
#nasim-laptop3d .nl-stat b {
  display: block;
  color: #67e8f9;
  font-size: clamp(0.72rem, 1.7vw, 1.15rem);
}
#nasim-laptop3d .nl-stat span {
  color: #94a3b8;
  font-size: clamp(0.5rem, 1vw, 0.72rem);
}
#nasim-laptop3d .nl-bars {
  display: flex;
  direction: ltr;
  align-items: flex-end;
  gap: clamp(4px, 1vw, 10px);
  height: clamp(38px, 9vw, 92px);
}
#nasim-laptop3d .nl-bars i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #a78bfa, #22d3ee);
  height: calc(var(--h) * var(--nl-boot, 0));
}

/* base / keyboard */
#nasim-laptop3d .nl-base {
  position: relative;
  height: clamp(12px, 1.9vw, 20px);
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #262b4d, #0c1024);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 30px 60px -20px rgba(0, 0, 0, 0.9);
  transform: rotateX(72deg) translateZ(0);
  transform-origin: 50% 0;
}
#nasim-laptop3d .nl-notch {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 16%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
}
#nasim-laptop3d .nl-shadow {
  margin: clamp(8px, 2vw, 22px) auto 0;
  width: 78%;
  height: clamp(18px, 3vw, 34px);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(88, 28, 235, 0.45), transparent 70%);
  filter: blur(10px);
  opacity: calc(0.35 + var(--nl-open, 0) * 0.5);
}

#nasim-laptop3d .nl-hint {
  position: relative;
  z-index: 2;
  margin-top: clamp(1rem, 4vh, 2.5rem);
  color: #64748b;
  font-size: 0.75rem;
  opacity: calc(1 - var(--nl-p, 0) * 1.6);
}

@media (max-width: 767px) {
  #nasim-laptop3d {
    height: 260vh;
  }
  #nasim-laptop3d .nl-sticky {
    padding: 80px 0 16px;
  }
  #nasim-laptop3d .nl-stage {
    width: 92vw;
    max-width: none;
  }
  #nasim-laptop3d .nl-hint {
    margin-top: 1rem;
  }
  #nasim-laptop3d .nl-sub {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #nasim-laptop3d {
    height: auto;
  }
  #nasim-laptop3d .nl-sticky {
    position: static;
    transform: none;
    height: auto;
    padding: 4rem 0;
  }
  #nasim-laptop3d .nl-lid {
    transform: none;
  }
  #nasim-laptop3d .nl-reel,
  #nasim-laptop3d .nl-stage,
  #nasim-laptop3d .nl-head {
    transform: none;
  }
  #nasim-laptop3d .nl-ui,
  #nasim-laptop3d .nl-bars i {
    opacity: 1;
  }
  #nasim-laptop3d .nl-screen-off {
    display: none;
  }
}
