@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary-color: #000;
  --secondary-color: #fff;
  --accent-color: #f5f5f5;
  --text-color: #333;
  --light-gray: #e0e0e0;
  --dark-gray: #333;
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Use transform3d for hardware acceleration */
.skill-card,
.certificate-card,
.project-image {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* Optimize animations with will-change */
.skill-card:hover,
.certificate-card:hover,
.project-image:hover img {
  will-change: transform;
}

/* Header */
header {
  padding: 20px 0;
  background-color: var(--secondary-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 15px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  z-index: 101;
  flex-shrink: 0;
}

/* Remove the logo icon margin since we're removing the icon */
.logo i {
  margin-right: 5px;
}

.nav-links {
  display: flex;
  gap: 30px;
  transition: var(--transition);
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 0;
}

.nav-links a:hover {
  color: #555;
}

.resume-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resume-btn:hover {
  background-color: #333;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.resume-icon-btn {
  display: none;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 8px;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resume-icon-btn:hover {
  background-color: #333;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 101;
  padding: 5px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

/* Hero Section */
#hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 0;
  min-height: calc(100vh - 80px);
  gap: 40px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 500px;
}

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

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
}

h1 span,
h2 span,
h3 span {
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

/* Hero text styling */
.regular-text {
  font-weight: 400;
}

.extra-bold {
  font-weight: 800;
}

.outlined-text {
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px var(--primary-color);
  text-stroke: 1px var(--primary-color);
}

/* Section title styling */
.section-title .regular-text {
  font-weight: 400;
}

.section-title .extra-bold {
  font-weight: 800;
}

/* Contact title styling */
.contact-title .outlined-text {
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px var(--primary-color);
  text-stroke: 1px var(--primary-color);
}

/* Responsive adjustments for contact title outlined text */
@media (max-width: 768px) {
  .contact-title .outlined-text {
    -webkit-text-stroke: 0.5px var(--primary-color);
    text-stroke: 0.5px var(--primary-color);
  }
}

/* Ensure proper inheritance for dark mode if implemented */
.dark-bg .outlined-text {
  -webkit-text-stroke: 1px var(--secondary-color);
  text-stroke: 1px var(--secondary-color);
}

/* Adjust responsive styling for outlined text */
@media (max-width: 768px) {
  .outlined-text {
    -webkit-text-stroke: 0.5px var(--primary-color);
    text-stroke: 0.5px var(--primary-color);
  }
}

.hero-content p {
  margin-bottom: 30px;
  color: #666;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.7;
}

.social-icons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Skills Section */
#skills {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 50px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  transition: var(--transition), background-color 0.3s ease, color 0.3s ease;
  min-height: 120px;
  text-align: center;
  /* Performance optimization */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.skill-card:hover {
  transform: translateY(-5px) translate3d(0, 0, 0);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card i,
.skill-card .js-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.skill-card.dark {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.skill-card p {
  font-size: 0.9rem;
  font-weight: 500;
}

.js-icon {
  font-weight: 700;
  font-family: monospace;
}

/* Experience Section */
.dark-bg {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 80px 0;
}

.experience-card {
  background-color: #111;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 15px;
  flex-wrap: wrap;
}

.company-logo {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.job-title {
  flex: 1;
  min-width: 200px;
}

.job-title h3 {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 5px;
}

.job-duration {
  font-size: 0.9rem;
  color: #aaa;
  text-align: right;
  white-space: nowrap;
}

.experience-body p {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* About Section */
#about {
  padding: 80px 0;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
  max-width: 45%;
}

.about-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
}

.about-content {
  flex: 1;
}

.about-text p {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.8;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Projects Section */
.projects-wrapper {
  width: 100%;
}

.project-card {
  margin-bottom: 100px;
  position: relative;
  margin-top: 0.5rem;
}

.project-number {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  margin-bottom: 20px;
  color: #fff;
}

.project-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.project-card.reverse .project-content {
  flex-direction: row-reverse;
}

.project-info {
  flex: 1;
  min-width: 300px;
}

.project-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 20px;
  color: #fff;
}

.project-description {
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.project-link {
  display: inline-block;
  font-size: 1.2rem;
  transition: var(--transition);
  color: #fff;
}

.project-link:hover {
  transform: translateY(-3px);
  color: #ccc;
}

.project-image {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  aspect-ratio: 412 / 183;
  /* Performance optimization */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-image:hover img {
  transform: scale(1.05) translate3d(0, 0, 0);
  will-change: transform;
}

/* Projects Controls */
.projects-controls {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  padding-top: 2rem;
  margin-bottom: 50px;
}

.show-more-projects,
.show-less-projects {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 15px 30px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.show-more-projects:hover,
.show-less-projects:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.show-more-projects i,
.show-less-projects i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.show-more-projects:hover i {
  transform: translateY(3px);
}

.show-less-projects:hover i {
  transform: translateY(-3px);
}

/* Responsive adjustments for projects controls */
@media (max-width: 768px) {
  .projects-controls {
    margin-top: 40px;
    padding-top: 1.5rem;
    margin-bottom: 40px;
  }

  .show-more-projects,
  .show-less-projects {
    padding: 12px 24px;
    font-size: 0.9rem;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .projects-controls {
    margin-top: 30px;
    padding-top: 1rem;
    margin-bottom: 30px;
  }

  .show-more-projects,
  .show-less-projects {
    padding: 10px 20px;
    font-size: 0.85rem;
    gap: 6px;
    border-radius: 25px;
  }
}

/* Hidden projects animation */
.hidden-projects {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden-projects.show {
  opacity: 1;
  transform: translateY(0);
}

/* Certificates Section */
#certificates {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 50px;
}

/* Replace the certificates grid with a new layout */
.certificates-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.certificate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  border-radius: 12px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  margin-top: 0.5rem;
  /* Performance optimization */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

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

.certificate-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

/* Replace all the certificate-logo styles with: */
.certificate-image {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* Certificates Controls for Show More/Less */
.certificates-controls {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding-top: 1rem;
}

.show-more-certificates,
.show-less-certificates {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #333;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.show-more-certificates:hover,
.show-less-certificates:hover {
  background: #eaeaea;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.show-more-certificates i,
.show-less-certificates i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.show-more-certificates:hover i {
  transform: translateY(2px);
}

.show-less-certificates:hover i {
  transform: translateY(-2px);
}

/* Hidden certificates animation */
.hidden-certificates {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden-certificates.show {
  opacity: 1;
  transform: translateY(0);
}

/* Awards Section Styles */
.awards-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.award-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  border-radius: 12px;
  background-color: #111;
  border: 1px solid #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 0.5rem;
}

.award-card.dark {
  background-color: #222;
}

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

.award-logo {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 1.5rem;
}

.award-logo.google {
  color: #4285f4;
}

.award-logo.youtube {
  color: #ff0000;
}

.award-logo.apple {
  color: #ffffff;
}

.award-info {
  flex: 1;
  margin-left: 20px;
}

.award-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.award-date {
  text-align: right;
}

.award-date p {
  font-size: 0.9rem;
  color: #aaa;
  margin: 0;
}

/* Awards Controls */
.awards-controls {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding-top: 1rem;
}

.show-more-btn,
.show-less-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.show-more-btn:hover,
.show-less-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Contact Section */
#contact {
  padding: 80px 0;
}

/* Contact Section - General improvements */
.contact-container {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-form {
  flex: 1;
  max-width: 500px;
}

.contact-info {
  flex: 1;
  max-width: 500px;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-bottom: 30px;
}

.submit-btn:hover {
  background-color: #333;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  transition: var(--transition);
}

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

.contact-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 20px;
  line-height: 1.2;
}

.contact-description {
  color: #666;
  margin-bottom: 30px;
  line-height: 1.7;
}

.contact-details p {
  margin-bottom: 10px;
  font-weight: 500;
}

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

.footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-copyright {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 0.9rem;
  color: #aaa;
}

/* Certificate Modal */
.certificate-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.certificate-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.certificate-modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.certificate-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 5px;
}

/* iPad and Tablet Specific Styles - Enhanced */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  /* Hide all navigation elements except logo and hamburger on iPad */
  .nav-links,
  .resume-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Enhanced iPad menu styling */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 80px 40px 40px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: right 0.3s ease;
    gap: 0;
    display: flex;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    font-size: 1.1rem;
  }

  .nav-links .mobile-resume-btn {
    display: block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 15px 25px;
    border-radius: 6px;
    text-align: center;
    margin-top: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    border: none;
  }

  /* Show icon-only resume button on iPad, hide text version */
  .resume-btn {
    display: none;
  }

  .resume-icon-btn {
    display: flex;
  }

  /* Hero section optimized for iPad */
  #hero {
    padding: 60px 0;
    gap: 40px;
    flex-direction: column;
    text-align: center;
    min-height: auto;
  }

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

  .hero-image {
    order: 1;
    max-width: 400px;
  }

  /* Center align social icons on iPad */
  .social-icons {
    justify-content: center;
  }

  /* Skills grid for iPad */
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 800px;
  }

  .skill-card {
    padding: 25px 15px;
    min-height: 110px;
  }

  /* About section for iPad */
  .about-container {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

  /* Experience cards for iPad */
  .experience-card {
    padding: 25px;
    margin-bottom: 25px;
  }

  .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .job-title {
    min-width: auto;
  }

  .job-duration {
    text-align: left;
  }

  /* Project cards optimized for iPad */
  .project-card {
    margin-bottom: 60px;
  }

  .project-content {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  .project-card.reverse .project-content {
    flex-direction: column;
  }

  .project-info {
    min-width: auto;
  }

  .project-image {
    min-width: auto;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Certificates optimized for iPad */
  .certificate-card {
    padding: 20px 25px;
    flex-direction: row;
  }

  .certificate-name {
    font-size: 1.1rem;
  }

  .certificate-image {
    width: 50px;
    height: 50px;
  }

  /* Awards optimized for iPad */
  .award-card {
    padding: 20px 25px;
  }

  .award-title {
    font-size: 1.1rem;
  }

  .award-logo {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  /* Contact section for iPad */
  .contact-container {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .contact-form,
  .contact-info {
    max-width: 600px;
    margin: 0 auto;
  }

  /* Footer for iPad */
  .footer-copyright {
    flex-direction: column;
    gap: 10px;
  }

  /* Section padding adjustments */
  section {
    padding: 60px 0;
  }

  .dark-bg {
    padding: 60px 0;
  }
}

/* Enhanced Mobile Styles */
@media (max-width: 767px) {
  .container {
    padding: 0 20px;
  }

  /* Hide all navigation elements except logo and hamburger on mobile */
  .nav-links,
  .resume-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    order: 3;
  }

  /* Mobile menu styling */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 80px 30px 30px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: right 0.3s ease;
    gap: 0;
    display: flex; /* Override the display: none */
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
  }

  /* Resume button inside mobile menu */
  .nav-links .mobile-resume-btn {
    display: block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 20px;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
    text-decoration: none;
    font-weight: 500;
    border: none;
  }

  .nav-links .mobile-resume-btn:hover {
    background-color: #333;
  }

  /* Show icon-only resume button on mobile, hide text version */
  .resume-btn {
    display: none;
  }

  .resume-icon-btn {
    display: flex;
  }

  /* Hero section for mobile */
  #hero {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
    min-height: auto;
    gap: 30px;
  }

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

  .hero-image {
    order: 1;
    max-width: 280px;
  }

  /* Skills grid for mobile */
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
  }

  .skill-card {
    padding: 20px 15px;
    min-height: 100px;
  }

  /* About section for mobile */
  .about-container {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

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

  /* Experience for mobile */
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .job-duration {
    text-align: left;
  }

  /* Projects for mobile */
  .project-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .project-card.reverse .project-content {
    flex-direction: column;
  }

  .project-info {
    min-width: auto;
  }

  .project-image {
    min-width: auto;
  }

  /* Contact section for mobile */
  /* Contact Section - Enhanced Mobile Styles */
  #contact {
    padding: 50px 0;
  }

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

  .contact-form {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .contact-info {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  /* Form styling improvements for mobile */
  .form-group {
    margin-bottom: 25px;
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 18px 20px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fafafa;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    background-color: white;
  }

  .form-group textarea {
    min-height: 140px;
    resize: vertical;
  }

  .submit-btn {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 18px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .submit-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
  }

  /* Contact title centered */
  .contact-title {
    text-align: center;
    margin-bottom: 25px;
  }

  /* Contact description centered */
  .contact-description {
    text-align: center;
    margin-bottom: 35px;
    font-size: 1.1rem;
    line-height: 1.6;
  }

  /* Contact details centered */
  .contact-details {
    text-align: center;
    margin-bottom: 30px;
  }

  .contact-details p {
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1rem;
  }

  /* Social links centered and improved */
  .social-links {
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }

  .social-link {
    width: 50px;
    height: 50px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
    font-size: 1.2rem;
  }

  .social-link:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

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

  .dark-bg {
    padding: 40px 0;
  }

  /* Smaller elements on very small screens */
  .skill-card {
    padding: 15px 10px;
    min-height: 90px;
  }

  .certificate-card,
  .award-card {
    padding: 12px 15px;
  }

  .certificate-image,
  .award-logo {
    width: 40px;
    height: 40px;
  }

  /* Adjust font sizes for small mobile */
  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 30px;
  }

  .certificate-name,
  .award-title {
    font-size: 0.9rem;
  }

  /* Hero adjustments for very small screens */
  .hero-image {
    max-width: 250px;
  }

  /* Social icons adjustments */
  .social-icons {
    justify-content: center;
  }

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

/* Small Mobile Devices - Further improvements */
@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  #contact {
    padding: 40px 0;
  }

  .contact-container {
    gap: 35px;
  }

  .form-group input,
  .form-group textarea {
    padding: 16px 18px;
    font-size: 1rem;
    border-radius: 6px;
  }

  .submit-btn {
    padding: 16px 25px;
    font-size: 1rem;
    border-radius: 6px;
  }

  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .contact-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 20px;
  }

  .contact-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }
}

/* Landscape orientation adjustments for tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  #hero {
    flex-direction: row;
    text-align: left;
    min-height: calc(100vh - 80px);
  }

  .hero-content {
    order: 1;
  }

  .hero-image {
    order: 2;
    max-width: 350px;
  }

  .about-container {
    flex-direction: row;
    text-align: left;
  }

  .contact-container {
    flex-direction: row;
    text-align: left;
  }
}
