/* Modern portfolio refresh. Loaded after the original stylesheet so content and behavior stay intact. */
:root {
  --color-primary: #22d3ee;
  --color-primary-light: #67e8f9;
  --color-primary-dark: #0891b2;
  --color-secondary: #a3e635;
  --color-secondary-light: #d9f99d;
  --color-secondary-dark: #65a30d;
  --color-bg-primary: #080a0d;
  --color-bg-secondary: #0d1218;
  --color-bg-tertiary: #121922;
  --color-bg-card: rgba(255, 255, 255, 0.045);
  --color-bg-glass: rgba(12, 18, 25, 0.68);
  --color-bg-glass-strong: rgba(18, 26, 35, 0.86);
  --color-text-primary: #f7fafc;
  --color-text-secondary: #d7dee8;
  --color-text-muted: #8d9bab;
  --color-border: rgba(255, 255, 255, 0.11);
  --color-border-hover: rgba(255, 255, 255, 0.26);
  --color-glow: rgba(34, 211, 238, 0.22);
  --color-glow-strong: rgba(34, 211, 238, 0.38);
  --color-glow-secondary: rgba(163, 230, 53, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, 0.28);
  --shadow-xl: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shadow-2xl: 0 34px 100px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 20px 60px rgba(34, 211, 238, 0.18);
  --shadow-glow-strong: 0 24px 80px rgba(34, 211, 238, 0.26);
  --shadow-glow-secondary: 0 20px 60px rgba(163, 230, 53, 0.14);
  --radius-sm: 0.35rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 0.9rem;
  --radius-2xl: 1.15rem;
  --radius-3xl: 1.4rem;
  --transition-fast: 160ms ease;
  --transition-normal: 280ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 520ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-bounce: 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.78), #080a0d 44%),
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), transparent 28%),
    linear-gradient(315deg, rgba(163, 230, 53, 0.09), transparent 30%),
    #080a0d;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
}

.enhanced-bg {
  opacity: 0.35;
}

.mesh-gradient,
.mesh-gradient-2,
.mesh-gradient-3 {
  display: none;
}

.noise-overlay {
  opacity: 0.45;
  animation: none;
}

main {
  max-width: none;
  padding-top: 112px;
}

.section-container {
  width: min(1180px, calc(100% - 40px));
  padding: 0;
}

.section-header {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-title {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: 0;
  background: linear-gradient(120deg, #ffffff 8%, #b9f8ff 52%, #d9f99d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-wrap: balance;
}

.section-subtitle {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  text-wrap: balance;
}

.navbar {
  top: 18px;
  width: min(680px, calc(100% - 28px));
  padding: 6px;
  background: rgba(8, 12, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.navbar-container {
  justify-content: space-between;
  gap: 4px;
}

.navbar-container a {
  flex: 1;
  justify-content: center;
  padding: 0.72rem 1rem;
  color: #cbd5df;
  border-radius: 999px;
}

.navbar-container a::before {
  display: none;
}

.navbar-container a:hover,
.navbar-container a.active {
  color: #041015;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  box-shadow: none;
  transform: translateY(-1px);
}

.nav-icon {
  color: currentColor;
}

.hero-section {
  min-height: calc(100vh - 72px);
  padding: clamp(2rem, 5vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}

.hero-container {
  width: min(1180px, calc(100% - 40px));
}

.hero-content {
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  margin-bottom: clamp(2.25rem, 5vw, 4rem);
}

.hero-title {
  font-size: clamp(3.15rem, 8.7vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  margin-bottom: 1.35rem;
}

.name-primary {
  background: linear-gradient(120deg, #ffffff 0%, #dff9ff 48%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.name-variations,
.name-secondary {
  color: var(--color-text-muted);
}

.name-variations {
  display: inline-flex;
  max-width: 100%;
  margin: 0.8rem 0 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-size: clamp(0.86rem, 1.4vw, 1rem);
  white-space: normal;
}

.name-secondary {
  font-size: clamp(1.05rem, 2.25vw, 1.75rem);
  font-weight: 500;
  margin-top: 0.85rem;
}

.hero-subtitle {
  min-height: 2.4rem;
  margin-bottom: 1.2rem;
  color: var(--color-primary-light);
  font-size: clamp(1.1rem, 2.5vw, 1.65rem);
}

.tagline {
  max-width: 680px;
  color: #c8d1dc;
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.hero-actions {
  gap: 0.9rem;
  flex-wrap: wrap;
}

.cta-button {
  min-height: 54px;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  font-size: 0.98rem;
  letter-spacing: 0;
  transform: translateZ(0);
}

.cta-button.primary {
  color: #041015;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-color: transparent;
}

.cta-button.secondary {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.055);
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.button-glow {
  display: none;
}

.hero-visual {
  min-height: 410px;
}

.profile-container {
  width: min(380px, 82vw);
  height: min(380px, 82vw);
  display: grid;
  place-items: center;
}

.profile-container::before {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 32px;
  transform: rotate(10deg);
}

.profile-glow-outer,
.profile-glow-inner {
  display: none;
}

.profile-img {
  width: min(315px, 68vw);
  height: min(315px, 68vw);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
  filter: saturate(1.06) contrast(1.03);
}

.profile-img:hover {
  transform: translateY(-8px) scale(1.015);
  filter: saturate(1.08) contrast(1.04);
}

.profile-frame {
  width: min(345px, 73vw);
  height: min(345px, 73vw);
  border-radius: 34px;
  border-color: rgba(34, 211, 238, 0.42);
  animation: none;
  transform: translate(-50%, -50%) rotate(-6deg);
}

.tech-badges {
  inset: 0;
}

.tech-badge {
  padding: 0.5rem 0.78rem;
  color: #eafcff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(12, 18, 25, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  animation: float-badge 7s ease-in-out infinite;
}

.tech-badge:nth-child(1) { top: 8%; right: 5%; }
.tech-badge:nth-child(2) { top: 22%; left: 0; }
.tech-badge:nth-child(3) { bottom: 24%; right: 0; }
.tech-badge:nth-child(4) { bottom: 9%; left: 8%; }
.tech-badge:nth-child(5) { top: 49%; right: 8%; animation-delay: 2.2s; }

.hero-footer {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-3xl);
  background: rgba(255, 255, 255, 0.035);
}

.location-info,
.cert-container {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cert-container {
  padding: 0;
}

.cert-logo,
.flag-icon,
.location-pin,
.social-icon {
  filter: none;
}

.projects-section,
.testimonials-section,
.stats-section,
.chatbot-section,
.contact-section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

.testimonials-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card,
.stat-card,
.testimonial-slide,
.chatbot-embed-container,
.social-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(8, 12, 16, 0.72);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
}

.project-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.55rem;
}

.project-card::before,
.card-background,
.card-glow,
.stat-background,
.stat-glow,
.testimonial-background,
.social-background {
  display: none;
}

.project-card:hover,
.project-card:focus-visible,
.stat-card:hover,
.stat-card:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-6px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.card-icon,
.stat-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  border-radius: 16px;
  color: #041015;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  font-size: 1.55rem;
  filter: none;
}

.card-title {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.12;
}

.card-description {
  color: var(--color-text-muted);
}

.card-tech-tags {
  justify-content: flex-start;
  margin-top: auto;
}

.tech-tag {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: #bff8ff;
  letter-spacing: 0;
}

.testimonial-slide {
  padding: clamp(1.5rem, 5vw, 3rem);
}

.testimonial-slide::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
}

.testimonial-slide.active {
  animation: cleanSlideIn 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cleanSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-quote p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.testimonial-quote mark {
  color: #d9f99d;
  background: transparent;
  -webkit-text-fill-color: currentColor;
}

.author-name {
  color: var(--color-primary-light);
}

.carousel-nav {
  width: 48px;
  height: 48px;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.055);
}

.carousel-nav:hover,
.carousel-nav:focus-visible {
  color: #041015;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  transform: translateY(-2px);
}

.dot {
  width: 9px;
  height: 9px;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
}

.dot.active,
.dot:hover {
  width: 30px;
  background: var(--color-primary);
  transform: none;
  box-shadow: none;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: none;
}

.stat-card {
  padding: 1.5rem;
}

.stat-icon {
  margin: 0 auto 1.15rem;
}

.count {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  background: linear-gradient(135deg, #ffffff, var(--color-primary-light), var(--color-secondary-light));
  -webkit-background-clip: text;
  background-clip: text;
  filter: none;
}

.stat-label {
  color: var(--color-text-muted);
}

.chatbot-embed-container {
  height: min(680px, 78vh);
  padding: 10px;
}

.chatbot-embed-container iframe {
  border-radius: calc(var(--radius-2xl) - 0.35rem);
  background: #fff;
}

.contact-text {
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

.socials {
  gap: 1rem;
}

.social-link {
  min-width: 170px;
  flex-direction: row;
  justify-content: flex-start;
  padding: 1rem;
}

.social-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.social-link:hover .social-icon {
  transform: scale(1.04);
  filter: none;
}

.social-label {
  color: var(--color-text-secondary);
}

.scroll-to-top,
.floating-chat-btn {
  width: 54px;
  height: 54px;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top {
  background: rgba(8, 12, 16, 0.82);
}

.scroll-to-top:hover,
.floating-chat-btn:hover {
  transform: translateY(-3px);
}

.floating-chat-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #041015;
}

.chat-pulse {
  border-color: rgba(34, 211, 238, 0.55);
}

.fade-in {
  animation: none;
}

.fade-in.visible {
  animation: cleanReveal 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cleanReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cursor {
  color: var(--color-secondary);
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .card-tech-tags {
    justify-content: center;
  }

  .project-card {
    text-align: center;
    align-items: center;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  main {
    padding-top: 92px;
  }

  .section-container,
  .hero-container {
    width: min(100% - 28px, 1180px);
  }

  .navbar {
    top: 10px;
    width: calc(100% - 20px);
    border-radius: 22px;
  }

  .navbar-container a {
    min-width: 0;
    padding: 0.72rem 0.45rem;
    gap: 0.35rem;
  }

  .navbar-container a span {
    font-size: 0.78rem;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-visual {
    min-height: 260px;
    order: -1;
  }

  .profile-container {
    width: 245px;
    height: 245px;
  }

  .profile-img {
    width: 210px;
    height: 210px;
    border-radius: 24px;
  }

  .profile-frame {
    width: 230px;
    height: 230px;
    border-radius: 28px;
  }

  .hero-footer {
    gap: 1rem;
  }

  .projects-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .socials {
    align-items: stretch;
  }

  .social-link {
    width: min(100%, 360px);
  }

  .floating-chat-btn {
    left: 1rem;
    bottom: 1rem;
  }

  .scroll-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .navbar-container a span {
    display: none;
  }

  .navbar-container a {
    min-height: 46px;
  }

  .name-variations {
    border-radius: 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .cta-button {
    width: 100%;
    max-width: none;
  }

  .location-info {
    flex-direction: column;
  }

  .cert-container {
    gap: 0.75rem;
  }

  .cert-logo {
    max-width: 100px;
    height: 34px;
  }

  .testimonial-slide {
    text-align: left;
  }

  .carousel-controls {
    gap: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in.visible,
  .testimonial-slide.active {
    animation: none;
  }
}

/* V2 polish: calmer premium colors, working motion, and a compact AI assistant frame. */
:root {
  --color-primary: #4f8cff;
  --color-primary-light: #8fb5ff;
  --color-primary-dark: #2563eb;
  --color-secondary: #9b7cff;
  --color-secondary-light: #c4b5fd;
  --color-secondary-dark: #6d5dfc;
  --color-bg-primary: #07080b;
  --color-bg-secondary: #0b0f16;
  --color-bg-tertiary: #111722;
  --color-bg-card: rgba(255, 255, 255, 0.05);
  --color-bg-glass: rgba(10, 14, 21, 0.72);
  --color-bg-glass-strong: rgba(14, 20, 31, 0.9);
  --color-text-primary: #f8fafc;
  --color-text-secondary: #dbe4f0;
  --color-text-muted: #98a6ba;
  --color-border: rgba(218, 226, 240, 0.12);
  --color-border-hover: rgba(143, 181, 255, 0.42);
  --color-glow: rgba(79, 140, 255, 0.22);
  --color-glow-strong: rgba(79, 140, 255, 0.34);
  --color-glow-secondary: rgba(155, 124, 255, 0.2);
  --shadow-glow: 0 22px 70px rgba(79, 140, 255, 0.18);
  --shadow-glow-strong: 0 28px 90px rgba(79, 140, 255, 0.28);
}

body {
  background:
    linear-gradient(180deg, rgba(7, 8, 11, 0.86) 0%, #07080b 46%, #080b12 100%),
    radial-gradient(1200px 700px at 14% 8%, rgba(79, 140, 255, 0.18), transparent 58%),
    radial-gradient(900px 620px at 88% 14%, rgba(155, 124, 255, 0.14), transparent 62%),
    linear-gradient(135deg, #07080b, #101522);
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 56px 56px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, rgba(79, 140, 255, 0.08) 38%, transparent 58%),
    linear-gradient(245deg, transparent 8%, rgba(155, 124, 255, 0.07) 42%, transparent 66%);
  opacity: 0.9;
  animation: ambientShift 16s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.035);
  }
}

.section-title {
  background: linear-gradient(120deg, #ffffff 0%, #dfe8ff 44%, var(--color-primary-light) 72%, var(--color-secondary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.navbar {
  background: rgba(7, 10, 16, 0.76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.navbar-container a {
  position: relative;
}

.navbar-container a:hover,
.navbar-container a.active {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.88), rgba(155, 124, 255, 0.78));
}

.name-primary {
  background: linear-gradient(120deg, #ffffff 0%, #eaf0ff 42%, var(--color-primary-light) 76%, var(--color-secondary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle,
.cursor {
  color: var(--color-primary-light);
}

.cta-button.primary,
.floating-chat-btn,
.card-icon,
.stat-icon,
.carousel-nav:hover,
.carousel-nav:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.cta-button {
  isolation: isolate;
}

.cta-button::before,
.project-card::after,
.stat-card::after,
.social-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.16) 40%, transparent 68%);
  transform: translateX(-120%);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}

.cta-button:hover::before,
.project-card:hover::after,
.stat-card:hover::after,
.social-link:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

.profile-container {
  animation: portraitFloat 6.5s ease-in-out infinite;
}

.profile-container::before {
  border-color: rgba(143, 181, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(155, 124, 255, 0.1), 0 24px 90px rgba(79, 140, 255, 0.12);
}

.profile-img {
  border-color: rgba(226, 232, 240, 0.2);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(79, 140, 255, 0.18);
}

.profile-frame {
  border-color: rgba(143, 181, 255, 0.38);
  animation: frameDrift 9s ease-in-out infinite alternate;
}

@keyframes portraitFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes frameDrift {
  from {
    transform: translate(-50%, -50%) rotate(-8deg) scale(1);
  }
  to {
    transform: translate(-50%, -50%) rotate(5deg) scale(1.025);
  }
}

.tech-badge {
  color: #eef4ff;
  background: rgba(11, 15, 22, 0.8);
  border-color: rgba(143, 181, 255, 0.22);
}

.hero-footer,
.project-card,
.stat-card,
.testimonial-slide,
.chatbot-embed-container,
.social-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028)),
    rgba(8, 12, 19, 0.76);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.project-card,
.stat-card,
.social-link {
  overflow: hidden;
}

.project-card:hover,
.project-card:focus-visible,
.stat-card:hover,
.stat-card:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tech-tag {
  border-color: rgba(143, 181, 255, 0.28);
  background: rgba(79, 140, 255, 0.09);
  color: #d7e5ff;
}

.testimonial-quote mark {
  color: var(--color-primary-light);
}

.author-name {
  color: var(--color-secondary-light);
}

.dot.active,
.dot:hover {
  background: var(--color-primary-light);
}

.count {
  background: linear-gradient(135deg, #ffffff, var(--color-primary-light), var(--color-secondary-light));
  -webkit-background-clip: text;
  background-clip: text;
}

.chatbot-section .section-container {
  display: grid;
  justify-items: center;
}

.chatbot-section .section-header {
  width: 100%;
}

.chatbot-embed-container {
  width: min(440px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #0b0f16;
}

.chatbot-embed-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: transparent;
}

.fade-in {
  opacity: 1;
  transform: none;
  animation: none;
}

.animations-ready .fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: none;
}

.animations-ready .fade-in.animate {
  animation: cleanReveal 780ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-section.fade-in.animate .hero-text-block {
  animation: slideInLeft 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-section.fade-in.animate .hero-visual {
  animation: slideInRight 920ms cubic-bezier(0.16, 1, 0.3, 1) both 120ms;
}

.projects-section.animate .project-card,
.stats-section.animate .stat-card,
.contact-section.animate .social-link {
  animation: cardRise 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.projects-section.animate .project-card:nth-child(2),
.stats-section.animate .stat-card:nth-child(2),
.contact-section.animate .social-link:nth-child(2) {
  animation-delay: 110ms;
}

.projects-section.animate .project-card:nth-child(3),
.stats-section.animate .stat-card:nth-child(3),
.contact-section.animate .social-link:nth-child(3) {
  animation-delay: 220ms;
}

.stats-section.animate .stat-card:nth-child(4) {
  animation-delay: 330ms;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-32px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .profile-container,
  .profile-frame,
  .fade-in.animate,
  .hero-section.fade-in.animate .hero-text-block,
  .hero-section.fade-in.animate .hero-visual,
  .projects-section.animate .project-card,
  .stats-section.animate .stat-card,
  .contact-section.animate .social-link {
    animation: none !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* V3 cinematic polish: depth, 3D hover, sharper motion, and premium glass. */
body {
  --page-x: 50vw;
  --page-y: 25vh;
}

body::after {
  background:
    radial-gradient(720px circle at var(--page-x) var(--page-y), rgba(79, 140, 255, 0.16), transparent 42%),
    linear-gradient(115deg, transparent 0%, rgba(79, 140, 255, 0.08) 38%, transparent 58%),
    linear-gradient(245deg, transparent 8%, rgba(155, 124, 255, 0.08) 42%, transparent 66%);
}

main {
  perspective: 1400px;
}

.section-container,
.hero-container {
  transform-style: preserve-3d;
}

.section-title {
  filter: drop-shadow(0 18px 34px rgba(79, 140, 255, 0.12));
}

.section-title::after {
  content: "";
  display: block;
  width: 76px;
  height: 2px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--color-primary-light), var(--color-secondary-light), transparent);
  transform-origin: center;
  animation: titleLine 3.8s ease-in-out infinite;
}

@keyframes titleLine {
  0%, 100% {
    opacity: 0.58;
    transform: scaleX(0.78);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.2);
  }
}

.navbar {
  transform-style: preserve-3d;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(143, 181, 255, 0.48), transparent 28%, rgba(196, 181, 253, 0.36) 72%, transparent);
  opacity: 0.34;
  filter: blur(10px);
}

.navbar-container a {
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), background 280ms ease, color 280ms ease;
}

.navbar-container a:hover,
.navbar-container a.active {
  transform: translateY(-2px) translateZ(18px);
}

.hero-content {
  transform-style: preserve-3d;
}

.hero-text-block {
  transform: translateZ(22px);
}

.hero-title {
  text-shadow: 0 28px 80px rgba(79, 140, 255, 0.18);
}

.name-primary {
  background-size: 180% 100%;
  animation: titleSheen 7s ease-in-out infinite;
}

@keyframes titleSheen {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.name-variations {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 50px rgba(0, 0, 0, 0.22);
}

.hero-visual {
  transform-style: preserve-3d;
}

.profile-container {
  transform-style: preserve-3d;
}

.profile-container::after {
  content: "";
  position: absolute;
  inset: 18%;
  z-index: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.22), rgba(155, 124, 255, 0.16));
  filter: blur(28px);
  transform: translateZ(-35px) rotate(-12deg);
  animation: portraitAura 5.5s ease-in-out infinite alternate;
}

@keyframes portraitAura {
  from {
    opacity: 0.55;
    transform: translateZ(-35px) rotate(-12deg) scale(0.94);
  }
  to {
    opacity: 0.95;
    transform: translateZ(-35px) rotate(8deg) scale(1.08);
  }
}

.profile-img {
  transform: translateZ(44px);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 520ms ease, filter 520ms ease;
}

.profile-img:hover {
  transform: translateZ(62px) translateY(-10px) rotateX(2deg) rotateY(-4deg) scale(1.025);
}

.profile-frame {
  transform-style: preserve-3d;
}

.tech-badge {
  transform: translateZ(60px);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), border-color 280ms ease, background 280ms ease;
}

.tech-badge:hover {
  transform: translateZ(74px) translateY(-5px) scale(1.04);
  border-color: rgba(143, 181, 255, 0.42);
}

.hero-footer {
  position: relative;
  overflow: hidden;
}

.hero-footer::before,
.testimonial-slide::after,
.chatbot-embed-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.12) 42%, transparent 68%);
  transform: translateX(-120%);
  animation: slowGlassSweep 8s ease-in-out infinite;
}

@keyframes slowGlassSweep {
  0%, 42% {
    opacity: 0;
    transform: translateX(-120%);
  }
  55% {
    opacity: 0.75;
  }
  78%, 100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

.project-card,
.stat-card,
.testimonial-slide,
.chatbot-embed-container,
.social-link {
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 320ms ease,
    box-shadow 520ms ease,
    background 420ms ease;
}

.project-card::before,
.stat-card::before,
.social-link::before,
.testimonial-slide::before,
.chatbot-embed-container::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(420px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(143, 181, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  opacity: 0;
  transition: opacity 320ms ease;
}

.project-card:hover::before,
.stat-card:hover::before,
.social-link:hover::before,
.testimonial-slide:hover::before,
.chatbot-embed-container:hover::before {
  opacity: 1;
}

.premium-tilt:hover {
  transform:
    translateY(-10px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateZ(18px);
}

.project-card > *,
.stat-card > *,
.testimonial-slide > *,
.social-link > *,
.chatbot-embed-container > * {
  position: relative;
  z-index: 1;
}

.card-icon,
.stat-icon,
.social-icon {
  transform: translateZ(34px);
}

.card-title,
.stat-number,
.social-label {
  transform: translateZ(26px);
}

.card-description,
.stat-label,
.card-tech-tags {
  transform: translateZ(16px);
}

.project-card:hover .card-icon,
.stat-card:hover .stat-icon {
  animation: iconPop 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iconPop {
  0% {
    transform: translateZ(34px) scale(1);
  }
  45% {
    transform: translateZ(54px) scale(1.1) rotate(-4deg);
  }
  100% {
    transform: translateZ(34px) scale(1);
  }
}

.tech-tag {
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), background 280ms ease, border-color 280ms ease;
}

.project-card:hover .tech-tag {
  transform: translateY(-2px);
  background: rgba(143, 181, 255, 0.13);
  border-color: rgba(196, 181, 253, 0.34);
}

.testimonial-slide.active {
  animation: testimonialFlip 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes testimonialFlip {
  from {
    opacity: 0;
    transform: rotateX(8deg) translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: rotateX(0) translateY(0) scale(1);
  }
}

.chatbot-embed-container {
  transform-origin: center;
}

.chatbot-embed-container:hover {
  box-shadow: 0 30px 100px rgba(79, 140, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.magnetic-control {
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease, background 280ms ease;
}

.magnetic-control:hover {
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0) translateY(-3px);
}

.animations-ready .fade-in.animate {
  animation: cinematicReveal 920ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cinematicReveal {
  from {
    opacity: 0;
    transform: translateY(34px) rotateX(7deg) scale(0.985);
    filter: blur(8px);
  }
  65% {
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
    filter: blur(0);
  }
}

.projects-section.animate .project-card,
.stats-section.animate .stat-card,
.contact-section.animate .social-link {
  animation: cardLiftReveal 880ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardLiftReveal {
  from {
    opacity: 0;
    transform: translateY(38px) rotateX(11deg) scale(0.96);
    filter: blur(7px);
  }
  70% {
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 768px) {
  .premium-tilt:hover,
  .magnetic-control,
  .magnetic-control:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .section-title::after,
  .profile-container::after,
  .hero-footer::before,
  .testimonial-slide::after,
  .chatbot-embed-container::after,
  .testimonial-slide.active,
  .animations-ready .fade-in.animate,
  .projects-section.animate .project-card,
  .stats-section.animate .stat-card,
  .contact-section.animate .social-link {
    animation: none !important;
  }
}

/* V4 refinement: smoother performance, roomier assistant, cleaner modern spacing. */
html {
  scroll-padding-top: 96px;
}

body {
  background:
    radial-gradient(1000px 560px at 12% 0%, rgba(79, 140, 255, 0.16), transparent 60%),
    radial-gradient(900px 560px at 92% 10%, rgba(155, 124, 255, 0.12), transparent 62%),
    linear-gradient(180deg, #07080b 0%, #090d14 48%, #07080b 100%);
}

body::before {
  opacity: 0.7;
  background-size: 64px 64px;
}

body::after {
  opacity: 0.72;
  animation-duration: 22s;
}

main {
  padding-top: 106px;
}

.section-container,
.hero-container {
  width: min(1220px, calc(100% - 44px));
}

.projects-section,
.testimonials-section,
.stats-section,
.chatbot-section,
.contact-section {
  padding: clamp(4.6rem, 9vw, 8.5rem) 0;
}

.section-header {
  margin-bottom: clamp(2.2rem, 4.8vw, 4.4rem);
}

.section-subtitle {
  line-height: 1.72;
}

.navbar {
  width: min(720px, calc(100% - 28px));
}

.hero-section {
  min-height: calc(100vh - 64px);
}

.tagline {
  line-height: 1.76;
}

.cta-button,
.navbar-container a,
.carousel-nav,
.scroll-to-top,
.floating-chat-btn {
  backface-visibility: hidden;
}

.hero-footer,
.project-card,
.stat-card,
.testimonial-slide,
.chatbot-embed-container,
.social-link {
  border-color: rgba(220, 229, 245, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.026)),
    rgba(9, 14, 22, 0.82);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.project-card,
.stat-card,
.testimonial-slide,
.social-link {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.premium-tilt:hover {
  transform:
    translateY(-8px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateZ(12px);
}

.project-card:hover,
.project-card:focus-visible,
.stat-card:hover,
.stat-card:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  box-shadow:
    0 26px 90px rgba(79, 140, 255, 0.16),
    0 18px 52px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-card.is-pressing,
.stat-card.is-pressing {
  transform: translateY(-2px) scale(0.985);
}

.project-card::before,
.stat-card::before,
.social-link::before,
.testimonial-slide::before,
.chatbot-embed-container::before {
  background:
    radial-gradient(360px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(143, 181, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.hero-footer::before,
.testimonial-slide::after,
.chatbot-embed-container::after {
  animation-duration: 12s;
  opacity: 0.5;
}

.card-icon,
.stat-icon {
  box-shadow:
    0 14px 30px rgba(79, 140, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.chatbot-section {
  background:
    linear-gradient(180deg, transparent, rgba(79, 140, 255, 0.035) 42%, transparent);
}

.chatbot-section .section-container {
  width: min(1080px, calc(100% - 44px));
}

.chatbot-embed-container {
  width: min(600px, 100%);
  height: clamp(620px, 76vh, 820px);
  min-height: 620px;
  max-height: 840px;
  aspect-ratio: auto;
  padding: 0;
  border-radius: 16px;
  background: #1a1a1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  contain: layout paint;
  margin: 0 auto;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.chatbot-embed-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: transparent;
  border: none;
}

.chatbot-embed-container:hover {
  box-shadow:
    0 32px 100px rgba(79, 140, 255, 0.14),
    0 22px 64px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(168, 85, 247, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.animations-ready .fade-in {
  transform: translateY(18px);
}

.animations-ready .fade-in.animate {
  animation: refinedReveal 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.projects-section.animate .project-card,
.stats-section.animate .stat-card,
.contact-section.animate .social-link {
  animation: refinedCardReveal 780ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes refinedReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes refinedCardReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.975);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 768px) {
  .chatbot-section .section-container {
    width: min(100% - 28px, 1080px);
  }

  .chatbot-embed-container {
    height: 680px;
    min-height: 620px;
    padding: 0;
    border-radius: 16px;
  }

  .chatbot-embed-container iframe {
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 88px;
  }

  .chatbot-embed-container {
    height: 640px;
    min-height: 600px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animations-ready .fade-in.animate,
  .projects-section.animate .project-card,
  .stats-section.animate .stat-card,
  .contact-section.animate .social-link {
    animation: none !important;
  }
}
