html { scroll-behavior: auto; }            /* Lenis handles smoothing; this is overridden in the no-JS fallback below */
html.no-lenis { scroll-behavior: smooth; } /* CSS-only fallback if Lenis fails to load */
::selection { background: #c6ff3d; color: #0a0a0b; }

/* ---------- Hero ---------- */
.stroke-text { -webkit-text-stroke: 2px #f2efe8; }
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.blob { position: absolute; border-radius: 9999px; filter: blur(90px); opacity: .35; pointer-events: none; }
.blob-a { width: 36vw; height: 36vw; background: #7c5cff; top: 10%; right: 5%; }
.blob-b { width: 28vw; height: 28vw; background: #c6ff3d; bottom: 0; left: 10%; opacity: .18; }
/* Portrait beside the name: soft, slightly faded, edges dissolve into the background */
.hero-portrait-wrap { position: absolute; right: 3vw; bottom: 0; height: min(96vh, 860px); pointer-events: none; will-change: transform, opacity; }
.hero-portrait {
  height: 100%; width: auto; max-width: none;
  opacity: .95;                                     /* lower for a more faded portrait */
  filter: contrast(1.05);
  /* Radial mask: solid around the face, fading to transparent at every edge (hides the cropped right/bottom edges) */
  -webkit-mask-image: radial-gradient(ellipse 54% 60% at 50% 40%, #000 72%, transparent 100%);
          mask-image: radial-gradient(ellipse 54% 60% at 50% 40%, #000 72%, transparent 100%);
}
@media (max-width: 767px) {
  .hero-portrait-wrap { right: -10vw; height: 68vh; }
  .hero-portrait { opacity: .5; }
}
.scroll-cue { transform-origin: top; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Split-text helpers (created in js/utils.js) */
.char-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.char { display: inline-block; will-change: transform; }
.line { display: block; }
.line-inner { display: inline-block; will-change: transform, opacity; }

/* ---------- Marquee ---------- */
.marquee { animation: marquee 30s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Projects ---------- */
.project-card {
  position: relative; flex: none; display: flex; flex-direction: column; justify-content: space-between;
  width: 82vw; max-width: 560px; padding: 2rem; border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,.1); background: linear-gradient(160deg, #15151b, #0e0e12);
  overflow: hidden; transition: border-color .3s;
}
@media (min-width: 768px) { .project-card { width: 42vw; padding: 2.5rem; } }
.project-card:hover { border-color: #c6ff3d; }
.card-num { font-size: clamp(5rem, 12vw, 9rem); font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.25); will-change: transform; }
.card-cat { font-family: 'JetBrains Mono', monospace; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: #c6ff3d; }
.card-title { font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: 700; line-height: 1.05; margin-top: .5rem; }
.card-desc { margin-top: 1rem; color: #8a8a90; max-width: 28rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.card-tags span { font-family: 'JetBrains Mono', monospace; font-size: .7rem; padding: .35rem .75rem; border: 1px solid rgba(255,255,255,.15); border-radius: 9999px; }

/* ---------- Experience stack ---------- */
.stack-card { position: relative; margin-bottom: 10vh; }
.stack-card:last-child { margin-bottom: 0; }
.stack-inner {
  min-height: max(62vh, 340px); padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: 1.75rem;
  /* Slightly translucent + blurred so the background photo glows through faintly */
  background: color-mix(in srgb, var(--c) 62%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1);
  transform-origin: center top; will-change: transform;
}

/* ---------- Buttons ---------- */
.btn { padding: 1rem 2rem; border: 1px solid rgba(255,255,255,.25); border-radius: 9999px; transition: background .25s, color .25s, border-color .25s; }
.btn:hover { background: #c6ff3d; color: #0a0a0b; border-color: #c6ff3d; }


/* ---------- Developer background FX ---------- */
#code-rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .5; pointer-events: none; }
#code-layer { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.code-snippet {
  position: absolute; white-space: nowrap; font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.7rem, 1.1vw, .95rem); color: #f2efe8; opacity: .08; will-change: transform;
}
.caret { animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Experience background photo ---------- */
.exp-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.exp-bg-img {
  position: sticky; top: 0; height: 100vh;
  background: url('../assets/maryam-bg.jpg') center 30% / cover no-repeat;
  opacity: .45;                                   /* soft — raise/lower to taste (also in js/experience.js) */
  filter: grayscale(.5) brightness(1.4) contrast(1.1);
  -webkit-mask-image: radial-gradient(ellipse 80% 85% at 65% 45%, #000 35%, transparent 85%);
          mask-image: radial-gradient(ellipse 80% 85% at 65% 45%, #000 35%, transparent 85%);
  will-change: transform, opacity;
}
/* Brand tint over the greyscale photo */
.exp-bg-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, #7c5cff, #c6ff3d); mix-blend-mode: color; opacity: .45;
}
