/* ============================================
   Refined motion layer — keeps the original warm/steel palette
   ============================================ */

/* Softer, more elegant reveals with stagger */
.reveal {
  transform: translateY(36px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { transform: none; }

/* Section heading accent line draws in */
.section__head h2::after {
  content: ""; display: block; height: 2px; width: 0; margin-top: .9rem;
  background: linear-gradient(90deg, var(--steel), var(--accent-2));
  transition: width 1s var(--ease) .3s;
}
.section__head.is-visible h2::after { width: 72px; }

/* ---------- Experience timeline ---------- */
.timeline::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 60%, transparent);
  opacity: .25;
}
.timeline::after {
  content: ""; position: absolute; left: 11px; top: 8px; width: 2px;
  height: calc((100% - 16px) * var(--tl, 0));
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
  border-radius: 2px; transition: height .25s linear;
}
.timeline__item { position: relative; }
.timeline__item.reveal { transform: translateX(-34px); }
.timeline__item.reveal.is-visible { transform: none; }
.timeline__marker { transition: transform .5s var(--ease), background .4s, box-shadow .4s; transform: scale(0); }
.timeline__item.is-visible .timeline__marker {
  transform: scale(1); background: var(--accent);
  box-shadow: 0 0 0 4px rgba(110,184,201,.15), 0 0 18px var(--accent-glow);
  transition-delay: .25s;
}
.timeline__item:first-child.is-visible .timeline__marker { animation: markerPulse 2.4s ease-in-out infinite .9s; }
@keyframes markerPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(110,184,201,.15), 0 0 14px var(--accent-glow); }
  50% { box-shadow: 0 0 0 9px rgba(110,184,201,.06), 0 0 26px var(--accent-glow); }
}
.timeline__body {
  position: relative; overflow: hidden;
  transition: transform .45s var(--ease), border-color .35s, box-shadow .45s var(--ease), background .35s;
}
.timeline__body::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), rgba(196,165,116,.13), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.timeline__body::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease);
}
.timeline__body:hover { transform: translateX(8px); box-shadow: 0 18px 44px rgba(0,0,0,.35); background: rgba(22,30,42,.9); }
.timeline__body:hover::before { opacity: 1; }
.timeline__body:hover::after { transform: scaleY(1); }
.timeline__top h3, .timeline__body h3 { transition: color .3s; }
.timeline__body:hover h3 { color: var(--accent); }

/* ---------- Projects ---------- */
.project-filters { position: relative; }
.filter { transition: all .35s var(--ease); }
.filter:hover { transform: translateY(-2px); }
.filter.is-active { box-shadow: 0 8px 22px var(--accent-glow); }

/* cards re-enter with a stagger whenever the filter changes */
.project-card:not(.is-hidden).filter-in { animation: cardIn .6s var(--ease) both; animation-delay: var(--fd, 0ms); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.94); }
  to { opacity: 1; transform: none; }
}

.project-card {
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 34px rgba(110,184,201,.12);
}
/* spotlight following the mouse */
.project-card::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, -999px) var(--my, -999px), rgba(196,165,116,.16), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.project-card:hover::before { opacity: 1; }
/* light sweep across the media */
.project-card__media::after {
  background:
    linear-gradient(115deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, transparent 40%, rgba(7,11,18,.55));
  transition: background-position .9s var(--ease), opacity .4s;
}
.project-card:hover .project-card__media::after { background-position: 150% 0, 0 0; }
.project-card__label { transition: transform .4s var(--ease), background .3s; }
.project-card:hover .project-card__label { transform: translateY(-3px); background: rgba(110,184,201,.25); }
/* arrow cue slides in */
.project-card__body { position: relative; }
.project-card__body::after {
  content: "→"; position: absolute; right: 1.35rem; bottom: 1.1rem;
  color: var(--accent); font-size: 1.2rem; opacity: 0; transform: translateX(-10px);
  transition: all .4s var(--ease);
}
.project-card:hover .project-card__body::after { opacity: 1; transform: none; }

/* Skill cards: gentle lift only */
.skill-card { position: relative; overflow: hidden; }
.skill-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), rgba(110,184,201,.13), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.skill-card:hover::before { opacity: 1; }

/* Buttons: soft shine */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn--primary:hover::after { transform: translateX(120%); }

::selection { background: var(--accent); color: #0a0e14; }

@media (prefers-reduced-motion: reduce) {
  .timeline__item.reveal, .project-card.filter-in { animation: none; transform: none; }
  .timeline__marker { transform: none; }
  .timeline__item:first-child.is-visible .timeline__marker { animation: none; }
}

/* ---------- Project card images ---------- */
.project-card__img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), filter .6s var(--ease);
}
.project-card__media::before { display: none; }
.project-card:hover .project-card__img { transform: scale(1.08); filter: brightness(1.1) saturate(1.1); }
.project-card__media { height: 180px; }
