
/* @import url('https://fonts.googleapis.com/css?family=roboto flex: wght@400; 500; 700&display=swap'); */


/* @import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap'); */

/* @import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap'); */


@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    /* font-family: "Poppins", sans-serif; */
    font-family: Inter, Arial, sans-serif;
}

:root {
    --bg-color: #1f242d;
     /* --bg:#171a1f; */
    --second-bg-color: #323946;
    --main-color: #7cf03d;
    --white-color: #fff;
    --disabled-color: #fff3;
    
}

html {
    font-size: 61%; /*62.5% */
    scroll-behavior: smooth;
    /* Prevent horizontal scrolling */
    overflow-x: hidden;
    width: 100%;
}

body {
    color: var(--white-color);
    background: var(--bg-color);
    /* Prevent horizontal scrolling */
    overflow-x: hidden;
    width: 100%;
}



/* home */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    visibility: visible;
    opacity: 1;
}

header.active {
    animation: none;
}

@keyframes show-header {
    100% {
        visibility: visible;
        opacity: 1;
    }
}

.logo {
    font-size: 2.5rem;
    color: var(--white-color);
    font-weight: 700;
}

nav a{
    font-size: 1.7rem;
    color: var(--white-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .5s;
}

nav a:hover,
nav a.active {
    color: var(--main-color) !important;
    font-weight: 700 !important;
    /* text-shadow: 0 0 10px var(--main-color) !important; */
}

#menu-icon{
    font-size: 4rem;
    display: none;
    color: var(--white-color);
    cursor: pointer;
}

.bars-box {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
}

.bars-box .bar {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: hide-bars .5s ease-in-out both;
    animation-delay: calc(.1s * var(--i));
}

@keyframes hide-bars {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%); 
    }
}

.bars-box.active .bar{
    animation: show-bars .5s ease-in-out both;
    animation-delay: calc(.1s * var(--i));
}

@keyframes show-bars {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0); 
    }
}

section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* Specific styles for portfolio section */
.portfolio {
    position: relative;
    /* Prevent horizontal scrolling */
    overflow-x: hidden;
    width: 100%;
}

/* Prevent horizontal scrolling on mobile for projects section */
#projects {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Additional mobile touch prevention */
@media (max-width: 768px) {
    #projects {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
    
    #projects .slider {
        touch-action: pan-y;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Prevent horizontal scrolling globally on mobile */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    /* Prevent horizontal scrolling on all sections */
    section {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    /* Specific prevention for projects section */
    #projects, #projects * {
        overflow-x: hidden;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@keyframes show-content {
    100% {
        visibility: visible;
        opacity: 1;
        overflow: auto;
    }
}

.home{
    display: flex;
    align-items: center;
    gap: 5rem;
    /* margin-left: 2rem; */
}

.home-detail h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
}

.home-detail h2 {
    display: inline-block;
    font-size: 3.2rem;
    margin-top: -1rem;
}

.home-detail h2 span {
    position: relative;
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: .07rem var(--main-color);
    animation: display-text 6s linear infinite;
    /* stagger by half the cycle (3s) to avoid overlap */
    animation-delay: calc(-3s * var(--i));
}

@keyframes display-text{
    25%,100%{
        display: none;
    }
}

.home-detail h2 span::before {
    content: attr(data-text);
    position: absolute;
    width: 0;
    border-right: .2rem solid var(--main-color);
    color: var(--main-color);
    white-space: nowrap;
    overflow: hidden;
    animation: fill-text 1.5s linear infinite;
}

@keyframes fill-text {
    10%,100% {
        width: 0;
    }
    70%,90% {
        width: 100%;
    }
    
}

.home-detail P {
    font-size: 19px;
    margin: 1rem 0 2.5rem;
    /* text-align: justify; */
}

.home-detail .btn-sci {
    display: flex;
    align-items: center;
    /* justify-content: space-between; */
    /* gap: 1rem; */
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: 3.5rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.7rem;
    color: var(--bg-color);
    font-weight: 500;
    transition: .5s;
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
}

.home-detail .btn-sci .sci {
    margin-left: 2rem;
}

.home-detail .btn-sci .sci a {
    display: inline-flex;
    padding: .8rem;
    /* border: .2rem solid var(--main-color); */
    border-radius: 50%;
    font-size: 3.2rem;
    color: var(--main-color);
    margin: 0 .8rem;
    transition: .5s;
}

.home-detail .btn-sci .sci a:hover{
    background: var(--main-color);
    color: var(--bg-color);
    /* box-shadow: 0 0 1rem var(--main-color); */

    
}

.home-img .img-box {
    position: relative;
    width: 25vw;
    height: 25vw;
    /* extra */
    max-width: 100%;
    max-height: 100%;
    /* extra */
    border-radius: 50%;
    padding: .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.home-img .img-box::before,
.home-img .img-box::after {
    content: '';
    position: absolute;

    /* extra 1 */
    /* width: ;100vw; */
    /* height: 100vw; */
    /* extra 1 */

    /* extra 2 */
    width: 100%;
    height: 100%;
    /* extra 2 */

    /* raw */
    /* width: 50rem;    */
    /* height: 50rem; */
     /* raw */

    border-radius: 50%;
    background: conic-gradient(transparent, transparent, transparent, var(--main-color));
    transform:rotate(0deg) ;
    animation: rotate-border 10s linear infinite;
}

.home-img .img-box::after{
    animation-delay: -5s;
}

@keyframes rotate-border{
    100%{
        transform: rotate(360deg);
    }
}

.home-img .img-box .img-item {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 50%;
    border: .01rem solid var(--bg-color);
    display: flex;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.home-img .img-box .img-item img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: normal; 
}






/* resume */
.heading {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

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

.resume-container{
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
}

 .resume-box h2{
    font-size: 3.4rem;
}

.resume-box p{
    font-size: 1.7rem;
    text-align: justify;
} 

/* Base desc class for about section */
.desc {
    font-size: 1.7rem;
    text-align: justify;
}
/* 
.resume-box .desc{
    margin: 2rem 0 2.5rem;
}  */

/* .resume-box .resume-btn {
    width: 70%;
    height: 5.3rem;
    background: var(--second-bg-color);
    border: .2rem solid var(--second-bg-color) ;
    font-size: 1.6rem;
    color: var(--white-color);
    font-weight: 500;
    margin-bottom: 2rem;
    border-radius: .8rem;
    cursor: pointer;
}

.resume-box .resume-btn.active{
    border-color: var(--main-color);
    color: var(--main-color);
} */

.resume-detail {
    display: none;   
}

.resume-detail.active{
    display: block;
}

.resume-box .heading{
    font-size: 3.5rem;
    text-align: left;
}

/* extra 'experience' */
.resume-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2rem;
    height: 38rem;
    overflow: auto;
}

.resume-list::-webkit-scrollbar {
    width: .7rem;
}

.resume-list::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 1rem;
}

.resume-list::hover::-webkit-scrollbar-thumb {
    background: var(--main-color);
}

.resume-list .resume-item {
    /* background: var(--second-bg-color); */
    /* border-radius: .8rem; */
    padding: 2rem 2rem;
    height: calc((40rem - 2rem) / 2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.resume-list .resume-item *{
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    
}

.resume-item .year {
    color: var(--white-color);
}

.resume-item h3 {
    font-size: 1.6rem;
    font-weight: 600;
}

.resume-item .company {
    position: relative;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.resume-item .company::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(50%);
    padding: .5rem;
    background: var(--main-color);
    border-radius: 50%;
    margin-left: -2rem;
}
.resume-item p {
    font-size: 1.4rem;
}

.resume-item .year {
    font-size: 1.3rem;
}

/* ______extra 'the end'_______ */

/* Keep Education items larger (exclude from compact sizing) */
/* .resume-detail.education .resume-list {
    height: auto;
}

.resume-detail.education .resume-list .resume-item {
    height: auto;
    padding: 3rem 2.5rem;
}

.resume-detail.education .resume-item h3 {
    font-size: 1.8rem;
}

.resume-detail.education .resume-item p {
    font-size: 1.7rem;
}

.resume-detail.education .resume-item .year {
    font-size: 1.5rem;
} */

/* Explicitly hide any About detail inside Resume section */
.resume-detail.about {
    display: none !important;
}

/* resume 'skills'  */
.resume-detail.skills .resume-list {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    height: auto;
    overflow: visible;
}

.resume-detail.skills .resume-item {
    position: relative;
    align-items: center;
    height: auto;
}

.resume-detail.skills .resume-list i {
    font-size: 6.5rem;
    transition: .5s;
    display: block;
    margin: 0 auto;
}

.resume-detail.skills .resume-item:hover i {
    color: var(--main-color);
}

.resume-detail.skills .resume-item span {
    position: absolute;
    top: -20%;
    background: var(--white-color);
    color: var(--bg-color);
    font-size: 1.4rem;
    padding: .5rem 1rem;
    border-radius: .6rem;
    pointer-events: none;
    opacity: 0;
    transform: scale(.9);
    transition: .2s;
    text-align: center;
    left: 50%;
    transform: translateX(-50%) scale(.9);
}

.resume-detail.skills .resume-item:hover span {
    top: -25%;
    opacity: 1;
    transform: scale(1);
}
/* Standardize icon size/shape inside resume items (works regardless of section id) */
.resume .resume-item i,
.resume .resume-item img,
.resume .resume-item .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 6rem;
    min-width: 6rem;
    /* border-radius: 50%; */
    line-height: 1;
    font-size: 3rem;
    flex-shrink: 0;
}

/* Ensure images used as icons fit inside the circle */
.resume .resume-item img,
.resume .resume-item .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* border-radius: 50%; */
}

/* Override skills grid big icon to use the standardized size */
.resume .resume-detail.skills .resume-item i {
    font-size: 3rem;
}

@media screen and (max-width: 768px) {
    .resume .resume-item i,
    .resume .resume-item img.icon,
    .resume .resume-item .icon {
        width: 5rem;
        height: 5rem;
        min-width: 5rem;
        font-size: 2.4rem;
    }
}
/* resume 'about'  */
.resume-detail.about .resume-list {
    height: auto;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
}

.resume-detail.about .resume-item {
    height: auto;
    padding: 0 0 .5rem;
    background: transparent;
}

.resume-detail.about .resume-item p {
    color: var(--main-color);
}

.resume-detail.about .resume-item p span{
    color: var(--white-color);
    margin-left: 1rem;
    font-size: 1.8rem;
}




/* projects */
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: -1.8rem;
}

.portfolio-box {
    position: relative;
}

.portfolio-detail {
    display: none;
}

.portfolio-detail.active {
    display: block;
}

.portfolio-box .numb {
   font-size: 5rem;
   -webkit-text-stroke: .07rem var(--white-color);
   /* color: transparent; */
   line-height: 1; 
}

.portfolio-box h3 {
    font-size: 3.5rem;
    margin: .8rem 0 2rem;

}

.portfolio-box p {
    font-size: 19px;
    text-align: justify;
}

.portfolio-box .tech {
    margin: 1rem 0;
    color: var(--main-color);
    border-bottom: none;
    padding-bottom: 1rem;
}

.portfolio-box .live-github a{
    position: relative;
    display: inline-flex;
    padding: .5rem;
    font-size: 4.1rem;
    color: var(--main-color);
    /* color: var(--white-color); */
    /* border-radius: 50%; */
    /* background: var(--second-bg-color); */
    transition: .5s;
}

.portfolio-box .live-github {
    transform: translateY(-12px);
}

.portfolio-box .live-github a:hover {
    color: var(--main-color);
}

.portfolio-box .live-github a:first-child {
    margin-right: 1.5rem;
}

.portfolio-box .live-github a:first-child i {
    transform: rotate(135deg);
}

.portfolio-box .live-github a span {
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%) scale(.9);
    font-size: 1.3rem;
    white-space: nowrap;
    padding: .5rem 1rem;
    border-radius: .6rem;
    pointer-events: none;
    background: var(--white-color);
    color: var(--bg-color);
    opacity: 0;
    transition: .2s;
}

.portfolio-box .live-github a:hover span {
    top: -70%;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.portfolio-box .portfolio-carousel {
    width: 100%;
    height: 45rem;
    border-radius: 1rem;
    overflow: hidden;
}

.portfolio-carousel .img-slide {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 2rem;
    height: inherit;
    transition: .5s;
}

.portfolio-carousel .img-item {
    height: inherit;
}

.portfolio-carousel .img-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 1rem;
}

.portfolio-box .navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
    margin-top: .8rem;
}

@media screen and (min-width: 769px) {
    .portfolio-box .navigation {
        transform: translateX(-12px);
    }
}

@media screen and (max-width: 768px) {
    .portfolio-box .navigation {
        transform: none;
    }
}

.portfolio-box .navigation button {
   display: inline-flex;
   padding: .2rem;
   background: var(--main-color);
   border: .2rem solid var(--second-bg-color);
   border-radius: .6rem;
   font-size: 4.5rem;
   color: var(--second-bg-color);
   cursor: pointer; 
    box-shadow: 0 0 1rem var(--main-color);
}

.portfolio-box .navigation button.disabled {
    border-color: var(--second-bg-color);
    color: var(--disabled-color);
}

.portfolio-box .navigation .arrow-right {
    margin-left: 0;
}


/* contact */


section#contact.contact {
    margin-top: -10rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    margin-top: -10rem;
}

.contact-container .conatact-box:first-child {
    align-self: center;
}

.contact h2 {
    font-size: 3.5rem;
    text-align: center;
     color: var(--main-color);
}

.contact-box p {
    font-size: 1.7rem;
}

.contact-box .desc {
    margin: 1.5rem 0 2.5rem;
}

.contact-box .contact-detail {
    display: flex;
    align-items: center;
    margin: 3rem 0;
}

.contact-detail i {
    display: inline-flex;
    /* background: var(--second-bg-color); */
    color: var(--main-color);
    font-size: 2.8rem;
    padding: 1rem;
    /* border-radius: .6rem; */
    margin-right: 1.5rem;
}

.contact-detail .detail p:first-child {
    color: var(--white-color);
}

.contact-box form {
    background: var(--second-bg-color);
    padding: 2.5rem 3.5rem 3.5rem;
    border-radius: 1rem;
    text-align: center;
}

.contact-box .heading {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--white-color);
}

.contact-box .field-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.contact-box .field-box input,
.contact-box .field-box textarea {
    padding: 1.5rem;
    background: var(--bg-color);
    border: .15rem solid var(--bg-color);
    border-radius: .6rem;
    font-size: 1.4rem;
    color: var(--white-color);
}

.contact-box .field-box textarea {
    grid-column: 1 / -1;
    height: 10rem;
    resize: none;
}

.contact-box .field-box input:focus,
.contact-box .field-box textarea:focus {
    border-color: var(--main-color);
}

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

/* breakpoints */
@media screen and (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media screen and (max-width: 992px) {
    header {
        padding: 2rem 4%;
    }
    section {
        padding: 10rem 4% 2rem;
    }
}

@media screen and (max-width: 810px) {
    .contact-box .field-box {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    /* Mobile Navigation - Hamburger Menu System */


    #menu-icon {
        display: block;
        cursor: pointer;
        z-index: 1000;
        position: relative;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 50vh;
        padding: 10rem 0;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        /* box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2); */
        text-align: center;
        transition: left 0.3s ease;
        -webkit-transition: left 0.3s ease;
        z-index: 999;
        -webkit-overflow-scrolling: touch;
    }

    nav.active {
        left: 0;
    }
    
    /* Add backdrop for mobile navigation */
    nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: -1;
    }
    
    /* Ensure mobile navigation works on all devices */
    body.nav-open {
        overflow: hidden;
    }
    
    /* Fix for iOS Safari */
    nav {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    nav a {
        display: block;
        margin: 2rem 0;
        font-size: 2rem;
        padding: 1rem 0;
        transition: all 0.3s ease;
    }
    
    nav a:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(10px);
    }
    
    /* Ensure active state is visible on mobile */
    nav a.active {
        color: var(--main-color) !important;
        font-weight: 700 !important;
        /* text-shadow: 0 0 10px var(--main-color) !important; */
        background: rgba(124, 240, 61, 0.1);
    }

      @media (max-width: 767px) {

        .home-detail p{
            text-align: justify;
        }

        .resume-list{
    padding-top: 2rem;
}

        section#projects.portfolio[style] {
        margin-top: -.1rem !important; /* Move it a bit below */
    }

    section#contact.contact[style] {
        margin-top: -110px !important; /* Move it higher (more negative) */
    }
      }

    
    /* Ensure mobile navigation works on very small screens */
    @media (max-width: 480px) {
        nav {
            padding: 8rem 0;
            height: 40vh;
        }
        
        nav a {
            margin: 1.5rem 0;
            font-size: 1.8rem;
        }
    }

    /* Layout adjustments */
    .home {
       flex-direction: column-reverse;
       justify-content: center;
       gap: 2rem; 
    }

    .home-img .img-box {
        width: 35rem;
        height: 35rem;
    }

    .resume-container,
    .portfolio-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .resume-container {
        gap: 3rem;
    }

    .portfolio-container .portfolio-box:first-child {
        order: 1;
    }

    .contact-box .field-box {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Font sizes */
    html {
        font-size: 55%;
    }
    
    .home-detail h1 {
        font-size: 4.5rem;
    }
    
    .home-detail h2 {
        font-size: 2.8rem;
    }
    
    .home-detail p {
        font-size: 19px;
    }
    
    .heading {
        font-size: 3rem;
    }
    
    .desc {
        font-size: 1.7rem;
    }
    
    .resume-item h3 {
        font-size: 2.2rem;
    }
    
    .resume-item p {
        font-size: 1.6rem;
    }
    
    .contact-box h2 {
        font-size: 3rem;
    }
    
    .contact-detail p {
        font-size: 1.5rem;
    }
    
    .contact-box input,
    .contact-box textarea {
        font-size: 1.4rem;
    }
    
    .contact-box .btn {
        font-size: 1.5rem;
    }
    
    /* Move contact form closer to contact details */
    .contact-container .contact-box:nth-child(2) {
        margin-top: -20px;
    }
    
    /* Move copyright text closer */
    .contact-container + p {
        margin-top: 60px;
    }
}

@media screen and (max-width: 600px){
    .home-img .img-box {
        width: 30rem;
        height: 30rem;
    }

    .contact-box .field-box {
        grid-template-columns: 1fr;
    }
    
    /* Ensure mobile navigation works on small screens */
    nav {
        padding: 8rem 0;
        height: 40vh;
    }
    
    nav a {
        margin: 1.5rem 0;
        font-size: 1.8rem;
    }
}



@media screen and (max-width: 600px) {
    html {
        font-size: 52%;
    }
    
    .home-detail h1 {
        font-size: 4.2rem;
    }
    
    .home-detail h2 {
        font-size: 2.6rem;
    }
    
    .home-detail p {
        font-size: 19px;
        text-align: justify;
    }
    
    .heading {
        font-size: 2.8rem;
    }
    
    .desc {
        font-size: 1.6rem;
    }
    
    .resume-item h3 {
        font-size: 2rem;
    }
    
    .resume-item p {
        font-size: 1.5rem;
    }

           .resume-list{
    padding-top: 2rem;
}

        section#projects.portfolio[style] {
        margin-top: -.1rem !important; /* Move it a bit below */
    }

    section#contact.contact[style] {
        margin-top: -110px !important; /* Move it higher (more negative) */
    }
    
    .contact-box h2 {
        font-size: 2.8rem;
    }
    
    .contact-detail p {
        font-size: 1.4rem;
    }
    
    .contact-box input,
    .contact-box textarea {
        font-size: 1.3rem;
    }
    
    .contact-box .btn {
        font-size: 1.4rem;
    }
    
    /* Move contact form closer to contact details */
    .contact-container .contact-box:nth-child(2) {
        margin-top: -30px;
    }
    
    /* Move copyright text closer */
    .contact-container + p {
        margin-top: 50px;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 50%;
    }
    
    .home-detail h1 {
        font-size: 4rem;
    }
    
    .home-detail h2 {
        font-size: 2.4rem;
    }
    
    .home-detail p {
        font-size: 18px;
        text-align: justify;
    }
    
    .heading {
        font-size: 2.6rem;
    }
    
    .desc {
        font-size: 18px !important;
    }
    
    .resume-item h3 {
        font-size: 1.8rem;
    }
    
    .resume-item p {
        font-size: 15px;
    }

       .resume-list{
    padding-top: 3rem;
}

        section#projects.portfolio[style] {
        margin-top: -.1rem !important; /* Move it a bit below */
    }

    section#contact.contact[style] {
        margin-top: -27rem !important;  /* Move it higher (more negative) */
    }
    
    .contact-box h2 {
        font-size: 2.6rem;
    }
    
    .contact-detail p {
        font-size: 15px;
    }
    
    .contact-box input,
    .contact-box textarea {
        font-size: 1.2rem;
    }
    
    .contact-box .btn {
        font-size: 1.3rem;
    }
    
    /* Move contact form closer to contact details */
    .contact-container .contact-box:nth-child(2) {
        margin-top: -40px;
    }
    
    /* Move copyright text closer */
    .contact-container + p {
        margin-top: 40px;
    }
}

@media screen and (max-width: 450px) {
    html {
        font-size: 50%;
        /* font-size: 20%; */
    }

    .home-detail p {
        font-size: 16px;
        text-align: justify;
    }
    
    /* Skills section desc font size */
    .resume-detail.skills.active .desc {
        font-size: 16px !important;
    }
    
    /* Override inline styles for all desc elements */
    .desc {
        font-size: 16px !important;
    }

    .resume-list{
    padding-top: 3rem;
}
    
        section#projects.portfolio[style] {
        margin-top: -.1rem !important; /* Move it a bit below */
    }

    section#contact.contact[style] {
        margin-top: -200px !important; /* Move it higher (more negative) */
    }


    /* Move contact form closer to contact details */
    .contact-container .contact-box:nth-child(2) {
        margin-top: -50px;
    }
    
    /* Move copyright text closer */
    .contact-container + p {
        margin-top: 35px;
    }
}

@media screen and (max-width: 400px) {
    .home-detail,
    .resume-box h2,
    .resume-box .heading,
    .resume-box .desc,
    .resume-detail.about .resume-item {
    text-align: center;
}

.home-detail p {
    font-size: 15px;
    text-align: justify;
}

/* Skills section desc font size */

.resume-detail.skills.active .desc {
    font-size: 15px !important;
    text-align: justify;
}

.resume-list{
    padding-top: 3rem;
}

/* Override inline styles for all desc elements */
.desc {
    font-size: 15px !important;
}

/* Ensure mobile navigation works on very small screens */
nav {
    padding: 6rem 0;
    height: 35vh;
}

nav a {
    margin: 1rem 0;
    font-size: 1.6rem;
}

    .home-detail .btn-sci {
        flex-direction: column-reverse;
    }

    .home-detail .btn-sci .sci {
        margin-left: 0;
        margin-bottom: 2rem;
    }

    section#projects.portfolio[style] {
        margin-top: 3rem !important; /* Move it a bit below */
    }

      section#contact.contact {
        margin-top: -200px;
    }

    .contact-box form {
        padding: 2.5rem 3rem 3.5rem;
    }

    .contact-box h2 {
        font-size: 3.5rem;
    }
}

@media screen and (max-width: 360px) {

    
    section#projects.portfolio[style] {
        margin-top: 1rem !important; /* Move it a bit below */
    }

       section#contact.contact{
        margin-top: -31rem !important;
    }

}
@media screen and (max-width: 412px) {
    
       section#contact.contact{
        margin-top: -55rem !important;
    }
}


@media screen and (max-width: 320px) {
    
       section#contact.contact{
        margin-top: -8rem !important;
    }
}
@media screen and (max-width: 480px) {
    
       section#contact.contact{
        margin-top: -47rem !important;
    }
}
