/* ==========================================================
   Portfolio — Tojo Rodialson
   Styles propriétaires : label de section, apparitions au
   scroll. Tout le reste est en utilities.
   ========================================================== */

/* Ancres : ne pas passer sous le header fixe */
html {
  scroll-padding-top: 5.5rem;
}

::selection {
  background-color: rgba(3, 105, 161, 0.14);
  color: #0f172a;
}

:focus-visible {
  outline: 2px solid #0369a1;
  outline-offset: 2px;
}

/* --- Label de section : signature mono ------------------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  color: #0369a1;
}

.section-label::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* --- Apparition au scroll : discrète, une seule fois -----
   Activée uniquement si le JS tourne (.js sur <html>) :
   sans JS, tout le contenu reste visible. ---------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* --- Lien éditorial : souligné au survol ----------------- */
.u-link {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease-out;
}

.u-link:hover {
  background-size: 100% 1px;
}

/* --- Marqueurs de timeline (parcours) -------------------- */
.timeline-marker {
  position: absolute;
  left: calc(-0.5rem / 2 - 0.5px); /* centré sur le filet border-l */
  top: 0.45rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: #e2e8f0;
}

.timeline-marker-current {
  background: #0369a1;
}

/* --- Motion réduit ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .u-link { transition: none; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
