/* =========================================================
   zenaufa.id — styles (light theme)
   Retheme the whole site from the tokens in :root.
   ========================================================= */
:root {
  color-scheme: light;
  --orb1-color: #a855f7;
  --orb2-color: #ec4899;
  --orb3-color: #06b6d4;
  --text-primary: #18171d;
  --text-secondary: #5b5866;
  --bg-primary: #faf9fc;
  --surface: rgba(255, 255, 255, 0.65);
  --border: rgba(24, 23, 29, 0.08);
  --placeholder: #eeecf2;
  --accent-purple: #4c2295;
  --accent-purple-light: #793bb3;
  --font: 'Overpass', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--accent-purple-light); outline-offset: 3px; }

/* ---------- Layout ---------- */
.container { width: 80%; max-width: 1080px; margin: 0 auto; padding: 2rem 0; }
.section { padding: 15px 0 0; position: relative; overflow: hidden; }
.content-wrapper { position: relative; z-index: 3; }

/* ---------- Ambient background: orbs, vignette, progress ---------- */
.floating-orbs {
  position: fixed; inset: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
}
/* Soft glow: a solid colour (so colour changes can fade smoothly) shaped by a
   fixed radial mask — same look as filter: blur(), far cheaper to paint */
.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
  background-color: var(--c);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 45%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 45%, transparent 100%);
  transition: background-color 1.5s ease;
  animation: float 20s infinite ease-in-out;
  will-change: transform;
}
.orb1 { --c: var(--orb1-color); width: 420px; height: 420px; top: calc(10% - 60px); left: calc(10% - 60px); }
.orb2 { --c: var(--orb2-color); width: 520px; height: 520px; top: calc(50% - 60px); right: calc(10% - 60px); animation-delay: 5s; }
.orb3 { --c: var(--orb3-color); width: 370px; height: 370px; bottom: calc(10% - 60px); left: calc(30% - 60px); animation-delay: 10s; }

.vignette-overlay {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(124, 58, 237, 0.08) 100%);
  opacity: 0.6;
}

.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent-purple-light), var(--accent-purple));
  z-index: 10000;
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Hero ---------- */
/* Column layout: hero content fills the middle, logo strip sits just above the scroll arrow */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  padding: 4% 0 100px;
}
.hero > .content-wrapper { flex: 1; display: flex; align-items: center; }

#particles-js { position: absolute; inset: 0; z-index: 2; }
#particles-js canvas { display: block; width: 100%; height: 100%; }

.hero-content { display: flex; justify-content: space-between; align-items: stretch; gap: 4rem; width: 100%; }

.hero-text {
  flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: slideLeft 1.4s var(--out);
}
.hero-text h1 {
  font-size: 50px;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  animation: slideTop 1.4s var(--out) 0.15s backwards;
}

.hero-image { flex: 1; display: flex; align-items: flex-end; }
.hero-image img {
  display: block;
  max-width: 100%; height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(76, 34, 149, 0.12);
  transition: transform 0.4s var(--bounce), box-shadow 0.4s ease;
  transform-origin: bottom center;
}
.hero-image img:hover { transform: scale(1.03); box-shadow: 0 20px 40px rgba(124, 58, 237, 0.3); }

.animated-text {
  min-height: 2em;
  margin: 1rem 0;
  font-size: 1.2rem;
  color: var(--text-secondary);
  opacity: 0;
  animation: initialFadeIn 1.2s var(--out) 0.5s forwards;
}
.animated-text.ready { opacity: 1; animation: none; }
.animated-text.ready.changing { animation: textChange 1.5s ease-in-out; }

.scroll-arrow {
  position: absolute; bottom: 40px; left: 50%;
  z-index: 3;
  width: 40px; height: 40px;
  padding: 0; border: 0; background: none;
  color: var(--text-primary);
  cursor: pointer;
  animation: bounce 2s infinite;
}
.scroll-arrow svg { width: 100%; height: 100%; fill: currentColor; }
.scroll-arrow:hover { animation-play-state: paused; color: var(--accent-purple-light); }

/* ---------- Connect button ---------- */
.connect-btn {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 10px;
  margin-top: 1.5rem;
  padding: 14px 32px;
  color: #fff;
  background: var(--text-primary);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1rem; font-weight: 600; letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(24, 23, 29, 0.25);
  transition: transform 0.3s var(--bounce), box-shadow 0.3s var(--bounce), background-color 0.3s ease;
}
.connect-btn:hover { transform: scale(1.08); background: #000; box-shadow: 0 10px 35px rgba(24, 23, 29, 0.35); }
.connect-btn svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

/* ---------- Hero testimonial carousel ---------- */
.hero-testimonial-carousel {
  margin-top: 1.5rem;
  position: relative;
  width: 100%; max-width: 520px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(76, 34, 149, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.testimonial-track { display: flex; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.testimonial-card { min-width: 100%; flex: 0 0 100%; padding: 24px; text-align: left; }
.testimonial-quote {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 4; line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.testimonial-quote::before {
  content: '\201C';
  font-size: 2rem; line-height: 1;
  color: var(--accent-purple-light);
  font-family: Georgia, serif;
  margin-right: 4px;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
}
.testimonial-info h4 { font-size: 0.85rem; color: var(--text-primary); margin: 0 0 2px; font-weight: 600; }
.testimonial-info p { font-size: 0.75rem; color: var(--text-secondary); margin: 0; line-height: 1.4; }

.testimonial-nav { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 24px 16px; }
.testimonial-dot {
  width: 6px; height: 6px; padding: 0; border: none;
  border-radius: 50%;
  background: rgba(24, 23, 29, 0.18);
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.testimonial-dot.active { background: var(--accent-purple-light); transform: scale(1.4); }

.testimonial-linkedin-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 0 24px 16px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.testimonial-linkedin-badge:hover { color: var(--accent-purple-light); }
.testimonial-linkedin-badge svg { width: 14px; height: 14px; fill: #0a66c2; }

/* ---------- Logo strip (infinite marquee) ---------- */
.logo-strip { position: relative; z-index: 3; width: 100%; padding-top: 1.5rem; }
.logo-strip-title {
  text-align: center;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; }
.logo-item {
  display: inline-flex; align-items: center; gap: 10px;
  margin-right: 14px;
  padding: 10px 18px 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.3s ease, opacity 0.3s ease, color 0.3s ease, transform 0.3s var(--bounce);
}
a.logo-item { text-decoration: none; cursor: pointer; }
.logo-item:hover, .logo-item:focus-visible { filter: none; opacity: 1; color: var(--text-primary); transform: translateY(-2px); }
a.logo-item:hover { border-color: rgba(121, 59, 179, 0.35); box-shadow: 0 6px 18px rgba(76, 34, 149, 0.12); }
.logo-item img { width: 28px; height: 28px; margin-top: -2px; object-fit: contain; border-radius: 6px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section headers ---------- */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: '';
  position: absolute; bottom: -10px; left: 0;
  width: 100%; height: 4px;
  background: var(--text-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--out) 0.15s;
}
.section-header.visible h2::after { transform: scaleX(1); }
.section-header h2:hover {
  background: linear-gradient(90deg, var(--accent-purple-light), var(--accent-purple));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Experience / training / activity items ---------- */
.experience-item {
  display: flex; justify-content: space-between; align-items: center; gap: 4rem;
  margin-bottom: 60px;
  min-height: 200px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.experience-item:last-child { margin-bottom: 5px; }
.experience-item.visible { opacity: 1; transform: none; }

.experience-text { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 50%; }
.experience-text h3 { font-size: 1.5rem; line-height: 1.35; margin-bottom: 0.5rem; color: var(--text-primary); }
.experience-text p { margin-bottom: 0.5rem; color: var(--text-secondary); }
.experience-text .org { color: var(--text-primary); font-weight: 800; }

/* Staggered reveal: title → company → date → description slide in one after another */
.experience-text > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--out), transform 0.6s var(--out);
}
.experience-item.visible .experience-text > * { opacity: 1; transform: none; }
.experience-item.visible .experience-text > :nth-child(1) { transition-delay: 0.08s; }
.experience-item.visible .experience-text > :nth-child(2) { transition-delay: 0.16s; }
.experience-item.visible .experience-text > :nth-child(3) { transition-delay: 0.24s; }
.experience-item.visible .experience-text > :nth-child(4) { transition-delay: 0.32s; }

.experience-image { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 45%; }

/* ---------- Image carousel ---------- */
.carousel-container {
  position: relative;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
  border-radius: 10px;
  background-color: var(--placeholder);
  box-shadow: 0 10px 30px rgba(76, 34, 149, 0.1);
  transition: transform 0.4s var(--bounce), box-shadow 0.4s ease;
}
.carousel-container:hover { transform: scale(1.03); box-shadow: 0 20px 50px rgba(76, 34, 149, 0.18); }

.carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.5s ease-in-out; }
.carousel-slide { flex: 0 0 100%; min-width: 100%; }
.carousel-slide img { display: block; width: 100%; height: auto; }
/* Multi-photo items crossfade: slides are stacked, the active one fades in */
.carousel-container.multi-slide .carousel-track { position: relative; }
.carousel-container.multi-slide .carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.carousel-container.multi-slide .carousel-slide.active-slide { opacity: 1; }
.carousel-container.multi-slide .carousel-slide img { height: 100%; object-fit: cover; }

/* Ken Burns: Activities photos drift slowly while on screen */
#activities-list .carousel-slide img {
  animation: kenburns 18s ease-in-out infinite alternate;
  animation-play-state: paused;
}
#activities-list .carousel-container.in-view .carousel-slide img { animation-play-state: running; }
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.12) translate(-2%, -1.5%); }
}

.carousel-btn {
  position: absolute; top: 50%; z-index: 10;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  transform: translateY(-50%);
  transition: transform 0.3s var(--bounce), background-color 0.3s ease;
}
.carousel-btn:hover { background: rgba(255, 255, 255, 0.95); transform: translateY(-50%) scale(1.1); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot {
  width: 8px; height: 8px; padding: 0; border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.dot.active { background: #fff; transform: scale(1.2); }

/* ---------- Back to top (ring fills as you scroll) ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  padding: 0; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent-purple);
  box-shadow: 0 8px 24px rgba(76, 34, 149, 0.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s ease, visibility 0.3s, transform 0.4s var(--bounce), box-shadow 0.3s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 14px 32px rgba(124, 58, 237, 0.3); }
.back-to-top .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.back-to-top .ring circle { fill: none; stroke-width: 3; }
.back-to-top .ring .track { stroke: rgba(76, 34, 149, 0.12); }
.back-to-top .ring .fill { stroke: url(#btt-gradient); stroke-linecap: round; stroke-dasharray: 144.5; stroke-dashoffset: 144.5; }
.back-to-top .arrow { width: 20px; height: 20px; fill: currentColor; position: relative; }

@media (max-width: 768px) {
  .back-to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 3;
  text-align: center;
  padding: 3rem 0 2.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.site-footer a { color: var(--text-primary); text-decoration: none; font-weight: 800; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Keyframes ---------- */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-20px); }
  60% { transform: translateX(-50%) translateY(-10px); }
}
@keyframes initialFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes textChange {
  0% { opacity: 1; }
  20% { opacity: 0; transform: translateY(10px); }
  80% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: none; }
}
@keyframes slideLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes slideTop { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -50px) rotate(120deg); }
  66% { transform: translate(-20px, 30px) rotate(240deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .hero-content { flex-direction: column; text-align: center; align-items: center; gap: 1.5rem; }
  .hero-text { align-items: center; }
  .hero-image { max-width: 50%; }
  .connect-btn { align-self: center; }
}

@media (max-width: 768px) {
  .hero { min-height: 100vh; min-height: 100dvh; padding: 2% 0 56px; }
  .hero-content { gap: 0.6rem; }
  .hero-image { max-height: 35vh; overflow: hidden; justify-content: center; max-width: none; }
  .hero-image img { max-height: 35vh; width: auto; object-fit: contain; }
  .hero-text { width: 100%; min-width: 0; overflow: hidden; }
  .hero-text h1 { font-size: 28px; margin-bottom: 0.3rem; }
  .animated-text { font-size: 1rem; margin: 0.3rem 0; min-height: 1.5em; }
  .connect-btn { margin: 0.6rem auto 0.8rem; padding: 10px 24px; font-size: 0.85rem; }

  .hero-testimonial-carousel { margin-top: 0.6rem; max-width: 100%; border-radius: 12px; }
  .testimonial-card { padding: 14px; }
  .testimonial-quote { font-size: 0.75rem; line-height: 1.5; margin-bottom: 10px; -webkit-line-clamp: 3; line-clamp: 3; }
  .testimonial-quote::before { font-size: 1.4rem; }
  .testimonial-avatar { width: 32px; height: 32px; }
  .testimonial-info h4 { font-size: 0.75rem; }
  .testimonial-info p { font-size: 0.65rem; }
  .testimonial-nav { padding: 0 14px 10px; gap: 4px; }
  .testimonial-dot { width: 5px; height: 5px; }
  .testimonial-linkedin-badge { padding: 0 14px 10px; font-size: 0.6rem; }
  .testimonial-linkedin-badge svg { width: 12px; height: 12px; }

  .scroll-arrow { bottom: 10px; width: 30px; height: 30px; }

  .experience-item { flex-direction: column; align-items: stretch; margin-bottom: 6rem; gap: 1rem; }
  .experience-text { text-align: center; max-width: 100%; }
  .logo-strip { padding-top: 0.75rem; }
  .logo-strip-title { margin-bottom: 0.75rem; }
  .logo-item { font-size: 0.8rem; padding: 8px 14px 6px 10px; }
  .logo-item img { width: 22px; height: 22px; }
  .experience-image { margin: 0.5rem 0; width: 100%; min-width: 100%; }

  .container { width: 90%; }
  .section-header { margin-bottom: 4rem; }
}

/* Respect users who ask the OS for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .experience-item, .experience-text > * { opacity: 1; transform: none; }
  .section-header h2::after { transform: none; }
  .marquee { overflow-x: auto; }
}
