/* === CROSS-BROWSER COMPATIBILITY & MOBILE OPTIMIZATIONS === */

/* CSS Custom Properties with Fallbacks */
:root {
  --font-heading: 'Rowdies', sans-serif;
  --font-body: 'Inter', sans-serif;
  --primary-color: #29a587;
  --bg-dark: #1d222a;
  --text-light: #fff;
  --tilt-}

/* Universal Reset with Cross-Browser Support */
* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
}

/* iOS Safari specific fixes */
*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* Prevent zoom on input focus (iOS Safari) */
input, textarea, select {
  font-size: 16px !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Smooth scrolling with fallbacks */
html {
  scroll-behavior: smooth;
  -webkit-scroll-behavior: smooth;
  -ms-scroll-behavior: smooth;
}

/* Mobile viewport fix */
@viewport {
  width: device-width;
  zoom: 1.0;
}

/* Webkit scrollbar styling for consistency */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1d222a;
}

::-webkit-scrollbar-thumb {
  background: #29a587;
  border-radius: 4px;
}

/* === YOUR ORIGINAL CSS WITH ONLY RESPONSIVENESS REWRITTEN === */
body, html {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  -ms-overflow-style: scrollbar; /* IE/Edge scrollbar */
}

/* Enhanced mobile support */
body {
  -webkit-text-size-adjust: 100%; /* Prevent text scaling in iOS Safari */
  -ms-text-size-adjust: 100%; /* Prevent text scaling in IE/Edge */
  text-size-adjust: 100%; /* Standard property */
  -webkit-font-smoothing: antialiased; /* Better font rendering on macOS/iOS */
  -moz-osx-font-smoothing: grayscale; /* Better font rendering on macOS */
}

.menu-container {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  position: fixed;
  top: 20px;
  right: 30px;
  cursor: pointer;
  z-index: 200;
}
.navbar {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  -ms-flex-pack: end;
  justify-content: flex-end;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 20px;
  background: #222;
  color: white;
}
.active{
  color: #29a587;
  background:#29a587;
  border-radius: 5px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2px;
  font-size: 2rem;
}
.nav-links li {
  display: inline-block;
  padding: 8px 15px;
}
.nav-links a {
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  transition: 0.3s;
  font-size: 2rem;
  border-radius: 50px;
  background: #3d5b49;
  background: linear-gradient(135deg, #142521, #1f7e66);
}
.nav-links a:hover {
  background: #04c796;
  border-radius: 50px;
}
.menu-text {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
  font-family: "Rowdies", sans-serif;
}
.menu-container:hover .menu-text {
  color: #29a587;
  transform: scale(1.1);
}
.container {
  width: 100%;
  height: 100%;
  background: linear-gradient(#232932, #2c3138, #232932);
}
.landing {
  margin-bottom: 0;
  padding-bottom: 0;
}
.banner {
  margin-bottom: 3rem;
}
.skills {
  margin-top: 0;
  padding-top: 6rem;
}

/* Navigation (UNCHANGED) */
.menu-icon {
  display: none;
}
.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 0.5rem;
}
/* Removed menu-btn::after to prevent triangular corner overlap */
.line {
  width: 3rem;
  height: 0.2rem;
  background-color: #bbb;
  transition: transform 0.3s;
}
.change .line-1 {
  transform: rotateZ(45deg) translate(0.7rem, -0.1rem);
}
.change .line-2 {
  transform: rotateZ(-45deg) translate(0.7rem, -0.1rem);
}
.navigation {
  position: fixed;
  top: -8rem;
  right: -63rem;
  width: 50rem;
  transform: rotateZ(-15deg);
  height: 100vh;
  background-color: #31363c;
  z-index: 100;
  display: flex;
  align-items: center;
  padding-left: 8rem;
  z-index: 150;
  transition: all 0.6s;
}
.change .navigation {
  top: 0;
  right: 0;
  transform: rotateZ(0);
}
.nav-items {
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
}
.change .nav-items {
  opacity: 1;
  visibility: visible;
  transition: 0.5s 0.7s;
}
.navigation .section-border {
  opacity: 0;
  visibility: hidden;
}
.change .navigation .section-border {
  opacity: 1;
  visibility: visible;
  transition: all 0.5s 0.7s;
}
.nav-items a {
  font-size: 3rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: #eee;
  margin: 1rem 0;
  transition: color 0.5s;
}
.nav-items a:hover {
  color: #29a587;
}

/* Landing Section (UNCHANGED) */
.landing {
  width: 100%;
  min-height: 100vh;
  position: relative;
}
.section-bg-heading {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-size: 30rem;
  font-family: "Caveat", cursive;
  color: #31363d;
  opacity: 0.5;
}
.logo {
  position: relative;
  top: 1rem;
  left: 2rem;
  font-size: 3rem;
  display: flex;
  align-items: center;
  z-index: 2;
}
.logo span:nth-child(1) { color: #fff; }
.logo span:nth-child(2) {
  font-size: 4rem;
  font-family: "Caveat", cursive;
  font-weight: bold;
  color: #29a587;
}
.logo span:nth-child(3) {
  color: #29a587;
  font-weight: bold;
  font-size: 4rem;
  font-family: "Caveat", cursive;
}
.logo span:nth-child(4) {
  font-size: 4rem;
  font-family: "Caveat", cursive;
  font-weight: bold;
  color: #29a587;
}
.banner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 rem;
  margin-top: 0rem;
  margin-bottom: 0rem;
}
.section-border {
  height: 55rem;
  width: 0.3rem;
  background-color: #bbb;
  margin-right: 5rem;
  position: relative;
  margin-top: 4rem;
}
.section-border::before {
  content: "";
  width: 3rem;
  height: 3rem;
  border: 0.2rem solid #bbb;
  border-radius: 50%;
  background-color: #1d222a;
  position: absolute;
  left: -1.65rem;
  top: -3rem;
}
.section-border::after {
  content: "";
  width: 3rem;
  height: 3rem;
  border: 0.2rem solid #bbb;
  border-radius: 50%;
  background-color: #1d222a;
  position: absolute;
  left: -1.65rem;
  bottom: -3rem;
}
.developer-info {
  display: flex;
  flex-direction: column;
  max-width: 60rem;
  margin-right: 1rem;
  flex: 1;
}
.greeting {
  font-size: 1.6rem;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.1rem;
}
.greeting span { color: #29a587; }
.name {
  font-size: 10rem;
  width: 60rem;
  margin: 4rem 0 2rem 0;
  color: #fff;
  text-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}
.name span { color: #29a587; }
.prof {
  font-size: 1.8rem;
  font-weight: 300;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.2rem;
  margin-bottom: 1rem;
}
.prof span {
  font-family: "Caveat", cursive;
  font-size: 3rem;
  font-weight: bold;
  text-transform: capitalize;
  margin-left: 1.2rem;
}
.hire-torn-note {
  position: absolute;
  top: 13rem; left: 2rem; width: 20rem; height: 12rem;
  padding: 2rem; background: #fffdf5; color: #1d222a;
  font-family: 'Rowdies', sans-serif; font-size: 2.2rem;
  display: flex; justify-content: center; align-items: center;
  text-align: center; box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 95% 88%, 90% 82%, 85% 88%, 80% 82%, 75% 88%, 70% 82%, 65% 88%, 60% 82%, 55% 88%, 50% 82%, 45% 88%, 40% 82%, 35% 88%, 30% 82%, 25% 88%, 20% 82%, 15% 88%, 10% 82%, 5% 88%, 0% 85%);
  z-index: 5;
  -webkit-animation: wave 3s ease-in-out infinite;
  animation: wave 3s ease-in-out infinite;
  -webkit-transform-origin: top center;
  -ms-transform-origin: top center;
  transform-origin: top center;
}
/* Cross-browser keyframes */
@-webkit-keyframes wave {
  0% { 
    -webkit-transform: rotate(-4deg) translateY(0);
    transform: rotate(-4deg) translateY(0);
  }
  50% { 
    -webkit-transform: rotate(-2deg) translateY(2px);
    transform: rotate(-2deg) translateY(2px);
  }
  100% { 
    -webkit-transform: rotate(-4deg) translateY(0);
    transform: rotate(-4deg) translateY(0);
  }
}

@keyframes wave {
  0% { 
    -webkit-transform: rotate(-4deg) translateY(0);
    transform: rotate(-4deg) translateY(0);
  }
  50% { 
    -webkit-transform: rotate(-2deg) translateY(2px);
    transform: rotate(-2deg) translateY(2px);
  }
  100% { 
    -webkit-transform: rotate(-4deg) translateY(0);
    transform: rotate(-4deg) translateY(0);
  }
}
.tech-stack-logos {
  margin-top: 6rem; margin-bottom: 0rem; text-align: center;
}
.tech-logos {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem;
}
.tech-logos img {
  height: 3rem; transition: transform 0.3s ease;
}
.tech-logos img:hover {
  transform: scale(1.5); filter: grayscale(0%);
}
.about {
  margin-top: 4rem; width: 60rem; font-size: 2rem; color: #fff; margin-bottom: 6rem;
}
.social-media {
  margin-top: 5rem; margin-bottom: 1rem;
}
.social-media i {
  font-size: 2.5rem; color: #fff; margin-right: 2rem;
  text-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.btn {
  width: 20rem; height: 6rem; border: 0.2rem solid #bbb;
  border-radius: 3rem; background-color: transparent; color: #fff;
  font-size: 1.4rem; font-weight: 300; text-transform: uppercase;
  position: relative; cursor: pointer; margin-right: 7rem;
}
.btn::before {
  content: ""; width: 100%; height: 100%;
  background-color: #29a587; border-radius: 3rem;
  position: absolute; top: 0; left: 0;
  z-index: -10; transform: scale(0);
  transition: transform 0.3s;
}
.btn:hover::before {
  transform: scale(1); transition: transform 0.5s;
}
.cv-btn::after {
  content: ""; width: 5rem; height: 0.2rem;
  background-color: #bbb; position: absolute; top: 50%; right: -5rem;
}
.cv span {
  margin-top: 2.5rem; font-size: 1.4rem; font-weight: 300;
  text-transform: uppercase; color: #fff;
}
.dev-img-wrapper {
  width: 100%; max-width: 40rem; height: auto;
  border-radius: 50%; background-color: #29a587;
  padding: 2rem 2rem 0 2rem; box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.2);
  overflow: hidden; position: relative;
}
.dev-img-wrapper img {
  flex: 1; width: 100%; height: auto;
}
.dev-img-wrapper:hover {
  transform: perspective(1000px) translateZ(50px);
  box-shadow: 0 20px 40px rgba(12, 44, 113, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  border-radius: 50%;
}
.dev-work {
  width: 25rem; height: 9rem; background-color: #1d222a;
  font-size: 1.4rem; text-transform: uppercase; color: #fff;
  border: 0.2rem solid #bbb; border-radius: 6rem;
  display: flex; justify-content: center; align-items: center;
  padding: 0 2rem; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
  position: absolute;
}
.dev-experience {
  bottom: 20%; right: 2%; transform: translateX(-50%);
}
.dev-projects {
  bottom: 12%; left: 60%; transform: translateX(-50%);
}
.dev-work span:nth-child(1) {
  font-size: 3rem; width: 50%; text-align: center;
}
.dev-work span:nth-child(2) {
  color: #29a587; width: 50%;
}

/* Skills Section (UNCHANGED) */
.skills {
  width: 100%; min-height: 100vh; position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.section-heading {
  font-size: 6rem; font-weight: 300; text-transform: uppercase;
  letter-spacing: 0.2rem; color: #fff; margin-bottom: 3rem;
}
.sub-heading {
  font-size: 2rem; color: #29a587; text-transform: uppercase;
}
.sub-heading span {
  font-family: "Caveat", cursive; font-size: 3.5rem;
  text-transform: capitalize; color: #fff;
}
.skills-cards {
  width: 140rem; margin: 8rem 0 0 10rem; display: flex; flex-wrap: wrap;
}
.skills-card {
  width: 40rem; height: 18rem; margin: 3rem; padding: 0 3rem; position: relative;
}
.skill {
  display: flex; justify-content: space-between; margin-bottom: 2rem;
}
.skill span {
  font-size: 2rem; color: #eee;
}
.skill span:nth-child(2) { color: #29a587; }
.skills-card p {
  font-family: "Arial", sans-serif; font-size: 1.7rem;
  color:white; margin-bottom: 2rem;
}
.skills-card-progress {
  width: 2.5rem; height: 2.5rem; background-color: #1d222a;
  border: 0.2rem solid #bbb; border-radius: 50%;
  position: absolute; bottom: -1.25rem;
}
.skills-card-progress::before {
  content: ""; height: 0.2rem; background-color: #29a587;
  position: absolute; top: 50%; transform: translateY(-50%);
}
.skills-card-progress::after {
  content: ""; height: 0.2rem; background-color: #777;
  position: absolute; top: 50%; transform: translateY(-50%);
}
.skills-card:nth-child(1) .skills-card-progress { right: 10%; }
.skills-card:nth-child(1) .skills-card-progress::before { width: 33rem; right: 2.5rem; }
.skills-card:nth-child(1) .skills-card-progress::after { width: 4rem; right: -4.3rem; }
.skills-card:nth-child(2) .skills-card-progress { right: 15%; }
.skills-card:nth-child(2) .skills-card-progress::before { width: 31.5rem; right: 2.5rem; }
.skills-card:nth-child(2) .skills-card-progress::after { width: 5.8rem; right: -6.1rem; }
.skills-card:nth-child(3) .skills-card-progress { right: 20%; }
.skills-card:nth-child(3) .skills-card-progress::before { width: 29.5rem; right: 2.5rem; }
.skills-card:nth-child(3) .skills-card-progress::after { width: 7.9rem; right: -8.2rem; }
.skills-card:nth-child(4) .skills-card-progress { right: 30%; }
.skills-card:nth-child(4) .skills-card-progress::before { width: 25.5rem; right: 2.5rem; }
.skills-card:nth-child(4) .skills-card-progress::after { width: 12rem; right: -12.2rem; }
.skills-card:nth-child(5) .skills-card-progress { right: 20%; }
.skills-card:nth-child(5) .skills-card-progress::before { width: 29.5rem; right: 2.5rem; }
.skills-card:nth-child(5) .skills-card-progress::after { width: 7.9rem; right: -8.2rem; }
.skills-card:nth-child(6) .skills-card-progress { right: 30%; }
.skills-card:nth-child(6) .skills-card-progress::before { width: 25.5rem; right: 2.5rem; }
.skills-card:nth-child(6) .skills-card-progress::after { width: 12rem; right: -12.2rem; }
.skills .section-border {
  position: absolute; left: 20rem; top: 50%; transform: translateY(-50%);
}

/* Projects Section (UNCHANGED) */
.projects {
  width: 100%; min-height: 100%; position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.projects-cards {
  width: 140rem; display: flex; justify-content: center;
  flex-wrap: wrap; margin-top: 10rem; padding-bottom: 10rem; z-index: 100;
}
.project-card {
  width: 40rem; height: 55rem; background-color: #1d222a;
  margin: 2rem; padding: 2rem; border-radius: 1rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.project-img {
  width: 36rem; height: 22rem; border-radius: 1rem; overflow: hidden;
}
.project-img img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 1rem;
  cursor: pointer; transition: transform 1.5s;
}
.project-img img:hover { transform: scale(1.3); }
.techs { margin-top: 1rem; }
.techs span {
  font-size: 1.6rem; font-weight: 100; text-transform: uppercase;
  color: #29a587; letter-spacing: 0.1rem;
}
.project-name {
  font-size: 2.5rem; font-weight: 0; color: #fff;
  margin-top: 1rem; margin-bottom: 1rem;
}
.project-desc {
  font-family: "Arial", sans-serif; font-size: 1.5rem; color:white;
}
.project-btn {
  width: 20rem; height: 4rem; background-color: transparent;
  font-size: 1.8rem; text-align: left; color: #fff;
  border: none; cursor: pointer;
}
.project-btn i {
  color: #29a587; margin-left: 1rem; transition: margin-left 0.3s;
}
.project-btn:hover i { margin-left: 2rem; }
.projects .btn { margin: 5rem 0 0 0; }
.projects .section-border {
  height: 140rem; position: absolute; top: 50%;
  right: 15rem; transform: translateY(-50%); margin: 0;
}

/* Contact Section (UNCHANGED) */
.contact {
  width: 100%; min-height: 100vh; position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.contact .section-border {
  position: absolute; left: 20rem; top: 30%;
}
.contact-content {
  width: 120rem; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); margin-top: 7rem;
  display: flex; justify-content: space-between; align-items: center;
}
.contact-left div {
  display: flex; align-items: center; margin: 3rem 0;
}
.contact-left i {
  width: 5rem; height: 5rem; background-color: #1d222a;
  border: 0.2rem solid #bbb; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 2rem; color: #eee; margin-right: 9rem; position: relative;
}
.contact-left i::after {
  content: ""; width: 4rem; height: 0.2rem;
  background-color: #bbb; position: absolute; top: 50%;
  transform: translateY(-50%); right: -4rem;
}
.contact-info {
  width: 20rem; display: flex; flex-direction: column;
}
.contact-info span { width: 100%; }
.contact-info span:nth-child(1) {
  font-family: "Caveat", cursive; font-size: 3rem;
  font-weight: bold; color: #fff; margin-bottom: 0.5rem;
}
.contact-info span:nth-child(2) {
  font-size: 1.6rem; font-weight: 300; color: #777;
}
.contact-right {
  width: 60rem; height: 60rem; display: flex;
  justify-content: center; align-items: center;
}
.input-groups { display: flex; }
.input-group { display: flex; flex-direction: column; }
.input-group label {
  font-size: 1.6rem; font-weight: 300; letter-spacing: 0.1rem;
  text-transform: uppercase; color: #fff; margin: 0 0 1.5rem 2rem;
}
.input-group label i { font-size: 1.2rem; color: #29a587; }
.input-group input, textarea {
  height: 6rem; margin: 0 3rem 5rem 0;
  background-color: #1d222a; border: 0.2rem solid #777;
  border-radius: 3rem; font-size: 1.6rem; font-weight: 300;
  color: #fff; padding: 1rem 1rem 1rem 2rem;
}
.input-groups input { width: 35rem; }
.input-group textarea {
  height: 12rem; margin-bottom: 2rem; resize: none;
}
.contact-btn {
  width: calc(100% - 3rem); height: 5rem;
  background-color: #29a587; border: 0.2rem solid #bbb;
  border-radius: 3rem; color: #fff; text-transform: uppercase;
  font-size: 1.6rem; font-weight: 300; letter-spacing: 0.2rem; cursor: pointer;
}
.back-to-top {
  position: fixed; bottom: 20px; right: 20px;
  background: #29a587; color: white; width: 50px; height: 50px;
  display: flex; justify-content: center; align-items: center;
  border-radius: 50%; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer; transition: all 0.3s ease-in-out;
  opacity: 0; visibility: hidden; z-index: 1000;
}
.back-to-top i { font-size: 24px; }
.back-to-top:hover { background: #218b6b; transform: scale(1.1); }
.back-to-top.show { opacity: 1; visibility: visible; }

/* Footer (UNCHANGED) */
.footer {
  width: 100%; height: 10rem; border-top: 0.1rem solid #444;
  display: flex; justify-content: space-evenly; align-items: center;
}
.icons i {
  font-size: 2rem; color: #fff; margin-right: 2rem;
  text-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.copyright, .author {
  font-size: 1.6rem; color: #fff;
}
.copyright span {
  font-family: "Caveat", cursive; font-size: 2.5rem;
  font-weight: bold; color: #29a587; margin-right: 1rem;
}
.author span {
  font-family: "Caveat", cursive; font-size: 2.5rem;
  font-weight: bold; color: #29a587;
}

/* =================================================== */
/* --- REWRITTEN & CONSOLIDATED RESPONSIVE SECTION --- */
/* =================================================== */

/* Set base font size for scaling */
html {
  font-size: 35%; /* Start with the smallest size from your original code */
}

/* LARGER MOBILE & SMALL TABLETS (501px to 767px) */
@media (min-width: 576px) {
  html {
    font-size: 35%; /* Keep font size consistent with your 700px breakpoint */
  }
  .skills-cards, .projects-cards, .contact-content {
    width: 60rem; /* Use values from your 700px breakpoint */
  }
  .contact-left {
    display: none; /* As per your original 700px rule */
  }
}

@media (max-width: 767px) {
  html {
    font-size: 52%;
  }
  body {
    overflow-x: hidden;
  }
  .container {
    padding: 7rem 2rem 6rem;
  }
  .navbar {
    display: none;
  }
  .menu-icon {
    display: flex;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 200;
  }
  .menu-btn {
    width: 12rem;
    height: 3.5rem;
    font-size: 1.2rem;
    border-radius: 0.5rem;
    background: #29a587;
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .menu-btn::after {
    display: none;
  }
  .navigation {
    width: 100%;
    right: -100%;
    top: -100vh;
    justify-content: center;
    padding-left: 0;
    transform: translateX(100%);
  }
  .change .navigation {
    right: 0;
    top: 0;
    transform: translateX(0);
  }
  .banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    padding-top: 4rem;
  }
  .landing {
    padding-top: 6rem;
  }
  .logo {
    position: relative;
    top: auto;
    left: auto;
    margin: 0 auto 2.5rem;
    justify-content: center;
    gap: 0.8rem;
    text-align: center;
    z-index: 1; /* Ensure logo stays below menu */
    width: 100%;
  }
  .logo span,
  .logo span:nth-child(2),
  .logo span:nth-child(3),
  .logo span:nth-child(4) {
    font-size: 2.8rem;
  }
  .section-border,
  .dev-experience,
  .dev-projects {
    display: none;
  }
  
  .hire-torn-note {
    position: static;
    width: 100%;
    max-width: 26rem;
    margin: 1.5rem auto 0;
    animation: none;
    transform: none;
  }
  .developer-info {
    align-items: center;
    margin-right: 0;
  }
  .greeting {
    font-size: 2.4rem;
  }
  .name {
    width: 100%;
    font-size: 6rem;
    margin: 2rem 0;
    text-align: center;
  }
  .about {
    width: 100%;
    font-size: 2.2rem;
    margin: 2rem 0 3rem;
    text-align: center;
  }
  .social-media {
    margin: 2rem 0 0;
    display: flex;
    justify-content: center;
  }
  .developer-img {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .dev-img-wrapper {
    max-width: 28rem;
    margin: 0 auto;
  }
  .tech-stack-logos {
    margin: 4rem auto 2rem;
    padding: 0 1rem;
  }
  .tech-logos {
    gap: 1.5rem;
  }
  .tech-logos img {
    height: 3rem;
  }
  .skills {
    padding: 4rem 0;
  }
  
  .section-heading {
    font-size: 4rem !important;
    margin-bottom: 2rem !important;
    text-align: center;
  }
  
  .sub-heading {
    font-size: 1.6rem !important;
    text-align: center;
  }
  
  .sub-heading span {
    font-size: 2.5rem !important;
  }
  
  .skills-cards {
    width: 100%;
    margin: 3rem 0 0;
    padding: 0 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  
  .skills-card {
    width: 100%;
    margin: 1rem 0;
    height: auto;
    padding: 2rem;
    background: rgba(29, 34, 42, 0.7);
    border-radius: 1rem;
    border: 1px solid #444;
  }
  
  .skill span {
    font-size: 1.8rem !important;
  }
  
  .skills-card p {
    font-size: 1.5rem !important;
    line-height: 1.5;
  }
  
  .skills-card-progress {
    display: none;
  }
  .projects-cards {
    width: 100%;
    padding: 0 1rem 6rem;
    margin-top: 4rem;
  }
  .project-card {
    width: 100%;
    margin: 1.5rem 0;
  }
  .contact {
    padding: 6rem 0;
  }
  .contact .section-border {
    display: none;
  }
  .contact-content {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 3rem;
    flex-direction: column;
    gap: 4rem;
  }
  .contact-left,
  .contact-right {
    width: 100%;
  }
  .contact-left div {
    margin: 2rem 0;
  }
  .input-groups {
    flex-direction: column;
    width: 100%;
    gap: 2rem;
  }
  .input-group {
    width: 100%;
  }
  .input-group input,
  .input-group textarea {
    width: 100%;
  }
  .contact-btn {
    width: 100%;
  }
  .footer {
    padding: 4rem 0;
    text-align: center;
  }
}

@media (max-width: 500px) {
  html {
    font-size: 48%;
  }
  .container {
    padding: 6rem 1.5rem 5rem;
  }
  .menu-icon {
    position: fixed;
    top: 1rem;
    right: 1rem;
  }
  .menu-btn {
    width: 10rem;
    height: 3rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    background: #29a587;
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .menu-btn::after {
    display: none;
  }
  .landing {
    padding-top: 3rem;
  }
  .banner {
    padding-top: 3rem;
  }
  .logo {
    margin: 0 auto 2rem;
  }
  .logo span,
  .logo span:nth-child(2),
  .logo span:nth-child(3),
  .logo span:nth-child(4) {
    font-size: 2.4rem;
  }
  .name {
    font-size: 5rem;
  }
  .about {
    font-size: 2rem;
  }
  .dev-img-wrapper {
    max-width: 24rem;
  }
  .tech-logos img {
    height: 2.6rem;
  }
  .section-heading {
    font-size: 3.5rem !important;
  }
  
  .sub-heading {
    font-size: 1.4rem !important;
  }
  
  .sub-heading span {
    font-size: 2rem !important;
  }
  
  .skills-cards {
    padding: 0 0.5rem;
    width: 100%;
    margin: 2rem 0 0;
  }
  
  .skills-card {
    padding: 1.5rem !important;
    margin: 0.8rem 0 !important;
  }
  
  .skill span {
    font-size: 1.6rem !important;
  }
  
  .skills-card p {
    font-size: 1.3rem !important;
    line-height: 1.4;
  }
  
  .projects-cards {
    padding: 0;
    width: 100%;
  }
  .project-card {
    padding: 2rem;
  }
  .contact-content {
    gap: 3rem;
  }
  .contact-left div {
    align-items: flex-start;
  }
  .contact-left i {
    margin-bottom: 0.8rem;
  }
  .contact-btn {
    font-size: 1.8rem;
  }
  .icons {
    display: none;
  }
}

/* Mobile Touch Optimizations */
@media (max-width: 800px) {
  /* iOS Safari specific fixes */
  body {
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  
  /* Touch target size optimization */
  .menu-icon {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 200 !important;
    -webkit-tap-highlight-color: transparent; /* iOS touch highlight removal */
    -webkit-touch-callout: none; /* iOS callout removal */
    -webkit-user-select: none; /* iOS text selection prevention */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    min-height: 44px; /* iOS minimum touch target */
    min-width: 44px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
  
  .menu-btn {
    width: 11rem !important;
    height: 3.2rem !important;
    font-size: 1.1rem !important;
    border-radius: 0.5rem !important;
    -webkit-border-radius: 0.5rem !important;
    -moz-border-radius: 0.5rem !important;
    background: #29a587 !important;
    color: white !important;
    border: none !important;
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer;
    /* Touch-friendly button */
    -webkit-tap-highlight-color: rgba(41, 165, 135, 0.3);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
  }
  
  .menu-btn::after {
    display: none !important;
  }
  
  .navigation {
    right: -100% !important;
    width: 100% !important;
    top: -100vh !important;
  }
  
  .container {
    padding-top: 6rem !important;
  }
}

/* SPECIFIC FIX FOR SCREENS BELOW 700px */
@media (max-width: 700px) {
  .navigation {
    right: -100% !important;
    width: 100vw !important;
    top: -100vh !important;
    transform: translateX(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
  }
  
  .change .navigation {
    right: 0 !important;
    top: 0 !important;
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Ensure nav items are hidden by default */
  .nav-items {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-50px) !important;
  }
  
  .change .nav-items {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: all 0.5s ease 0.3s !important;
  }
}

/* ULTRA-SMALL SCREENS (245px and below) */
@media (max-width: 245px) {
  html {
    font-size: 40% !important;
  }
  
  .container {
    padding: 5rem 0.8rem 4rem !important;
  }
  
  /* Scale down all section headings */
  .section-heading {
    font-size: 2.8rem !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }
  
  .sub-heading {
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .sub-heading span {
    font-size: 1.6rem !important;
    display: block !important;
    margin-top: 0.5rem !important;
  }
  
  /* Logo scaling */
  .logo span,
  .logo span:nth-child(2),
  .logo span:nth-child(3),
  .logo span:nth-child(4) {
    font-size: 1.8rem !important;
  }
  
  /* Name section */
  .name {
    font-size: 3.5rem !important;
    line-height: 1.1 !important;
  }
  
  /* Menu button */
  .menu-btn {
    width: 8rem !important;
    height: 2.5rem !important;
    font-size: 0.9rem !important;
  }
  
  /* Skills cards */
  .skills-card {
    padding: 1rem !important;
    margin: 0.5rem 0 !important;
  }
  
  .skill span {
    font-size: 1.4rem !important;
  }
  
  .skills-card p {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
  }
  
  /* Contact section */
  .contact-info span:nth-child(1) {
    font-size: 2rem !important;
  }
  
  .contact-info span:nth-child(2) {
    font-size: 1.2rem !important;
  }
  
  /* Tech logos */
  .tech-logos img {
    height: 2rem !important;
  }
  
  /* Hire note */
  .hire-torn-note {
    width: 16rem !important;
    height: 9rem !important;
    font-size: 1.6rem !important;
    padding: 1.5rem !important;
  }
}

/* FIX FOR SPECIFIC TABLET RESOLUTION (977x647) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hire-torn-note {
    position: static !important;
    width: 100%;
    max-width: 20rem;
    margin: 2rem auto 0;
    animation: none;
    transform: none;
  }
  
  .logo {
    text-align: center;
    margin: 2rem auto 1rem;
  }
  
  .banner {
    margin-top: 2rem;
  }
}

/* TABLETS & SMALL DESKTOPS (768px to 1199px) */
@media (min-width: 768px) {
  html {
    font-size: 42%; /* A blend between your 900px and 1200px breakpoints */
  }
  .container {
    padding-top: 0; /* Reset padding for larger screens */
  }
  .navbar {
    display: none; /* Still use hamburger menu */
  }
  .menu-icon {
    display: flex; /* Ensure it's visible */
    top: 3rem;
    right: 3rem;
  }
  .banner {
    flex-direction: row; /* Side-by-side layout */
    text-align: left;
    gap: 4rem;
  }
  .section-border, .dev-experience, .dev-projects {
    display: none; /* Keep decorative elements hidden on tablets */
  }
  
  .section-heading {
    font-size: 5rem;
  }
  
  .skills-cards {
    width: 90%;
    margin: 5rem auto 0;
    justify-content: center;
  }
  
  .skills-card {
    width: 45%;
    margin: 2rem 1rem;
    min-height: 16rem;
  }
  
  .hire-torn-note {
    position: relative;
    animation: wave 3s ease-in-out infinite;
  }
  .input-groups {
    flex-direction: row; /* Side-by-side inputs */
  }
  .input-groups input {
    width: 35rem; /* Restore width */
  }
  .contact-left {
    display: block; /* Show contact info again */
  }
  .contact-content {
    width: 100rem;
    justify-content: space-evenly;
  }
}

/* MEDIUM TABLETS TO SMALL DESKTOPS (1025px to 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
  .hire-torn-note {
    position: absolute;
    top: 10rem; 
    left: 1rem;
    width: 18rem; 
    height: 10rem;
    font-size: 1.8rem;
    animation: wave 3s ease-in-out infinite;
  }
  
  .logo {
    font-size: 2.5rem;
  }
  
  .logo span:nth-child(2),
  .logo span:nth-child(3),
  .logo span:nth-child(4) {
    font-size: 3rem;
  }
}

/* LARGE DESKTOPS (1200px and up) */
@media (min-width: 1200px) {
  html {
    font-size: 55%; /* A good average for your larger breakpoints */
  }
  .container {
    padding-top: 0; /* Reset padding for desktop */
  }
  .navbar {
    display: flex; /* Show the full navbar */
  }
  .menu-icon {
    display: none; /* Hide the hamburger menu */
  }
  /* Restore all decorative elements */
  .section-border, .dev-experience, .dev-projects, .hire-torn-note {
    display: block;
  }
  
  .hire-torn-note {
    position: absolute;
    top: 13rem; 
    left: 2rem;
    width: 20rem; 
    height: 12rem;
    margin: 0;
    animation: wave 3s ease-in-out infinite;
