/* ===================================
   Reset & Base Styles
   =================================== */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

:root {
  --primary-color: #2d3748;
  --secondary-color: #0ea5e9;
  --accent-color: #06b6d4;
  --tertiary-color: #3b82f6;
  --text-dark: #1a202c;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --page-bg: #f3f4f6; /* page background (light grey) */
  --content-bg: #f8fafc; /* section background */
  --card-border: #e5e7eb; /* subtle light border */
  --hero-bg: linear-gradient(135deg, #e9f4ff 0%, #dff6ff 50%, #eaf2ff 100%);
  --hero-overlay: rgba(255, 255, 255, 0.22);
  --border-color: #e2e8f0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --sidebar-bg: linear-gradient(180deg, #1e293b, #0f172a);
}

/* Dark Mode Colors */
body.dark-mode {
  --primary-color: #1a202c;
  --secondary-color: #0ea5e9;
  --accent-color: #06b6d4;
  --tertiary-color: #3b82f6;
  --text-dark: #f7fafc;
  --text-light: #cbd5e1;
  --bg-light: #1e293b;
  --bg-white: #2d3748;
  --page-bg: #0f172a;
  --content-bg: #111827;
  --card-border: #334155;
  --hero-bg: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #3b82f6 100%);
  --hero-overlay: rgba(0, 0, 0, 0.3);
  --border-color: #475569;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.7);
  --sidebar-bg: linear-gradient(180deg, #0f172a, #020617);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--page-bg);
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease,
    border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Smooth transitions for all theme-dependent elements */
.section,
.experience-item,
.nav-link,
.card,
.skill-card-new,
.work-card,
.contact-card,
.hero-section,
.footer {
  transition: background-color 0.5s ease, color 0.5s ease,
    border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Ensure text colors transition smoothly */
h1,
h2,
h3,
h4,
h5,
h6,
.section-title,
.section-tag,
.stat-number,
.stat-label,
.work-card h3,
.work-card p,
.contact-info h3,
.contact-info p,
.footer p,
.footer a {
  transition: color 0.5s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

/* ===================================
   Sidebar Navigation
   =================================== */
.sidebar {
  position: fixed;
  left: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1100;
  transition: left 0.3s ease;
  box-shadow: 2px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.sidebar.active {
  left: 0;
}

/* Main Content and Hero Section */
.main-content,
.hero-section {
  width: 100%;
  transition: transform 0.3s ease, margin-left 0.3s ease;
  transform: translateX(0);
  will-change: transform;
}

/* Desktop: Sticky Sidebar */
@media (min-width: 993px) {
  .sidebar {
    position: fixed;
    left: 0;
    transition: none;
  }

  .main-content {
    margin-left: 300px;
    width: calc(100% - 300px);
  }

  .close-sidebar {
    display: none !important;
  }

  .hamburger-menu {
    display: none !important;
  }
}

/* Hamburger Menu Toggle */
.hamburger-menu {
  position: fixed;
  top: 25px;
  left: 25px;
  z-index: 1200;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease,
    opacity 0.2s ease;
  will-change: transform, box-shadow, opacity;
  opacity: 1;
  pointer-events: auto;
}

.hamburger-menu:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hamburger-menu:active {
  transform: scale(0.98);
}

.hamburger-menu .bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  will-change: transform, opacity;
}

.hamburger-menu .bar:not(:last-child) {
  margin-bottom: 5px;
}

.dark-mode .hamburger-menu {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.close-sidebar {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  z-index: 1200;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  will-change: transform, box-shadow;
}

.close-sidebar i {
  transition: transform 0.3s ease;
}

.close-sidebar:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.4);
}

.close-sidebar:active {
  transform: scale(0.95);
}

.sidebar.hidden {
  left: -300px;
}

.sidebar-header {
  padding: 30px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.logo i {
  font-size: 28px;
  color: var(--secondary-color);
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.close-btn::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  z-index: -1;
}

.close-btn:hover::before {
  transform: scale(1);
}

.close-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.close-btn:active {
  transform: scale(0.95) rotate(90deg);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
  font-size: 12px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: var(--secondary-color);
}

.nav-link i {
  font-size: 18px;
  width: 20px;
}

.sidebar-footer {
  padding: 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle {
  margin-bottom: 20px;
}

.dark-mode-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Poppins", sans-serif;
  position: relative;
  overflow: hidden;
}

.dark-mode-btn::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;
}

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

.dark-mode-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.3),
    rgba(6, 182, 212, 0.3)
  );
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(14, 165, 233, 0.2);
}

.dark-mode-btn:active {
  transform: translateY(0);
}

.dark-mode-btn i {
  font-size: 18px;
}

body.dark-mode .dark-mode-btn i.fa-moon {
  display: none;
}

body.dark-mode .dark-mode-btn i.fa-sun {
  display: inline-block;
}

body:not(.dark-mode) .dark-mode-btn i.fa-sun {
  display: none;
}

.sidebar-footer .social-links {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.sidebar-footer .social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sidebar-footer .social-links a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.sidebar-footer .social-links a:hover::before {
  transform: scale(1);
}

.sidebar-footer .social-links a:hover {
  transform: translateY(-5px) rotate(5deg);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.sidebar-footer .social-links a:active {
  transform: translateY(-2px) rotate(0deg);
}

/* ===================================
   Menu Toggle Button
   =================================== */
.menu-toggle {
  position: fixed;
  left: 30px;
  top: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
}

.menu-toggle:hover {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
}

/* Hamburger menu bars */
.menu-toggle i {
  display: none;
}

.menu-toggle::before,
.menu-toggle::after,
.menu-toggle span {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle span {
  margin: 0;
}

.menu-toggle.active {
  left: 320px;
}

/* ===================================
   Scroll Progress Indicator
   =================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color),
    var(--tertiary-color)
  );
  z-index: 10000;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* ===================================
   Gradient Text Effect
   =================================== */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #0ea5e9 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ===================================
   Glassmorphism Effect
   =================================== */
.glass-effect {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===================================
   Main Content
   =================================== */
.main-content {
  margin-left: 0px;
  transition: margin-left 0.3s ease;
}

@media (min-width: 993px) {
  .main-content {
    margin-left: 300px;
  }
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  overflow: hidden;
  color: #f8fafc;
}
.hero-image img,
.work-item .work-image img,
.blog-card img,
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Animated Background Shapes */
.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  opacity: 0.5;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float-shape 20s infinite ease-in-out;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: rgba(14, 165, 233, 0.3);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: rgba(59, 130, 246, 0.3);
  bottom: 20%;
  right: 15%;
  animation-delay: 5s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: rgba(99, 102, 241, 0.3);
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float-shape {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-30px, 30px) rotate(240deg);
  }
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat bottom;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 35px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge i {
  color: #ffd700;
}

@keyframes badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
}

.hero-text h1 {
  font-size: 56px;
  color: white;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  font-weight: 300;
}

.hero-description {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  font-size: 18px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: white;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.5),
      0 4px 15px rgba(14, 165, 233, 0.3);
  }
  50% {
    box-shadow: 0 0 35px rgba(14, 165, 233, 0.8),
      0 4px 20px rgba(14, 165, 233, 0.5);
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: white;
  color: #0ea5e9;
  border-color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary:active {
  transform: translateY(-1px) scale(0.98);
}

.hero-image {
  position: relative;
}

.image-wrap.project-card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

/* Dark mode styles for project cards */
body.dark-mode .project-card {
  background: var(--bg-dark-secondary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.05);
}

.image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.3s ease;
}

.image-wrapper:hover img {
  transform: scale(1.02);
}

/* Code Snippet Decoration */
.image-decoration {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: rgba(26, 32, 44, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 20px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: "Courier New", monospace;
  font-size: 12px;
  min-width: 250px;
}

.code-snippet {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-line {
  color: #e2e8f0;
  line-height: 1.6;
}

.keyword {
  color: #c792ea;
  font-weight: 600;
}

.class-name {
  color: #82aaff;
}

.scroll-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 24px;
  animation: bounce 2s infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.scroll-text {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===================================
   Stats Section
   =================================== */
.stats-section {
  padding: 80px 0;
  background: var(--bg-white);
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  backdrop-filter: blur(10px);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-10px);
  border-color: var(--secondary-color);
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3);
}

.stat-card:hover::before {
  opacity: 0.1;
}

.stat-icon {
  font-size: 48px;
  color: var(--secondary-color);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-family: "Poppins", sans-serif;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ===================================
   Section Styles
   =================================== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-title {
  font-size: 42px;
  color: var(--text-dark);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.section-description {
  font-size: 18px;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* ===================================
   About Section
   =================================== */
.about-section {
  background: var(--bg-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  border-radius: 15px;
  box-shadow: var(--shadow);
  width: 100%;
}

.experience-badge {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  text-align: center;
}

.badge-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
}

.badge-text {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.about-text .lead {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 15px;
  color: var(--text-light);
  line-height: 1.8;
}

.about-highlights {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.highlight-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 15px;
  border-radius: 10px;
  transition: var(--transition);
  cursor: pointer;
}

.highlight-item:hover {
  background: var(--bg-light);
  transform: translateX(10px);
}

.highlight-item i {
  font-size: 32px;
  color: var(--secondary-color);
  min-width: 40px;
  transition: var(--transition);
}

.highlight-item:hover i {
  transform: scale(1.2) rotate(10deg);
  color: var(--accent-color);
}

.highlight-item h4 {
  font-size: 18px;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.highlight-item p {
  margin: 0;
  font-size: 14px;
}

/* ===================================
   Services Section
   =================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.15),
    transparent
  );
  transition: left 1s ease;
}

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

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--secondary-color);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 25px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* ===================================
   Skills Section - New Design
   =================================== */
.skills-section {
  background: var(--bg-light);
}

.skills-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

.skill-card-new {
  background: var(--bg-white);
  padding: 35px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.skill-card-new::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--secondary-color),
    var(--accent-color)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card-new:hover {
  border-color: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.skill-card-new:hover::before {
  opacity: 1;
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.skill-icon-new {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  flex-shrink: 0;
}

.skill-card-header h3 {
  font-size: 22px;
  color: var(--text-dark);
  margin: 0;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.skill-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.skill-level {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary-color);
  padding: 4px 12px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 12px;
}

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

.skill-progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color)
  );
  border-radius: 10px;
  position: relative;
  animation: fillBar 1.5s ease-out;
}

.skill-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes fillBar {
  from {
    width: 0;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ===================================
   Projects Section
   =================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.project-card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color),
    var(--purple-accent)
  );
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.project-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 25px;
  transition: all 0.3s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.project-card p {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
}

.project-client {
  display: block;
  font-size: 14px;
  color: var(--secondary-color);
  font-weight: 600;
}

.projects-note {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  padding: 30px 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-top: 20px;
}

.projects-note p {
  font-size: 18px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.projects-note i {
  font-size: 24px;
}

/* ===================================
   Experience Section - New
   =================================== */
.experience-section {
  padding: 100px 0;
  background-color: var(--bg-light);
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

/* Dark mode styles */
body.dark-mode .experience-section {
  background-color: var(--bg-dark);
}

.experience-section .section-header {
  text-align: center;
  margin-bottom: 50px;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.experience-card {
  perspective: 1000px;
  height: 100%;
  min-height: 400px;
}

.experience-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

.experience-card:hover .experience-card-inner {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.experience-card-front,
.experience-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.experience-card-front {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.experience-card-back {
  transform: rotateY(180deg);
  padding: 30px;
  overflow-y: auto;
}

.experience-card.flipped .experience-card-inner {
  transform: rotateY(180deg);
}

.experience-card-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.experience-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.experience-card-title {
  flex: 1;
}

.experience-card-title h3 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

.experience-date {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.experience-location {
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.experience-location i {
  color: #0ea5e9;
  font-size: 12px;
}

.experience-summary {
  color: #475569;
  margin: 0 0 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.experience-role {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.role-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.experience-tech-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.tech-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.tech-tag-more {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  margin-left: 5px;
}

.experience-card-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.view-details {
  color: #0ea5e9;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-details:hover {
  color: #0284c7;
}

.view-details i {
  transition: transform 0.3s ease;
}

.view-details:hover i {
  transform: translateX(3px);
}

/* Back of card styles */
.experience-card-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.experience-card-content h4 {
  color: #1e293b;
  margin: 0 0 15px;
  font-size: 18px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.experience-card-content h4:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #3b82f6);
  border-radius: 3px;
}

.experience-card-content h5 {
  color: #334155;
  margin: 20px 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.experience-card-content p {
  color: #475569;
  line-height: 1.7;
  margin: 0 0 15px;
  font-size: 14px;
}

.experience-responsibilities {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.experience-responsibilities li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  color: #475569;
  line-height: 1.6;
  font-size: 14px;
}

.experience-responsibilities li i {
  color: #0ea5e9;
  font-size: 12px;
  position: absolute;
  left: 0;
  top: 5px;
}

.experience-technologies {
  margin: 20px 0;
}

.technologies-section h5 {
  margin-bottom: 10px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.tech-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.experience-client {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
}

.experience-client p {
  margin: 5px 0;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dark mode adjustments */
body.dark-mode .experience-item {
  background: var(--bg-white);
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .experience-header:hover {
  background-color: rgba(14, 165, 233, 0.05);
}

body.dark-mode .experience-details {
  border-top-color: rgba(255, 255, 255, 0.05);
}

/* Responsive styles */
@media (max-width: 768px) {
  .experience-header {
    padding: 20px;
    flex-wrap: wrap;
  }

  .experience-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
    margin-right: 15px;
  }

  .experience-main h3 {
    font-size: 18px;
  }

  .experience-meta {
    flex-direction: column;
    gap: 5px;
  }

  .experience-date::before {
    display: none;
  }

  .experience-details {
    padding: 0 20px !important;
  }

  .experience-item.active .experience-details {
    padding: 20px !important;
  }

  .tech-tags {
    gap: 6px;
  }

  .tech-tag {
    font-size: 12px;
    padding: 3px 10px;
  }
}

/* Animation for expanding/collapsing */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.experience-content > * {
  animation: fadeIn 0.3s ease-out forwards;
  opacity: 0;
}

.experience-content > *:nth-child(1) {
  animation-delay: 0.1s;
}
.experience-content > *:nth-child(2) {
  animation-delay: 0.2s;
}
.experience-content > *:nth-child(3) {
  animation-delay: 0.3s;
}
.experience-content > *:nth-child(4) {
  animation-delay: 0.4s;
}

/* ===================================
   Work Section
   =================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.work-item {
  background: var(--bg-white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.work-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color),
    var(--tertiary-color)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.work-item:hover::after {
  transform: scaleX(1);
}

.work-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.work-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.work-item:hover .work-image img {
  transform: scale(1.1);
}

.work-overlay {
  display: none;
}

.work-info {
  padding: 30px;
}

.work-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.work-info p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-tags span {
  padding: 5px 12px;
  background: var(--bg-light);
  color: var(--text-dark);
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
}

/* ===================================
   Blog Section
   =================================== */
.blog-section {
  background: var(--bg-light);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.blog-card {
  background: var(--bg-white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.blog-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color),
    var(--purple-accent)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.blog-card:hover::after {
  transform: scaleX(1);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.blog-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.blog-date {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--secondary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.blog-content {
  padding: 30px;
}

.blog-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-light);
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-content h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.blog-content > p {
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

.blog-link {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
}

.blog-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color)
  );
  transition: width 0.3s ease;
}

.blog-link:hover::after {
  width: 100%;
}

.blog-link:hover {
  gap: 12px;
  color: var(--accent-color);
}

/* ===================================
   Contact Section
   =================================== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 24px;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.contact-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.4);
}

.contact-item h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.contact-item p {
  color: var(--text-light);
  line-height: 1.6;
}

.contact-item a {
  color: var(--secondary-color);
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-social {
  margin-top: 40px;
}

.contact-social h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.contact-social .social-links {
  display: flex;
  gap: 15px;
}

.contact-social .social-links a {
  width: 45px;
  height: 45px;
  background: var(--bg-light);
  color: var(--text-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.contact-social .social-links a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.contact-social .social-links a:hover::before {
  transform: translateY(0);
}

.contact-social .social-links a:hover {
  color: white;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.contact-social .social-links a:active {
  transform: translateY(-2px) scale(1);
}

.contact-form-wrapper h3 {
  font-size: 24px;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group input,
.form-group textarea {
  padding: 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  transition: var(--transition);
  background: var(--bg-white);
  color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: var(--accent-color);
}

.form-group textarea {
  resize: vertical;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--primary-color);
  color: white;
  padding: 40px 0;
}

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

.footer-text p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9em;
  position: relative;
  padding: 0 10px;
}

.footer-links a:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -12px;
  color: rgba(255, 255, 255, 0.3);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-links a:last-child {
  margin-right: 0;
}

/* ===================================
   Modal Dialogs
   =================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-white);
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  color: var(--text-dark);
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.close-modal {
  position: absolute;
  right: 25px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--secondary-color);
  text-decoration: none;
}

.modal h2 {
  color: var(--secondary-color);
  margin-top: 0;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.modal h3 {
  color: var(--text-dark);
  margin: 25px 0 15px 0;
  font-size: 1.2em;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
}

.modal-body p,
.modal-body ul {
  margin-bottom: 15px;
  line-height: 1.6;
}

.modal-body ul {
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 8px;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ===================================
   Responsive Design
   =================================== */
/* Main Content Transition */
.main-content,
.hero-section {
  transition: transform 0.3s ease, margin-left 0.3s ease;
  will-change: transform, margin-left;
}

/* Mobile Styles */
@media (max-width: 992px) {
  .sidebar {
    width: 100%;
    left: -100%;
    transition: left 0.3s ease;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

 @supports (-webkit-overflow-scrolling: touch) {
  .main-content,
  .hero-section {
    transform: none !important;
  }
  body.sidebar-open .main-content,
  body.sidebar-open .hero-section {
    transform: translateX(100%) !important;
  }
}


  .hamburger-menu {
    display: flex !important;
    left: auto;
    right: 25px;
  }

  .close-sidebar {
    display: flex !important;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 42px;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
  }

  /* Fix for experience badge flicker */
  .experience-badge {
    position: relative !important;
    transform: none !important;
    top: 0 !important;
    left: 0 !important;
    margin: 20px auto;
    width: 200px;
    text-align: center;
  }

  .hero-section {
    padding: 80px 20px;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .hero-description {
    font-size: 16px;
  }

  .section-title {
    font-size: 30px;
  }

  .section-description {
    font-size: 16px;
  }

  .services-grid,
  .projects-grid,
  .work-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Stats section responsive */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-card {
    padding: 30px 20px;
  }

  .stat-number {
    font-size: 36px;
  }

  .stat-icon {
    font-size: 36px;
  }

  /* Hero badge responsive */
  .hero-badge {
    font-size: 12px;
    padding: 6px 15px;
  }

  /* Code snippet responsive */
  .image-decoration {
    display: none;
  }

  /* Animated shapes responsive */
  .shape {
    display: none;
  }

  .menu-toggle.active {
    left: 280px;
  }

  .sidebar {
    width: 280px;
    left: -280px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-icon {
    left: 0;
  }

  .timeline-item {
    padding-left: 70px;
  }

  .experience-badge {
    bottom: -20px;
    right: -20px;
    padding: 20px;
  }

  .badge-number {
    font-size: 28px;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }

  .about-highlights {
    margin-top: 30px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 24px;
  }

  .menu-toggle {
    left: 20px;
    top: 20px;
    width: 45px;
    height: 45px;
  }

  .service-card,
  .project-card,
  .timeline-content {
    padding: 25px 20px;
  }

  .projects-note {
    padding: 25px;
  }

  .projects-note p {
    font-size: 16px;
    flex-direction: column;
  }

  /* Stats section mobile */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 32px;
  }

  .scroll-text {
    display: none;
  }

  /* Skills section mobile */
  .skills-grid-new {
    grid-template-columns: 1fr;
  }

  .skill-card-new {
    padding: 25px;
  }

  .skill-icon-new {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .skill-card-header h3 {
    font-size: 18px;
  }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 10px;
}
.mt-2 {
  margin-top: 20px;
}
.mt-3 {
  margin-top: 30px;
}
.mt-4 {
  margin-top: 40px;
}
.mt-5 {
  margin-top: 50px;
}

.mb-1 {
  margin-bottom: 10px;
}
.mb-2 {
  margin-bottom: 20px;
}
.mb-3 {
  margin-bottom: 30px;
}
.mb-4 {
  margin-bottom: 40px;
}
.mb-5 {
  margin-bottom: 50px;
}

/* ===================================
   Sidebar & Hamburger Fixes
   =================================== */

/* Make sure hamburger stays visible and aligned */
.menu-toggle {
  position: fixed;
  left: 30px;
  top: 30px;
  z-index: 1100;
  transition: all 0.3s ease;
}

/* When sidebar is visible, shift hamburger behind */
.menu-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Sidebar transition animation */
.sidebar {
  transform: translateX(-300px);
  transition: transform 0.3s ease;
}
.sidebar.active {
  transform: translateX(0);
}

/* Ensure close button stays on top inside sidebar */
.close-btn {
  position: absolute;
  top: 25px;
  right: 20px;
  z-index: 1200;
}

/* Mobile-specific tweaks */
@media (max-width: 768px) {
  .menu-toggle {
    left: 20px;
    top: 20px;
  }

  .sidebar {
    width: 260px;
    transform: translateX(-260px);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .close-btn {
    top: 20px;
    right: 15px;
  }
}
/* Mobile styles for hero badge */
@media (max-width: 768px) {
  .hero-badge {
    position: relative;
    margin: 0 auto 20px !important; /* Center align and add bottom margin */
    display: inline-flex;
    left: 0;
    right: 0;
    transform: none;
    width: fit-content;
    padding: 8px 20px !important;
    font-size: 13px !important;
    z-index: 10;
    margin-top: 25px !important;
  }

  .hero-badge i {
    font-size: 12px !important;
  }
}
/* ===================================
   EXPERIENCE / TIMELINE SECTION
   =================================== */
.experience-section {
  background: var(--content-bg);
  position: relative;
  padding: 100px 0;
  color: var(--text-dark);
}

.experience-section .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.timeline {
  position: relative;
  margin: 0 auto;
  padding-left: 30px;
  max-width: 900px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  padding: 40px 0 40px 50px;
}


.timeline-icon {
  position: absolute;
  top: 40px;
  left: -29px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.timeline-icon i {
  font-size: 16px;
}

.timeline-content {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  transition: var(--transition);
  position: relative;
}

body.dark-mode .timeline-content {
  background: var(--bg-light);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.timeline-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.timeline-header p {
  font-size: 15px;
  color: var(--text-light);
  margin: 0;
}

.date-badge {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 30px;
  padding: 5px 14px;
  display: inline-block;
  align-self: flex-start;
}

.timeline-details {
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  transition: max-height 0.4s ease, padding 0.4s ease;
  overflow: hidden;
}

.timeline-toggle {
  background: transparent;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  font-size: 18px;
  margin-top: 10px;
  align-self: flex-start;
  transition: transform 0.3s ease;
}

.timeline-toggle:hover {
  transform: rotate(180deg);
}

/* Animation when item becomes visible */
.timeline-item.animate .timeline-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

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

/* ===================================
   Responsive
   =================================== */
@media (max-width: 768px) {
  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 0;
  }

  .timeline-item {
    padding: 20px 0 20px 40px;
  }

  .timeline-content {
    padding: 20px;
  }

  .timeline-icon {
    left: -10px;
    width: 32px;
    height: 32px;
  }

  .timeline-header h3 {
    font-size: 16px;
  }

  .date-badge {
    font-size: 12px;
    padding: 4px 10px;
  }
}
.timeline-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.timeline-header-top .date-badge {
  flex-shrink: 0;
}

.timeline-header-top h3 {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.timeline-header-top .timeline-toggle {
  background: transparent;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.timeline-header-top .timeline-toggle:hover {
  transform: rotate(180deg);
  color: var(--accent-color);
}
