* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

:root {
    --nav-bg-color: rgba(0, 0, 0, .1);
    --bg-color: rgb(62, 61, 61);
    --text-color: rgb(197, 196, 196);
    --btn-bg-color: rgb(33, 142, 33);
    --btn-gb-hover-color: rgb(46, 163, 46);
    --para-bg-color: rgb(111, 145, 139);

    /* main section */
    --main-bg-gradient: linear-gradient(45deg, rgb(207, 106, 106), blue);
}


section {
    padding: 6rem 20px;
    /* padding-top: 6rem; */
}

section h2 {
    text-align: center;
    margin-bottom: 10px;
}
/* ============================================================================================= */
/* Laptop views */

nav {
    /* border: 1px solid red; */
    background-color: var(--nav-bg-color);
    color: var(--text-color);
    width: fit-content;
    margin: auto;
    top: 20px;
    border-radius: 30px;
    padding: 5px 30px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    transition: all .3s ease;
    z-index: 100;
}

nav.scrolled {
  background-color: rgba(0, 0, 0, 0.9);
  top: 5px;
}

nav.hide {
    transform: translateX(-50%) translateY(-150%); /* slide up offscreen */
    opacity: 0; /* fade out */
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    /* border: 1px solid red; */
    padding: 0;
    margin: 0;
}

nav ul li {
    display: flex;
    list-style: none;
    justify-content: space-evenly;
    cursor: pointer;
    transition: all .3s ease-in-out;
    /* border: 1px solid red; */
}

nav ul li:hover {
    transform: translateY(-3px);
}

nav ul li a {
    padding: 10px 35px;
    margin: 0 5px;
    color: inherit;
    text-decoration: none;
}

/* ############################################################################################ */
/* main container or section 1 */

section:nth-child(1) {
    background: var(--main-bg-gradient);
    padding: 0;
}

.profile {
    display: flex;
    justify-items: center;
    align-items: center;
    margin: auto;
    height: 100vh;
    /* border: 1px solid red; */
    overflow: hidden;
}


.image img {
    /* width: 100%; */
    height: 100vh;
    max-height: 1200px;
    /* border: 1px solid red; */
}

.info {
    display: flex;
    flex-direction: column;
}

.info h1 {
    color: var(--text-color);
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.info .resume {
    background-color: var(--btn-bg-color);
    color: var(--text-color);
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: .2s ease-in-out;
}

.info .resume:hover {
    background-color: var(--btn-gb-hover-color);
    box-shadow: 1px 1px yellow;
}

/* ######################################################################################## */
/* section 2 or abouts */

section:nth-child(2) {
    background: linear-gradient(90deg, #8c52ff, #5ce1e6);
    text-align: justify;
}

section:nth-child(2) p {
    padding: 20px;
    margin: 0 20px;
    font-size: 1.02em;
}

section:nth-child(2) p::first-letter {
    color: red;
    font-size: 2rem;
}

section:nth-child(2) div {
    margin: 20px 15rem;
    background-color: #2a34403a;
    color: white;
    border-radius: 2em;
}


.box-base {
    width: 400px;
    height: 100px;
    margin: auto;
    background: linear-gradient(#fdd82e, #7b2d9f);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
}

.box-base .circle {
    border-radius: 50%;
    height: 150px;
    width: 150px;
    justify-content: center;
    align-items: center;
    text-align: center;
    display: flex;
    font-size: 2rem;
    background: green;
    color: var(--text-color);
}


/* ######################################################################################## */
/* section 3 or services */

section:nth-child(3) {
    background: linear-gradient(90deg, #fff7ad, #ffa9f9);
}

.container3 {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container3 .main-container {
    background-color: #6f6f6f;
    width:60%;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px 10px 20px;
    border-radius: 2em;
    box-shadow: 0 0 10px 5px rgba(146, 124, 124, .3);
    /* border: 1px solid red; */
}


.container3 .img-box {
    width: 40%;
    height: 200px;
    /* border: 1px solid red; */
    margin: 10px auto;
}

.container3 .img-box img {
    height: inherit;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 0 10px 2px rgba(108, 221, 157, 0.4);
}

.content-box {
    /* width: 90%; */
    height: 100px;
    overflow-x: auto;
    scroll-behavior: smooth;
    border-radius: 10px;
    /* border: 1px solid red; */
    margin: auto;
    padding: 10px;
    background: #a796c9;
    margin-bottom: 20px;
}

.content-box::-webkit-scrollbar {
    display: none;
}

.main-container .apply {
    width: fit-content;
    padding: 10px 15px;
    margin: auto;
    border: none;
    border-radius: 10px;
    transition: .2s ease-in-out;
}

.main-container .apply:hover {
    transform: translateY(-2px);
    background-color: rgb(1, 202, 1);
    color: white;
}

.container3 .slide-btn {
    width: 70px;
    height: 70px;
    justify-content: center;
    align-items: center;
    display: flex;
    border-radius: 30%;
    margin: 20px;
    background-color: black;
    color: white;
    font-weight: bold;
    transition: all .2s ease-in-out;
}

.container3 .slide-btn:hover {
    border-radius: 50%;
}

/* ############################################################################################# */
/* section4 or projects */

section:nth-child(4) {
    background: linear-gradient( 90deg, #1f1f1f, #737373);
    color: #fff;
    /* border: 1px solid red; */
}

.container4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 60%;
    margin: auto;
    height: 75vh;
    padding: 20px;
    place-items: stretch;
    overflow: hidden;
    scroll-behavior: smooth;
    background: rgb(203, 199, 199);
    border-radius: 1.5em;
}


.container4 > div {
    height: 90%;
    margin: 10px;
}


/* Left column (image box) */
.container4 .img-box {
    border-right: 5px solid black;
    padding-right: 20px;
}

/* Image styling */
.container4 img {
    width: 90%;
    border-radius: 10px;
    box-shadow: 0 0 15px 4px rgba(0, 0, 0, .2);
}

/* Right column (content box) */
.container4 > .img-box {
    display: flex;
    flex-direction: column;         /* stack content + scroller */
    justify-content: center;
    align-items: center;
    width: 100%;
}

.container4 .content-box {
    margin-left: 50px;
}

/* Scroller buttons */
.container4 .scroller {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    flex-direction: row;
    border-top: 1px solid rgba(111, 145, 139, .3);
    margin-top: 20px;
}


.container4 .scroller span {
    background-color: grey;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .3s ease-in-out;
}

.container4 .scroller span:hover {
    background-color: black;
}

/* ########################################################################################## */
/* Skills */

section:nth-child(5) {
    background: linear-gradient(180deg, #ab4ad8, #e2c544);
    color: white;
}

.skill-container {
    background: linear-gradient(rgba(192,192,192, .5), #efa9a9);
    width: 70%;
    max-height: 75vh;
    overflow: auto;
    scrollbar-width: thin;
    margin: auto;
    padding: 3rem;
    border-radius: 10px;
    margin-bottom: 3rem;
}


.skill-container > div {
    margin-bottom: .6rem;
    background-color: #ece7e753;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px #86777753;
}

.progress-cent {
    display: flex;
    float: right;
    
}

.skill-porgress {
    width: 100%;
    height: 5px;
    border-radius: 20px;
    overflow: hidden;
    appearance: none;
}

::-webkit-progress-bar {
    border-radius: 20px;
    background-color: white;
}

::-webkit-progress-value {
    background: linear-gradient(90deg, rgb(65, 189, 65), #f00);
    border-radius: 20px;
    transition: width 0.5s ease;
}

/* Firefox */
::-moz-progress-bar {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border-radius: 20px;
}

.coding-container {
    /* border: 1px solid red; */
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 20px;
    background-color: #000;
    border-radius: 20px;
    margin-top: 2rem;
}

.coding-container iframe {
    width: 340px;
    display: block;
    justify-content: center;
}



/* ########################################################################################## */
/* footer */

footer {
    background-color: #2c2929;
    color: #fff;
    text-align: center;
    padding: 20px;
    /* border: 1px solid red; */
}


footer .container {
    /* border: 1px solid red; */
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    height: 30vh;
    align-items: center;
    justify-content: center;
}

.social-media {
    background-color: black;
    width: fit-content;
    margin: auto;
    padding: 0 20px;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.social-media a {
    text-decoration: none;
    
}

.social-media span {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
    background-color: white;
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all .3s ease;
    cursor: pointer;
}

.social-media span:hover {
    transform: translateY(-5px);
    background-color: rgb(36, 25, 239);
}




/* ======================================================================= */
/* RESPONSIVE STYLES */
/* ======================================================================= */

/* Large desktops (above 1600px) */
@media screen and (min-width: 1600px) {
    .container3 .main-container {
        width: 50%;
        height: auto;
    }

    .container4 {
        width: 50%;
        height: auto;
    }

    .skill-container {
        width: 60%;
    }
}

/* Standard desktops / laptops (1025px – 1599px) */
/* Your current design already fits well for 14-inch (~1366px). */

/* Tablets landscape (768px – 1024px) */
@media screen and (max-width: 1024px) {
    nav ul li a {
        padding: 10px 20px;
    }

    .profile {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding: 20px;
    }

    .image img {
        width: 100%;
        height: auto;
    }

    .info h1 {
        font-size: 2.8rem;
    }

    section:nth-child(2) div {
        margin: 20px 10rem;
    }

    .container3 .main-container {
        width: 80%;
        height: auto;
    }

    .container4 {
        grid-template-columns: 1fr;
        width: 80%;
        height: auto;
    }

    .container4 .img-box {
        border-right: none;
        border-bottom: 4px solid black;
        padding: 10px;
    }

    .skill-container {
        width: 85%;
        padding: 2rem;
    }

    .coding-container {
        grid-template-columns: 1fr 1fr;
    }

    footer .container {
        grid-template-columns: 1fr 1fr;
        height: auto;
        gap: 20px;
    }
}

@media screen and (min-width: 1024px) {
    section:nth-child(2) p {
        font-family: cursive;
    }
}
@media screen and (max-width: 991px) {
    section:nth-child(2) p {
        font-family: sans-serif;
    }
}

/* Tablets portrait (600px – 767px) */
@media screen and (max-width: 767px) {
    section {
        padding: 20px;
    }

    nav {
        display: none;
    }

    .scrolled {
        display: none;
    }


    .info h1 {
        font-size: 2rem;
    }

    .info .resume {
        font-size: 1rem;
        padding: 8px 12px;
    }

    section:nth-child(2) div {
        margin: .3rem 5rem;
        border-radius: 10px;
    }

    section:nth-child(2) p {
        padding: 1rem;
        margin: 0;
    }

    .container3 .main-container {
        width: 100%;
        border-radius: 1em;
    }

    .container3 .img-box {
        width: 80%;
        height: auto;
        justify-content: center;
        display: flex;
    }

    .container3 .img-box img {
        width: inherit;
        height: inherit;
        justify-content: center;
    }

    .container3 .slide-btn {
        margin: 5px;
        padding: 5px;
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .main-container .apply {
        border-radius: 5px;
        padding: 5px 10px;
    }

    .content-box {
        height: auto;
        max-height: 200px;
    }

    .container4 {
        width: 90%;
        padding: 15px;
        border-radius: 10px;
    }

    .container4 .img-box img {
        width: 70%;
    }

    .container4 .content-box {
        margin: auto;
    }

    .skill-container {
        width: 95%;
    }

    .coding-container {
        grid-template-columns: 1fr;
    }

    footer .container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

}

/* Mobile (below 599px) */
@media screen and (max-width: 599px) {
    body {
        font-size: 0.9rem;
    }


    .profile {
        flex-direction: column;
        height: auto;
    }

    .info h1 {
        font-size: 1.8rem;
    }

    section:nth-child(2) div {
        margin: 0;
    }


    .container3 .img-box {
        width: 100%;
    }

    .container4 {
        width: 95%;
    }

    .container4 img {
        width: 100%;
    }

    .skill-container {
        width: 100%;
        padding: 1.5rem;
    }

    .coding-container iframe {
        width: 100%;
    }

    footer {
        padding: 15px;
    }

    footer .container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .social-media {
        padding: 0 10px;
    }

    .social-media span {
        width: 25px;
        height: 25px;
    }
}
