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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #1f242d;
  --second-bg-color: #323946;
  --skills-bg-color: #2a2f3a;
  --text-color: #fff;
  --main-color: #0ef;
  --accent-color: #00d4ff;
  --header-height: 7rem;
}

html {
  font-size: 62.5%;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

section {
  min-height: 100vh;
  padding: 8rem 9% 4rem;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 2rem 9%;
  background: rgba(31, 36, 45, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(15px);
  border-bottom: 0.1rem solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

header.sticky {
  background: rgba(31, 36, 45, 0.98);
  backdrop-filter: blur(20px);
}

.logo {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 700;
  cursor: default;
  background: linear-gradient(45deg, var(--main-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar a {
  font-size: 1.7rem;
  color: var(--text-color);
  margin-left: 4rem;
  transition: 0.3s ease;
  position: relative;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

.navbar a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--main-color);
  transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

#menu-icon {
  font-size: 3.5rem;
  color: var(--text-color);
  display: none;
  cursor: pointer;
  transition: 0.3s ease;
}

/* Hero section with proper spacing */
.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  height: 100vh;
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 2rem);
}

.home-content {
  flex: 1;
  max-width: 60rem;
}

.home-content h3 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.home-content h3:nth-of-type(2) {
  margin-bottom: 2rem;
}

span {
  color: var(--main-color);
}

.home-content h1 {
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--main-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-content p {
  font-size: 1.8rem;
  margin: 2rem 0 3rem;
  line-height: 1.6;
}

.stats-container {
  display: flex;
  gap: 3rem;
  margin: 2rem 0 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--main-color);
}

.stat-label {
  font-size: 1.4rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-top: 0.5rem;
}

.social-media {
  margin: 3rem 0;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  margin-right: 1.5rem;
  transition: 0.5s ease;
}

.social-media a:hover {
  background: var(--main-color);
  color: var(--second-bg-color);
  box-shadow: 0 0 1rem var(--main-color);
  transform: translateY(-3px);
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background: var(--main-color);
  border-radius: 4rem;
  box-shadow: 0 0 1rem var(--main-color);
  font-size: 1.6rem;
  color: var(--second-bg-color);
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.5s ease;
  margin-right: 2rem;
  margin-bottom: 1rem;
}

.btn:hover {
  box-shadow: 0 0 2rem var(--main-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--main-color);
  border: 0.2rem solid var(--main-color);
}

.btn-secondary:hover {
  background: var(--main-color);
  color: var(--second-bg-color);
}

.home-img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-img img {
  width: 35vw;
  max-width: 400px;
  min-width: 300px;
  animation: floatImage 4s ease-in-out infinite;
  border-radius: 50%;
  border: 0.3rem solid var(--main-color);
  box-shadow: 0 0 2rem rgba(14, 255, 255, 0.3);
}

@keyframes floatImage {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2.4rem);
  }
  100% {
    transform: translateY(0);
  }
}

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  background: var(--second-bg-color);
  padding: 8rem 9% 6rem;
}

.about-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-img img {
  width: 35vw;
  max-width: 400px;
  min-width: 300px;
  border-radius: 2rem;
  box-shadow: 0 0 2rem rgba(14, 255, 255, 0.2);
}

.about-content {
  flex: 1;
  max-width: 60rem;
}

.heading {
  text-align: center;
  font-size: 4.5rem;
  margin-bottom: 5rem;
}

.about-content h2 {
  text-align: left;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.about-content h3 {
  font-size: 2.6rem;
  color: var(--main-color);
  margin-bottom: 2rem;
}

.about-content p {
  font-size: 1.6rem;
  margin: 0 0 3rem;
  line-height: 1.6;
}

.experience-timeline {
  margin: 4rem 0;
}

.timeline-item {
  margin-bottom: 3rem;
  padding-left: 3rem;
  border-left: 0.2rem solid var(--main-color);
  position: relative;
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 0;
  width: 1rem;
  height: 1rem;
  background: var(--main-color);
  border-radius: 50%;
}

.timeline-date {
  color: var(--main-color);
  font-size: 1.4rem;
  font-weight: 600;
}

.timeline-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.timeline-company {
  color: var(--accent-color);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.timeline-description {
  font-size: 1.4rem;
  line-height: 1.5;
}

/* Enhanced Skills Section */
.skills {
  background: var(--skills-bg-color);
  padding: 8rem 9% 6rem;
  position: relative;
}

.skills::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(14, 255, 255, 0.02),
    rgba(0, 212, 255, 0.02)
  );
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin: 3rem 0;
}

.skill-category {
  background: var(--second-bg-color);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 0.1rem solid rgba(14, 255, 255, 0.3);
  transition: 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(14, 255, 255, 0.05),
    transparent
  );
  transform: rotate(45deg);
  transition: 0.5s ease;
  opacity: 0;
}

.skill-category:hover::before {
  opacity: 1;
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: 0 1.5rem 3rem rgba(14, 255, 255, 0.15);
  border-color: var(--main-color);
}

.skill-category h4 {
  color: var(--main-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.skill-category p {
  font-size: 1.5rem;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Services section with reduced top padding */
.services {
  padding: 6rem 9% 8rem;
  background: var(--bg-color);
}

.services h2 {
  margin-bottom: 5rem;
  text-align: center;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.services-container .services-box {
  background: var(--second-bg-color);
  padding: 3rem 2.5rem 3.5rem;
  border-radius: 2rem;
  text-align: center;
  border: 0.2rem solid transparent;
  transition: 0.5s ease;
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.services-container .services-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--main-color), var(--accent-color));
  z-index: -1;
  opacity: 0;
  transition: 0.5s ease;
}

.services-container .services-box:hover::before {
  opacity: 0.1;
}

.services-container .services-box:hover {
  border-color: var(--main-color);
  transform: translateY(-8px);
  box-shadow: 0 1.5rem 3rem rgba(14, 255, 255, 0.2);
}

.services-box-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.services-box i {
  font-size: 6rem;
  color: var(--main-color);
  margin-bottom: 2rem;
  display: block;
}

.services-box h3 {
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.services-box p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  flex-grow: 1;
}

.portfolio {
  background: var(--second-bg-color);
  padding: 8rem 9% 6rem;
}

.portfolio h2 {
  margin-bottom: 4rem;
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  align-items: center;
  gap: 2.5rem;
}

.portfolio-container .portfolio-box {
  position: relative;
  border-radius: 2rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  background: var(--bg-color);
  transition: 0.5s ease;
  height: 300px;
}

.portfolio-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 1.5rem 3rem rgba(14, 255, 255, 0.2);
}

.portfolio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: 0.5s ease;
}

.portfolio-box img:hover {
  transform: scale(1.05);
}

.portfolio-box .portfolio-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.1), var(--main-color));
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem 3rem;
  transform: translateY(100%);
  transition: 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
  transform: translateY(0);
}

.portfolio-layer h4 {
  font-size: 2.5rem;
  color: var(--bg-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.portfolio-layer p {
  font-size: 1.4rem;
  margin: 0.3rem 0 1rem;
  color: var(--bg-color);
  line-height: 1.4;
}

.portfolio-layer .tech-stack {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--second-bg-color);
  font-weight: 600;
}

.portfolio-layer .project-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.portfolio-layer a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  height: 4.5rem;
  background: var(--text-color);
  border-radius: 50%;
  transition: 0.3s ease;
}

.portfolio-layer a:hover {
  background: var(--second-bg-color);
  transform: scale(1.1);
}

.portfolio-layer a i {
  font-size: 2rem;
  color: var(--bg-color);
}

.contact {
  padding: 8rem 9% 6rem;
  background: var(--bg-color);
}

.contact h2 {
  margin-bottom: 3rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  background: var(--second-bg-color);
  padding: 3rem;
  border-radius: 2rem;
  border: 0.1rem solid rgba(14, 255, 255, 0.2);
}

.contact-info h3 {
  color: var(--main-color);
  font-size: 2.4rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.contact-item i {
  font-size: 2rem;
  color: var(--main-color);
  margin-right: 1rem;
}

.contact-item span {
  font-size: 1.6rem;
  color: var(--text-color);
}

.contact form {
  background: var(--second-bg-color);
  padding: 3rem;
  border-radius: 2rem;
  border: 0.1rem solid rgba(14, 255, 255, 0.2);
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background: var(--bg-color);
  border-radius: 0.8rem;
  margin: 0.7rem 0;
  border: 0.1rem solid rgba(14, 255, 255, 0.2);
  transition: 0.3s ease;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 1rem rgba(14, 255, 255, 0.2);
}

.contact form .input-box input {
  width: calc(50% - 0.5rem);
}

.contact form textarea {
  resize: none;
  height: 15rem;
}

.contact form .btn {
  margin-top: 2rem;
  cursor: pointer;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--bg-color);
  border-top: 0.1rem solid rgba(255, 255, 255, 0.1);
}

.footer-text p {
  font-size: 1.6rem;
}

.footer-iconTop a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  background: var(--main-color);
  border-radius: 0.8rem;
  transition: 0.5s ease;
}

.footer-iconTop a:hover {
  box-shadow: 0 0 1rem var(--main-color);
  transform: translateY(-3px);
}

.footer-iconTop a i {
  font-size: 2.4rem;
  color: var(--second-bg-color);
}

/* Responsive Design - Fixed zoom and scaling issues */
@media (max-width: 1439px) {
  html {
    font-size: 58%;
  }
  section {
    padding: 8rem 7% 4rem;
  }
  .about {
    padding: 8rem 7% 6rem;
  }
  .skills {
    padding: 8rem 7% 6rem;
  }
  .services {
    padding: 6rem 7% 8rem;
  }
  .portfolio {
    padding: 8rem 7% 6rem;
  }
  .contact {
    padding: 8rem 7% 6rem;
  }
  .footer {
    padding: 2rem 7%;
  }

  .home {
    gap: 3.5rem;
  }
  .about {
    gap: 3.5rem;
  }

  .services-container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
  }

  .services-box {
    min-height: 360px;
    padding: 3rem 2.2rem 3.5rem;
  }

  .services-box i {
    font-size: 5.8rem;
  }
  .services-box h3 {
    font-size: 2.3rem;
  }
  .services-box p {
    font-size: 1.45rem;
  }
}

@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
  :root {
    --header-height: 6.5rem;
  }

  .home {
    gap: 3rem;
  }
  .about {
    gap: 3rem;
  }

  .services-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .services-box i {
    font-size: 5.5rem;
  }
  .services-box h3 {
    font-size: 2.2rem;
  }
  .services-box p {
    font-size: 1.4rem;
  }

  .portfolio-container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 1024px) {
  html {
    font-size: 53%;
  }
  header {
    padding: 2rem 6%;
  }
  section {
    padding: 8rem 6% 4rem;
  }
  .about {
    padding: 8rem 6% 6rem;
  }
  .skills {
    padding: 8rem 6% 6rem;
  }
  .services {
    padding: 6rem 6% 8rem;
  }
  .portfolio {
    padding: 8rem 6% 6rem;
  }
  .contact {
    padding: 8rem 6% 6rem;
  }
  .footer {
    padding: 2rem 6%;
  }

  .home {
    gap: 2.8rem;
  }
  .about {
    gap: 2.8rem;
  }

  .home-content h1 {
    font-size: 5.2rem;
  }
  .home-content h3 {
    font-size: 3rem;
  }
  .home-content p {
    font-size: 1.7rem;
  }

  .about-content h3 {
    font-size: 2.4rem;
  }
  .about-content p {
    font-size: 1.5rem;
  }

  .services-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.2rem;
  }

  .services-box {
    min-height: 340px;
    padding: 2.8rem 2rem 3.2rem;
  }

  .services-box i {
    font-size: 5.2rem;
  }
  .services-box h3 {
    font-size: 2.1rem;
  }
  .services-box p {
    font-size: 1.35rem;
  }
}

@media (max-width: 991px) {
  html {
    font-size: 52%;
  }
  header {
    padding: 2rem 5%;
  }
  section {
    padding: 8rem 5% 4rem;
  }
  .about {
    padding: 8rem 5% 6rem;
  }
  .skills {
    padding: 8rem 5% 6rem;
  }
  .services {
    padding: 6rem 5% 8rem;
  }
  .portfolio {
    padding: 8rem 5% 6rem;
  }
  .contact {
    padding: 8rem 5% 6rem;
  }
  .footer {
    padding: 2rem 5%;
  }

  .home {
    gap: 2.5rem;
  }
  .about {
    gap: 2.5rem;
  }

  .services-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
  }

  .services-box {
    min-height: 320px;
    padding: 2.5rem 2rem 3rem;
  }

  .services-box i {
    font-size: 5rem;
  }
  .services-box h3 {
    font-size: 2rem;
  }
  .services-box p {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 6rem;
  }
  html {
    font-size: 54%;
  }

  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    background: rgba(31, 36, 45, 0.98);
    backdrop-filter: blur(20px);
    border-top: 0.1rem solid rgba(14, 255, 255, 0.2);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3);
    display: none;
    border-radius: 0 0 1rem 1rem;
  }

  .navbar.active {
    display: block;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 2rem 0;
    padding: 1rem 0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }

  .navbar a:hover {
    background: rgba(14, 255, 255, 0.1);
    padding-left: 1rem;
  }

  .home {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-top: calc(var(--header-height) + 3rem);
    text-align: center;
    gap: 3rem;
  }

  .home-content {
    order: 2;
  }
  .home-img {
    order: 1;
  }

  /* Enhanced mobile text sizes */
  .home-content h3 {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
  }
  .home-content h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }
  .home-content p {
    font-size: 1.8rem;
    line-height: 1.6;
    margin: 2rem 0 3rem;
    padding: 0 1rem;
  }

  .home-img img {
    width: 70vw;
    max-width: 350px;
    min-width: 250px;
  }

  /* Fixed stats container for mobile - horizontal layout */
  .stats-container {
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: nowrap;
    margin: 2.5rem 0 3.5rem;
  }

  .stat-item {
    flex: 1;
    min-width: auto;
    max-width: 130px;
  }

  .stat-number {
    font-size: 2.8rem;
    font-weight: 700;
  }
  .stat-label {
    font-size: 1.4rem;
    text-align: center;
    margin-top: 0.8rem;
  }

  .about {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
  }
  .about-img img {
    width: 70vw;
    max-width: 350px;
    min-width: 250px;
  }

  .about-content h2 {
    text-align: center;
    font-size: 4.2rem;
  }

  .about-content h3 {
    font-size: 2.6rem;
    margin-bottom: 2rem;
  }

  .about-content p {
    font-size: 1.7rem;
    line-height: 1.6;
    margin-bottom: 3rem;
  }

  .heading {
    font-size: 4.2rem;
    margin-bottom: 4rem;
  }

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

  .skill-category h4 {
    font-size: 2.1rem;
    margin-bottom: 1.5rem;
  }

  .skill-category p {
    font-size: 1.6rem;
    line-height: 1.6;
  }

  /* Fixed services section for mobile */
  .services-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 100%;
  }

  .services-box {
    max-width: 100%;
    min-height: 300px;
    padding: 2.5rem 2rem 3rem;
    margin: 0;
  }

  .services-box i {
    font-size: 5.5rem;
    margin-bottom: 2rem;
  }

  .services-box h3 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
  }

  .services-box p {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  .services-box .btn {
    font-size: 1.6rem;
    padding: 1.2rem 2.4rem;
    margin: 0;
  }

  .portfolio-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info h3 {
    font-size: 2.6rem;
    margin-bottom: 2rem;
  }

  .contact-info p {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  .contact-item span {
    font-size: 1.7rem;
  }

  .contact form .input-box {
    flex-direction: column;
  }

  .contact form .input-box input {
    width: 100%;
    font-size: 1.7rem;
    padding: 1.8rem;
  }

  .contact form textarea {
    font-size: 1.7rem;
    padding: 1.8rem;
  }

  .footer {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-text p {
    font-size: 1.7rem;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 52%;
  }

  .home-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
  }
  .home-content h3 {
    font-size: 2.8rem;
  }
  .home-content p {
    font-size: 1.7rem;
    padding: 0 0.5rem;
  }

  .stats-container {
    gap: 1.8rem;
    padding: 0 1rem;
  }
  .stat-item {
    max-width: 110px;
  }
  .stat-number {
    font-size: 2.5rem;
  }
  .stat-label {
    font-size: 1.3rem;
  }

  .btn {
    padding: 1.1rem 2.2rem;
    font-size: 1.5rem;
    margin-right: 1rem;
    display: inline-block;
    margin-bottom: 1rem;
  }

  .heading {
    font-size: 3.8rem;
  }

  .about-content h2 {
    font-size: 3.8rem;
  }
  .about-content h3 {
    font-size: 2.4rem;
  }
  .about-content p {
    font-size: 1.6rem;
  }

  .skills-grid {
    gap: 1.5rem;
  }
  .skill-category {
    padding: 2rem;
  }
  .skill-category h4 {
    font-size: 1.9rem;
  }
  .skill-category p {
    font-size: 1.5rem;
  }

  /* Further mobile optimization for services */
  .services-box {
    min-height: 280px;
    padding: 2.2rem 1.8rem 2.5rem;
  }

  .services-box i {
    font-size: 5rem;
    margin-bottom: 1.8rem;
  }

  .services-box h3 {
    font-size: 2.1rem;
    margin-bottom: 1.3rem;
  }

  .services-box p {
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 1.8rem;
  }

  .services-box .btn {
    font-size: 1.5rem;
    padding: 1.1rem 2.2rem;
  }

  .portfolio-box {
    height: 250px;
  }

  .portfolio-layer h4 {
    font-size: 2.2rem;
  }
  .portfolio-layer p {
    font-size: 1.3rem;
  }
  .portfolio-layer .tech-stack {
    font-size: 1.2rem;
  }

  .contact-info h3 {
    font-size: 2.4rem;
  }
  .contact-info p {
    font-size: 1.5rem;
  }
  .contact-item span {
    font-size: 1.6rem;
  }

  .footer-text p {
    font-size: 1.6rem;
  }
}

@media (max-width: 365px) {
  html {
    font-size: 50%;
  }

  .home-content h1 {
    font-size: 4.2rem;
  }
  .home-content h3 {
    font-size: 2.6rem;
  }
  .home-content p {
    font-size: 1.6rem;
  }

  .home-img img {
    width: 85vw;
    max-width: 300px;
  }
  .about-img img {
    width: 85vw;
    max-width: 300px;
  }

  .stats-container {
    gap: 1.2rem;
    padding: 0 0.5rem;
  }

  .stat-item {
    max-width: 95px;
  }
  .stat-number {
    font-size: 2.2rem;
  }
  .stat-label {
    font-size: 1.2rem;
  }

  .logo {
    font-size: 2.2rem;
  }
  .heading {
    font-size: 3.5rem;
  }

  .about-content h2 {
    font-size: 3.5rem;
  }
  .about-content h3 {
    font-size: 2.2rem;
  }
  .about-content p {
    font-size: 1.5rem;
  }

  .services-box {
    min-height: 260px;
    padding: 2rem 1.5rem 2.2rem;
  }

  .services-box i {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
  }
  .services-box h3 {
    font-size: 1.9rem;
    margin-bottom: 1.2rem;
  }
  .services-box p {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }

  .services-box .btn {
    font-size: 1.4rem;
    padding: 1rem 2rem;
  }

  .contact-info h3 {
    font-size: 2.2rem;
  }
  .contact-info p {
    font-size: 1.4rem;
  }
  .contact-item span {
    font-size: 1.5rem;
  }

  .footer-text p {
    font-size: 1.5rem;
  }
}

/* Smooth scroll enhancement */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Focus styles for accessibility */
.btn:focus,
.navbar a:focus,
.social-media a:focus {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

/* Loading animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}
