:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --transition: all 0.3s ease;
  /* The radial progress custom property for dynamic skill arcs */
  --progress: 90deg; 
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f8fa;
  color: var(--dark-color);
  line-height: 1.6;
  scroll-behavior: smooth;
}

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

/* Navigation */
header {
  background-color: var(--secondary-color);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0.8;
  transition: var(--transition);
}

/* Improve header on mobile */
@media (max-width: 768px) {
  header {
    padding: 12px 0; /* Slightly reduce header padding on mobile */
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px 0; /* Further reduce header padding on small screens */
  }
}

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

.logo {
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

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

.hamburger {
  display: none;
  cursor: pointer;
  color: white;
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: var(--dark-color);
  color: white;
  position: relative;
  overflow: hidden;
}

/* Improve hero section on mobile */
@media (max-width: 768px) {
  .hero {
    padding-top: 70px; /* Reduce top padding on mobile */
    min-height: 100vh; /* Ensure full height */
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 60px; /* Further reduce top padding on small screens */
    padding-bottom: 40px; /* Add bottom padding for small screens */
  }
}

.hero:before,
.hero:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero:before {
  /* Background image layer */
  background: url('image.jpg') center/cover no-repeat;
  opacity: 0.9; /* ← adjust this to control image visibility */
}

.hero:after {
  /* Dark overlay layer */
  /*background: var(--dark-color);*/ /* or rgba(10, 25, 47, 0.85) */
  background: white;
  opacity: 0.1;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--primary-color);
}

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

.profile-image {
  max-width: 300px;
  height: auto;
  border-radius: 50%;
  border: 8px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-left: 50px;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
  min-height: 44px; /* Minimum touch target */
  min-width: 44px; /* Minimum touch target */
}

/* Social icon mobile optimization */
@media (max-width: 576px) {
  .social-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  margin-right: 15px;
  min-height: 44px; /* Minimum touch target size */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Button optimization for mobile */
@media (max-width: 768px) {
  .btn {
    padding: 10px 25px;
    font-size: 0.9rem;
    margin-right: 10px;
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 8px 18px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
    min-height: 40px;
  }
}

.btn:hover {
  background-color: #2980b9;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.expand-btn {
display: inline-block;
margin-top: 10px;
background-color: var(--primary-color);
color: #fff;
border: none;
padding: 8px 16px;
border-radius: 20px;
cursor: pointer;
transition: var(--transition);
font-size: 0.9rem;
font-weight: 500;
min-height: 36px; /* Minimum touch target */
min-width: 100px; /* Minimum width for touch */
}

/* Expand button mobile optimization */
@media (max-width: 768px) {
  .expand-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    min-height: 34px;
  }
}

@media (max-width: 480px) {
  .expand-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 32px;
    min-width: 90px;
  }
}

.expand-btn:hover {
  background-color: #2980b9; /* slightly darker shade of the primary color */
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}


/* Section base styles */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}

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

.bullet-list {
  list-style-type: disc;    /* or circle, square, etc. */
  margin-left: 20px;        /* indent bullets if you like */
  /* any other styling you want */
}

/* Experience Section */
.experience {
  background-color: var(--light-color);
}

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

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

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

.timeline-item:nth-child(odd) {
  left: 0;
}
.timeline-item:nth-child(even) {
  left: 50%;
}
.hidden {
  display: none;
}

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

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

.timeline-content {
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.timeline-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.timeline-description {
  font-size: 0.95rem;
}

.timeline-description ul {
  margin-top: 10px;
  margin-left: 20px;
}

.timeline-description li {
  margin-bottom: 5px;
}

/* Skills Section */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.skill-category {
  background-color: white;
  border-radius: 10px;
  padding: 60px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  flex: 1;
  min-width: 300px;
  max-width: 350px;
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-align: center;
  position: relative;
}

.skill-category h3:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 8px 15px;
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.skill-tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Additional Skill Visualization (Radial) */
.skill-radial-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

.skill-radial {
  width: 150px;
  height: 150px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skill-radial-progress {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* var(--progress) is a custom var to set the coverage of the arc */
  background: conic-gradient(var(--primary-color) var(--progress), #ecf0f1 0deg);
  transform: rotate(-90deg);
}

.skill-radial-progress::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background-color: white;
}

.skill-radial-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.skill-radial-percentage {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
}

.skill-radial-name {
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Projects Section */
.projects {
  background-color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr; /* single column on smaller screens */
    gap: 20px;                  /* optionally reduce gap to save space */
  }
}

.project-card {
  background-color: var(--light-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

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

.project-img {
  height: 200px;
  overflow: hidden;
}

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

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

.project-content {
  padding: 20px;
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.project-description {
  font-size: 0.95rem;
  margin-bottom: 15px;
  color: #7f8c8d;
}

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

.project-tag {
  font-size: 0.8rem;
  padding: 5px 10px;
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
  border-radius: 15px;
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.project-link i {
  margin-right: 5px;
}

/* Education Section */
.education-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.education-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  transition: var(--transition);
}

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

.education-header {
  background-color: var(--secondary-color);
  color: white;
  padding: 20px;
}

.education-body {
  padding: 20px;
}

.education-degree {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.education-field {
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 10px;
}

.education-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.education-school {
  font-size: 1.1rem;
  margin-bottom: 10px;
  font-weight: bold;
}

.education-gpa {
  font-size: 0.9rem;
  color: #7f8c8d;
}

.divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 15px 0;
}

/* Certifications Section */
.certifications {
  background-color: var(--light-color);
}

.certification-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.certification-card {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 500px;
  transition: var(--transition);
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.certification-logo {
  width: 60px;
  height: 60px;
  background-color: rgba(52, 152, 219, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.certification-info {
  flex: 1;
}

.certification-name {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.certification-issuer {
  font-size: 0.9rem;
  color: #7f8c8d;
}

.certification-link {
  margin-left: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
}

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

/* Contact Section */
.contact-content {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(52, 152, 219, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.contact-form {
  flex: 1;
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

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

.btn-submit {
  width: 100%;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

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

.hidden {
  display: none !important;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 30px 0;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 20px 0;
}

.footer-links li {
  margin: 0 15px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-social {
  margin-bottom: 20px;
}

.copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Analytics Counter */
.analytics-counter {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 80px;
}

.counter-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.counter-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.counter-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.counter-number:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  

  .profile-image {
    margin: 30px auto 0;
  }

  .social-icons {
    justify-content: center;
  }

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

  .timeline::after {
    left: 20px; /* Move timeline line to left side for mobile */
  }

  .timeline-item {
    padding: 10px 20px 10px 60px; /* Add left padding for timeline dot space */
    position: relative;
    width: 100% !important; /* Force full width on mobile */
    left: 0 !important; /* Override any left positioning */
    box-sizing: border-box;
  }

  .timeline-item:nth-child(even) {
    left: 0 !important; /* Force all items to left side */
  }

  .timeline-item::after {
    left: 10px !important; /* Consistent dot positioning on left */
  }

  /* Mobile timeline content improvements */
  .timeline-content {
    padding: 15px; /* Reduce padding for mobile */
    margin-bottom: 20px; /* Add spacing between timeline items */
  }

  .timeline-title {
    font-size: 1.1rem; /* Slightly smaller title for mobile */
  }

  .timeline-description {
    font-size: 0.9rem; /* Smaller text for better mobile readability */
  }

  .timeline-description ul {
    margin-left: 15px; /* Reduce left margin for mobile */
  }

  .expand-btn {
    font-size: 0.8rem; /* Smaller button text for mobile */
    padding: 6px 12px; /* Smaller button padding */
  }

  /* Mobile spacing improvements */
  section {
    padding: 60px 0; /* Reduce section padding for mobile */
  }

  .container {
    padding: 0 15px; /* Reduce container padding for mobile */
  }

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

  /* Navigation improvements for mobile */
  .logo {
    font-size: 1.4rem; /* Slightly smaller logo for mobile */
  }

  .hamburger {
    font-size: 1.4rem; /* Slightly smaller hamburger for mobile */
    padding: 8px; /* Add padding for better touch target */
  }

  .nav-links {
    padding: 20px 0; /* Adequate mobile menu padding */
  }

  .nav-links a {
    font-size: 1rem; /* Maintain readable nav text */
    padding: 12px 0; /* Touch-friendly padding */
    min-height: 44px; /* Minimum touch target size */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover effect */
    border-radius: 5px;
  }
}

/* Large phones and small tablets (576px and below) */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.2rem; /* Further reduce hero title */
  }

  .hero p {
    font-size: 0.95rem; /* Smaller hero description */
  }

  .section-title {
    font-size: 1.8rem; /* Smaller section titles */
  }

  .profile-image {
    width: 220px;
    height: 220px; /* Slightly smaller profile image */
  }

  .timeline-content {
    padding: 12px; /* Further reduce timeline padding */
  }

  .timeline-title {
    font-size: 1rem; /* Smaller timeline titles */
  }

  .timeline-description {
    font-size: 0.85rem; /* Smaller timeline text */
  }

  .project-card {
    margin-bottom: 15px; /* Reduce project card spacing */
  }

  .project-title {
    font-size: 1.1rem; /* Smaller project titles */
  }

  .project-description {
    font-size: 0.9rem; /* Smaller project descriptions */
  }

  .skill-category {
    padding: 25px 15px; /* Reduce skill category padding */
  }

  .skill-category h3 {
    font-size: 1.1rem; /* Smaller skill category titles */
  }

  .skill-tag {
    font-size: 0.8rem; /* Smaller skill tags */
    padding: 6px 12px;
  }

  .flip-card {
    width: 100%;
    max-width: 100%; /* Full width flip cards */
  }

  .education-cards {
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Reduce gap between education cards */
  }

  .certification-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .certification-logo {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .contact-form {
    padding: 20px; /* Reduce contact form padding */
  }

  .form-control {
    padding: 12px; /* Reduce form input padding */
    font-size: 0.9rem;
  }

  .btn {
    padding: 10px 25px; /* Smaller buttons */
    font-size: 0.9rem;
  }

  /* Navigation improvements for medium mobile screens */
  .logo {
    font-size: 1.4rem; /* Slightly smaller logo */
  }

  .hamburger {
    font-size: 1.4rem; /* Slightly smaller hamburger */
  }

  .nav-links a {
    font-size: 0.95rem; /* Slightly smaller nav text */
    padding: 10px 0; /* Touch-friendly padding */
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 10px; /* Further reduce container padding */
  }

  section {
    padding: 40px 0; /* Further reduce section padding */
  }

  .hero h1 {
    font-size: 1.8rem; /* Much smaller hero title for very small screens */
    line-height: 1.1;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 1.6rem; /* Smaller section titles */
    margin-bottom: 30px;
  }

  .profile-image {
    width: 180px;
    height: 180px; /* Much smaller profile image */
    margin: 20px auto 0;
  }

  .social-icons {
    gap: 10px; /* Reduce social icon spacing */
  }

  .social-icon {
    width: 35px;
    height: 35px; /* Smaller social icons */
    font-size: 1rem;
  }

  .timeline-item {
    padding: 8px 15px 8px 50px; /* Further reduce timeline padding */
  }

  .timeline::after {
    left: 15px; /* Adjust timeline line position */
  }

  .timeline-item::after {
    left: 5px; /* Adjust timeline dot position */
    width: 15px;
    height: 15px; /* Smaller timeline dots */
  }

  .timeline-content {
    padding: 10px; /* Minimal timeline content padding */
  }

  .timeline-title {
    font-size: 0.95rem; /* Very small timeline titles */
  }

  .timeline-description {
    font-size: 0.8rem; /* Very small timeline text */
  }

  .expand-btn {
    font-size: 0.75rem;
    padding: 5px 10px; /* Very small expand buttons */
  }

  .project-card {
    margin-bottom: 10px;
  }

  .project-img {
    height: 150px; /* Smaller project images */
  }

  .project-title {
    font-size: 1rem; /* Smaller project titles */
  }

  .project-description {
    font-size: 0.85rem; /* Smaller project descriptions */
  }

  .project-tag {
    font-size: 0.7rem; /* Smaller project tags */
    padding: 3px 8px;
  }

  .skill-category {
    padding: 20px 10px; /* Minimal skill category padding */
  }

  .skill-category h3 {
    font-size: 1rem; /* Smaller skill category titles */
  }

  .skill-tag {
    font-size: 0.75rem; /* Very small skill tags */
    padding: 5px 10px;
  }

  .flip-card {
    min-height: 320px; /* Reduce flip card height */
  }

  .flip-card-inner {
    min-height: 320px; /* Reduce flip card inner height */
  }

  .flip-card-front,
  .flip-card-back {
    min-height: 320px; /* Reduce flip card face height */
  }

  .education-header {
    padding: 15px; /* Reduce education header padding */
  }

  .education-body {
    padding: 15px; /* Reduce education body padding */
  }

  .education-degree {
    font-size: 1.1rem; /* Smaller education degree text */
  }

  .education-field {
    font-size: 0.9rem; /* Smaller education field text */
  }

  .certification-card {
    padding: 12px; /* Minimal certification card padding */
  }

  .certification-name {
    font-size: 1rem; /* Smaller certification names */
  }

  .certification-issuer {
    font-size: 0.8rem; /* Smaller certification issuer text */
  }

  .contact-info h3 {
    font-size: 1.3rem; /* Smaller contact info title */
  }

  .contact-info p {
    font-size: 1rem; /* Smaller contact info text */
  }

  .contact-detail {
    margin-bottom: 15px; /* Reduce contact detail spacing */
  }

  .contact-icon {
    width: 40px;
    height: 40px; /* Smaller contact icons */
    font-size: 1rem;
  }

  .contact-form {
    padding: 15px; /* Minimal contact form padding */
  }

  .form-control {
    padding: 10px; /* Minimal form input padding */
    font-size: 0.85rem;
  }

  .btn {
    padding: 8px 20px; /* Very small buttons */
    font-size: 0.85rem;
  }

  .footer-links {
    flex-wrap: wrap; /* Allow footer links to wrap */
    gap: 10px;
  }

  .footer-links li {
    margin: 5px; /* Reduce footer link margins */
  }

  .back-to-top {
    width: 40px;
    height: 40px; /* Smaller back to top button */
    font-size: 1rem;
  }

  /* Navigation improvements for small screens */
  .logo {
    font-size: 1.3rem; /* Smaller logo on very small screens */
  }

  .hamburger {
    font-size: 1.3rem; /* Smaller hamburger icon */
  }

  .nav-links {
    padding: 15px 0; /* Reduce mobile menu padding */
  }

  .nav-links a {
    font-size: 0.9rem; /* Smaller navigation text */
    padding: 8px 0; /* Add touch-friendly padding */
  }
}

/* Ensure the education section has a distinct background */
#education {
  background-color: #ffffff;  /* Set a contrasting background (white in this case) */
  padding: 100px 0;
}

.flip-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: #fff;
  background-color: var(--primary-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 15px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 40px; /* Minimum touch target */
  min-width: 80px; /* Minimum width for touch */
}

/* Flip button mobile optimization */
@media (max-width: 768px) {
  .flip-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-height: 36px;
  }
}

@media (max-width: 480px) {
  .flip-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    min-height: 32px;
    min-width: 70px;
    margin-left: 5px;
  }
}

.flip-btn:hover {
  background-color: #2980b9; /* a slightly darker shade */
  transform: translateY(-3px);
}


/* Keep each card from stretching 100% */
.flip-card {
  width: 400px;       /* Fixed width for horizontal layout */
  max-width: 100%;    /* Responsive fallback */
  perspective: 1000px;
  min-height: 380px; 
}

/* Inner container of the flip card */
.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 450px;  /* Make sure it can grow with content */
  transition: var(--transition);
  transform-style: preserve-3d;
}

/* Front and Back faces styling */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  min-height: 450px;  /* Maintain a consistent height for both sides */
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Updated flip card back design */
.flip-card-back {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--dark-color);
  transform: rotateY(180deg);
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* New sections inside flip card back */
.flip-card-back .back-section {
  text-align: left;
}
.flip-card-back .back-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 5px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 2px;
}
.flip-card-back .back-list {
  list-style: none;
  padding-left: 15px;
}
.flip-card-back .back-list li {
  font-size: 0.9rem;
  margin-bottom: 4px;
}


/* Card front uses your original .education-card styling */
.flip-card-front {
  background-color: white; /* or keep your existing background */
  z-index: 2; /* Keep it on top until flipped */
}

/* 1) A wrapper that hides the overflow so we don't see partial cards. */
.skills-slider-container {
  position: relative;
  overflow: hidden; 
  margin: 40px 0;  /* space above/below slider */
  /* Optional: padding so your Prev/Next buttons sit outside the cards */
  padding: 0 60px; 
}

/* 2) The slider (track) that holds all skill cards horizontally. */
.skills-slider {
  display: flex;
  gap: 20px;             /* spacing between cards */
  transition: transform 0.4s ease;
  transform: translateX(0);
}

/* 3) Each skill card. 
   Using 30% so three cards fit side-by-side 
   (with some gap leftover). Tweak as needed. */
.skill-category {
  flex: 0 0 30%;
  box-sizing: border-box;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Prev/Next buttons outside the cards. 
   The container padding (60px) ensures they don't overlap. */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 5px;
  opacity: 0.8;
  transition: 0.3s;
}

.slider-btn:hover {
  opacity: 1;
}

#prevBtn {
  left: 10px; /* or 0, if you prefer */
}
#nextBtn {
  right: 10px; /* or 0, if you prefer */
}

/* Responsive tweak: on narrower screens, 
   you might only want 2 or 1 card visible at once. */
@media (max-width: 992px) {
  .skill-category {
    flex: 0 0 45%; /* about 2 cards per view */
  }
}
@media (max-width: 600px) {
  .skill-category {
    flex: 0 0 90%; /* show 1 card at a time on mobile */
  }
}



/* Actual flipping behavior on hover */

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

  @media (max-width: 768px) {
    .nav-links {
      display: none;
      position: absolute;
      top: 60px;
      left: 0;
      width: 100%;
      background-color: var(--secondary-color);
      flex-direction: column;
      align-items: center;
      padding: 20px 0;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
      display: flex;
    }

    .nav-links li {
      margin: 10px 0;
    }

    .hamburger {
      display: block;
    }

    .hero h1 {
      font-size: 2.5rem;
    }

    .hero p {
      font-size: 1rem;
    }

    .section-title {
      font-size: 2rem;
    }

    .profile-image {
      width: 250px;
      height: 250px;
    }
    
    /* Mobile Analytics Counter */
    .analytics-counter {
      flex-direction: column;
      gap: 15px;
      padding: 15px;
      margin: 15px 0;
    }
    
    .counter-item {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      min-width: auto;
      padding: 10px;
      background-color: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
    }
    
    .counter-item i {
      font-size: 1.2rem;
      margin-bottom: 0;
      margin-right: 10px;
    }
    
    .counter-number {
      font-size: 1.4rem;
      margin-bottom: 0;
    }
    
    .counter-label {
      font-size: 0.7rem;
      margin-left: auto;
    }
  
  }
