:root {
  --bg: #fef0f7;
  --bg-soft: #fde6f1;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --border: rgba(192, 132, 252, 0.18);
  --border-strong: rgba(192, 132, 252, 0.32);
  --text: #2d1b3d;
  --text-dim: #6b5577;
  --text-mute: #9a89af;
  --accent: #ec4899;
  --accent-2: #c084fc;
  --accent-3: #a78bfa;
  --gradient: linear-gradient(135deg, #ec4899 0%, #c084fc 50%, #a78bfa 100%);
  --radius: 16px;
  --max-w: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(236, 72, 153, 0.18), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(192, 132, 252, 0.16), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(167, 139, 250, 0.14), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 1;
}

a { color: inherit; text-decoration: none; }

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(254, 240, 247, 0.75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.nav__logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.55);
}

.nav__links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.nav__links a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s var(--ease);
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); }

.lang-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-switch__btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
}

.lang-switch__btn:hover { color: var(--text); }

.lang-switch__btn.is-active {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
}

.hero__photo-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__photo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ec4899, #c084fc, #a78bfa, #ec4899);
  animation: spin 8s linear infinite;
  filter: blur(2px);
  opacity: 0.85;
}

.hero__photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  z-index: 1;
}

.hero__photo-fallback {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--bg);
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  background-image: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero__title span { display: block; }

.hero__title > span:first-child {
  font-size: 0.4em;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.hero__name {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: 1px solid transparent;
  font-family: inherit;
}

.btn--primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.45);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.hero__scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--text-mute));
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* SECTIONS */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.section__head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ABOUT */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text {
  font-size: 1.1rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__text-cta {
  font-style: italic;
  font-weight: 500;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about__facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.about__facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.92rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.about__facts-key {
  color: var(--text-mute);
  font-weight: 500;
}

.about__facts a { color: var(--accent); font-weight: 500; }
.about__facts a:hover { color: var(--accent-2); }

/* TIMELINE */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}

.timeline__item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15);
}

.timeline__date {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.timeline__role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.timeline__company {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.timeline__desc {
  color: var(--text-dim);
}

/* SKILLS */
.skills {
  display: grid;
  gap: 2rem;
}

.skills__group h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text);
  transition: all 0.25s var(--ease);
  cursor: default;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tag:hover {
  background: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.22);
}

/* CERTIFICATE FOLDERS */
.cert-folders {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cert-folder {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cert-folder[open] {
  border-color: var(--border-strong);
  box-shadow: 0 8px 26px rgba(236, 72, 153, 0.08);
}

.cert-folder__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s var(--ease);
}

.cert-folder__head::-webkit-details-marker { display: none; }
.cert-folder__head::marker { content: ''; }

.cert-folder__head:hover {
  background: rgba(255, 255, 255, 0.5);
}

.cert-folder__icon {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}

/* CSS-drawn folder shape */
.cert-folder__icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  border-radius: 3px 3px 4px 4px;
  clip-path: polygon(0 25%, 38% 25%, 48% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(236, 72, 153, 0.25));
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}

.cert-folder[open] .cert-folder__icon {
  transform: translateY(-1px) rotate(-4deg);
  animation: folder-pulse 2.6s ease-in-out infinite;
}

.cert-folder[open] .cert-folder__icon::before {
  opacity: 1;
  filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.45));
}

@keyframes folder-pulse {
  0%, 100% { transform: translateY(-1px) rotate(-4deg) scale(1); }
  50%      { transform: translateY(-2px) rotate(-4deg) scale(1.06); }
}

.cert-folder__head:hover .cert-folder__icon {
  transform: translateY(-1px) rotate(-3deg) scale(1.05);
}

.cert-folder__title {
  position: relative;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  flex: 1;
  letter-spacing: -0.005em;
  background: linear-gradient(110deg, #ec4899 0%, #c084fc 35%, #a78bfa 60%, #ec4899 100%);
  background-size: 220% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.6s var(--ease);
}

.cert-folder[open] .cert-folder__title {
  animation: title-shimmer 5s linear infinite;
}

.cert-folder__head:hover .cert-folder__title {
  background-position: 100% center;
}

@keyframes title-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 220% center; }
}

/* Animated underline under the title — draws in on hover, stays on open */
.cert-folder__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}

.cert-folder__head:hover .cert-folder__title::after,
.cert-folder[open] .cert-folder__title::after {
  transform: scaleX(1);
}

.cert-folder__count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(236, 72, 153, 0.1);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(236, 72, 153, 0.18);
  transition: all 0.3s var(--ease);
}

.cert-folder[open] .cert-folder__count {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.3);
}

.cert-folder__chevron {
  font-size: 1.5rem;
  color: var(--text-mute);
  font-weight: 300;
  transition: transform 0.3s var(--ease);
  line-height: 1;
}

.cert-folder[open] .cert-folder__chevron {
  transform: rotate(90deg);
  color: var(--accent);
}

.cert-folder .cards {
  padding: 0 1.25rem 1.25rem;
  animation: cert-folder-open 0.35s var(--ease);
}

@keyframes cert-folder-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* CARDS (generic + cert) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.5rem 1.4rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  color: var(--text);
}

.cert-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gradient);
  opacity: 0.85;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(236, 72, 153, 0.18);
  background: white;
}

.cert-card__issuer {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.cert-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.cert-card__meta {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-mute);
}

.cert-card__badge {
  background: var(--gradient);
  color: white;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* PROJECTS */
.project-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.project-card__title { font-size: 1.25rem; }

.project-card__desc { color: var(--text-dim); }

.project-card__cta {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

/* GOALS */
.goals__text {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: 2rem;
}

.goals__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill {
  padding: 0.6rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-image: linear-gradient(135deg, rgba(236, 72, 153, 0.10), rgba(167, 139, 250, 0.10));
}

/* GAME */
.section--game {
  text-align: center;
}
.section--game .section__head {
  justify-content: center;
  border-bottom: none;
  margin-bottom: 1.25rem;
}
.game__text {
  max-width: 620px;
  margin: 0 auto 2rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.game__cta {
  font-size: 1.05rem;
  padding: 1rem 2.25rem;
}

/* RESUMES */
.resumes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.resume-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.resume-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: white;
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.22);
}

.resume-card__flag {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.65rem;
  background: var(--gradient);
  color: white;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.resume-card__label {
  font-size: 0.95rem;
  color: var(--text);
}

/* CONTACT */
.section--contact { text-align: center; }

.section--contact .section__head {
  justify-content: center;
  border-bottom-color: transparent;
}

.contact__text {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  font-size: 0.95rem;
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact__link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: white;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.18);
}

.contact__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* REVEAL ON SCROLL */
.section, .hero__cta, .hero__photo-wrap, .hero__title, .hero__tagline {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.section.is-visible,
.hero__photo-wrap.is-visible,
.hero__title.is-visible,
.hero__tagline.is-visible,
.hero__cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 820px) {
  .nav { padding: 0.75rem 1rem; gap: 0.75rem; }
  .nav__links { display: none; }
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .project-card { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .section { padding: 4rem 1.25rem; }
  .hero { padding-top: 6rem; }
}

@media (max-width: 480px) {
  .lang-switch__btn { padding: 0.35rem 0.55rem; font-size: 0.7rem; }
  .hero__photo-wrap { width: 140px; height: 140px; }
  .hero__cta { flex-direction: column; width: 100%; max-width: 280px; }
  .btn { justify-content: center; }
}
