/* sections.css - hero, timeline, projects, skills */

/* ========== Layout / Sections ========== */
.fullpage-section {
  min-height: 100vh;
  padding: 80px 0;
  display: flex;
  align-items: center;
}
.hero-inner {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: space-between;
}
.hero-title {
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1;
  margin: 0;
}
.profile-photo {
  width: 320px;
  height: 320px;
  border-radius: 9999px;
  object-fit: cover;
  border: 4px solid rgba(0,212,255,0.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transition: transform .45s cubic-bezier(.2,.9,.3,1);
}
.scroll-hint { display: inline-block; margin-top: 24px; color: var(--muted); }

/* ========== Timeline ========== */
.timeline { border-left: 3px solid var(--primary); padding-left: 28px; }
.timeline-item {
  position: relative;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: all .7s cubic-bezier(.2,.9,.3,1);
}
.timeline-item.appear { opacity: 1; transform: translateY(0); }
.timeline-icon {
  position: absolute;
  left: -44px;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #000;
}
.timeline-content {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  padding: 16px;
  border-radius: 10px;
}

/* ========== Projects ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 260px;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.9,.3,1), box-shadow .35s;
}
.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.45));
  opacity: 0;
  transform: translateY(10px);
  transition: all .35s;
}
.project-card:hover .project-overlay { opacity: 1; transform: translateY(0); }
.card-meta { position: absolute; top: 12px; left: 12px; z-index: 3; }

/* ========== Skills ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.skill-card { padding: 18px; border-radius: 12px; }
.skill-bar {
  height: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
}
.skill-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width .9s ease;
}

/* ========== HERO CINEMATIC LAYERS ======== */
.hero {
  position: relative;
  overflow: visible;
}
.hero-inner { position: relative; z-index: 5; }

/* parallax layer wrappers: optional decorative layers inside .hero */
.hero-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  opacity: .12;
}
.hero-layer .node {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 999px;
  position: absolute;
}

/* elevated hero title split (words are wrapped by animations.js or CSS for reveal) */
.hero-title .word {
  display: inline-block;
  transform-origin: center;
  will-change: transform, opacity;
}

/* ========== PROJECT HOVER PREVIEW (video) ========== */
.project-card { overflow: visible; position: relative; }
.project-preview {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 320px;
  height: 180px;
  z-index: 30;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0,0,0,0.6);
  display: none;
  background: #000;
  transform-origin: right top;
}
.project-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* show preview when JS adds preview-active */
.project-card.preview-active .project-preview { display: block; opacity: 1; transform: translateY(0); }

/* lottie fade */
.lottie-inline {
  opacity: 0;
  transform: translateY(6px);
  transition: all .45s cubic-bezier(.2,.9,.3,1);
}
.lottie-inline.visible { opacity: 1; transform: none; }

/* ensure hero particle z-index layering */
#tsparticles { z-index: -2 !important; }

/* ========== NAME ACCENT STYLING (Deluxe: gradient shimmer + entrance) ========== */
/* Base hero title tone (neutral greeting) */
.hero-left .hero-title {
  color: var(--text);
  font-weight: 600;
  line-height: 1.02;
  font-size: clamp(28px, 6vw, 56px);
  letter-spacing: -0.01em;
}

/* ====== Updated NAME ACCENT: subtler gradient, slower shimmer ====== */
.hero-left .hero-title .accent {
  /* gradient tuned to primary + accent variables for visual coherence */
  background: linear-gradient(90deg, var(--primary) 10%, var(--accent) 55%, rgba(255,230,180,0.9) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  padding-left: 6px;
  display: inline-block;
  position: relative;
  overflow: visible;
  -webkit-text-fill-color: transparent;

  /* reduce shimmer amplitude & speed for a premium feel */
  background-size: 300% 100%;
  animation: accentShimmer 6s linear infinite;
  text-shadow: 0 8px 30px rgba(0,212,255,0.06);
  transform: translateY(6px) scale(0.99);
  opacity: 0;
  transition: transform .7s cubic-bezier(.2,.9,.3,1), opacity .7s;
}

/* slower, gentler shimmer */
@keyframes accentShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* entrance: when body has .page-enter class we animate the accent in */
.page-enter .hero-left .hero-title .accent {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* hover still gives a tiny lift */
.hero-left .hero-title .accent:hover {
  transform: translateY(-2px) scale(1.02);
  transition: transform 260ms cubic-bezier(.2,.9,.3,1);
}


/* entrance: when body has .page-enter class we animate the accent in */
.page-enter .hero-left .hero-title .accent {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* subtle hover micro-interaction for the name */
.hero-left .hero-title .accent:hover {
  transform: translateY(-2px) scale(1.02);
  transition: transform 260ms cubic-bezier(.2,.9,.3,1);
}

/* Word-level fallback reveal via CSS (works when animations.js splits title into words) */
.hero-left .hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition: transform .7s cubic-bezier(.2,.9,.3,1), opacity .7s;
}
.page-enter .hero-left .hero-title .word {
  opacity: 1;
  transform: none;
}

/* ========== SMALL RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 1000px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 28px; }
  .profile-photo { width: 220px; height: 220px; }
  .project-preview { right: 6px; width: 260px; height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-left .hero-title .accent { animation: none; }
  .hero-title .word, .timeline-item, .project-preview, .lottie-inline { transition: none !important; animation: none !important; }
}
