:root {
  --primary: #000000;
  --secondary: #333333;
  --accent: #ffffff;
  --gray: #f5f5f5;
  --light-gray: #e8e8e8;
  --white: #ffffff;
  --black: #000000;
  --sidebar-bg: #000000;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--white);
  color: var(--text-primary);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

/* Mobile Navbar */
.mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--sidebar-bg);
  color: var(--white);
  padding: 0.8em 1em;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
}

.mobile-nav-right {
  display: flex;
  align-items: center;
  gap: 1em;
}

.mobile-profile-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.mobile-socials {
  display: flex;
  /* gap: 1em; */
}

.mobile-socials a {
  color: var(--white);
  font-size: 1.2em;
  transition: color 0.3s ease;
}

.mobile-socials a:hover {
  color: var(--light-gray);
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5em;
  transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
  transform: scale(1.1);
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Offcanvas Sidebar */
.mobile-offcanvas {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--white);
  color: var(--black);
  z-index: 1001;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-offcanvas.active {
  right: 0;
}

.mobile-offcanvas-content {
  padding: 2em 1.5em;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mobile-offcanvas-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 2em;
  padding: 1em 0;
  border-bottom: 1px solid var(--border-color);
}

.mobile-offcanvas-close {
  background: none;
  border: none;
  color: var(--black);
  font-size: 1.5em;
  cursor: pointer;
  padding: 0.5em;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.mobile-offcanvas-close:hover {
  background: var(--gray);
  transform: scale(1.1);
}

.mobile-offcanvas-nav {
  flex: 1;
}

.mobile-offcanvas-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-offcanvas-nav li {
  margin-bottom: 0.5em;
}

.mobile-offcanvas-nav a {
  color: var(--black);
  text-decoration: none;
  font-size: 1.2em;
  font-weight: 500;
  padding: 1em 0;
  display: block;
  border-radius: 8px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.mobile-offcanvas-nav a:hover,
.mobile-offcanvas-nav a.active {
  background: var(--black);
  color: var(--white);
  padding-left: 1em;
  transform: translateX(5px);
}


/* Mobile Offcanvas Overlay */
.mobile-offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-offcanvas-overlay.active {
  opacity: 1;
  visibility: visible;
}

aside#sidebar.desktop-sidebar {
  width: 350px;
  background: var(--sidebar-bg);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2em;
  min-height: 100vh;
  position: fixed;
}

.profile-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1em;
  border: 4px solid var(--white);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.socials {
  margin-bottom: 2em;
  border-bottom: 1px solid var(--white);
  padding-bottom: 1em;
}

.socials a {
  color: var(--white);
  margin: 0 0.8em;
  font-size: 1.6em;
  transition: color 0.3s;
}

.socials a:hover {
  color: var(--light-gray);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

nav {
  width: 100%;
}

nav ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

nav li {
  margin: 1.5em 0;
}

nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  padding: 0.5em 0.7em;
  border-radius: 5px;
}

nav a:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
}

nav a.active {
  color: var(--white);
  transform: translateX(5px);
}

main {
  margin-left: 350px;
  flex: 1;
  padding: 0;
  width: calc(100% - 350px);
  overflow-x: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}


/* Section styles (simplified, expand as you wish) */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--white);
  position: relative;
}

#home .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 100%);
}

#home .content {
  position: relative;
  z-index: 2;
  text-align: center;
}

#home p.main-heading {
  font-size: 2.7em;
  margin-bottom: 0.2em;
  color: var(--white);
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#home h1 {
  font-size: 1.4em;
  margin-bottom: 0.2em;
  color: var(--white);
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#home h2 {
  font-size: 1.3em;
  font-weight: 400;
  margin-top: 0.6em;
  color: var(--light-gray);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#home h2::after {
  display: none;
}

#about p,
#services ul,
#contact ul {
  font-size: 1.1em;
}

.btn {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  padding: 0.7em 1.4em;
  border-radius: 22px;
  text-decoration: none;
  margin: 0;
  font-size: 1em;
  border: 2px solid var(--black);
  transition: all 0.3s ease;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2em 0;
  flex-wrap: wrap;
}

.btn:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Center buttons in About and Services sections */
#about .btn,
#services .btn {
  display: inline-block;
  text-align: center;
  margin: 0;
}

/* Home section icons styling */
#home .upwork-img,
#home .\31 0\+experience-img {
  max-width: 150px;
  height: auto;
  margin: 0.5em;
  border-radius: 8px;
  transition: all 0.3s ease;
  opacity: 0.9;
}

#home .upwork-img:hover,
#home .\31 0\+experience-img:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 1;
}

#home .icons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  margin-top: 1.5em;
  flex-wrap: wrap;
}

#portfolio .tabs {
  display: flex;
  gap: 1em;
  margin-bottom: 2.5em;
  flex-wrap: wrap;
}

#portfolio .tabs button {
  background: var(--white);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  outline: none;
  padding: 0.6em 1.4em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#portfolio .tabs button.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

#portfolio .tabs button:hover {
  border-color: var(--black);
  color: var(--black);
  transform: translateY(-1px);
}

#portfolio .cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
  margin-bottom: 3em;
  align-items: stretch;
}

#portfolio .card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.2em;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 500px;
  width: 100%;
  box-sizing: border-box;
}

#portfolio .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#portfolio .card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1em;
  flex-shrink: 0;
}

#portfolio .card h3 {
  margin: 0 0 1em 0;
  color: var(--black);
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.3;
  flex-shrink: 0;
}

#portfolio .card p {
  color: var(--text-secondary);
  line-height: 1.4;
  font-size: 0.9em;
  flex-grow: 1;
  margin: 0;
  text-align: center;
  word-wrap: break-word;
  hyphens: auto;
  overflow-y: auto;
  max-height: 200px;
  padding-top: 1em;
}

#portfolio .loadmore {
  margin: 2em auto 0 auto;
  display: block;
  padding: 0.8em 2em;
  font-size: 1.1em;
}

/* Image Popup Styles */
.image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow: auto;
}

.image-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.image-popup-container {
  position: relative;
  max-width: 50%;
  max-height: calc(100% - 30px);
  /* display: flex; */
  /* flex-direction: column; */
  /* align-items: center; */
  /* justify-content: center; */
  /* overflow: scroll; */
  scroll-behavior: smooth;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.image-popup-close {
  position: fixed;
  right: calc(100% - 74%);
  top: 20px;

  /* position: absolute; */
  /* top: 10px; */
  /* right: 10px; */
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
  padding: 0;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.image-popup-close:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.9);
}

.image-popup-prev,
.image-popup-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1.2em;
  padding: 0.4em;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-popup-prev {
  left: 20px;
}

.image-popup-next {
  right: 20px;
}

.image-popup-prev:hover,
.image-popup-next:hover {
  background: rgba(255, 255, 255, 0.9);
  color: black;
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.image-popup-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
  width: auto;
  height: auto;
  min-width: 100%;
}

.image-popup-title {
  color: white;
  font-size: 1.2em;
  font-weight: 500;
  margin-top: 1.5em;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s ease;
}

.image-popup-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  font-weight: 400;
  margin-top: 0.3em;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s ease;
}

/* Image Popup Loader */
.image-popup-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  display: none;
}

.image-popup-loader.active {
  display: block;
}

.image-popup-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

/* Contact styles */
#contact {
  display: flex;
  gap: 4em;
  align-items: flex-start;
}

#contact .details {
  flex: 1;
}

#contact .details ul {
  list-style: none;
  padding: 0;
}

#contact .details li {
  margin-bottom: 0.7em;
}

#contact form {
  flex: 1.5;
  background: var(--white);
  border-radius: 10px;
  padding: 2em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1em;
  border: 1px solid var(--border-color);
}

#contact input,
#contact textarea {
  border: 2px solid var(--border-color);
  border-radius: 5px;
  padding: 0.7em;
  font-size: 1em;
  width: 100%;
  transition: border-color 0.3s ease;
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--black);
}

#contact textarea {
  min-height: 80px;
  resize: vertical;
}

/* Section Headers */
h2 {
  color: var(--black);
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 1em;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--black);
}

h3 {
  color: var(--black);
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 0.5em;
}

/* About Section */
#about {
  padding: 1em 2em;
}

#about p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5em;
}

#about ul {
  color: var(--text-secondary);
  line-height: 1.6;
}

#about ul li {
  margin-bottom: 0.5em;
}

/* Skills Section */
#skills {
  padding: 2em 2em 4em 2em;
  background: var(--gray);
}

.skills-container {
  width: 100%;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em 4em;
  margin-top: 3em;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

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

.skill-name {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--black);
  margin: 0;
}

.skill-percentage {
  font-size: 1em;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.skill-progress-container {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--light-gray);
  border-radius: 3px;
  overflow: hidden;
}

.skill-progress-bar {
  height: 100%;
  background: var(--black);
  border-radius: 3px;
  transition: width 1.5s ease-in-out;
  width: 0%;
}



/* Services Section */
#services {
  padding: 2em 2em;
  background: var(--gray);
}

#services .cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  margin-bottom: 3em;
}

#services .card {
  background: var(--black);
  color: var(--white);
  border-radius: 10px;
  padding: 1.8em;
  box-shadow: none;
  text-align: center;
  border: 1px solid var(--black);
  display: flex;
  flex-direction: column;
  height: auto;
  margin-bottom: 0;
  align-items: center;
  min-height: 320px;
}

#services .card .icon {
  font-size: 2.3em;
  color: var(--white);
}

#services .card h3 {
  color: var(--white);
  font-size: 1.25em;
  font-weight: 600;
  margin-bottom: 0.8em;
  text-align: center;
  line-height: 1.3;
}

#services .card p {
  color: var(--light-gray);
  line-height: 1.5;
  text-align: justify;
  font-size: 0.9em;
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Portfolio Section */
#portfolio {
  padding: 2em 2em;
  clear: both;
}

/* Contact Section */
#contact {
  padding: 1em 2em;
}

#contact .details h2 {
  margin-bottom: 1.5em;
}

#contact .details ul li {
  color: var(--text-secondary);
  line-height: 1.6;
}

#contact .details ul li strong {
  color: var(--black);
}

#contact .details ul li a {
  color: var(--black);
  text-decoration: none;
  transition: color 0.3s ease;
}

#contact .details ul li a:hover {
  color: var(--text-secondary);
}

/* Contact Social Icons */
.contact-socials {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border-color);
}

.contact-socials h3 {
  color: var(--black);
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 1em;
  text-align: left;
}

.contact-socials h3::after {
  display: none;
}

.social-icons {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--black);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.3em;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-icons a:hover {
  background: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: var(--white);
}

.social-icons a i {
  transition: transform 0.3s ease;
}

.social-icons a:hover i {
  transform: scale(1.1);
}

/* Contact Form Styles */
#contact-form {
  position: relative;
}

#submit-btn {
  position: relative;
  overflow: hidden;
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  display: none;
}

.btn-loader i {
  margin-right: 0.5em;
}

#form-message {
  transition: all 0.3s ease;
  font-weight: 500;
  text-align: center;
}

#form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Basic responsive adjustments for portfolio */
@media (max-width: 1200px) {
  #portfolio .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5em;
  }

  .image-popup-container {
    max-width: 70%;
  }

  .image-popup-close {
    right: calc(100% - 83%);
  }
}

@media (max-width: 768px) {

  .image-popup-container {
    max-width: 95%;
    max-height: 90vh;
    padding: 20px;
  }

  .image-popup-img {
    max-width: 100%;
    /* max-height: 70vh; */
    min-width: auto;
    /* object-fit: contain; */
    object-fit: cover;
    max-height: 100%;
  }

  .image-popup-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 1.2em;
  }

  .image-popup-prev {
    left: 15px;
    width: 35px;
    height: 35px;
    font-size: 1em;
  }

  .image-popup-next {
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 1em;
  }

  /* Show mobile navbar */
  .mobile-navbar {
    display: block;
  }

  #contact {
    align-items: center;
  }

  #contact form {
    width: 100% !important;
  }

  #home {
    min-height: auto !important;
  }

  /* Hide sidebar on mobile */
  aside#sidebar.desktop-sidebar {
    display: none;
  }

  /* Remove left margin from main content on mobile and add top padding for navbar */
  main {
    margin-left: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Home section responsive styles */
  #home {
    min-height: 100vh;
    padding: 5em 1em 2em 1em;
    text-align: center;
  }

  #home h1.main-heading {
    font-size: 2em;
    margin-bottom: 0.5em;
    line-height: 1.2;
  }

  #home h2 {
    font-size: 1.1em;
    margin-top: 0.8em;
    line-height: 1.4;
  }

  #home .btn {
    margin-top: 2em;
    padding: 0.8em 1.6em;
    font-size: 0.95em;
  }

  /* Mobile home icons */
  #home .upwork-img,
  #home .\31 0\+experience-img {
    max-width: 130px;
    margin: 0.3em;
  }

  #home .icons-container {
    margin-top: 1.2em;
    gap: 0.8em;
  }

  #portfolio .cards {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }

  #portfolio .card {
    height: 500px;
  }

  #portfolio .card img {
    height: 200px;
  }

  #portfolio .card h3 {
    font-size: 1.2em;
    margin-bottom: 0.8em;
  }

  #portfolio .card p {
    font-size: 0.85em;
    line-height: 1.3;
    max-height: 180px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2em;
  }


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

  .skill-percentage {
    font-size: 0.9em;
  }


  /* Services section responsive */
  #services .cards {
    grid-template-columns: 1fr;
    gap: 1.2em;
  }

  #services .card {
    min-height: 280px;
    padding: 1.5em;
  }

  #services .card .icon {
    font-size: 2.1em;
  }

  #services .card h3 {
    font-size: 1.15em;
    margin-bottom: 0.7em;
  }

  #services .card p {
    font-size: 0.88em;
    line-height: 1.5;
  }

  /* Add padding to all sections on mobile */
  #about,
  #skills,
  #portfolio,
  #services,
  #contact {
    padding-left: 1em;
    padding-right: 1em;
  }

  /* Contact section responsive */
  #contact {
    flex-direction: column;
    gap: 2em;
  }

  #contact .details {
    margin-bottom: 1em;
  }

  #contact .details h2 {
    font-size: 2em;
    margin-bottom: 1.5em;
  }

  #contact .details ul li {
    font-size: 1.1em;
    margin-bottom: 1em;
    line-height: 1.6;
  }

  #contact form {
    flex: 1;
    padding: 2.5em;
    margin-top: 1em;
  }

  #contact input,
  #contact textarea {
    padding: 1em;
    font-size: 1.1em;
    border-radius: 8px;
  }

  #contact textarea {
    min-height: 120px;
  }

  #contact .btn {
    padding: 1em 2em;
    font-size: 1.1em;
    margin: 0;
  }

  /* Contact social icons mobile */
  .contact-socials {
    margin-top: 1.5em;
    padding-top: 1em;
  }

  .contact-socials h3 {
    font-size: 1.5em;
    margin-bottom: 0.8em;
  }

  /* 
  .social-icons {
    gap: 0.8em;
  } */

  .social-icons a {
    width: 50px;
    height: 50px;
    font-size: 1.5em;
  }

  /* Mobile popup adjustments for tablets */
  .image-popup-prev,
  .image-popup-next {
    width: 55px;
    height: 55px;
    font-size: 1.3em;
    position: fixed;
  }

  .image-popup-prev {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .image-popup-next {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  #home h1.main-heading {
    font-size: 1.8em;
  }

  #home h2 {
    font-size: 1em;
  }

  #home .btn {
    padding: 0.7em 1.4em;
    font-size: 0.9em;
  }

  /* Extra small screens home icons */
  #home .upwork-img,
  #home .\31 0\+experience-img {
    max-width: 110px;
    margin: 0.2em;
  }

  #home .icons-container {
    margin-top: 1em;
    gap: 0.5em;
  }

  .mobile-navbar {
    padding: 0.6em 0.8em;
  }

  .mobile-profile-img {
    width: 40px;
    height: 40px;
  }

  .mobile-socials a {
    font-size: 1.7em;
  }

  main {
    padding: 0;
  }

  /* Add padding to all sections on extra small screens */
  #about,
  #skills,
  #portfolio,
  #services,
  #contact {
    padding-left: 0.8em;
    padding-right: 0.8em;
  }

  #home {
    padding: 4.5em 0.8em 0.8em 0.8em;
  }

  /* Ensure no horizontal overflow on very small screens */
  #contact {
    gap: 1.5em;
  }

  #contact form {
    padding: 2em;
    margin-top: 0.5em;
  }

  #contact input,
  #contact textarea {
    padding: 0.9em;
    font-size: 1em;
  }

  #contact textarea {
    min-height: 100px;
  }

  #contact .btn {
    padding: 0.9em 1.8em;
    font-size: 1em;
  }

  /* Contact social icons extra small screens */
  .contact-socials {
    margin-top: 1.2em;
    padding-top: 0.8em;
  }

  .contact-socials h3 {
    font-size: 1em;
    margin-bottom: 0.7em;
  }

  .social-icons {
    gap: 0.6em;
  }

  .social-icons a {
    width: 38px;
    height: 38px;
    font-size: 1.1em;
  }

  /* Services section for extra small screens */
  #services .cards {
    gap: 1em;
  }

  #services .card {
    padding: 1.2em;
    min-height: 260px;
  }

  #services .card .icon {
    font-size: 1.9em;
  }

  #services .card h3 {
    font-size: 1.05em;
    margin-bottom: 0.6em;
  }

  #services .card p {
    font-size: 0.82em;
    line-height: 1.4;
  }

  /* Portfolio cards for extra small screens */
  #portfolio .card {
    height: 480px;
    padding: 1em;
  }

  #portfolio .card img {
    height: 180px;
  }

  #portfolio .card h3 {
    font-size: 1.1em;
    margin-bottom: 0.7em;
  }

  #portfolio .card p {
    font-size: 0.8em;
    line-height: 1.2;
    max-height: 160px;
  }

  /* Mobile popup adjustments */
  .image-popup-close {
    top: 20px;
    right: 24px;
    width: 28px;
    height: 28px;
    font-size: 1em;
  }

  .image-popup-prev,
  .image-popup-next {
    width: 30px;
    height: 30px;
    font-size: 0.9em;
    position: fixed;
  }

  .image-popup-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .image-popup-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .image-popup-container {
    max-width: 98%;
    max-height: 100%;
    padding: 15px;
  }

  .image-popup-img {
    max-width: 100%;
    max-height: 100%;
    min-width: auto;
    object-fit: cover;
  }

  .image-popup-title {
    font-size: 1.1em;
    margin-top: 1.2em;
  }

  .image-popup-counter {
    font-size: 0.8em;
  }

  /* Mobile loader adjustments */
  .image-popup-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }
}

/* WhatsApp Sticky Icon */
.whatsapp-sticky {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-sticky:hover {
  background: #128C7E;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  text-decoration: none;
  color: white;
}

.whatsapp-sticky i {
  transition: transform 0.3s ease;
}

.whatsapp-sticky:hover i {
  transform: scale(1.1);
}

/* Pulse animation for WhatsApp icon */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }

  50% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.1);
  }

  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
}

/* Mobile responsive adjustments for WhatsApp icon */
@media (max-width: 768px) {
  .whatsapp-sticky {
    width: 55px;
    height: 55px;
    font-size: 24px;
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .whatsapp-sticky {
    width: 50px;
    height: 50px;
    font-size: 22px;
    bottom: 12px;
    right: 12px;
  }
}

/* Toast Notification Styles */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  z-index: 10002;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-success {
  border-left: 4px solid #22c55e;
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-message {
  flex: 1;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #374151;
}

/* Button loader styles */
.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Mobile responsive for toast */
@media (max-width: 768px) {
  .toast-notification {
    top: 80px;
    right: 15px;
    left: 15px;
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .toast-notification {
    top: 70px;
    right: 10px;
    left: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }

  .toast-icon {
    font-size: 1.3rem;
  }

  .toast-message {
    font-size: 0.85rem;
  }
}

/* Image Optimization & Loading Styles */
.img-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--light-gray);
}

.lazy-img {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: block;
  width: 100%;
  height: auto;
}

.lazy-img.loaded {
  opacity: 1;
}

.lazy-img.error {
  opacity: 0.5;
}

/* Skeleton loader for images */
.img-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      var(--light-gray) 0%,
      #e0e0e0 20%,
      var(--light-gray) 40%,
      var(--light-gray) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

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

  100% {
    background-position: 200% 0;
  }
}

/* Background image loading fade-in */
#home {
  transition: background-image 0.5s ease-in-out;
}

#home.bg-loaded {
  animation: fadeInBg 0.6s ease-in-out;
}

@keyframes fadeInBg {
  from {
    opacity: 0.7;
  }

  to {
    opacity: 1;
  }
}

/* Optimize portfolio card images */
#portfolio .card .img-wrapper {
  aspect-ratio: 16 / 10;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

#portfolio .card img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* Profile images optimization */
.profile-img,
.mobile-profile-img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Badge images optimization */
.upwork-img,
.\31 0\+experience-img {
  image-rendering: -webkit-optimize-contrast;
  will-change: transform;
}

/* Preload hint for critical images */
img[loading="eager"] {
  content-visibility: auto;
}

/* Blur-up effect for progressive image loading */
.lazy-img:not(.loaded) {
  filter: blur(10px);
  transform: scale(1.05);
}

.lazy-img.loaded {
  filter: blur(0);
  transform: scale(1);
}

/* Image error state styling */
.lazy-img.error {
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  .lazy-img,
  #home,
  .img-skeleton {
    animation: none !important;
    transition: none !important;
  }
}

/* Performance optimization: GPU acceleration */
.lazy-img,
.img-skeleton {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Image compression hint for browsers */
img {
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Responsive image container for portfolio */
@media (max-width: 768px) {
  #portfolio .card .img-wrapper {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 480px) {
  #portfolio .card .img-wrapper {
    aspect-ratio: 4 / 3;
  }

  .img-skeleton {
    animation-duration: 1.2s;
  }
}

/* Footer Styles */
.site-footer {
  background: #000000;
  color: #ffffff;
  padding: 1.5em 0;
  margin-top: auto;
  text-align: center;
  position: relative;
  z-index: 10;
  width: 100%;
}

.footer-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
  color: #ffffff;
  line-height: 1.6;
  width: 100%;
  padding: 0 1em;
}

.footer-keywords span {
  transition: color 0.3s ease;
  white-space: nowrap;
  margin: 0 0.3em;
}

.footer-keywords span:hover {
  color: #cccccc;
}

.footer-keywords span:not(:last-child)::after {
  content: " |";
  color: #666666;
  margin-left: 0.3em;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
  .site-footer {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-footer {
    display: none;
  }
}