/* Better Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Georgia, sans-serif; /* Better font stack */
}

body {
  line-height: 1.6;
  color: #333;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Remove all <br> tags styling */
br {
  display: none;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 8rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
  color: black;
  font-size: 1.2rem;
  font-weight: 600;
  flex-shrink: 0;
  order: 1;
}

header img {
  width: auto;
  height: 60px;
  order: 1;
}

.navmenu {
  display: flex;
  order: 2;
  list-style: none;
}

.burger-menu {
  order: 3;
}

.navmenu a {
  display: inline-block;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  margin: 0 1.5rem;
  color: black;
  font-weight: 500;
  transition: all 0.6s;
}

.navmenu a:hover {
  transform: translateY(-5px);
}

.home {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  padding: 2rem 5rem 0 18rem;
  gap: 1rem;
}

.home-text h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.home-text h3 {
  position: relative;
  padding-left: 6rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.home-text h3::before {
  left: 0;
  top: 1rem;
  background-color: black;
  content: "";
  width: 80px;
  height: 2px;
  position: absolute;
}

.home-text p {
  margin-bottom: 2rem;
}

.btn {
  padding: 1rem;
  width: fit-content;
  cursor: pointer;
  display: inline-block;
  border-radius: 0.5rem;
  color: white;
  background: black;
  transition: all 0.5s;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid black;
}

.btn:hover {
  color: black;
  background: white;
  transition: translateY(5px);
}

.home-btn {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icons {
  position: absolute;
  top: 30%;
  padding: 0 8rem;
}

.social-icons i {
  display: block;
  margin: 25px 0;
  color: black;
  font-size: 1.5rem;
  transition: all 0.6s;
}

.social-icons i:hover {
  transform: rotate(0, 0, 1, 90deg);
}

.scroll-btn {
  display: flex;
  font-weight: 600;
  color: black;
  align-items: center;
}

.scroll-btn {
  left: 9%;
  bottom: 7%;
  position: absolute;
}

/* Styling Scroll Button */
.scroll-btn i {
  margin-left: 0.5rem;
  font-size: 1.2rem;
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* About Section Styling */

.about {
  max-width: 800px;
  margin: 140px auto 60px auto; /* Added top margin for header spacing */
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: calc(
    100vh - 340px
  ); /* Ensures it takes up most of the viewport */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about h2 {
  font-size: 2.5rem;
  color: black; /* Fixed typo from 'blacks' to 'black' */
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.about h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(45deg, blue, #4ecdc4);
  border-radius: 2px;
}

.about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333; /* Changed to darker color for better readability on white background */
  margin: 0 auto;
  max-width: 600px;
}

/* Animation for fade-in effect */

.animated-fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Styling Skills Section */

.skills {
  max-width: 900px;
  margin: 100px auto 60px auto; /* Added top margin for header spacing */
  padding: 40px 20px;
  min-height: calc(100vh - 240px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.skills h2 {
  text-align: center;
  font-size: 2.5rem;
  color: black;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.skills h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(45deg, blue, #4ecdc4);
  border-radius: 2px;
}

.skills .skill {
  margin: 2.5rem 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills .skill:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.skills .skill h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: black;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skills .skill h3 .percentage {
  font-size: 1rem;
  font-weight: 500;
  color: #555;
}

.skills .skill .progress {
  background: #e0e0e0;
  border-radius: 25px;
  overflow: hidden;
  height: 20px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skills .skill .progress .progress-bar {
  height: 100%;
  background: linear-gradient(45deg, #333, #666);
  line-height: 20px;
  color: white;
  text-align: right;
  padding-right: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  transition: width 2s ease-in-out;
}

.skills .skill .progress .progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Individual skill colors and widths */

.skills .skill .progress .html {
  width: 90%;
  background: linear-gradient(45deg, #e34f26, #f06529);
}

.skills .skill .progress .css {
  width: 80%;
  background: linear-gradient(45deg, #1572b6, #33a9dc);
}

.skills .skill .progress .js {
  width: 70%;
  background: linear-gradient(45deg, #f7df1e, #ffeb3b);
  color: black;
}

.skills .skill .progress .python {
  width: 75%;
  background: linear-gradient(45deg, #3776ab, #4b8bbe);
}

.skills .skill .progress .java {
  width: 65%;
  background: linear-gradient(45deg, #ed8b00, #f89820);
}

/* Animation for skill bars */

.skills .skill .progress .progress-bar {
  width: 0;
  animation: loadSkill 2s ease-in-out forwards;
}

@keyframes loadSkill {
  to {
    width: var(--skill-width);
  }
}

/* Responsive Design for Skills */

@media (max-width: 768px) {
  .skills {
    max-width: 100%;
    margin: 140px 15px 40px 15px;
    padding: 30px 15px;
    min-height: calc(100vh - 180px);
  }

  .skills h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .skills .skill {
    margin: 1.5rem 0;
    padding: 15px;
  }

  .skills .skill h3 {
    font-size: 1.1rem;
  }

  .skills .skill .progress {
    height: 18px;
  }

  .skills .skill .progress .progress-bar {
    line-height: 18px;
    font-size: 0.7rem;
  }
}

/* Tablet - 992px and below */
@media (max-width: 992px) {
  header {
    padding: 1rem 2rem;
  }

  .home {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 2rem;
  }

  .home-text h2 {
    font-size: 2.2rem;
  }

  .home-text h3 {
    font-size: 1.3rem;
    padding-left: 0;
  }

  .home-text h3::before {
    display: none;
  }

  .home-text p {
    font-size: 1rem;
  }

  .home-img img {
    max-width: 350px;
  }

  .home-btn {
    justify-content: center;
    gap: 1.5rem;
  }

  .btn {
    padding: 1rem 2rem;
  }

  .social-icons {
    position: static !important;
    flex-direction: row !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
    padding: 2rem 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
  }

  .social-icons a {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 1.5rem !important;
  }

  .social-icons i {
    margin: 0 !important;
  }

  .scroll-btn {
    position: static !important;
    display: block !important;
    text-align: center !important;
    margin: 2rem auto !important;
    padding: 1rem 1.5rem !important;
    width: fit-content !important;
    font-size: 1rem !important;
    left: auto !important;
    bottom: auto !important;
  }

  .about {
    margin: 140px 20px 60px 20px;
  }

  .about h2 {
    font-size: 2.2rem;
  }

  .skills {
    margin: 140px 20px 60px 20px;
  }

  .skills h2 {
    font-size: 2.2rem;
  }

  .contact {
    margin: 120px 20px 60px 20px;
  }

  .contact h2 {
    font-size: 2.2rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-section h3 {
    font-size: 1.2rem;
  }

  .footer-description {
    font-size: 0.9rem;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
  }
}

/* Mobile Navigation - Centered */
@media (max-width: 768px) {
  .navmenu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95),
      rgba(240, 240, 240, 0.95)
    );
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.4s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .navmenu.active {
    left: 0;
  }

  .navmenu li {
    width: 80%;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    list-style: none;
  }

  .navmenu a {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 1rem 2rem;
    display: block;
    width: 100%;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
  }
}

/* Contact Section Styling */

.contact {
  max-width: 750px;
  margin: 120px auto 60px auto;
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: calc(100vh - 240px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact h2 {
  font-size: 2.5rem;
  color: black;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.contact h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(45deg, blue, #4ecdc4);
  border-radius: 2px;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.contact form label {
  text-align: left;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 5px;
}

.contact form input,
.contact form textarea {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: Georgia;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  outline: none;
}

.contact form input:focus,
.contact form textarea:focus {
  border-color: #4ecdc4;
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
  transform: translateY(-2px);
}

.contact form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact form button {
  padding: 15px 30px;
  background: linear-gradient(45deg, #333, #666);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

.contact form button:hover {
  background: linear-gradient(45deg, #555, #888);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact form button:active {
  transform: translateY(0);
}

/* Form Field Container */

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* Burger Menu Styles */
.burger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  z-index: 1001;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background-color: black;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Burger menu animation */
.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Reduce animations on mobile for better performance */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Lazy load images */
/* img {
  loading: lazy;
} */

/* Optimize animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ===== ULTRA SMALL MOBILE - 320px and below ===== */
@media (max-width: 320px) {
  header {
    padding: 0.6rem;
  }

  header img {
    height: 40px;
  }

  .burger-menu span {
    width: 20px;
    height: 2px;
  }

  .home {
    margin-top: 75px;
    gap: 0.8rem;
    padding: 0.3rem;
  }

  .home-text h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .home-text h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .home-text p {
    font-size: 0.75rem;
  }

  .home-img img {
    max-width: 200px;
  }

  .home-btn {
    gap: 0.6rem;
  }

  .btn {
    padding: 0.7rem;
    font-size: 0.7rem;
  }

  .social-icons {
    gap: 0.6rem !important;
    padding: 1rem 0 !important;
  }

  .social-icons a {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }

  .scroll-btn {
    font-size: 0.8rem !important;
    margin: 1rem auto !important;
  }

  .about h2 {
    font-size: 1.3rem;
  }

  .skills h2 {
    font-size: 1.3rem;
  }

  .contact h2 {
    font-size: 1.3rem;
  }

  .footer-section h3 {
    font-size: 1rem;
  }

  .footer-description {
    font-size: 0.8rem;
  }

  .footer-social a {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .back-to-top {
    width: 38px;
    height: 38px;
    font-size: 0.8rem;
  }
}

/* ===== TABLET - 992px and below ===== */
@media (max-width: 992px) {
  header {
    padding: 1rem 2rem;
  }

  .home {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 2rem;
  }

  .home-text h2 {
    font-size: 2.2rem;
  }

  .home-text h3 {
    font-size: 1.3rem;
    padding-left: 0;
  }

  .home-text h3::before {
    display: none;
  }

  .home-text p {
    font-size: 1rem;
  }

  .home-img img {
    max-width: 350px;
  }

  .home-btn {
    justify-content: center;
    gap: 1.5rem;
  }

  .btn {
    padding: 1rem 2rem;
  }

  .social-icons {
    position: static !important;
    flex-direction: row !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
    padding: 2rem 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
  }

  .social-icons a {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 1.5rem !important;
  }

  .social-icons i {
    margin: 0 !important;
  }

  .scroll-btn {
    position: static !important;
    display: block !important;
    text-align: center !important;
    margin: 2rem auto !important;
    padding: 1rem 1.5rem !important;
    width: fit-content !important;
    font-size: 1rem !important;
    left: auto !important;
    bottom: auto !important;
  }

  .about {
    margin: 140px 20px 60px 20px;
  }

  .about h2 {
    font-size: 2.2rem;
  }

  .skills {
    margin: 140px 20px 60px 20px;
  }

  .skills h2 {
    font-size: 2.2rem;
  }

  .contact {
    margin: 120px 20px 60px 20px;
  }

  .contact h2 {
    font-size: 2.2rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-section h3 {
    font-size: 1.2rem;
  }

  .footer-description {
    font-size: 0.9rem;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
  }
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Reduce animations on mobile for better performance */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Lazy load images */
/* img {
  loading: lazy;
} */

/* Optimize animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* Footer Styling */
.footer {
  background: linear-gradient(135deg, #1e1e1e, #2c2c2c);
  color: #ffffff;
  padding: 60px 0 0 0;
  margin-top: 100px;
  position: relative;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-section h3 {
  color: #4ecdc4;
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-description {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 45px;
  height: 45px;
  background: rgba(78, 205, 196, 0.1);
  border: 2px solid rgba(78, 205, 196, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ecdc4;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #4ecdc4;
  color: #1e1e1e;
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #4ecdc4;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cccccc;
  font-size: 0.95rem;
}

.contact-item i {
  color: #4ecdc4;
  font-size: 1.1rem;
  width: 20px;
}

.contact-item a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #4ecdc4;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  padding: 25px 0;
  margin-top: 50px;
  border-top: 1px solid rgba(78, 205, 196, 0.2);
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-bottom-content p {
  color: #cccccc;
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 25px;
}

.footer-bottom-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: #4ecdc4;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #4ecdc4, #45b7aa);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
  background: linear-gradient(45deg, #45b7aa, #4ecdc4);
}

.back-to-top:active {
  transform: translateY(-1px);
}

/* Responsive Footer & Back to Top */
@media (max-width: 768px) {
  .footer {
    margin-top: 60px;
    padding: 40px 0 0 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  .footer-section {
    text-align: center;
  }

  .footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .footer-description {
    font-size: 0.9rem;
    margin: 0 auto 20px auto;
    max-width: 280px;
  }

  .footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .contact-info {
    text-align: center;
    align-items: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

/* ===== MOBILE RESPONSIVE - 768px and below ===== */
@media (max-width: 768px) {
  /* Header Mobile */
  header {
    padding: 1rem;
    justify-content: space-between;
  }

  header img {
    height: 50px;
    margin: 0;
    order: 1;
  }

  .navmenu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95),
      rgba(240, 240, 240, 0.95)
    );
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.4s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .navmenu.active {
    left: 0;
  }

  .navmenu li {
    width: 80%;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    list-style: none;
  }

  .navmenu a {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 1rem 2rem;
    display: block;
    width: 100%;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    margin: 0;
  }

  .navmenu a:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
  }

  .burger-menu {
    display: flex;
    order: 3;
  }

  /* Home Section Mobile */
  .home {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1.5rem;
    margin-top: 100px;
    height: auto;
    grid-template-columns: 1fr;
  }

  .home-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    order: 1;
    margin: 0;
  }

  .home-text h2 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    padding-left: 0;
  }

  .home-text h2 i {
    margin-left: 0.5rem;
  }

  .home-text h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    padding-left: 0;
  }

  .home-text h3::before {
    display: none;
  }

  .home-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.5rem 0;
    max-width: 100%;
  }

  .home-img {
    order: 2;
    margin: 1rem 0;
  }

  .home-img img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  .home-btn {
    order: 3;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    margin-top: 1rem;
    margin: 0;
    padding: 0;
  }

  .btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  /* Social Icons Mobile */
  .social-icons {
    position: static !important;
    flex-direction: row !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 2rem 0 !important;
    margin: 1rem auto 0 auto !important;
    width: 100% !important;
  }

  .social-icons a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .social-icons i {
    margin: 0 !important;
    display: flex;
  }

  /* Scroll Button Mobile */
  .scroll-btn {
    position: static !important;
    display: block !important;
    text-align: center !important;
    margin: 1rem auto 2rem auto !important;
    padding: 1rem !important;
    width: fit-content !important;
    left: auto !important;
    bottom: auto !important;
  }

  .scroll-btn i {
    margin-left: 0.5rem;
  }

  /* About Section Mobile */
  .about {
    max-width: 100%;
    margin: 100px 15px 40px 15px;
    padding: 30px 15px;
    min-height: auto;
  }

  .about h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .about p {
    font-size: 1rem;
  }

  /* Skills Section Mobile */
  .skills {
    max-width: 100%;
    margin: 100px 15px 40px 15px;
    padding: 30px 15px;
    min-height: auto;
  }

  .skills h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .skills .skill {
    margin: 1.5rem 0;
    padding: 15px;
  }

  .skills .skill h3 {
    font-size: 1.1rem;
  }

  .skills .skill .progress {
    height: 18px;
  }

  .skills .skill .progress .progress-bar {
    line-height: 18px;
    font-size: 0.7rem;
  }

  /* Contact Section Mobile */
  .contact {
    max-width: 100%;
    margin: 100px 15px 40px 15px;
    padding: 30px 15px;
    min-height: auto;
  }

  .contact h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .contact form {
    gap: 15px;
  }

  .contact form label {
    font-size: 1rem;
  }

  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  /* Footer Mobile */
  .footer {
    margin-top: 60px;
    padding: 40px 0 0 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  .footer-section {
    text-align: center;
  }

  .footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .footer-description {
    font-size: 0.9rem;
    margin: 0 auto 20px auto;
    max-width: 280px;
  }

  .footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .contact-info {
    text-align: center;
    align-items: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  /* Back to Top Mobile */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

/* Portfolio Section - Desktop */
.portfolio {
  max-width: 1200px;
  margin: 140px auto 80px auto;
  padding: 60px 40px;
  text-align: center;
}

.portfolio h2 {
  font-size: 2.5rem;
  color: black;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  padding-bottom: 20px;
}

.portfolio h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(45deg, blue, #4ecdc4);
  border-radius: 2px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.project-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.project-info {
  padding: 30px;
}

.project-info h3 {
  font-size: 1.5rem;
  color: black;
  margin-bottom: 15px;
  margin-top: 0;
}

.project-info p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.project-links .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.project-links .btn:hover {
  transform: translateY(-3px);
}

/* ===== TABLET PORTFOLIO - 992px and below ===== */
@media (max-width: 992px) {
  .portfolio {
    margin: 140px 20px 60px 20px;
    padding: 40px 30px;
  }

  .portfolio h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
  }

  .project-card img {
    height: 220px;
  }

  .project-info {
    padding: 25px;
  }

  .project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .project-info p {
    font-size: 0.9rem;
    margin-bottom: 18px;
  }

  .project-links {
    gap: 12px;
  }

  .project-links .btn {
    padding: 9px 18px;
    font-size: 0.85rem;
    min-width: 100px;
  }
}

/* ===== MOBILE PORTFOLIO - 768px and below ===== */
@media (max-width: 768px) {
  .portfolio {
    margin: 100px 15px 40px 15px;
    padding: 30px 15px;
  }

  .portfolio h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
  }

  .portfolio h2::after {
    width: 80px;
    height: 2px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 25px;
  }

  .project-card {
    display: flex;
    flex-direction: column;
  }

  .project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .project-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    margin-top: 0;
  }

  .project-info p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.5;
  }

  .project-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
  }

  .project-links .btn {
    padding: 10px 15px;
    font-size: 0.85rem;
    width: 100%;
    min-width: auto;
  }
}

/* ===== SMALL MOBILE PORTFOLIO - 480px and below ===== */
@media (max-width: 480px) {
  .portfolio {
    margin: 80px 10px 40px 10px;
    padding: 20px 12px;
  }

  .portfolio h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 12px;
  }

  .portfolio h2::after {
    width: 70px;
    height: 2px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .project-card img {
    height: 180px;
  }

  .project-info {
    padding: 18px;
  }

  .project-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .project-info p {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .project-links {
    gap: 8px;
  }

  .project-links .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}

/* ===== ULTRA SMALL MOBILE PORTFOLIO - 320px and below ===== */
@media (max-width: 320px) {
  .portfolio {
    margin: 75px 8px 30px 8px;
    padding: 15px 10px;
  }

  .portfolio h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .portfolio h2::after {
    width: 60px;
    height: 1.5px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
  }

  .project-card img {
    height: 160px;
  }

  .project-info {
    padding: 15px;
  }

  .project-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .project-info p {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }

  .project-links {
    gap: 6px;
  }

  .project-links .btn {
    padding: 7px 10px;
    font-size: 0.75rem;
  }
}

/* Removing underlines from buttons */

.btn:hover {
  text-decoration: none; /* Ensure no underline on hover */
}

.btn:focus {
  text-decoration: none; /* Ensure no underline on focus */
}

.btn:active {
  text-decoration: none; /* Ensure no underline on active */
}

.home-btn .btn {
  text-decoration: none !important;
}

.home-btn .btn:hover {
  text-decoration: none !important;
}

/* Remove underlines from social media icons */
.social-icons {
  text-decoration: none;
}

.social-icons a {
  text-decoration: none !important;
  color: inherit;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  text-decoration: none !important;
}

.social-icons a:focus {
  text-decoration: none !important;
  outline: none;
}

.social-icons a:active {
  text-decoration: none !important;
}

.social-icons i {
  text-decoration: none !important;
}

/* Mobile social icons - Remove underlines */
@media (max-width: 768px) {
  .social-icons a {
    text-decoration: none !important;
  }

  .social-icons a:hover {
    text-decoration: none !important;
  }
}

/* Small mobile social icons */
@media (max-width: 480px) {
  .social-icons a {
    text-decoration: none !important;
  }

  .social-icons a:hover {
    text-decoration: none !important;
  }
}

/* Ultra small mobile social icons */
@media (max-width: 320px) {
  .social-icons a {
    text-decoration: none !important;
  }

  .social-icons a:hover {
    text-decoration: none !important;
  }
}
