@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: "Poppins", sans-serif;
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --main-color: #7cf03d;
    --white-color: #fff;
    --disabled-color: #fff3;
}

html {
    font-size: 62.5%;
}

body {
    color: var(--white-color);
}

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: hidden;
    opacity: 0;
}

header.active {
    animation: show-header 1.5s linear forwards;
    animation-delay: 1.2s;
}

@keyframes show-header {
    100% {
        visibility: visible;
        opacity: 1;
    }
}

.logo {
    font-size: 3rem;
    color: var(--white-color);
    font-weight: 700;
}

nav a {
    font-size: 2rem;
    color: var(--white-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .5s;
}

nav a:hover,
nav a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 4rem;
    display: none;
}

.bars-box {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
}

.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: absolute;
    width: 100%;
    height: 100%;
    padding: 10rem 9% 2rem;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
}

section.active {
    animation: show-content 1.5s linear forwards;
    animation-delay: 1.6s;
}

@keyframes show-content {
    100% {
        visibility: visible;
        opacity: 1;
        overflow: auto;
    }    
}

.home {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.home-detail h1 {
    font-size: clamp(3.5rem, 10vw, 5.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 16s linear infinite;
    animation-delay: calc(-4s * 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 4s linear infinite;
}

@keyframes fill-text {
    10%,
    100% {
        width: 0;
    }
    70%,
    90% {
        width: 100%;
    }
}

.home-detail p {
    font-size: 1.6rem;
    margin: 1rem 0 2.5rem;
}

.home-detail .btn-sci {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    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: 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: 32vw;
    height: 32vw;
    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;
    width: 50rem;
    height: 50rem;
    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: 3rem;
    display: block;
    width: 85%;
    object-fit: cover;
    mix-blend-mode: lighten;
}

.heading {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.heading span {
    color: var(--main-color);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50rem, 1fr)); /* change it to 30rem later*/
    gap: 2rem;
}

.services-container .services-box {
    padding: 3rem 2.5rem;
    background: var(--second-bg-color);
    border: .2rem solid var(--second-bg-color);
    border-radius: 1rem;
    transition: .5s;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.services-box .icon {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.services-box .icon i {
    font-size: 4.5rem;
    transition: .5s;
}

.services-box:hover .icon :not(a i) {
    color: var(--main-color);
}

.services-box .icon a {
    display: inline-flex;
    background: var(--white-color);
    border-radius: 50%;
    padding: 1rem;
}

.services-box:hover .icon a{
    background: var(--main-color);
}

.services-box .icon a i {
    font-size: 3rem;
    color: var(--bg-color);
    transform: rotate(225deg);
}

.services-box .icon a:hover i {
    transform: rotate(180deg);
} 

.services-box h3 {
    font-size: 3rem;
    margin: .5rem 0 2rem;
}

.services-box:hover h3{
    color: var(--main-color);
}

.services-box p {
    font-size: 1.6rem;
}
.resume-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.resume-box {
    background: var(--second-bg-color);
    border-radius: 0.8rem;
    padding: 2rem;
    box-sizing: border-box;
}

.resume-box h2 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.resume-box .desc {
    margin: 2rem 0;
    font-size: 1.2rem;
    line-height: 1.6;
}

.resume-box .resume-btn {
    width: 100%;
    height: 5.3rem;
    background: var(--second-bg-color);
    border: 0.2rem solid var(--second-bg-color);
    font-size: 1.6rem;
    color: var(--white-color);
    margin-bottom: 1.5rem;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resume-box .resume-btn:hover {
    transform: translateY(-3px);
}

.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;
    margin-bottom: 2rem;
}

.resume-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-height: 40rem;
    overflow-y: auto;
    padding-right: 1rem;
}

.resume-list::-webkit-scrollbar {
    width: 0.7rem;
}

.resume-list::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 1rem;
    transition: background 0.3s;
}

.resume-list:hover::-webkit-scrollbar-thumb {
    background: var(--main-color);
}

.resume-item {
    background: var(--second-bg-color);
    border-radius: 0.8rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.resume-item:hover {
    transform: translateY(-5px);
}

.resume-item .year {
    color: var(--main-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.resume-item h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.resume-item .company,
.resume-item .company1 {
    position: relative;
    margin-left: 2rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

.resume-item .company::before,
.resume-item .company1::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -2rem;
    width: 0.8rem;
    height: 0.8rem;
    background: var(--main-color);
    border-radius: 50%;
}

/* Enhanced Scrollbar Styles for All Sections */
.resume-list,
.resume-detail.certificates .resume-list,
.resume-detail.experience .resume-list,
.resume-detail.education .resume-list,
.resume-detail.skills .resume-list {
    scrollbar-width: thick; /* For Firefox */
    scrollbar-color: var(--main-color) transparent;
}

/* Webkit Scrollbars (Chrome, Safari, Edge) */
.resume-list::-webkit-scrollbar,
.resume-detail.certificates .resume-list::-webkit-scrollbar,
.resume-detail.experience .resume-list::-webkit-scrollbar,
.resume-detail.education .resume-list::-webkit-scrollbar,
.resume-detail.skills .resume-list::-webkit-scrollbar {
    width: 12px; /* Increased from 0.7rem */
    height: 12px; /* For horizontal scrollbars if needed */
}

.resume-list::-webkit-scrollbar-thumb,
.resume-detail.certificates .resume-list::-webkit-scrollbar-thumb,
.resume-detail.experience .resume-list::-webkit-scrollbar-thumb,
.resume-detail.education .resume-list::-webkit-scrollbar-thumb,
.resume-detail.skills .resume-list::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 10px;
    border: 3px solid var(--second-bg-color);
}

.resume-list::-webkit-scrollbar-track,
.resume-detail.certificates .resume-list::-webkit-scrollbar-track,
.resume-detail.experience .resume-list::-webkit-scrollbar-track,
.resume-detail.education .resume-list::-webkit-scrollbar-track,
.resume-detail.skills .resume-list::-webkit-scrollbar-track {
    background: var(--second-bg-color);
    border-radius: 10px;
}

/* Hover Effects */
.resume-list:hover::-webkit-scrollbar-thumb,
.resume-detail.certificates .resume-list:hover::-webkit-scrollbar-thumb,
.resume-detail.experience .resume-list:hover::-webkit-scrollbar-thumb,
.resume-detail.education .resume-list:hover::-webkit-scrollbar-thumb,
.resume-detail.skills .resume-list:hover::-webkit-scrollbar-thumb {
    background: var(--main-color);
}

/* Specific Certificates Section Adjustments */
.resume-detail.certificates .resume-list {
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 2rem;
    max-height: 40rem;
    overflow-y: auto;
    padding-right: 1rem;
}

.resume-detail.certificates .resume-item {
    background: var(--second-bg-color);
    border-radius: 0.8rem;
    padding: 2.5rem;
    transition: transform 0.3s ease;
}

.resume-detail.certificates .resume-item:hover {
    transform: translateY(-5px);
}

.resume-detail.certificates .resume-item .year {
    color: var(--main-color);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.resume-detail.certificates .resume-item h3 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

.resume-detail.certificates .resume-item span.year {
    display: inline-block;
    font-size: 1.4rem;
    color: var(--text-color);
    position: relative;
    padding-left: 2rem;
}

.resume-detail.certificates .resume-item span.year::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background: var(--main-color);
    border-radius: 50%;
}
/* Skills Section */
.resume-detail.skills .resume-list {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    max-height: 40rem; /* Set a fixed max height */
    overflow-y: auto; /* Enable vertical scrolling */
    gap: 1.5rem;
    padding-right: 1rem; /* Space for scrollbar */
}

.resume-detail.skills .resume-list::-webkit-scrollbar {
    width: 0.7rem;
}

.resume-detail.skills .resume-list::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 1rem;
}

.resume-detail.skills .resume-item {
    align-items: center;
    justify-content: center;
    padding: 1rem;
    height: 12rem;
    position: relative; /* Needed for absolute positioning of tooltip */
}

.resume-detail.skills .resume-item i {
    font-size: 5rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.resume-detail.skills .resume-item span {
    position: absolute;
    top: 0rem;
    background: var(--main-color);
    color: var(--white-color);
    font-size: 1.2rem;
    padding: 0.3rem 1rem;
    border-radius: 0.4rem;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 1; /* Ensure tooltip appears above other elements */
}

.resume-detail.skills .resume-item:hover span {
    opacity: 1;
    transform: translateY(0);
}

/* About Section */
.resume-detail.about .resume-list {
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    max-height: 40rem;
    gap: 2.5rem;
}

.resume-detail.about .resume-item {
    background: transparent;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: auto;
}

.resume-detail.about .resume-item p {
    color: var(--main-color);
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
}

.resume-detail.about .resume-item p span {
    color: var(--white-color);
    font-size: 1.2rem;
    text-align: right;
}

ul {
  padding-left: 20px;
  list-style-type: disc;
}

ul li {
  margin-bottom: 10px;
  line-height: 1.6;
}



.portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.portfolio-detail {
    display: none;
}

.portfolio-detail.active {
      display: block;
}

.portfolio-box .numb {
    font-size: 8rem;
    -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: 1.6rem;
}

.portfolio-box .tech {
    margin: 2rem 0;
    color: var(--main-color);
    border-bottom: .1rem solid var(--white-color);
    padding-bottom: 2rem;
}

.portfolio-box .live-github a {
    position: relative;
    display: inline-flex;
    padding: 1.3rem;
    font-size: 3rem;
    color: var(--white-color);
    border-radius: 50%;
    background: var(--second-bg-color);
    transition: .5s;
}

.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(0deg);
}

.portfolio-box .live-github a span {
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%) scale(.9);
    font-size: 1.6rem;
    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 {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #323946; /* optional */
    height: inherit;
}

.portfolio-carousel .img-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 1rem;
}

.portfolio-box .navigation {
    text-align: right;
    margin-top: 2rem;
}

.portfolio-box .navigation button {
    display: inline-flex;
    margin-left: 1.6rem;
    padding: .4rem;
    background: var(--second-bg-color);
    border: .2rem solid var(--main-color);
    border-radius: .6rem;
    font-size: 4rem;
    color: var(--main-color);
    cursor: pointer;
}

.portfolio-box .navigation button.disabled {
    border-color: var(--second-bg-color);
    color: var(--disabled-color);
}

.portfolio-box .navigation .arrow-right {
    margin-right: 1.5rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: start;
}

.contact-box {
    width: 100%;
}

.contact-box:first-child {
    align-self: center;
}

.contact-box h2 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.contact-box p,
.contact-box .desc {
    font-size: 1.6rem;
    line-height: 1.6;
}

.contact-box .desc {
    margin: 1.5rem 0 2.5rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    gap: 1.5rem;
}

.contact-detail i {
    display: inline-flex;
    background: var(--second-bg-color);
    color: var(--main-color);
    font-size: 3rem;
    padding: 1.2rem;
    border-radius: .6rem;
    flex-shrink: 0;
}

.contact-detail .detail p:first-child {
    color: var(--main-color);
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

/* Contact Form Styles */
.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: 3.5rem;
    margin-bottom: 2rem;
}

.field-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.field-box input,
.field-box textarea {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-color);
    border: .15rem solid var(--bg-color);
    border-radius: .6rem;
    font-size: 1.6rem;
    color: var(--white-color);
    transition: border-color 0.3s ease;
}

.field-box textarea {
    grid-column: 1 / -1;
    height: 20rem;
    resize: none;
}

.field-box input:focus,
.field-box textarea:focus {
    border-color: var(--main-color);
    outline: none;
}

.contact-box .btn {
    margin-top: 2rem;
    cursor: pointer;
    width: 100%;
}
/* Responsive Media Queries */
/* Ultra-HD Responsive Adjustments (2560px and above) */
@media screen and (min-width: 2560px) {
    /* Global Scaling */
    html {
        font-size: 75%;
    }
    
    /* Header */
    header {
        padding: 3rem 8%;
    }
    
    .logo {
        font-size: 3.5rem;
    }
    
    nav a {
        font-size: 2.2rem;
        margin: 0 2rem;
    }
    
    /* Home Section */
    .home {
        padding: 0 8%;
    }
    
    .home-detail h1 {
        font-size: 6rem;
    }
    
    .home-detail h2 {
        font-size: 4rem;
    }
    
    .home-detail p {
        font-size: 2.2rem;
        line-height: 1.8;
    }
    
    .btn {
        padding: 1.8rem 4rem;
        font-size: 2rem;
    }
    
    .sci a i {
        font-size: 3.5rem;
    }
    
    .home-img .img-box {
        width: 45rem;
        height: 45rem;
    }
    
    /* Services Section */
    .services {
        padding: 15rem 10%;
    }
    
    .heading {
        font-size: 6rem;
        margin-bottom: 8rem;
    }
    
    .services-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 5rem;
        max-width: 2400px;
    }
    
    .services-box {
        padding: 4rem 3.5rem;
        border-radius: 1.5rem;
    }
    
    .services-box h3 {
        font-size: 2.8rem;
        margin: 2rem 0;
    }
    
    .services-box p {
        font-size: 2rem;
        line-height: 1.8;
    }
    
    .services-box .icon i {
        font-size: 5rem;
    }
    
    /* Resume Section */
    .resume-container {
        max-width: 2000px;
        margin: 0 auto;
        gap: 6rem;
        padding: 0 8%;
    }
    
    .resume-box h2 {
        font-size: 4rem;
    }
    
    .resume-box .desc {
        font-size: 1.8rem;
    }
    
    .resume-btn {
        height: 6rem;
        font-size: 1.8rem;
    }
    
    .resume-item {
        padding: 3rem;
    }
    
    .resume-item h3 {
        font-size: 2.5rem;
    }
    
    .resume-item p {
        font-size: 1.6rem;
    }
    
    /* Portfolio Section */
    .portfolio-container {
        max-width: 2000px;
        margin: 0 auto;
        gap: 6rem;
        padding: 0 8%;
    }
    
    .portfolio-detail h3 {
        font-size: 3rem;
    }
    
    .portfolio-detail p {
        font-size: 1.8rem;
    }
    
    .tech p {
        font-size: 1.6rem;
    }
    
    .live-github a {
        font-size: 1.8rem;
    }
    
    /* Contact Section */
    .contact-container {
        max-width: 2000px;
        margin: 0 auto;
        gap: 8rem;
        padding: 0 8%;
    }
    
    .contact-box h2 {
        font-size: 5rem;
    }
    
    .contact-box .desc {
        font-size: 2rem;
    }
    
    .contact-detail i {
        font-size: 4rem;
        padding: 1.8rem;
    }
    
    .contact-detail .detail p {
        font-size: 1.8rem;
    }
    
    .field-box input,
    .field-box textarea {
        padding: 2.5rem;
        font-size: 1.8rem;
    }
    
    .contact-box .btn {
        padding: 2rem 4rem;
        font-size: 2rem;
    }
    
    /* Extreme 4K+ Adjustments (3840px and above) */
    @media screen and (min-width: 3840px) {
        html {
            font-size: 130%;
        }
        
        .home-img .img-box {
            width: 55rem;
            height: 55rem;
        }
        
        .services-container {
            gap: 6rem;
        }
        
        .resume-container,
        .portfolio-container,
        .contact-container {
            max-width: 2400px;
        }
    }
}
/* Large devices (desktops, less than 1200px) */
@media screen and (max-width: 1200px) {
    html {
        font-size: 55%;
    }
    
    /* Add any other large screen adjustments here */
}

/* Medium devices (tablets, less than 992px) */
@media screen and (max-width: 992px) {
    header {
        padding: 2rem 4%;
    }
    
    section {
        padding: 10rem 4% 2rem;
    }
    
    /* Services grid adjustment */
    .services-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Resume section adjustments */
    .resume-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-box h2 {
        font-size: 3.8rem;
    }
    
    .contact-box .heading {
        font-size: 3rem;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media screen and (max-width: 768px) {
    /* Mobile menu */
    #menu-icon {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 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: .3s ease;
    }
    
    nav.active {
        left: 0;
    }
    
    nav a {
        display: block;
        margin: 2.5rem 0;
        font-size: 2rem;
    }
    
    /* Home section */
    .home {
        flex-direction: column-reverse;
        justify-content: center;
        gap: 2rem;
        text-align: center;
    }
    
    .home-img .img-box {
        width: 35rem;
        height: 35rem;
    }
    
    .home-detail .btn-sci {
        justify-content: center;
    }
    
    /* Portfolio section */
    .portfolio-container {
        grid-template-columns: 1fr;
    }
    
    .portfolio-container .portfolio-box:first-child {
        order: 1;
    }
    
    /* Contact form */
    .contact-box .field-box {
        grid-template-columns: 1fr;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
   
    
    .contact-box form {
        padding: 2rem 2.5rem 3rem;
    }
    
    .field-box {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-detail {
        margin: 1.5rem 0;
    }
    .resume-detail.certificates .resume-list {
        grid-template-columns: 1fr;
    }
    
    .resume-detail.certificates .resume-item {
        padding: 2rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media screen and (max-width: 576px) {
    html {
        font-size: 50%;
    }
    
    .home-img .img-box {
        width: 30rem;
        height: 30rem;
    }
    
    /* Services single column */
    .services-container {
        grid-template-columns: 1fr;
    }
    
    /* Center align text elements */
    .home-detail,
    .resume-detail h2,
    .resume-box .heading,
    .resume-box .desc,
    .resume-detail.about .resume-item,
    .services-box {
        text-align: center;
    }
    
    /* Stack social and button */
    .home-detail .btn-sci {
        flex-direction: column-reverse;
        align-items: center;
    }
    
    .home-detail .btn-sci .sci {
        margin-left: 0;
        margin-bottom: 2rem;
    }
    
    /* Contact form padding */
    .contact-box form {
        padding: 2.5rem 3rem 3.5rem;
    }
    
    .contact-box h2 {
        font-size: 3.5rem;
    }
    .contact-box h2 {
        font-size: 3.2rem;
    }
    
    .contact-box .heading {
        font-size: 2.8rem;
    }
    
    .contact-box form {
        padding: 1.8rem 2rem 2.5rem;
    }
    
    .contact-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .contact-detail i {
        margin-right: 0;
    }
    
    .field-box input,
    .field-box textarea {
        padding: 1.2rem;
        font-size: 1.5rem;
    }
    
    .field-box textarea {
        height: 15rem;
    }
}

/* Very small devices (less than 400px) */
@media screen and (max-width: 400px) {
    .home-img .img-box {
        width: 25rem;
        height: 25rem;
    }

    .contact-box h2 {
        font-size: 3.2rem;
    }
    
    .contact-box .heading {
        font-size: 2.8rem;
    }
    
    .contact-box form {
        padding: 1.8rem 2rem 2.5rem;
    }
    
    .contact-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .contact-detail i {
        margin-right: 0;
    }
    
    .field-box input,
    .field-box textarea {
        padding: 1.2rem;
        font-size: 1.5rem;
    }
    
    .field-box textarea {
        height: 15rem;
    }
    .resume-detail.certificates .resume-item h3 {
        font-size: 1.8rem;
    }
    
    .resume-detail.certificates .resume-item .year,
    .resume-detail.certificates .resume-item span.year {
        font-size: 1.3rem;
    }
    
    /* Adjust any other very small screen elements here */
}