/* =================================================================
   Site-wide overrides on top of the Webflow export.
   Loaded last so it wins over webflow.css / about.css / ai-cv-chat.css.
================================================================= */

/* One overlay strength for every section, so the background no longer
   changes brightness from section to section. */
:root {
  --section-overlay: rgba(0, 0, 0, .7);
}

.section-1,
.about,
.cv,
.footer-dark {
  background-image: linear-gradient(var(--section-overlay), var(--section-overlay));
}

/* Smoother scrolling: "background-attachment: fixed" forces the browser
   to repaint the whole background on every scroll frame. A fixed layer
   behind the page looks the same but is composited by the GPU instead. */
.body {
  background-image: none;
  background-color: #0d0d0d;
}
.body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../images/background-image-min.jpeg') 100% / cover no-repeat;
  pointer-events: none;
  transform: translateZ(0);
}
@media screen and (max-width: 991px) {
  /* Keep Webflow's tablet/phone sizing of the hexagon pattern */
  .body::before { background-size: auto; }
}

/* Hero title: typed out letter by letter with a caret, the same effect as
   the role line in the About section (white text, no gradient). Runs once
   on load, then the caret blinks briefly and fades away.
   js/hero-title.js splits the text into letters; the title is held hidden
   until then so it never flashes. Without JS it just shows. */
.w-mod-js .heading.mobile:not(.is-split) { visibility: hidden; }

.heading .t-word { display: inline-block; white-space: nowrap; }
.heading .t-char { visibility: hidden; }
.heading .t-char.on,
.heading.is-done .t-char { visibility: visible; }

.heading .t-caret {
  display: inline-block;
  width: 4px;
  height: .9em;
  margin-left: 4px;
  margin-right: -8px;          /* caret doesn't push the text off-centre */
  vertical-align: -.08em;
  background: #a1bde5;
  border-radius: 2px;
  animation: title-blink 1s steps(1) infinite;
  transition: opacity .4s;
}
.heading .t-caret.is-typing { animation: none; }   /* solid while typing */
.heading .t-caret.is-gone { opacity: 0; }
@keyframes title-blink { 50% { opacity: 0; } }

/* ---------- Hero: gentle "scroll to discover" label on the right edge ----------
   Same pill look as the About section's tech chips. */
.scroll-hint {
  position: absolute;
  right: 28px;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  padding: 12px 7px;
  border-radius: 999px;
  background: rgba(12, 12, 12, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .4);
  font-family: Mulish, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transform: translateY(-50%);
  opacity: 0;
  animation: scroll-hint-in 1.2s ease-out 2.5s forwards;
  transition: color .3s, border-color .3s;
}
/* A soft light travelling down the border, top to bottom.
   The mask keeps only the 1px ring, so the gradient shows on the border alone. */
.scroll-hint::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .45), transparent) no-repeat;
  background-size: 100% 40%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: scroll-hint-border 3.2s ease-in-out infinite;
  pointer-events: none;
}
.scroll-hint:hover { color: rgba(255, 255, 255, .75); border-color: rgba(161, 189, 229, .3); }
.scroll-hint-arrow { opacity: .8; animation: scroll-hint-bob 3.2s ease-in-out infinite; }
.scroll-hint-wheel { animation: scroll-hint-wheel 3.2s ease-in-out infinite; }

@keyframes scroll-hint-in { to { opacity: 1; } }
@keyframes scroll-hint-wheel { 0% { opacity: 0; transform: translateY(-1px); } 30% { opacity: 1; } 70%, 100% { opacity: 0; transform: translateY(4px); } }
@keyframes scroll-hint-border { from { background-position: 0 -100%; } to { background-position: 0 200%; } }
@keyframes scroll-hint-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }

@media (max-width: 767px) {
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; opacity: 1; }
  .scroll-hint-arrow, .scroll-hint-wheel { animation: none; }
  .scroll-hint::before { display: none; }
}
