*{
    margin: 0;
    padding: 0;
    font-family: 'poppins' , sans-serif;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
body{
    background: #080808;
    color: #fff;
}
#header{
    width: 100%;
    height: 100vh;
    background-image: url(seg.png);
    background-size: cover;
    background-position:top 80px left 300px;
    background-repeat: no-repeat;
}
.container{
    padding: 18px 10%;
}

nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
nav ul li{
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
}
nav ul li a{
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    position: relative;
}
nav ul li a::after{
    content: "";
    width: 0;
    height: 3px;
    background: #ff7f50;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0.5s;
}
nav ul li a:hover::after{
    width: 100%;
}

.main-text{
    margin-top: 20%;
    font-size: 30px;
}

.main-text h1{
    font-size: 60px;
    margin-top: 15px;
}

.main-text h1 span{
    color:#ff7f50 ;
}
.background-image{
    position: absolute;
    right: 0;
    left:50%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 40%;
    border-radius: 15px;
    z-index: -1;
    object-fit: cover;
    -webkit-box-reflect: below 5px linear-gradient(transparent, rgba(255, 255, 255, 0.1));
    box-shadow: 0px 0px 20px rgba(255, 140, 0, 0.5);
}

/* animated text */
.animated-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.animated-text span{
    position: relative;
}

.animated-text span::before{
    content: "Youtuber";
    color: #ff7f50;
    animation: words 20s infinite;
}

.animated-text span::after{
    content: "";
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    background-color: #080808;
    border-left: 2px solid #ff7f50;
    right: -8px;
    animation: cursor .8s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
    to{
        border-left: 2px solid #ff7f5000;
    }
}

@keyframes words {
    0%,20%{
        content: "HTML & Css";
    }
    21%,40%{
        content: "Javascript ";
    }

    41%,60%{
        content: "React";
    }
    61%,80%{
        content: "Java";
    }
    81%,100%{
        content: "MySql";
    }
}

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

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

/* GENERAL */
* {
    margin: 0;
    padding: 0;
}

/* SECTIONS */
section {
    padding-top: 4vh;
    height: 96vh;
    margin: 0 10rem;
    box-sizing: border-box;
    min-height: fit-content;
}

.section-container {
    display: flex;
    margin-top: 10px;
}

/* PROFILE SECTION */
#profile {
    display: flex;
    justify-content: center;
    gap: 5rem;
    height: 80vh;
}

.section__pic-container {
    display: flex;
    height: 400px;
    width: 400px;
    margin: auto 0;
}

.section__text {
    align-self: center;
    text-align: center;
}

.section__text p {
    font-weight: 600;
}

.section__text__p1 {
    text-align: center;
}

.title {
    font-size: 3rem;
    text-align: center;
    color: #ff7f50;
}

#socials-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

/* ICONS */
.icon {
    cursor: pointer;
    height: 2rem;
}

/* BUTTONS */

/* ABOUT SECTION */
.text-container{
    margin-top: 130px;
}

#about {
    position: relative;
    height: 750px;
}

.about-containers {
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
}

.about-containers,
.about-details-container {
    display: flex;
}

.about-pic {
    border-radius: 2rem;
}

.arrow {
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
}

.details-container {
    padding: 1.5rem;
    flex: 1;
    background: white;
    border-radius: 2rem;
    border: 1px solid #ff7f50;
    box-shadow: 0px 0px 30px grey;
    text-align: center;
}

.section-container {
    gap: 4rem;
    height: 80%;
}

.section__pic-container {
    height: 400px;
    width: 400px;
    margin: auto 0;
    box-shadow: 0px 0px 30px grey;
    border-radius: 30px;
    border: 1px solid #ff7f50;
}

.icon h1{
    color: black;
}

.sub{
    display: inline-block;
    padding: 10px;
    font-weight: 700;
}

.details-container{
    background-color: #080808;
    margin-top: 30px;
    margin-left: -5px;
}

/* services */
#services{
    padding: 30px 0;
    margin-bottom: -50px;
}
.services-list, .work-list{
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    grid-gap: 40px;
    margin-top: 50px;
}
.sub-title{
    font-size: 3rem;
    font-weight: 700;
    color: #ff7f50;
    margin-left: 15px;
}

.services-list div{
    background: #262626;
    padding: 40px ;
    font-size: 13px;
    font-weight: 300;
    border-radius: 30px;
    transition: background 0.5s, transform 0.5s;
}
.services-list div i{
    font-size: 50px;
    color: #ff7f50;
    margin-bottom: 30px;
}

.services-list div h2{
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 15px;
}

.services-list div a{
    text-decoration: none;
    color: white;
    font-size: 10px;
    margin-top: 20PX;
    display: inline-block;
}
.services-list div:hover{
    background-color: #ff7f50;
    transform: translateY(-10px);
    color: #262626;
}

.services-list div a{
    font-size: 20px;
}

#portfolio{
    padding: 50px 0;
}

.work{
    border-radius: 10px ;
    position: relative;
    overflow: hidden;
}
.work img{
    width:100% ;
    border-radius: 10px;
    display: block;
    transition:transform 0.5s;
}
.layer{
    width: 100%;
    height: 0%;
    background: linear-gradient(rgba(0,0,0,0.6),#ff7f50);
    border-radius: 10px;
    position: absolute;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    font-size: 14px;
    transition: height 0.5s;
}
.layer h3{
    font-weight: 500;
    margin-bottom: 20px;
}
.layer a{
    margin-top: 20px;
    color: #ff7f50;
    text-decoration: none;
    font-size: 18px;
    line-height: 60px;
    background: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
}
.work:hover img{
    transform: scale(1.1);
}
.work:hover .layer{
    height: 100%;
}
.btn{
    display: block;
    margin: 50px auto;
    width: fit-content;
    border: 1px solid #ff7f50;
    padding: 14px 50px;
    border-radius: 6px ;
    text-decoration: none;
    color: white;
    transition: background 0.5s;
}
.btn:hover{
    background: #ff7f50;
}
.layer a i:hover{
    transform: rotate(90deg);
    color:black;
}
.layer a i{
    transition: 0.5s;
}

.row{
    display: flex;
}
.contact-left{
    flex-basis: 35%;
}
.contact-right{
    flex-basis: 65%;
}
.contact-left p{
    margin-top: 30px;
    margin-left: 15px;
}
.contact-left p i{
    color: #ff7f50;
    margin-right: 15px;
    font-size: 25px;
}
.social-icons{
    margin-top: 30px;
    margin-left: 15px;
}
.social-icons a{
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: #ababab;
    display: inline-block;
    transition: transform 0.5s;
}
.social-icons a:hover{
    color: #ff7f50;
    transform: translateY(-5px);
}
.btn.btn2{
    display: inline-block;
}
.btn2{
    width: fit-content;
    height: fit-content;
    padding: 10px 20px;
    margin-top: 18px;
}
.contact-right form{
    width: 100%;
}
form input, form textarea{
    width: 100%;
    border: 0;
    outline: none;
    background: #262626;
    padding: 15px;
    margin: 15px 0;
    color: #fff;
    font-size: 18px;
    border-radius: 6px;
}

form .btn2{
    padding: 14px 60px;
    font-size: 18px;
    margin-top: 20px;
    cursor: pointer;
    background-color: #080808;
}
nav .fa-solid{
    display: none;
}

/* EXISTING MEDIA QUERY FOR MAX-WIDTH: 600px */
@media only screen and (max-width:600px){
    #header{
        /* Adjust background position for smaller screens */
        background-position: center top 80px;
    }
    .main-text {
        margin-top: 100%;
        font-size: 16px;
    }
    .main-text h1{
        font-size: 30px;
    }
    .animated-text{
        font-size: 24px; /* Adjust animated text size for small screens */
        min-width: unset; /* Remove fixed min-width */
    }
    .background-image{
        /* Adjust background image for small screens */
        position: relative; /* Change from absolute to relative to flow with content */
        left: unset;
        right: unset;
        top: unset;
        transform: none;
        width: 80%; /* Make it wider */
        height: auto; /* Auto height to maintain aspect ratio */
        margin: 20px auto; /* Center it */
        display: block; /* Ensure it's a block element for margin auto to work */
    }

    nav .fa-solid{
        display: block;
        font-size: 25px;
    }
    nav ul{
        background: #ff7f50;
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100%;
        padding-top:50px ;
        z-index: 2;
        transition: right 0.5s;
    }
    nav ul li{
        display: block;
        margin: 25px;
    }
    nav ul .fa-solid{
        position: absolute ;
        top: 25px;
        left: 25px;
        cursor: pointer;
    }
    .sub-title{
        font-size: 40px;
    }
    .about-col-1,.about-col-2{ /* These classes aren't explicitly defined in HTML for flex-basis */
        flex-basis: 100%;
    }
    .about-col-1{
        margin-bottom: 30px;
    }
    .about-col-2{
        font-size: 14px;
    }
    .tab-links{
        font-size:16px;
        margin-right: 20px;
    }
    .section__pic-container{
        display: none; /* Hide the profile picture on small screens */
    }
    /* About section adjustments for smaller screens */
    #about {
        height: auto; /* Allow height to adjust */
        margin: 0 1rem; /* Reduce side margin */
        padding-top: 2vh; /* Adjust padding */
    }
    .section-container {
        flex-direction: column; /* Stack content vertically */
        gap: 2rem; /* Adjust gap */
    }
    .text-container {
        margin-top: 50px; /* Adjust margin for text */
    }
    .details-container {
        margin-left: 0; /* Remove negative margin */
        width: 100%; /* Ensure it takes full width */
        margin-bottom: 20px; /* Add some space below */
    }

    /* Services and Portfolio adjustments */
    .services-list, .work-list {
        grid-template-columns: 1fr; /* Stack columns on small screens */
        grid-gap: 20px; /* Reduce gap */
    }
    .services-list div {
        padding: 20px; /* Reduce padding */
    }

    /* Contact section adjustments */
    .row {
        flex-direction: column; /* Stack contact columns */
    }
    .contact-left, .contact-right {
        flex-basis: 100%; /* Make them full width */
    }
    .contact-left p, .social-icons {
        margin-left: 0; /* Remove left margin for better alignment */
        text-align: center; /* Center text and icons */
    }
    .contact-left p i {
        margin-right: 8px; /* Adjust icon spacing */
    }
    .social-icons a {
        margin: 0 10px; /* Adjust spacing between social icons */
    }
    form .btn2 {
        width: 100%; /* Make submit button full width */
    }

    /* Footer adjustments */
    footer {
        padding: 2rem 0; /* Adjust footer padding */
    }
    .footer-content {
        grid-template-columns: 1fr; /* Stack footer sections */
        padding: 0 1rem; /* Adjust padding */
        text-align: center; /* Center text */
    }
    .footer-section h3, .footer-section ul, .footer-section p {
        margin-bottom: 0.5rem; /* Reduce margin */
    }
    .footer-section ul li {
        margin-bottom: 0.2rem; /* Reduce margin */
    }
    .footer-bottom {
        padding-top: 1rem; /* Adjust padding */
    }
}

/* NEW MEDIA QUERY FOR MEDIUM SCREENS (e.g., tablets) */
@media only screen and (min-width: 601px) and (max-width: 1024px) {
    .container {
        padding: 18px 5%; /* Adjust container padding */
    }
    nav ul li {
        margin: 10px 15px; /* Adjust nav item spacing */
    }
    .main-text {
        margin-top: 25%; /* Adjust main text margin */
        font-size: 24px;
    }
    .main-text h1 {
        font-size: 45px;
    }
    .animated-text {
        font-size: 28px; /* Adjust animated text size */
    }
    .background-image {
        left: 55%; /* Adjust image position for tablets */
        width: 45%; /* Slightly larger */
        height: 45%;
    }

    section {
        margin: 0 5rem; /* Adjust section margin */
    }
    .title {
        font-size: 2.5rem; /* Adjust title size */
    }
    .section-container {
        gap: 2rem; /* Adjust gap in about section */
    }
    .section__pic-container {
        height: 300px; /* Adjust pic size */
        width: 300px;
    }
    .text-container {
        margin-top: 80px; /* Adjust margin for about text */
    }

    .services-list, .work-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Allow 2 columns on tablets */
        grid-gap: 30px; /* Adjust gap */
    }
    .sub-title {
        font-size: 2.5rem; /* Adjust sub-title size */
    }

    .row {
        flex-direction: row; /* Keep contact columns side-by-side if they fit */
        flex-wrap: wrap; /* Allow wrapping if content is too wide */
    }
    .contact-left, .contact-right {
        flex-basis: 50%; /* Distribute space evenly */
        padding: 0 15px; /* Add some padding */
    }
    .contact-left {
        text-align: left; /* Keep text left aligned */
    }
    .contact-left p, .social-icons {
        margin-left: 0; /* Remove left margin */
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Allow 2 or 3 columns in footer */
        padding: 0 1rem; /* Adjust padding */
    }
}

.text-container{
    margin-bottom: -40px;
}
.fa-bars{
    position: absolute;
    right: -50px;
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Skill cards styling */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: #1f1f1f;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff7f50;
}

.skill-level {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #ff7f50;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Project cards styling */
.project-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.project-link {
    padding: 0.5rem 1rem;
    background: #fff;
    color: #1f1f1f;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #ff7f50;
    color: #fff;
}

/* Footer styling */
footer {
    background: #1f1f1f;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ff7f50;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

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


     .main-text img{
        display: none; 

    }
    .container #sidemenu{
        display: none; /* Adjust container padding for small screens */
    }
    .main-text img{
        display: none; 

    }
    .main-text p{
        text-align: center; 
    }
    .main-text a{
        text-align: center; /* Center link on very small screens */
    };
    .animated-text {
       text-align: center; /* Adjust animated text size for very small screens */
    }
    .typing{
        text-align: center; /* Center the typing text */
    }
    .main-text .btn{
        display: block;
        margin: 20px auto;
        width: fit-content;
        text-align: center;
    }
    .main-text {
        display: block;
        margin: 0 auto;
        text-align: center;
        padding-top: 20px;
    }

    .main-text h1 {
        font-size: 40px;
        margin-bottom: 15px;
    }
    #id{
        margin-top: 10px;
    }
}
  /* Small devices (phones, 481px - 767px) */
  @media only screen and (min-width: 481px) and (max-width: 767px) {
    .main-text img{
        display: none; 

    }
       .main-text img{
        display: none; 

    }
    .container #sidemenu{
        display: none; /* Adjust container padding for small screens */
    }
    .main-text p{
        text-align: center; 
    }
    .main-text a{
        text-align: center; /* Center link on very small screens */
    };
    .animated-text {
       text-align: center; /* Adjust animated text size for very small screens */
    }
    .typing{
        text-align: center; /* Center the typing text */
    }
    .main-text .btn{
        display: block;
        margin: 20px auto;
        width: fit-content;
        text-align: center;
    }
    .main-text {
        display: block;
        margin: 0 auto;
        text-align: center;
        padding-top: 20px;
    }

    .main-text h1 {
        font-size: 40px;
        margin-bottom: 15px;
    }
    #id{
        margin-top: 10px;
    }
  }
  
  /* Medium devices (tablets, 768px - 991px) */
  @media only screen and (min-width: 768px) and (max-width: 991px) {
    .main-text img{
        display: none; 

    }
    .main-text p{
        text-align: center; 
    }
    .main-text a{
        text-align: center; /* Center link on very small screens */
    };
    .animated-text {
       text-align: center; /* Adjust animated text size for very small screens */
    }
    .typing{
        text-align: center; /* Center the typing text */
    }
    .main-text .btn{
        display: block;
        margin: 20px auto;
        width: fit-content;
        text-align: center;
    }
    .main-text {
        display: block;
        margin: 0 auto;
        text-align: center;
        padding-top: 20px;
    }

    .main-text h1 {
        font-size: 40px;
        margin-bottom: 15px;
    }
    #id{
        margin-top: 10px;
    }
  }
