:root {
  --primary-color: #1a365d;
  --secondary-color: #3182ce;
  --accent-color: #4299e1;
  --text-color: #2d3748;
  --text-light: #718096;
  --bg-color: #f7fafc;
  --bg-secondary: #edf2f7;
  --white: #ffffff;
  --gradient-1: linear-gradient(135deg,
      #667eea 0%,
      #764ba2 100%);
  --gradient-2: linear-gradient(135deg,
      #f093fb 0%,
      #f5576c 100%);
  --gradient-3: linear-gradient(135deg,
      #4facfe 0%,
      #00f2fe 100%);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

  /* Animation Variables */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --hover-lift: translateY(-8px);
}

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

body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Loading Animation */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a192f;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader img {
  width: 100px;
  height: 100px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Media Query for smaller screens */
@media screen and (max-width: 768px) {
  .loader img {
    width: 80px;
    height: 80px;
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4 {
  margin-bottom: var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-rendering: optimizeLegibility;
  line-height: 1.2;
  color: var(--primary-color);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;

  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-transition: 0.3s ease;
  -moz-transition: 0.3s ease;
  -ms-transition: 0.3s ease;
  -o-transition: 0.3s ease;
  transition: all 0.3s ease;
}

/* Accessible focus styles */
.btn:focus-visible,
button:focus-visible,
.nav-links a:focus-visible,
.social-links a:focus-visible,
.skill-card:focus-visible,
.certification-card:focus-visible,
a.btn:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.35);
}

.btn:focus,
button:focus,
.nav-links a:focus,
.social-links a:focus {
  outline: none;
  /* rely on :focus-visible */
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
}

.btn-secondary {
  background: var(--gradient-2);
  color: #fff;
}

header {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: var(--gradient-1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1000;
  cursor: alias;
  transition: all 0.3s ease;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  gap: 2rem;
  justify-content: center;
  flex-grow: 1;
}

.nav-links li {
  margin: 0 0.75rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 5px;
  position: relative;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #fff;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  transform: translateY(-3px);
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: block;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  -webkit-transform: rotate(45deg) translate(5px, 5px);
  -moz-transform: rotate(45deg) translate(5px, 5px);
  -ms-transform: rotate(45deg) translate(5px, 5px);
  -o-transform: rotate(45deg) translate(5px, 5px);
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  -webkit-transform: rotate(-45deg) translate(5px, -5px);
  -moz-transform: rotate(-45deg) translate(5px, -5px);
  -ms-transform: rotate(-45deg) translate(5px, -5px);
  -o-transform: rotate(-45deg) translate(5px, -5px);
  transform: rotate(-45deg) translate(5px, -5px);
}

.responsive {
  display: none;
}

/* hero section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3%;
  position: relative;
  background: url("../media/banner.avif") no-repeat center center/cover;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  flex: 1;
  padding: 2rem;
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 50%;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-image {
  flex: 1;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 45%;
}

.hero-image img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.05);
}

.glitch {
  position: relative;
  color: #fff;
  font-size: 4rem;
  letter-spacing: 0.5rem;
  animation: glitch 1s infinite;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(31px, 9999px, 94px, 0);
  }

  20% {
    clip: rect(112px, 9999px, 76px, 0);
  }

  40% {
    clip: rect(85px, 9999px, 77px, 0);
  }

  60% {
    clip: rect(27px, 9999px, 97px, 0);
  }

  80% {
    clip: rect(64px, 9999px, 98px, 0);
  }

  100% {
    clip: rect(61px, 9999px, 85px, 0);
  }
}

@keyframes glitch-anim2 {
  0% {
    clip: rect(129px, 9999px, 36px, 0);
  }

  20% {
    clip: rect(36px, 9999px, 4px, 0);
  }

  40% {
    clip: rect(85px, 9999px, 66px, 0);
  }

  60% {
    clip: rect(68px, 9999px, 103px, 0);
  }

  80% {
    clip: rect(14px, 9999px, 100px, 0);
  }

  100% {
    clip: rect(61px, 9999px, 37px, 0);
  }
}

section {
  padding: 3rem 0;
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

section:hover::after {
  transform: scaleX(1);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: var(--primary-color);
  position: relative;
  font-size: 2.75rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--gradient-1);
  margin: 0.5rem auto;
}

/* Hero layout adjustments */
.hero {
  position: relative;
  min-height: 100vh;
  /* sit full viewport height */
  display: block;
  overflow: hidden;
}

.hero-image picture,
.hero-image img {
  width: 100%;
  height: 100vh;
  /* sit full viewport height */
  object-fit: cover;
  object-position: right center;
  /* focus right side of banner */
  display: block;
  /* remove darkening over background image */
  filter: none;
}

.hero::after {
  /* remove shaded panel/gradient overlay */
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 0 2rem;
  z-index: 3;
}

.hero .glitch,
.hero #typed-text {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero .cta-buttons {
  margin-top: 1rem;
}

/* Right-side square image */
.hero::before {
  content: '';
  position: absolute;
  left: 60vw;
  top: 30vh;
  width: min(50vw, 350px);
  height: min(50vw, 400px);
  background: url(../media/profile-pic.jpg) center / cover no-repeat;
  border-radius: 12px;
  border: 3px solid royalblue;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

@media (max-width: 1019.98px) {
  .hero {
    min-height: 60vh;
  }

  .hero-image picture,
  .hero-image img {
    height: 60vh;
  }

  .hero::before {
    left: 3vw;
    width: min(30vw, 300px);
    height: min(22vw, 220px);
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 55vh;
  }

  .hero-image picture,
  .hero-image img {
    height: 55vh;
  }

  .hero::before {
    display: none;
  }

  /* hide profile on small screens */
}

.about-content {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  position: relative;
  min-height: auto;
  flex-wrap: wrap;
}

.about-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.about-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-text {
  min-width: 300px;
}

/* Profile Image Styles */
.profile-image {
  width: 400px;
  height: 350px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
  overflow: hidden;
  position: relative;
  border: 5px solid royalblue;
  -webkit-border-radius: 45%;
  -moz-border-radius: 45%;
  -ms-border-radius: 45%;
  -o-border-radius: 45%;
  border-radius: 45%;
  -webkit-animation: fadeInUp 2s ease-in-out;
  animation: fadeInUp 2s ease-in-out;
}

/* Add a glow effect on hover */
.profile-image:hover {
  cursor: none;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.5);
  -webkit-transform: scale(1.3) rotate(1.6 deg);
  -moz-transform: scale(1.3) rotate(1.6 deg);
  -ms-transform: scale(1.3) rotate(1.6 deg);
  -o-transform: scale(1.3) rotate(1.6 deg);
  transform: scale(1.3) rotate(1.6 deg);
}

/* Frame Pseudo-element */
.profile-image::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(0, 128, 255, 0.4);
  /*Gloweffect*/
  opacity: 0;
  -webkit-transition: opacity 0.6s ease-in-out;
  -moz-transition: opacity 0.6s ease-in-out;
  -ms-transition: opacity 0.6s ease-in-out;
  -o-transition: opacity 0.6s ease-in-out;
  transition: opacity 0.6s ease-in-out;
}

.profile-image:hover::before {
  opacity: 1;
}

/* Animation when image comes into view */
@keyframes fadeInUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  50% {
    opacity: 0.5;
    -webkit-transform: translateY(15px);
    -moz-transform: translateY(15px);
    -ms-transform: translateY(15px);
    -o-transform: translateY(15px);
    transform: translateY(15px);
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Bubble Styles */
.bubble {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 140px;
  height: auto;
  margin: 10px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
  color: var(--primary-color);
  cursor: pointer;
  /* Smooth transition for hover */
  -webkit-transition: transform 0.3s ease, background 0.3s ease;
  -moz-transition: transform 0.3s ease, background 0.3s ease;
  -ms-transition: transform 0.3s ease, background 0.3s ease;
  -o-transition: transform 0.3s ease, background 0.3s ease;
  transition: transform 0.3s ease, background 0.3s ease;
}

.bubble i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.biodata-bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.bubble:hover i {
  color: var(--gradient-2);
}

.bubble p {
  font-size: 0.8rem;
}

/* Hover Effect */
.bubble:hover {
  transform: scale(1.1);
  /* Slight scaling on hover */
  background: rgba(255,
      255,
      255,
      0.15);
  /* Slightly less transparent background on hover */
}

/* Bubble Floating Animation */
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateY(-50px) scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: translateY(-100px) scale(1.2);
    opacity: 0;
  }
}

/* Bubble Floating on Scroll */
.bubble.float {
  animation: floatUp 2s ease-in-out forwards;
  /* Smoother animation with easing */
}

.about-text {
  position: relative;
}

.about-text::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: var(--primary-color);
  opacity: 0.1;
  border-radius: 50%;
  top: -20px;
  left: -20px;
  z-index: -1;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--primary-color);
  background-color: #333;
  font-size: 1.5rem;
  display: inline-block;
  width: 40px;
  border-radius: 50%;
  text-align: center;
  margin-right: 5px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--secondary-color);
  background: #fff;
  -webkit-transform: scale(1.2) rotate(15deg) translateY(-3px);
  -moz-transform: scale(1.2) rotate(15deg) translateY(-3px);
  -ms-transform: scale(1.2) rotate(15deg) translateY(-3px);
  -o-transform: scale(1.2) rotate(15deg) translateY(-3px);
  transform: scale(1.2) rotate(15deg) translateY(-3px);
}

/* Skills Section Styling */
.skills-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.skills-category {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem 2rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  max-height: 600px;
}

.skills-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.skills-category:hover::before {
  transform: scaleX(1);
}

.skills-category:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.skills-category h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  /* tighter to reduce empty gap */
  text-align: center;
  position: relative;
  letter-spacing: -0.02em;
  text-rendering: optimizeLegibility;
}

.skills-category h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-2);
  border-radius: 2px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  width: 100%;
  margin-top: 0;
  /* remove extra gap under title */
  align-content: start;
  /* ensure items pack from top */
  /* make grid pack densely and fix two rows per viewport */
  --skills-gap: 1.2rem;
  --skill-card-h: 160px;
  grid-auto-rows: var(--skill-card-h);
  grid-auto-flow: row dense;
  /* snap scrolling by two-row pages */
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overflow: auto;
  overscroll-behavior: contain;
  /* hide scrollbars but keep scrolling enabled */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.skills-grid::-webkit-scrollbar {
  /* Chrome/Safari */
  display: none;
}


/* Subtle scrollbar styling for skills grids */
.skills-grid::-webkit-scrollbar {
  width: 8px;
}

.skills-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

.skills-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}

.skills-grid:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.skill-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 18px;
  width: 100%;
  height: var(--skill-card-h);
  text-align: center;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: visible;
  backface-visibility: hidden;
  transform: translateZ(0);
  transform-origin: center;
  contain: paint;
  /* snap each card to start of row for consistent paging */
  scroll-snap-align: start;
  scroll-margin-top: calc(var(--skills-gap) / 2);
}

.skill-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
  border-color: var(--primary-color);
  will-change: transform;
  z-index: 2;
}


/* Subtle scrollbar styling for skills grids */
.skills-grid::-webkit-scrollbar {
  width: 8px;
}

.skills-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

.skills-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}

.skills-grid:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.skill-card:hover::before {
  left: 100%;
}

.skill-card i {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.skill-card:hover i {
  transform: scale(1.3) rotateY(10deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.skill-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.8rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

.skill-level {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
  position: relative;
}

.skill-level::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gradient-1);
  border-radius: 3px;
  width: var(--skill-width, 0%);
  transition: width 1.5s ease-in-out;
  animation: skillProgress 2s ease-in-out;
}

@keyframes skillProgress {
  0% {
    width: 0%;
  }

  100% {
    width: var(--skill-width, 0%);
  }
}

.skill-card[data-level="95"] .skill-level::before {
  --skill-width: 95%;
}

.skill-card[data-level="90"] .skill-level::before {
  --skill-width: 90%;
}

.skill-card[data-level="92"] .skill-level::before {
  --skill-width: 92%;
}

.skill-card[data-level="88"] .skill-level::before {
  --skill-width: 88%;
}

.skill-card[data-level="85"] .skill-level::before {
  --skill-width: 85%;
}

.skill-card[data-level="82"] .skill-level::before {
  --skill-width: 82%;
}

.skill-card[data-level="80"] .skill-level::before {
  --skill-width: 80%;
}

.skill-card[data-level="78"] .skill-level::before {
  --skill-width: 78%;
}

.skill-card[data-level="75"] .skill-level::before {
  --skill-width: 75%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 2rem;
}

.project-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: auto;
  min-height: 350px;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.1);
}

.project-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.project-info p {
  margin-bottom: 1rem;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 2rem;
}

.experience-card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: auto;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.experience-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.experience-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.experience-content h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.experience-content h4 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.experience-date {
  font-style: italic;
  margin-bottom: 1rem;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  animation: growLine 2s ease-out forwards;
}

@keyframes growLine {
  0% {
    height: 0;
  }

  100% {
    height: 100%;
  }
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -16px;
  background-color: white;
  border: 4px solid var(--primary-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even)::after {
  left: -16px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  font-style: italic;
  margin-bottom: 1rem;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 2rem;
}

.certification-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
  height: auto;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.certification-card:hover {
  transform: translateY(-5px);
}

.cert-icon {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
}

.cert-icon i {
  transition: all 0.3s ease;
}

.certification-card:hover .cert-icon i {
  transform: scale(1.2);
  color: #4299e1;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 2rem;
}

.interest-card {
  perspective: 1000px;
  height: 200px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  border-radius: 10px;
}

.interest-content {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.interest-card:hover .interest-content {
  transform: rotateY(180deg);
}

.interest-front,
.interest-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  border-radius: 10px;
}

.interest-front {
  background-color: #fff;
  color: var(--primary-color);
}

.interest-back {
  background-color: var(--primary-color);
  color: #fff;
  transform: rotateY(180deg);
}

.interest-front i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cartoon-animation {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 150px;
  height: 150px;
  overflow: hidden;
}

.animated-robot {
  width: auto;
  height: -webkit-fill-available;
  cursor: progress;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@media (min-width: 1020px) {
  .hero-content {
    padding: 0 2rem;
  }
}

@media (max-width: 768px) {

  /* Hamburger styling */
  .hamburger {
    display: block;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
  }

  /* Hamburger animation for 'X' */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Hide navigation links by default */
  /* .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--gradient-1);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    clip-path: circle(0% at 100% 0);
    transition: all 0.5s ease-out;
  } */

  /* Show navigation links when the hamburger is active */
  .nav-links.active {
    clip-path: circle(150% at 100% 0);
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  /* Ensure both left and right nav links are block */
  .nav-links.left,
  .nav-links.right {
    display: block;
  }

  .hero {
    flex-direction: column;
  }

  .hero-image {
    height: 50vh;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item::before {
    left: 60px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

  .timeline-item::after {
    left: 15px;
  }

  .timeline-item:nth-child(even) {
    left: 0%;
  }

  .timeline-item:nth-child(even)::after {
    left: 14px;
  }

  .contact-content {
    flex-direction: column;
  }

  .media-container {
    grid-template-columns: 1fr;
  }
}

.media-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 2rem;
}

.media-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  height: auto;
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.media-section:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
}

.media-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.media-scroll {
  height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.media-scroll::-webkit-scrollbar {
  width: 8px;
}

.media-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.media-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.media-grid,
.blog-grid,
.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.media-card,
.blog-card,
.social-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  transform: translateY(50px);
  opacity: 0;
}

.media-card:hover,
.blog-card:hover,
.social-card:hover {
  transform: translateY(-12px) scale(1.05) rotateX(5deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.media-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.media-card:hover img {
  transform: scale(1.1);
}

.media-card h4,
.blog-card h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.social-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

.social-card p {
  margin-bottom: 1rem;
}

.media-card p {
  padding: 0 1rem 1rem;
}

.contact-content {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.contact-info {
  flex: 1;
  background-color: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-image {
  position: absolute;
  bottom: 0;
  top: 380px;
  left: 0;
  right: 0;
  width: auto;
  height: 280px;
  object-fit: contain;
  -webkit-animation: walk-contact-image 7s linear infinite;
  animation: walk-contact-image 7s linear infinite;
  transition: opacity 0.3s ease;
}

@keyframes walk-contact-image {
  0% {
    transform: translateX(0) scaleX(1);
  }

  25% {
    transform: translateX(80%) scaleX(1);
  }

  50% {
    transform: translateX(80%) scaleX(-1);
  }

  75% {
    transform: translateX(0) scaleX(-1);
  }

  100% {
    transform: translateX(0) scaleX(1);
  }
}

.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

#contact-form {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  /* backdrop-filter: blur(10px); */
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1rem;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
  transform: translateY(-3px);
}

footer {
  background: var(--gradient-2);
  padding: 1rem 0;
}

.footer-container {
  background: var(--gradient-1);
  color: fff;
  padding: 1.5rem 0;
}

.footer-logo {
  width: 150px;
  height: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3.5rem;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  color: aliceblue;
}

.footer-section h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  position: relative;
}

.footer-section h3::after {
  content: "";
  display: block;
  margin-top: 0.5rem;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: #fff;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
  align-content: center;
}

.footer-section a {
  color: var(--gradient-1);
  text-decoration: none;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
  opacity: 0.8;
  padding-left: 2px;
}

.social-links a {
  color: var(--primary-color);
  display: inline-block;
  width: 40px;
  height: 40px;
  background: rgb(255, 255, 255, 0.255);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  margin-right: 3px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--secondary-color);
  background: #fff;
  -webkit-transform: scale(1.2) rotate(15deg) translateY(-3px);
  -moz-transform: scale(1.2) rotate(15deg) translateY(-3px);
  -ms-transform: scale(1.2) rotate(15deg) translateY(-3px);
  -o-transform: scale(1.2) rotate(15deg) translateY(-3px);
  transform: scale(1.2) rotate(15deg) translateY(-3px);
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.whatsapp-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-button {
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  -webkit-transition: all 0.7s ease;
  -moz-transition: all 0.7s ease;
  -ms-transition: all 0.7s ease;
  -o-transition: all 0.7s ease;
  transition: all 0.7s ease;
}

.whatsapp-button:hover {
  -webkit-transform: scale(1.3);
  -moz-transform: scale(1.3);
  -ms-transform: scale(1.3);
  -o-transform: scale(1.3);
  transform: scale(1.3);
}

.whatsapp-button i {
  font-size: 30px;
  color: white;
}

.whatsapp-content {
  display: none;
  background-color: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(20px, -20px);
  }

  50% {
    transform: translate(40px, 0);
  }

  75% {
    transform: translate(20px, 20px);
  }
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.float-item {
  position: absolute;
  font-size: 2rem;
  color: var(--primary-color);
  animation: float 15s ease-in-out infinite;
  opacity: 0.7;
  -webkit-transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -ms-transition: all 0.5s ease;
  -o-transition: all 0.5s ease;
  transition: all 0.5s ease;
}

.float-item:hover {
  opacity: 1;
  transform: scale(1.2);
}

.float-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.float-item:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.float-item:nth-child(2) {
  top: 50%;
  right: 10%;
  animation-delay: -5s;
}

.float-item:nth-child(3) {
  bottom: 10%;
  left: 50%;
  animation-delay: -10s;
}

.float-item:nth-child(4) {
  top: 30%;
  left: 30%;
  animation-delay: -7s;
}

.float-item:nth-child(5) {
  bottom: 30%;
  right: 30%;
  animation-delay: -3s;
}

/* Basic styles for character */
#character {
  position: fixed;
  bottom: 10%;
  left: 10px;
  /*Initialposition*/
  width: 100px;
  height: 100px;
  background-image: url("../media/character.png");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1000;
  will-change: transform;
  -webkit-transform: translateX(100%);
  -moz-transform: translateX(100%);
  -ms-transform: translateX(100%);
  -o-transform: translateX(100%);
  transform: translateX(100%);
  opacity: 1;
  -webkit-transition: transform 0.5s ease, filter 0.3s ease,
    box-shadow 0.3s ease;
  -moz-transition: transform 0.5s ease, filter 0.3s ease, box-shadow 0.3s ease;
  -ms-transition: transform 0.5s ease, filter 0.3s ease, box-shadow 0.3s ease;
  -o-transition: transform 0.5s ease, filter 0.3s ease, box-shadow 0.3s ease;
  transition: transform 0.5s ease, filter 0.3s ease, box-shadow 0.3s ease,
    opacity 0.5s ease;
}

/* Character actions */
#character.walk {
  animation: walk 2s steps(4) infinite;
}

#character.jump {
  animation: jump 1s ease-out infinite;
}

#character.wave {
  animation: wave 1.5s infinite ease-in-out;
}

#character.dance {
  animation: dance 2s infinite ease-in-out;
}

#character.think {
  animation: think 1.5s infinite ease-in-out;
}

#character.relax {
  animation: relax 3s infinite ease-in-out;
}

#character.sit {
  animation: sit 1.5s ease-in-out infinite;
}

#character.fly {
  animation: fly 2.5s ease-in-out infinite;
}

#character.typing {
  animation: typing 2s infinite steps(4);
}

#character.laugh {
  animation: laugh 2s infinite;
}

#character.wave-goodbye {
  animation: wave-goodbye 2s infinite;
}

#character.game-action {
  animation: jump-spin 2s infinite ease-in-out;
}

/* Section-specific styles */
section {
  box-sizing: border-box;
  border-bottom: 1px solid #ddd;
  /* Light border between sections */
  background-color: #f0f0f0;
  /* Light background for sections */
  position: relative;
  /* Ensure sections are positioned correctly */
  overflow: hidden;
  /* Prevent overflow */
  transition: background-color 0.3s ease;
  /* Optional: Add smooth transitions for section visibility changes */
}

/* Alternating background colors for sections */
section:nth-of-type(odd) {
  background-color: #e0e0e0;
  /* Slightly different color for contrast */
}

/* Character keyframe animations */
@keyframes typing {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -400px 0;
  }

  /* Adjust for your sprite sheet */
}

@keyframes laugh {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes wave-goodbye {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(20deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes walk {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -400px 0;
  }

  /* Assuming a 4-frame sprite sheet */
}

@keyframes jump {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-60px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(20deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes dance {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes think {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes relax {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-30px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes sit {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(20px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes fly {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-100px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes jump-spin {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-50px) rotate(90deg);
  }

  50% {
    transform: translateY(0) rotate(180deg);
  }

  75% {
    transform: translateY(-50px) rotate(270deg);
  }

  100% {
    transform: translateY(0) rotate(360deg);
  }
}

/* Interactive enhancement styles */
section:hover #character {
  filter: brightness(1.3);
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#character.interactive {
  filter: brightness(1.3);
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Tooltip styles */
[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]:before,
[data-tooltip]:after {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

[data-tooltip]:before {
  position: absolute;
  bottom: 150%;
  left: 50%;
  margin-bottom: 5px;
  margin-left: -80px;
  padding: 7px;
  width: 160px;
  border-radius: 3px;
  background-color: #000;
  color: #fff;
  content: attr(data-tooltip);
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
}

[data-tooltip]:after {
  position: absolute;
  bottom: 150%;
  left: 50%;
  margin-left: -5px;
  width: 0;
  border-top: 5px solid #000;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: " ";
  font-size: 0;
  line-height: 0;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  visibility: visible;
  opacity: 1;
}

/* 3D Transform */
.transform-3d {
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.transform-3d:hover {
  transform: rotateY(180deg);
}

/* Image Reflection */
.reflect {
  -webkit-box-reflect: below 0 linear-gradient(transparent, rgba(0, 0, 0, 0.4));
}

/* Image Masking */
.masked-image {
  -webkit-mask-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 1),
      rgba(0, 0, 0, 0));
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

@keyframes bubbleUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bubble {
  animation: bubbleUp 0.5s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.experience-card,
.media-card,
.social-card {
  opacity: 0;
}

@keyframes spin {
  from {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  to {
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

/* Responsive Design */
/* Base styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

/* Hamburger menu */
.hamburger {
  display: none;
  cursor: pointer;
  padding: 10px;
}

.logo {
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Responsive styles */
@media (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .projects-grid,
  .experience-grid,
  .certifications-grid,
  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    gap: 2.5rem;
  }
}

@media (max-width: 1019.98px) {
  .container {
    max-width: 720px;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hamburger {
    display: block;
    z-index: 1000;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  nav.nav\.container .nav-links {
    display: none;
  }

  .nav-links {
    gap: 0px;
    display: none;
  }

  .nav-links.active {
    display: flex;
    clip-path: circle(150% at 100% 0);
  }

  .nav-links li {
    margin: 0.2rem 0;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.5rem 0;
  }

  .nav-links a::after {
    display: none;
  }

  /* responsive menu */
  .responsive {
    display: none;
    height: 100vh;
  }

  .responsive .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: start;
  }

  ul.nav-links.responsive li {
    padding: 20px;
  }

  .responsive ul {
    list-style-type: none;
    padding: 0;
  }

  .responsive ul li {
    padding: 10px 20px;
    text-align: center;
  }

  .responsive ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 0;
  }

  /* end */

  .hero {
    flex-direction: column;
    height: auto;
  }

  .hero-content,
  .hero-image {
    width: 100%;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-image {
    max-width: 100%;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-right {
    gap: 1.25rem;
  }

  .biodata-bubbles {
    gap: 0.75rem;
    justify-content: center;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Contact Section Image */
  .contact-image {
    width: 100%;
    max-width: 125px;
    height: auto;
    margin-bottom: 2rem;
    top: 30px;
  }

  .profile-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    -webkit-animation: profileImageAnimation 5s ease-in-out;
    animation: profileImageAnimation 5s ease-in-out;
  }

  .profile-image.animated {
    opacity: 1;
  }

  @keyframes profileImageAnimation {
    0% {
      transform: scale(1);
    }

    50% {
      transform: scale(1.2);
    }

    100% {
      transform: scale(1);
    }
  }

  .skills-category {
    padding: 2rem 1.5rem;
    margin-bottom: 3rem;
  }

  .skills-category h3 {
    font-size: 1.75rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--skills-gap);
    /* keep two visible rows; shrink card height for this breakpoint */
    --skill-card-h: 140px;
  }

  .skill-card {
    height: var(--skill-card-h);
    padding: 1.25rem 1rem;
  }

  .media-container {
    grid-template-columns: 1fr;
  }

  .contact-content {
    flex-direction: column;
  }

  .contact-info,
  #contact-form {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .container {
    max-width: 540px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .projects-grid,
  .experience-grid,
  .certifications-grid,
  .interests-grid {
    grid-template-columns: 1fr;
  }

  .hero-image {
    height: auto;
    max-width: 100%;
  }

  .skills-category {
    padding: 1.5rem 1rem;
    margin-bottom: 2.5rem;
  }

  .skills-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    --skill-card-h: 120px;
  }

  .skill-card {
    height: var(--skill-card-h);
    padding: 1.1rem 0.9rem;
  }

  /* keep two columns and two rows per scroll on phones as well */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--skills-gap);
    overflow: auto;
  }

  .skill-card h4 {
    font-size: 1rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
  }

  .footer-section {
    margin-bottom: 2rem;
  }

  .footer-section h3::after {
    display: none;
  }

  /* About section spacing on small screens */
  .biodata-bubbles {
    gap: 0.6rem;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  #character {
    width: 60px;
    height: 60px;
  }

  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item::before {
    left: 60px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

  .timeline-item::after {
    left: 15px;
  }

  .timeline-item:nth-child(even) {
    left: 0%;
  }

  .floating-elements {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .container {
    max-width: 100%;
    padding: 1rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .profile-image {
    max-width: 250px;
  }

  .biodata-bubbles {
    flex-direction: column;
    align-items: center;
  }

  .bubble {
    width: 100%;
    max-width: 120px;
    margin: 6px;
    padding: 0.8rem;
  }

  .bubble p {
    font-size: 0.75rem;
  }

  .whatsapp-popup {
    right: 10px;
    bottom: 10px;
  }

  .whatsapp-button {
    width: 50px;
    height: 50px;
  }

  .whatsapp-button i {
    font-size: 24px;
  }

  .float-item {
    font-size: 1.5rem;
  }

  .float-item img {
    width: 30px;
    height: 30px;
  }

  .glitch {
    font-size: 2.5rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  #contact-form input,
  #contact-form textarea {
    padding: 0.75rem;
  }

  .contact-image {
    top: 25px;
    max-width: 90px;
  }

  .footer-content {
    gap: 15px;
  }

  .footer-section h3 {
    padding-bottom: 0.1rem;
    margin-bottom: 3px;
  }

  .hamburger {
    right: 1rem;
    top: 1rem;
  }

  .hamburger span {
    width: 25px;
    height: 4px;
    margin: 4px 0;
  }
}