*{
    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: #080808;
    --second-bg-color: #131313;
    --text-color: white;
    --main-color: #00ff88;
}

html{
    font-size: 60%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body{
    background-color: var(--bg-color);
    color: var(--text-color);
    
}
.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 4rem 12% 4rem;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    align-items: center;
    z-index: 5;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background-color: #1f2937; /* gray-800 */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background-color: #374151; /* gray-700 */
  transform: rotate(180deg);
}

/* Default dark theme */
html.dark {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: white;
    --main-color: #00ff88;
}

/* Light theme */
html:not(.dark) {
    --bg-color: #ffffff;
    --second-bg-color: #f8f9fa;
    --text-color: #000000;
    --main-color: #00cc6a;
}

/* Apply light theme styles */
html:not(.dark) body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

html:not(.dark) .header {
    background: rgba(255,255,255,0.3);
}
/* Fix heading class for light theme */
html:not(.dark) .heading,
html:not(.dark) h1.heading,
html:not(.dark) h2.heading,
html:not(.dark) h3.heading {
    color: #000000 !important;
}

/* Also target headings by their content or section */
html:not(.dark) #contact .heading,
html:not(.dark) #services .heading,
html:not(.dark) .contact-section .heading,
html:not(.dark) .services-section .heading {
    color: #000000 !important;
}

/* General fallback for all headings */
html:not(.dark) h1,
html:not(.dark) .heading,
html:not(.dark) .timeline-date,
html:not(.dark) h4,
html:not(.dark) h5,
html:not(.dark) h6 {
    color: #000000 !important;
}

/* Fix sen1 class for light theme */
html:not(.dark) .sen1 {
    color: #000000 !important;
}

/* If sen1 is used on different elements */
html:not(.dark) p.sen1,
html:not(.dark) div.sen1,
html:not(.dark) span.sen1,
html:not(.dark) h1.sen1,
html:not(.dark) h2.sen1,
html:not(.dark) h3.sen1 {
    color: #000000 !important;
}
/* Footer light theme fix */
html:not(.dark) footer,
html:not(.dark) .footer {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Footer text elements */
html:not(.dark) footer *,
html:not(.dark) .footer * {
    color: #000000 !important;
}

/* Footer links */
html:not(.dark) footer a,
html:not(.dark) .footer a {
    color: #000000 !important;
}

html:not(.dark) footer a:hover,
html:not(.dark) .footer a:hover {
    color: var(--main-color) !important;
}



/* @media (max-width: 430px) {
  .theme-toggle {
    width: 2px;
    height: 32px;
    font-size: 1rem;
    margin-left: 0.5rem;
  }
} */


.logo {
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo span{
    text-shadow: 0 0 25px var(--main-color);
}

.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 800;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    padding-bottom: 0.5rem;
}

.navbar a:hover,
.navbar a:active,
.navbar a.active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
#menu-icon{
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
    cursor: pointer
}


section{
    min-height: 100vh ;
    padding: 100rem 12% 10rem;
}

.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    gap: 2rem;
    margin-top: 10vh;

}

.home-content {
    flex: 1;
    margin-left: 4rem;
    margin-top: 50px;
    padding-top: 50px;
}


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

}

.logo span{
    color: var(--main-color);

}
.home-content h3{
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3.5rem;
}

.home-content h1{
     font-size: 7rem;
     font-weight: 700;
     margin-top: 1.5rem;
     line-height: 1;
     font-weight: bolder ;
}

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

.home-img img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    transition: 0.4s ease-in-out;
}

.home-img img:hover {
    box-shadow: 0 0 50px var(--main-color);
}

.home-content p{
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    max-width: 1000px;
}
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: transparent;
    border: 2px solid var(--main-color);
    font-size: 2.5rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3.5rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}

.social-icons a:hover {
    color: white;
    transform: scale(1.3) translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: black;
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

html:not(.dark) .footer {
    background-color: #ffffff !important;
}

.btn:hover{
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--main-color);
}

.btn-group{
    display: flex;
    align-items: center;
    gap: 1.5rem ;
}

.btn-group a:nth-of-type(2){
    background-color: black;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 25px transparent;
}
.btn-group a:nth-of-type(2):hover{
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
    color: black;
}

.text-animation{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
    font-family: 'Roboto Mono', monospace;
}

.text-animation span{
    position: relative;
    font-family: 'Roboto Mono', monospace;

}
.text-animation span::before {
    content: "";
    color: var(--main-color);
    animation: words 20s infinite;
  }

  /* .text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--main-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(22) infinite;
  } */

  /* @keyframes words {
    0%, 20% {
      content: "Data Scientist";
    }
    21%, 40% {
      content: "AI Engineer";
    }
    41%, 60% {
      content: "Full-stack Developer";
    }
    61%, 100% {
      content: "";
    }
  }

  @keyframes typing {
0%, 5% {
  width: calc(100% + 8px); 
}
10%, 20% {
  width: 0;
}
25%, 30% {
  width: calc(100% + 8px);
}
35%, 40% {
  width: 0;
}
45%, 50% {
  width: calc(100% + 8px);
}
55%, 60% {
  width: 0;
}
65%, 100% {
  width: 0;
}
}


  @keyframes cursor {
    0%, 100% {
      border-color: transparent;
    }
    50% {
      border-color: var(--main-color);
    }
  } */

  .text-animation span::after {
    content: "";
    position: absolute;
    right: -8px;
    height: 100%;
    width: 3px;
    background-color: var(--main-color);
    animation: cursor 0.6s infinite;
  }
  
  @keyframes cursor {
    0%, 100% {
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
  }
.heading{
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
}

/* @media (max-width:768px)  {
    .home{
        width: 100vh;
    }
} */

/*work*/

.work{
    padding: 100px 15px;
    background: var(--second-bg-color);

}
.work h2{
    margin-bottom: 5rem;
}
#work h2::before,
#work h2::after {
    content: none !important;
    display: none !important;
}

#work hr,
#work .line, 
#work .border-line {
    display: none !important;
}



.timeline-items{
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.timeline-items::before{
    content: "";
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% -  1px);
}

.timeline-item{
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}

.timeline-item:last-child{
    margin-bottom: 0;
}

.timeline-item:nth-child(odd){
    padding-right: calc(50% + 30px);
    text-align: right;
}
.timeline-item:nth-child(even){
    padding-left: calc(50% + 30px);
}
.timeline-dot{
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color);
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 10px;
}



.timeline-date{
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 6px 0 15px;

}
.timeline-content {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.timeline-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0; 
    transition: opacity 0.5s ease-in-out;
}

.image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    opacity: 0; 
    transition: opacity 0.5s ease-in-out;
}

.image-text h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.image-text span {
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 20px;
}

.image-text a {
    margin-top: 15px;
    display: block;
    color: #fff;
    text-decoration: underline;
}

.timeline-item:hover .timeline-image img,
.timeline-item:hover .image-text {
    opacity: 1;
}

.learn-more-btn {
    margin-top: 15px;
    display: inline-block;
    padding: 8px 16px;
    border-color: white;
    color: #fff;
    border: 20px #fff;
    border-radius: 30px;
    width: auto;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.learn-more-btn:hover {
    background-color: gray;
    color: black;
}

.d1{
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #FFC300;
    font-weight: 800;
    font-size: 40px; 
    text-align: center; 
    white-space: nowrap;
}

.L{
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #C724B1;
    font-size: 40px; 
    text-align: center; 
    white-space: nowrap;
}

.P{
    font-size: .7rem;
    color: aquamarine;
}

.R{
font-size: .7rem;
color: yellowgreen;
}
.JSON{
    font-size: .7rem;
color: greenyellow;
}
.M{
    font-size: .7rem;
    color: #FFC300;
}
.DL{
    font-size: .3rem;
    color: cadetblue;
}
.TA{
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #FF6B6B;
    font-weight: 800;
    font-size: 40px; 
    text-align: center; 
    white-space: nowrap;
}
.TS{
    font-size: .3rem;
    color: #C724B1;
}
.JS{
    font-size: .3rem;
    color: chocolate;
}
.H{
    font-size: .3rem;
    color: maroon;
}
.MRS{
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 800;
    color: limegreen;
    font-size: 40px; 
    text-align: center; 
    white-space: nowrap;
}
.K{
    font-size: .3rem;
    color: mediumslateblue;
}
.T{
    font-size: .3rem;
    color: tomato;
}

::-webkit-scrollbar{
    width: 15px;
}
::-webkit-scrollbar-thumb{
    background-color: var(--main-color);
}

::-webkit-scrollbar-track{
    background-color: var(--bg-color);
    width: 50px;
}

/*tech-tools*/
.heading::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background-color: #000;
    margin-top: 10px;
  }

  .active-button {
    background-color: var(--main-color);
    color: #080808;
  }
  .tech-item img {
    filter: drop-shadow(0 0 5px var(--main-color));
  }
  .fade-in {
      animation: fadeInScale 0.5s ease forwards;
    }
  
    @keyframes fadeInScale {
      0% {
        opacity: 0;
        transform: scale(0.8);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

.sen1{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 45%;
}

.tech-section {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem;
  }
  
  .tech-title {
    font-size: 3rem;
    line-height: 1.5; 
    font-family: 'Roboto Mono', monospace;
    width: 90%;
    margin: 0 auto 2rem auto;
    text-align: center;
    font-weight: 600;
  }
  
  .filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--main-color);
    border-radius: 0.5rem;
    font-weight: 600;
    transition: 0.3s;
  }
  
  .filter-btn:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
  }

  /* @media (max-width: 430px) {
    .tech-section{
        width: 100vh;
    }
} */


  /*services*/
  
  .sen1{
    color: white;
    font-size: 3rem;
    line-height: 1.5; 
    font-family: 'Roboto Mono', monospace;
    width: 90%;
    display: flex;
    justify-content: center;
    margin: 0 auto 2rem auto;
    text-align: center;
    font-weight: 600;
  }
  .services{
    margin-top: 0%;
    padding: 50px 0;
    background: var(--bg-color);
    color: black;
    font-weight: 800;
  }
  .services h2{
    margin-top: 5rem; /* Or even 3rem, depending on your design */
    padding: 100px 0; /* Less padding */
    margin-bottom: 5rem;
    color: white;
  }

  .services-con {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem; 
    padding: 2rem;
  }
  
  #services h2::before,
#services h2::after {
    content: none !important;
    display: none !important;
}

#services hr,
#services .line, 
#services .border-line {
    display: none !important;
}

  .service-box {
    width: 100%;
    max-width: 800px;
  }
  
  .service-info {
    flex: 1; /* or a fixed width like width: 45% */
    background: #aaff33; /* your bright green background */
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 0 20px #00ff00;
  }
  .service-info {
    transition: all 0.5s ease; 
}

.service-info:hover {
    border: 3px solid var(--main-color);
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 50px;
}
  .service-gif {
    width: 25%;
    height: auto;
    margin-left: 40% ;
    border-radius: 10px;
    margin-bottom: 20px;
    pointer-events: none; 
  }
  
  .service-info h4 {
    align-items: center;
    font-size: 3rem;
    font-weight: 800;
    line-height: 2;
  }
  
  .service-info p {
    font-size: 1.6rem;
    font-weight: 600;
  }

  
  /* @media (max-width: 768px) {
    .services-con {
      flex-direction: column;
    }
  }
  @media (max-width: 768px) {
    .services{
        width: 100vh;
    }
  }
 */

  /*Testimonials*/

  .testimonials{
    margin-top: 0%;
    padding: 50px 0;
    background-color: var(--second-bg-color);
    font-weight: 800;
  }
  .testimonials-box{
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    /* height: 20%; */
  }

  .testimonials .heading{
    margin-bottom: 5rem;

  }

  #testimonials h2::before,
#testimonials h2::after {
    content: none !important;
    display: none !important;
}

#testimonials hr,
#testimonials .line, 
#testimonials .border-line {
    display: none !important;
}

  /* .testimonial img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%; 
    border: 3px solid var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
} */

.testimonial-item img {
    width: 300px;   /* Make sure width and height are equal */
    height: 300px;
    object-fit: cover;  /* Make the image fill the box without distortion */
    border-radius: 50%; /* Make it circular */
    border: 3px solid var(--main-color);
    border-color: var(--main-color); /* Optional: add a nice white border */
    box-shadow: 0 4px 8px var(--main-color); /* Optional: a soft shadow */
}
.testimonial-item:hover {
    /* transform: translateY(-12px) scale(1.04);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2); */
    border: 3px solid var(--main-color);
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 50px var(--main-color);
}

.wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}


.testimonial-item{
    min-height: 550px;
    max-width: 450px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(238, 238, 238, 0.2);
    border-radius: 2rem;
    margin: 0 2rem;
    padding: 30px 60px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    color: white;
    transition: 0.4s ease-in-out;

    
} 

.testimonial-item h2{
    font-size: 2.8rem;
    font-weight: 600;
}
  
.testimonial-item p{
    font-size: 1.3rem;
}

#star{
    font-size: 2rem;
    color: gold;
}

.linkedin-icon {
    margin: 10px 0;
}

.linkedin-icon a {
    font-size: 28px;
    color: #0a66c2; /* Official LinkedIn blue */
    transition: color 0.3s ease;
}

.linkedin-icon a:hover {
    color: #004182; /* Darker blue on hover */
}

/*Contact*/

.contact{
    margin-top: 0%;
    padding: 50px ;
    margin-left: 8rem;
    background-color: var(--second-bg-color);
    font-weight: 800;
    background-color: var(--bg-color);
}

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

#contact h2::before,
#contact h2::after {
    content: none !important;
    display: none !important;
}

#contact hr,
#contact .line, 
#contact .border-line {
    display: none !important;
}


.contact-form{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 5rem auto;
    text-align: center;
}

.contact form .input-box{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea{
    width: 100%;
    padding: 2.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 2rem;
    border: 2px solid var(--main-color);
    margin: 1.5rem 0;
    resize: none;
    
}

.contact form .btn{
    margin-top: 2rem;
    position: relative;
    left:26rem;
}

.input{
 display: flex;
 flex-wrap: nowrap;
 gap: 2rem;
}

.footer{
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
    background-color: var(--second-bg-color);
}

.footer .social{
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
}

.footer .social a{
    font-size: 25px;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 42px;
    height: 42px;
    line-height: 42px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s ease-in-out;
}

.footer .social a:hover{
    color: white;
    transform: scale(1.3) translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
}

.footer ul{
    margin-top: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.footer ul li a{
    color: white;
    border-bottom: 3px solid transparent;
    transform: 0.3s ease-in-out;
}
.footer ul li a:hover{
    border-bottom: 3px solid var(--main-color);
}

.footer ul li{
    display: inline-block;
    padding: 0 15px;
}
.footer .copyrights{
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: white;
}

/* @media(max-width:1285px){
    html{
        font-size: 55%;
    }
    .services-container{
        padding-bottom: 7rem;
        grid-template-columns: repeat(2,1fr);
        margin: 0 5rem;
    }
} */


/* Mobile-specific fixes - add this file after your main CSS */

/* Mobile-specific fixes - add this file after your main CSS */

/* Small screens (phones up to 430px) */
@media (max-width: 430px) {
  /* Fix header for mobile */
  .header {
    padding: 1.5rem 4%;
  }
  
  #menu-icon {
    display: block;
  }
  
  /* Make the navbar work on mobile */
  .navbar {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    padding: 1rem 4%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 99;
    transition: left 0.3s ease;
    flex-direction: column;
    align-items: center;
  }
  
  .navbar.active {
    left: 0;
  }
  
  .navbar a {
    display: block;
    font-size: 1.8rem;
    margin: 1rem 0;
    width: 100%;
    text-align: center;
  }
  
  /* Fix home section layout */
  .home {
    flex-direction: column-reverse;
    padding: 0 2rem;
    margin-top: 5rem;
    text-align: center;
  }
  
  .home-content {
    margin-left: 0;
    padding-top: 2rem;
  }
  
  .home-img img {
    width: 25rem;
    height: 25rem;
  }
  
  .home-content h1 {
    font-size: 4.5rem;
  }
  
  .social-icons {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }
  
  .btn-group {
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  /* Fix timeline for mobile - FIXED ALIGNMENT ISSUE */
  .timeline-items::before {
    left: 7px;  /* Adjusted to align with center of dot */
    width: 4px;
  }
  
  .timeline-dot {
    height: 18px;
    width: 18px;
    left: 0;
    top: 10px;
    transform: translateX(0);
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding: 0 0 0 4rem !important;
    text-align: left !important;
  }
  
  /* Reset timeline image and text styles */
  .timeline-image {
    position: relative;
    height: auto;
    min-height: 20rem;
    overflow: hidden;
  }
  
  .timeline-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Fix image text overlay - show on hover only */
  .image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 0.5rem;
    pointer-events: none;
  }
  
  /* Always show text on mobile for better UX */
  .timeline-item:hover .image-text,
  .timeline-item:active .image-text,
  .timeline-item:focus .image-text {
    opacity: 1;
  }
  
  /* Tap to reveal effect for mobile */
  .timeline-image:after {
    content: "Tap to view details";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
  }
  
  .timeline-item:hover .timeline-image:after,
  .timeline-item:active .timeline-image:after,
  .timeline-item:focus .timeline-image:after {
    display: none;
  }
  
  /* Fix title text size */
  .image-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
    word-wrap: break-word;
  }
  
  /* Fix class-specific title styles */
  .image-text h3.L, 
  .image-text h3.d1,
  .image-text h3.TA, 
  .image-text h3.MRS {
    font-size: 1.8rem;
    white-space: normal;
  }
  
  /* Fix tag spans */
  .image-text span {
    display: inline-block;
    margin: 0.3rem;
    padding: 0.2rem 0.4rem;
    font-size: 1rem;
    border-radius: 0.3rem;
  }
  
  /* Make button more visible */
  .learn-more-btn {
    margin-top: 0.8rem;
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--main-color);
    color: #000;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
  }
  
  /* Fix testimonials for mobile */
  
@media (max-width: 430px) {

  .testimonials h2.heading,
  .testimonials .heading,
  .testimonials-box .heading {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2rem 0 !important;
    padding: 0 1rem !important;
    text-align: center !important;
    font-size: 4rem !important;
    white-space: normal !important;
    box-sizing: border-box !important;
    display: block !important;
    left: 0 !important;
    right: 0 !important;
  }
}

  .wrapper {
    grid-template-columns: 1fr;
  }
  
  .testimonial-item {
    min-height: auto;
    max-width: 100%;
  }
  
  /* Fix services for mobile */
  .services-con {
    flex-direction: column;
  }
  
  /* Fix contact form for mobile */
  .contact {
    margin-left: 0;
    padding: 5rem 2rem;
  }
  
  .input {
    flex-direction: column;
  }
  
  .contact form .btn {
    position: static;
    margin: 2rem auto;
    display: block;
  }
}

/* Medium screens (phones and small tablets, 431px to 768px) */
@media (min-width: 431px) and (max-width: 768px) {
  .header {
    padding: 2rem 5%;
  }
  
  #menu-icon {
    display: block;
  }
  
  .navbar {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(0, 0, 0, 0.9);
    transition: left 0.3s ease;
    flex-direction: column;
  }
  
  .navbar.active {
    left: 0;
  }
  
  .navbar a {
    margin: 1.5rem 0;
    display: block;
    text-align: center;
  }
  
  .home {
    flex-direction: column-reverse;
    text-align: center;
  }
  
  .home-content {
    margin-left: 0;
  }
  
  /* Fix timeline for mobile - FIXED ALIGNMENT ISSUE */
  .timeline-items::before {
    left: 7px;
    width: 4px;
  }
  
  .timeline-dot {
    height: 18px;
    width: 18px;
    left: 0;
    top: 10px;
    transform: translateX(0);
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding: 0 0 0 4rem !important;
    text-align: left !important;
  }
  
  /* Fix image text similar to small screens */
  .timeline-image:after {
    content: "Tap to view details";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
  }
  
  .image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .timeline-item:hover .image-text,
  .timeline-item:active .image-text,
  .timeline-item:focus .image-text {
    opacity: 1;
  }
  
  .services-con {
    flex-direction: column;
  }
  
  .contact {
    margin-left: 0;
    padding: 5rem 2rem;
  }
  
  .contact form .btn {
    left: auto;
    position: static;
    margin: 2rem auto;
    display: block;
  }
}
@media (max-width: 430px){
  body {
    margin: 0; /* Remove default body margin */
    padding: 0;
    width: 100vw;
    overflow-x: hidden;
  }

}

 /* Adjustments to lower the profile image on mobile */
@media (max-width: 430px) {
  /* Full width container fixes (keeping your previous code) */
  body {
    margin: 0;
    padding: 0;
    width: 100vw;
    overflow-x: hidden;
  }

  .main-container, 
  section, 
  .work, 
  .about, 
  .home, 
  .contact, 
  .testimonials, 
  .timeline-items {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* NEW CHANGES - Lower the profile image */
  .home-img {
    margin-top: 5rem !important; /* Push image down further */
    padding-top: 1.5rem;
  }

  /* Adjust spacing after the image */
  .home-content {
    margin-top: 2rem;
  }
}

/* Also apply similar but slightly different adjustments for tablet sizes */
@media (min-width: 431px) and (max-width: 768px) {
  .home-img {
    margin-top: 4rem !important;
  }
}

/* For larger tablets */
@media (min-width: 769px) and (max-width: 991px) {
  .home-img {
    margin-top: 3rem !important;
  }
}

/* Fix specific issue with image-text opacity on all screen sizes */
@media (max-width: 991px) {
  .timeline-image img {
    opacity: 1 !important;
  }
  
  /* Make hover state work on touch for all devices */
  .timeline-item .image-text {
    opacity: 0;
  }
  
  .timeline-image {
    cursor: pointer;
  }
  
  /* States to trigger text display */
  .timeline-item:hover .image-text,
  .timeline-item:active .image-text,
  .timeline-item:focus .image-text,
  .timeline-item.touched .image-text {
    opacity: 1;
  }
}
  /* Fix all section headings globally on mobile - ADDED */
  .heading {
    display: block;
    width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1rem;
    box-sizing: border-box;
  }
  
  .testimonials-box {
    width: 100%;
    padding: 0 1rem;
  }

  /* Minimal CSS fix to make Learn More buttons work */
.image-text {
  pointer-events: none; 
}

.learn-more-btn {
  pointer-events: auto; 
  position: relative;
  z-index: 10; 
}

a.learn-more-btn {
  display: inline-block; 
}
.tags-container {
  margin-bottom: 10px;
  display: block;
}

/* Specific fixes for testimonials on tablets (iPad) */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Improve testimonial grid layout for tablets */
  .wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Change to 2 columns instead of 3 */
    gap: 2rem;
    padding: 1rem;
  }
  
  /* Make testimonial cards larger and more readable */
  .testimonial-item {
    min-height: auto;
    max-width: 100%;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
  }
  
  /* Improve image size on tablets */
  .testimonial-item img {
    width: 120px;
    height: 120px;
  }
  
  /* Improve text readability */
  .testimonial-item p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 1.5rem 0;
  }
  
  .testimonial-item h2 {
    font-size: 2rem;
    margin: 1rem 0;
  }
  
  /* Better star rating display */
  #star {
    font-size: 1.6rem;
    margin: 0.2rem;
  }
  
  /* Specifically target iPad Pro */
  @media only screen and (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
    .wrapper {
      grid-template-columns: repeat(2, 1fr); /* Force 2 columns on iPad Pro */
    }
    
    /* Add more breathing room */
    .testimonials {
      padding: 6rem 4% 4rem;
    }
    
    .testimonial-item {
      min-height: 450px; /* Set consistent height */
    }
  }
  
  /* Fix for specific iPad models in landscape */
  @media only screen and (min-width: 1000px) and (max-width: 1366px) and (orientation: landscape) {
    .wrapper {
      grid-template-columns: repeat(3, 1fr); /* Return to 3 columns but with better sizing */
      gap: 1.5rem;
    }
    
    .testimonial-item {
      padding: 2.5rem 1.5rem;
    }
  }
}


/* Fix only for the mobile menu background in light theme */
html:not(.dark) .navbar {
    background: rgba(255, 255, 255, 0.9) !important;
}

html:not(.dark) .navbar a {
    color: #000000 !important;
}

html:not(.dark) .navbar a:hover,
html:not(.dark) .navbar a.active {
    color: var(--main-color) !important;
}


/* ----------------------------------------------------------------------------------- */

