/* Global Styles */
:root {
  --primary-color: #4a6cf7;
  --primary-color-hover: #3a5be0;
  --secondary-color: #6c757d;
  --accent-color: #ff6b6b;
  --text-color: #333;
  --text-color-light: #f8f9fa;
  --bg-color: #ffffff;
  --bg-color-dark: #121212;
  --bg-color-light: #f8f9fa;
  --card-bg: #ffffff;
  --card-border: #eaeaea;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  --border-radius: 10px;
  --section-spacing: 6rem;
}

.dark-mode {
  --text-color: #f8f9fa;
  --text-color-light: #dddddd;
  --bg-color: #121212;
  --bg-color-light: #1e1e1e;
  --card-bg: #1e1e1e;
  --card-border: #333;
  --card-shadow: rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease forwards;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2:after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  transform: translateX(-50%);
  transition: width var(--transition-speed) ease;
}

.section-title:hover h2:after {
  width: 100px;
}

.section-title p {
  font-size: 1.2rem;
  color: var(--secondary-color);
  max-width: 700px;
  margin: 0 auto;
}

/* Improved animation classes */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

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

/* Staggered animation for items in a list */
.stagger-fade-in > * {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

/* Apply staggered delay to children */
.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade-in > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-fade-in > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-fade-in > *:nth-child(8) { animation-delay: 0.8s; }

/* Animate on scroll utility class */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading animation */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
  border: 5px solid var(--bg-color-light);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Smooth scroll behavior for anchor links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  /* Use hex base color with alpha instead of invalid rgba(var(--bg-color), a) */
  background-color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-speed) ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode header {
  background-color: rgba(18, 18, 18, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.transparent {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
}

.dark-mode header.transparent {
  background-color: rgba(18, 18, 18, 0.85);
}

header.scrolled {
  padding: 0.7rem 0;
  /* Use explicit rgba instead of invalid rgba(var(--bg-color), a) */
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 25px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode header.scrolled {
  background-color: rgba(18, 18, 18, 0.98);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: transform var(--transition-speed) ease;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo span {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed) ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: transform 0.4s ease, opacity 0.3s ease;
  border-radius: 3px;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.theme-toggle {
  cursor: pointer;
  margin-left: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-color-light);
  border: 2px solid rgba(74, 108, 247, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  border-radius: 50%;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(74, 108, 247, 0.3);
}

.theme-toggle:hover::before {
  opacity: 0.1;
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
  position: relative;
  z-index: 1;
}

.theme-toggle:hover i {
  color: var(--accent-color);
  transform: rotate(180deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-color-light) 100%);
  position: relative;
  overflow: hidden;
  padding: 120px 0 4rem;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1 1 45%;
  position: relative;
  z-index: 1;
  padding-right: 2rem;
  animation: fadeInLeft 1s ease;
}

.hero-animation {
  flex: 1 1 55%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 1s ease;
  position: relative;
}

.hero-greeting {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  padding: 0.3rem 1rem;
  background: rgba(74, 108, 247, 0.1);
  border-radius: 30px;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientText 3s ease infinite;
  background-size: 200% auto;
}

@keyframes gradientText {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.hero-subtitle {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.hero-dynamic {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.typed-text {
  color: var(--primary-color);
  font-weight: 600;
  position: relative;
}

.typed-text::after {
  content: '|';
  position: absolute;
  right: -8px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.6s ease;
  z-index: -1;
}

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

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-color-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(74, 108, 247, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--card-border);
}

.btn-outline:hover {
  background-color: var(--card-border);
  color: var(--primary-color);
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  padding: 1rem 1.5rem;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--card-shadow);
  text-align: center;
  transition: transform var(--transition-speed) ease;
}

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

.stat-card strong {
  font-size: 1.8rem;
  color: var(--primary-color);
  display: block;
}

.stat-card span {
  font-size: 0.9rem;
  color: var(--secondary-color);
}

/* Shape decorations */
.shape {
  position: absolute;
  z-index: 0;
  opacity: 0.5;
}

.shape-1 {
  top: 20%;
  left: 10%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  filter: blur(20px);
  animation: float 6s ease-in-out infinite;
}

.shape-2 {
  bottom: 20%;
  right: 10%;
  width: 150px;
  height: 150px;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(20px);
  animation: morph 8s ease-in-out infinite;
}

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

@keyframes morph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%; }
  50% { border-radius: 70% 30% 50% 50% / 60% 40% 60% 40%; }
  75% { border-radius: 40% 60% 30% 70% / 70% 30% 70% 30%; }
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Hero Section */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

/* Mobile-First Android Optimizations */
@media (max-width: 768px) {
  /* Improve touch targets for Android */
  .btn, .project-btn, .theme-toggle, .hamburger {
    min-height: 48px;
    min-width: 48px;
    padding: 12px 20px;
  }
  
  /* Enhanced hamburger menu */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    transition: transform 0.3s ease;
  }
  
  .hamburger:active {
    transform: scale(0.95);
  }
  
  .hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Mobile navigation overlay */
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    /* Fixed: rgba(var(--bg-color), .98) was invalid because --bg-color is a hex, so fallback to solid with layered gradient */
    background:
      linear-gradient(135deg, rgba(74,108,247,0.08), rgba(74,108,247,0.02))
      , var(--bg-color);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 2rem;
  }

  /* Screen overlay behind the mobile menu */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
  }
  .overlay.active { opacity: 1; visibility: visible; }

  /* Fallback for browsers without backdrop-filter support */
  @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .nav-menu {
      background: var(--bg-color) !important;
    }
    .overlay { background: rgba(0,0,0,0.5); }
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  /* Reset hidden state only when menu closed so animation replays each open */
  .nav-menu:not(.active) .nav-item { opacity: 0; transform: translateX(-50px); }
  .nav-menu .nav-item { margin: 1.5rem 0; }
  .nav-menu.active .nav-item { animation: slideInNav 0.5s ease forwards; }
  
  .nav-menu.active .nav-item:nth-child(1) { animation-delay: 0.1s; }
  .nav-menu.active .nav-item:nth-child(2) { animation-delay: 0.2s; }
  .nav-menu.active .nav-item:nth-child(3) { animation-delay: 0.3s; }
  .nav-menu.active .nav-item:nth-child(4) { animation-delay: 0.4s; }
  .nav-menu.active .nav-item:nth-child(5) { animation-delay: 0.5s; }
  .nav-menu.active .nav-item:nth-child(6) { animation-delay: 0.6s; }
  
  .nav-menu .nav-link {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .nav-menu .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
  }
  
  .nav-menu .nav-link:hover::before {
    left: 100%;
  }
  
  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 108, 247, 0.3);
  }

  /* Dark mode explicit background for overlay */
  body.dark-mode .nav-menu {
    background:
      linear-gradient(135deg, rgba(74,108,247,0.12), rgba(74,108,247,0.05))
      , var(--bg-color);
  }
  
  /* Smooth scroll behavior for Android */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Hero section mobile optimizations */
  .hero {
    min-height: 100vh;
    padding: 140px 1rem 2rem;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-color-light) 50%, var(--bg-color) 100%);
  }
  
  .hero-container {
    flex-direction: column;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    padding: 0;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-weight: 500;
  }
  
  .hero-dynamic {
    font-size: 1.2rem;
    margin: 1.5rem 0;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(74, 108, 247, 0.1);
    border-radius: 25px;
    display: inline-block;
  }
  
  .hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 100%;
    color: var(--text-color);
    opacity: 0.9;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 3rem;
  }
  
  .hero-buttons .btn {
    width: 220px;
    padding: 16px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .hero-buttons .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.4);
  }
  
  .hero-buttons .btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.2);
  }
  
  .hero-buttons .btn:active {
    transform: scale(0.98);
  }
  
  .hero-animation {
    width: 100%;
    max-width: 350px;
    height: auto;
  }
  
/* Interactive Coding Game Styles */
.coding-game-container {
  width: 100%;
  max-width: 500px;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(74, 108, 247, 0.1);
  position: relative;
  overflow: hidden;
}

.coding-game-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(74, 108, 247, 0.03), rgba(255, 107, 107, 0.03));
  pointer-events: none;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-color-light);
}

.game-header h3 {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.game-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.score {
  color: var(--accent-color);
}

.level {
  color: var(--primary-color);
}

.game-screen {
  display: flex;
  gap: 2rem;
  align-items: center;
  min-height: 300px;
}

.question-container {
  flex: 2;
}

.question-number {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.option-btn {
  background: var(--bg-color-light);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.option-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(74, 108, 247, 0.1), transparent);
  transition: left 0.5s;
}

.option-btn:hover {
  border-color: var(--primary-color);
  background: rgba(74, 108, 247, 0.05);
  transform: translateX(4px);
}

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

.option-btn.correct {
  background: rgba(46, 204, 113, 0.1);
  border-color: #2ecc71;
  color: #2ecc71;
}

.option-btn.incorrect {
  background: rgba(231, 76, 60, 0.1);
  border-color: #e74c3c;
  color: #e74c3c;
}

.option-btn.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.game-progress {
  margin-top: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-color-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 4px;
}

.game-character {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.character-avatar {
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.avatar-face {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.avatar-body {
  width: 60px;
  height: 80px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  border-radius: 30px 30px 15px 15px;
  position: relative;
  margin: 0 auto;
}

.avatar-body::before {
  content: '</>';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.code-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.code-particles span {
  position: absolute;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.8rem;
  opacity: 0.7;
  animation: particle-float 4s ease-in-out infinite;
}

.code-particles span:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.code-particles span:nth-child(2) {
  top: 20%;
  right: 10%;
  animation-delay: 1s;
}

.code-particles span:nth-child(3) {
  bottom: 30%;
  left: 20%;
  animation-delay: 2s;
}

.code-particles span:nth-child(4) {
  bottom: 10%;
  right: 20%;
  animation-delay: 3s;
}

.game-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(74, 108, 247, 0.05);
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.game-hint i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.game-hint span {
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-style: italic;
}

/* Game Completion Modal */
.game-completion-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.game-completion-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 3rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  position: relative;
}

.game-completion-modal.show .modal-content {
  transform: scale(1);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  border-radius: 22px;
  z-index: -1;
}

.completion-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.completion-message {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-reveal {
  background: var(--bg-color-light);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.contact-reveal h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

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

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.contact-link:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 108, 247, 0.3);
}

.close-modal {
  background: var(--bg-color-light);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: var(--primary-color);
  color: white;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes particle-float {
  0%, 100% {
    transform: translateY(0px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .coding-game-container {
    padding: 1.5rem;
  }
  
  .game-screen {
    flex-direction: column;
    gap: 1.5rem;
    min-height: auto;
  }
  
  .game-character {
    order: -1;
  }
  
  .character-avatar {
    transform: scale(0.8);
  }
  
  .modal-content {
    padding: 2rem;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Mini Game styles removed: replaced by inline-scoped Sky Catcher styles in index.html */

/* Reward Modal */
.reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.reward-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
  background: rgba(10, 16, 26, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
  background: rgba(17, 20, 26, 0.35);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-slide-up 0.3s ease-out;
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(2rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: start;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(17,20,26,0.6), rgba(17,20,26,0.3));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.modal-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}
.modal-close-icon {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  line-height: 30px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}


.modal-body {
    padding: 1.5rem;
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    font-size: 0.9rem;
}

.contact-item .label {
    color: rgba(255, 255, 255, 0.8);
}

.contact-item .value {
    color: white;
    font-weight: 500;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.action-buttons .action-btn:first-child {
    grid-column: 1 / -1;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsiveness for AI Avatar */
@media (max-width: 768px) {
    .ai-avatar-container {
        padding: 1rem;
    }
    
    .chat-bubble {
        width: 280px;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-buttons .action-btn:first-child {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .avatar-container {
        width: 100px;
        height: 100px;
    }
    
    .progress-container {
        width: 100px;
    }
    
    .chat-bubble {
        width: 240px;
    }
    
    .canvas-container {
        width: 100px;
        height: 100px;
    }
}
  
  .hero-achievements {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .achievement-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  
  .achievement-item:active {
    transform: scale(0.95);
  }
  
  .achievement-counter {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
  }
  
  .achievement-text {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
  }
}

@keyframes slideInNav {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* About Section */
.about {
  position: relative;
  background: var(--bg-color);
  overflow: hidden;
}

/* Creative background elements */
.about::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 108, 247, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
}

.about::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px var(--card-shadow);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-image:hover {
  transform: translateY(-10px) rotate(2deg);
  box-shadow: 0 30px 60px var(--card-shadow);
}

.about-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(74, 108, 247, 0.7), rgba(255, 107, 107, 0.7));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.about-image:hover::before {
  opacity: 0.2;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  transition: transform 0.8s ease;
}

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

.about-info {
  position: relative;
}

.about-info p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.about-info p:first-of-type {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
}

/* Floating skill badges */
.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.skill-badge {
  padding: 0.6rem 1.2rem;
  background: var(--card-bg);
  border-radius: 50px;
  box-shadow: 0 5px 15px var(--card-shadow);
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--card-border);
  animation: float 5s ease-in-out infinite;
}

.skill-badge:nth-child(1) { animation-delay: 0s; }
.skill-badge:nth-child(2) { animation-delay: 1s; }
.skill-badge:nth-child(3) { animation-delay: 2s; }
.skill-badge:nth-child(4) { animation-delay: 3s; }
.skill-badge:nth-child(5) { animation-delay: 4s; }

.skill-badge:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px var(--card-shadow);
  background: var(--primary-color);
  color: white;
}

/* Redesigned competencies section */
.core-competencies {
  margin-top: 3rem;
  position: relative;
  z-index: 1;
  /* Prevent parent blend modes from affecting text inside */
  isolation: isolate;
  color: var(--text-color);
}

/* Hard reset any gradient text or blending inside competencies */
.core-competencies, .core-competencies * {
  mix-blend-mode: normal !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}

.core-competencies h3 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.core-competencies h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.core-competencies:hover h3::after {
  width: 80px;
}

.progress-bar {
  margin-bottom: 2rem;
  position: relative;
}

.progress-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

/* Ensure competency label and percentage are always legible */
.core-competencies .progress-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none !important;
  text-decoration: none !important;
  font-weight: 500;
  position: relative;
  z-index: 2; /* ensure text sits above any decorative layers */
  line-height: 1.25;
  min-height: 28px;
}
.core-competencies .progress-title::before,
.core-competencies .progress-title::after {
  content: none !IMPORTANT;
}
.core-competencies .progress-title span {
  color: var(--text-color) !important;
  -webkit-text-fill-color: currentColor !important;
  text-decoration: none !important;
  background: none !important;
  position: relative;
  z-index: 1;
  opacity: 1 !important;
  visibility: visible !important;
}
.core-competencies .progress-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
.core-competencies .progress-title span:last-child {
  flex: 0 0 auto;
}

.progress-bg {
  height: 10px;
  width: 100%;
  background-color: var(--bg-color-light);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0; /* Will be set by JS */
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.1, 0.5, 0.2, 1);
  position: relative;
}

/* Glowing dot at the end of progress bar */
/* removed glowing dot trail on progress bars */

/* --- Mobile/Accessibility Fallback for Core Competencies ---
   On some Android browsers, text inside the bar layout can become hard to see.
   This fallback switches to a text-only, badge-style list on small screens and
   for users who prefer higher contrast. */
@media (max-width: 768px) {
  .core-competencies .progress-bg { display: none !important; }
  .core-competencies .progress-bar {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(0,0,0,0.08));
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 6px 16px var(--card-shadow, rgba(0,0,0,0.08));
  }
  .core-competencies .progress-title { margin: 0; }
  .core-competencies .progress-title span:first-child {
    font-weight: 600;
    color: var(--text-color) !important;
  }
  .core-competencies .progress-title span:last-child {
    color: #ffffff !important;
    background: var(--primary-color);
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1;
    font-weight: 600;
    min-width: 44px;
    text-align: center;
  }
}

@media (prefers-contrast: more) {
  .core-competencies .progress-bg { display: none !important; }
  .core-competencies .progress-bar {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(0,0,0,0.25));
  }
}

@media (max-width: 992px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-image {
    width: 80%;
    margin: 0 auto;
  }
  
  .core-competencies h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .about-image {
    width: 100%;
  }
  
  .skill-badges {
    justify-content: center;
  }
  
  .core-competencies h3 {
    font-size: 1.4rem;
    text-align: center;
    display: block;
  }
  
  .core-competencies h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Improve visibility & separation of competencies on small screens */
  .core-competencies {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 1rem 1.75rem;
    border-radius: 18px;
    box-shadow: 0 6px 20px var(--card-shadow);
    color: var(--text-color);
  }
  .progress-bar { margin-bottom: 1.4rem; }
  .progress-title { font-size: 0.9rem; }
  .progress-bg { height: 12px; }
}

/* Improve bar contrast in dark mode */
.dark-mode .core-competencies .progress-bg {
  background-color: rgba(255, 255, 255, 0.12);
}
.dark-mode .core-competencies .progress-fill {
  box-shadow: none;
}

/* Avoid any accidental blending on labels and percents */
.core-competencies .progress-title span {
  mix-blend-mode: normal;
  text-shadow: none;
}

/* Hard visibility overrides for Android/dark mode */
.dark-mode .core-competencies { color: #f5f7fa !important; }
.dark-mode .core-competencies .progress-title span {
  color: #f5f7fa !important;
  -webkit-text-fill-color: #f5f7fa !important;
  -webkit-text-stroke: 0 !important;
  text-decoration: none !important;
  letter-spacing: 0;
  word-spacing: 0;
  opacity: 1 !important;
}

/* Light mode explicit, for safety */
body:not(.dark-mode) .core-competencies { color: #121212 !important; }
body:not(.dark-mode) .core-competencies .progress-title span {
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
  -webkit-text-stroke: 0 !important;
  text-decoration: none !important;
}

/* Projects Section - Bus Topology Style */
.projects-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  background-color: var(--bg-color-light);
  color: var(--text-color);
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  position: relative;
}

/* Enhanced Bus Topology Style */
.bus-row {
  display: flex;
  position: relative;
  min-height: 300px;
  transition: all var(--transition-speed) ease;
}

.bus-row::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 10px;
}

.bus-row-right {
  flex-direction: row;
}

.bus-row-left {
  flex-direction: row-reverse;
}

.project-card {
  width: 45%;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--card-shadow);
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  transform-origin: center;
  border: 1px solid var(--card-border);
}

.project-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px var(--card-shadow);
}

.project-content {
  padding: 1.8rem;
}

.project-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-category {
  display: inline-block;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  box-shadow: 0 3px 10px rgba(74, 108, 247, 0.2);
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.project-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  transition: width var(--transition-speed) ease;
}

.project-card:hover .project-title::after {
  width: 80px;
}

.project-description {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
}

.project-tag {
  background-color: var(--bg-color-light);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  transition: all var(--transition-speed) ease;
}

.project-tag:hover {
  background-color: rgba(74, 108, 247, 0.1);
  transform: translateY(-2px);
}

.project-links {
  display: flex;
  gap: 1.5rem;
}

.project-link {
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  padding: 0.5rem 0;
}

.project-link:hover {
  color: var(--accent-color);
  transform: translateX(3px);
}

/* Connector to the bus line */
.connector {
  position: absolute;
  width: 80px;
  height: 5px;
  background: linear-gradient(to right, var(--card-bg), var(--primary-color));
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
}

.bus-row-left .connector {
  background: linear-gradient(to left, var(--card-bg), var(--primary-color));
}

.bus-row-right .connector {
  left: 45%;
}

.bus-row-left .connector {
  right: 45%;
}

/* Project Stats */
.project-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

.project-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.project-stat i {
  color: var(--primary-color);
}

/* Responsive Projects */
@media (max-width: 992px) {
  .project-card {
    width: 48%;
  }
}

@media (max-width: 768px) {
  /* Mobile Project Cards Optimization */
  .projects-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 44px;
    white-space: nowrap;
    border-radius: 20px;
  }
  
  .projects-grid {
    gap: 2rem;
    padding: 0 1rem;
  }
  
  /* Remove bus topology on mobile for cleaner layout */
  .bus-row::after {
    display: none;
  }
  
  .bus-row {
    min-height: initial;
    flex-direction: column !important;
    margin-bottom: 1rem;
    align-items: center;
  }
  
  .bus-row-left,
  .bus-row-right {
    flex-direction: column;
  }
  
  .project-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
  }
  
  .project-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  }
  
  .project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  
  .project-card:hover .project-image {
    transform: scale(1.05);
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-category {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.4;
  }
  
  .project-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .project-tag {
    background: var(--bg-color-light);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .project-links {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .project-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 25px;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  
  .project-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 0;
  }
  
  .project-btn:active::before {
    width: 300px;
    height: 300px;
  }
  
  .btn-primary.project-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
  }
  
  .btn-outline.project-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
  }
  
  .btn-outline.project-btn:hover {
    background: var(--primary-color);
    color: white;
  }
  
  .project-stats {
    display: none; /* Hide on mobile for cleaner look */
  }
  
  .connector {
    display: none; /* Hide connectors on mobile */
  }
  
  .bus-row-left .connector {
    bottom: 0;
    top: auto;
    background: linear-gradient(to bottom, var(--card-bg), var(--primary-color));
  }
  
  .bus-row-right .connector {
    background: linear-gradient(to top, var(--card-bg), var(--primary-color));
  }
  
  .projects-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
    white-space: nowrap;
  }
  
  .filter-btn {
    flex-shrink: 0;
  }
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--card-shadow);
  padding: 2rem;
  transition: transform 0.3s ease;
}

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

.skill-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.skill-icon.code {
  background-color: rgba(62, 65, 241, 0.1);
  color: var(--primary-color);
}

.skill-icon.wrench {
  background-color: rgba(62, 65, 241, 0.1);
  color: var(--secondary-color);
}

.skill-icon.cloud {
  background-color: rgba(62, 65, 241, 0.1);
  color: var(--accent-color);
}

.skill-icon.database {
  background-color: rgba(62, 65, 241, 0.1);
  color: #28a745;
}

.skill-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center; /* Ensure the skill name is centered */
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center; /* Center skill tags */
  margin-bottom: 1.5rem;
}

.skill-item {
  background-color: var(--bg-color-light); /* Consider making the background darker in light mode */
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #565f74; /* Change text color to a darker shade for better contrast */
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.skill-item:hover {
  background-color: var(--primary-color);
  transform: scale(1.05); /* Slight zoom effect */
}

.certificate-link {
  text-align: center;
}

.certificate-link a {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.certificate-link a:hover {
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr 1fr;
  }

  .skill-name {
    font-size: 1rem;
  }

  .skill-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }
}

/* Light Mode Adjustments */
:root {
  --bg-color-light: #f0f0f0; /* Lighter background for light mode */
  --primary-color: #007bff; /* Primary color (blue) for contrast */
  --secondary-color: #6c757d; /* Secondary color (gray) */
  --card-bg: #fff; /* White card background for better visibility */
  --card-shadow: rgba(0, 0, 0, 0.1); /* Light shadow for better contrast */
  --accent-color: #ff6b6b; /* Accent color for a slight pop */
}

/* Experience/Timeline Section */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 5px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2.5px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: var(--bg-color);
  border: 4px solid var(--primary-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-left {
  left: 0;
}

.timeline-right {
  left: 50%;
}

.timeline-left::after {
  right: -12.5px;
}

.timeline-right::after {
  left: -12.5px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: var(--card-bg);
  position: relative;
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--card-shadow);
}

.timeline-period {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.timeline-org {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.timeline-description {
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style-type: disc;
  margin-left: 1.5rem;
}

.timeline-bullets li {
  margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--bg-color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.contact-form {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--card-shadow);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.7rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all var(--transition-speed) ease;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

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

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Footer */
footer {
  background-color: var(--bg-color-light);
  padding: 3rem 0;
  text-align: center;
}

.footer-content {
  max-width: 700px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-link {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

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

/* 
  Animations 
  - Feel free to add or remove these classes on elements to animate them:
    .fade-in-up => fade in from below
    .fade-in => simple fade in
*/
.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--card-shadow);
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.close-alert {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  color: inherit;
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 2.2rem;
  }
  
  .section-title p {
    font-size: 1.1rem;
  }
  
  section {
    padding: 4rem 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .btn {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .hero-stats {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .stat-card {
    flex: 0 0 calc(50% - 1rem);
    margin-bottom: 1rem;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item::after {
    left: 15px;
  }
  
  .timeline-right {
    left: 0;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
  
  .project-card {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .hero-greeting {
    font-size: 1.2rem;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-animation {
    transform: scale(0.8);
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .stat-card {
    flex: 0 0 100%;
  }
}

/* Improved Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: relative;
  animation: rotate 1.5s linear infinite;
}

.loader:before, .loader:after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.loader:before {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, transparent 40%, var(--primary-color));
  animation: rotate 2s linear infinite;
}

.loader:after {
  width: 85%;
  height: 85%;
  background: var(--bg-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Enhanced animations for various components */
.animate-on-scroll.visible {
  animation-name: fadeInUp;
  animation-duration: 0.8s;
  animation-fill-mode: forwards;
}

.animate-on-scroll.visible:nth-child(odd) {
  animation-name: fadeInLeft;
}

.animate-on-scroll.visible:nth-child(even) {
  animation-name: fadeInRight;
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Active Navigation Link Highlighting */
.nav-link.active {
  position: relative;
  color: var(--primary-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

/* Better form styles */
.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all var(--transition-speed) ease;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.7rem;
  font-weight: 500;
  color: var(--text-color);
}

.btn-primary[type="submit"] {
  width: 100%;
  padding: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Improved alerts */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--card-shadow);
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.close-alert {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  color: inherit;
}

/* Fix for hero stats in mobile view */
@media (max-width: 768px) {
  .hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .stat-card {
    background-color: var(--bg-color-light);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--card-shadow);
    text-align: center;
    flex: 0 0 calc(33% - 1rem);
  }
  
  .stat-card strong {
    font-size: 1.5rem;
    color: var(--primary-color);
  }
  
  .stat-card span {
    font-size: 0.8rem;
  }
}

/* Creative Hero Achievements Section */
.hero-achievements {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
}

.hero-achievements::before {
  content: '';
  position: absolute;
  height: 2px;
  width: 100%;
  background: linear-gradient(to right, transparent, var(--primary-color-hover), transparent);
  top: -15px;
  opacity: 0.5;
}

.achievement-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .achievement-item {
  background: rgba(0, 0, 0, 0.2);
}

.achievement-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(30deg);
  animation: shine 6s linear infinite;
  opacity: 0;
}

.achievement-item:hover::before {
  opacity: 1;
}

@keyframes shine {
  0% {
    transform: translateX(-200%) rotate(30deg);
  }
  100% {
    transform: translateX(200%) rotate(30deg);
  }
}

.achievement-item:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

.achievement-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
  transition: all 0.4s ease;
}

.achievement-item:hover .achievement-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 20px rgba(74, 108, 247, 0.6);
}

.achievement-counter {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0.5rem 0;
  position: relative;
}

.achievement-counter::after {
  content: '';
  position: absolute;
  height: 3px;
  width: 40px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.achievement-item:hover .achievement-counter::after {
  width: 60px;
}

.achievement-text {
  font-size: 0.9rem;
  color: var(--secondary-color);
  text-align: center;
  font-weight: 500;
  line-height: 1.4;
}

.achievement-item:nth-child(1) {
  animation-delay: 0.2s;
}

.achievement-item:nth-child(2) {
  animation-delay: 0.4s;
}

.achievement-item:nth-child(3) {
  animation-delay: 0.6s;
}

@media (max-width: 768px) {
  .hero-achievements {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .achievement-item {
    flex: 0 0 calc(33.33% - 1rem);
    padding: 1rem 0.5rem;
    min-width: 100px;
  }
  
  .achievement-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .achievement-counter {
    font-size: 2rem;
  }
  
  .achievement-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .hero-achievements {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  
  .achievement-item {
    flex: 0 0 100%;
    width: 100%;
    max-width: 250px;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 1rem 1.5rem;
    gap: 1rem;
    justify-content: flex-start;
  }
  
  .achievement-icon {
    margin-bottom: 0;
    margin-right: 1rem;
  }
  
  .achievement-counter {
    margin: 0;
    font-size: 1.8rem;
  }
  
  .achievement-counter::after {
    bottom: -8px;
  }
  
  .achievement-text {
    text-align: left;
  }
}

/* Adjust the original hero-stats styles so they don't conflict */
.hero-stats {
  display: none;
}
