@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;1,400;1,700&display=swap');

/* font-family: 'Roboto', sans-serif; */
:root {
    --primary: #b241ef;
    --normal: #ffffff;
    --black: #13131a;
    --bg: #0c1013;
    --danger: #eb3820;
    --border: 0.1rem solid rgba(255, 255, 255, 0.3);


    --container-width-lg: 80%;
    --container-width-md: 90%;
    --container-width-sm: 94%;
}

* {
    margin: 0;
    padding: 0;
    outline-offset: none;
    border: none;
    box-sizing: border-box;
    text-decoration: none;
    text-transform: capitalize;
    list-style: none;
    transition: all 0.5s linear;
    scroll-behavior: smooth;
}

/* custom scroll bar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--normal);
}

::-webkit-scrollbar-thumb {
    background: var(--black);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--danger);
}

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

body {
    line-height: 1.7;
    color: var(--normal);
    background-color: var(--bg);
    font-family: 'Roboto', sans-serif;
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;
}

section {
    padding: 6rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
}

h1,
h2,
h3,
h4,
h5 {
    line-height: 1.2;
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

a {
    color: var(--normal);
}

img {
    width: 100%;
    object-fit: cover;
    display: block;
    padding: 5%;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--black);
    padding: 0.5rem 2rem;
    border: 1px solid transparent;
    border-radius: 0.3rem;
    font-weight: bold;
    cursor: pointer;
}

.btn:hover {
    color: var(--primary);
    background-color: transparent;
    border-color: var(--primary);
}

.border-bottom {
    text-align: center;
    display: inline-block;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    margin-bottom: 2.5rem;
}

nav {
    background-color: var(--black);
    width: 100vw;
    height: 5rem;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.nav_container {
    display: flex;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}

.nav_container span {
    color: var(--primary);
}

.nav_container h3::first-letter {
    font-size: 2rem;
}

.nav_container h3:hover {
    color: var(--primary);
    transform: rotateX(360deg);
    transition-duration: 1.2s;
}

nav button {
    display: none;
}

.nav_menu {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav_menu a {
    font-size: 1rem;
}

.nav_menu a:hover {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.3rem;
    /* background-color: var(--black); */
}


/* ==================HEADER======================== */

header {
    position: relative;
    top: 5rem;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: var(--black);
}

.header_container {
    display: flex;
    align-items: center;
    position: relative;
}

.header_left {
    flex: 1;
}

.header_right {
    flex: 1;
}

.header_right .text-1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.header_right .text-2 {
    font-size: 3rem;
    font-weight: 400;
}

.header_right .text-3 {
    font-size: 2.5rem;
    margin-bottom: 0.3rem 0;
}

.header_right .text-3 span {
    color: var(--primary);
    font-weight: bold;
}


/* ==================About Me=================== */

.about {
    text-align: center;
}

.about_container {
    display: flex;
    margin: auto;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2.5rem;
}

.about_container .about_img {
    border: 4px solid var(--primary);
    border-radius: 50%;
    overflow: hidden;
    max-width: 12.5rem;
    max-height: 12.5rem;
    margin-left: 2rem;
    position: relative;
    align-items: center;
    margin-bottom: 2rem;
}

.about_container .about_text {
    max-width: 70%;
    text-align: justify;
    line-height: 1.5rem;
    letter-spacing: 0.5px;
    padding-bottom: 2.5rem;
}

.about_container .about_text p {
    margin-bottom: 0.7rem;
}

.about_container .about_text .text {
    margin-bottom: 1rem;
}

.about_container .about_text .text span {
    color: var(--primary);
}



/* ===========Services================== */

.services {
    text-align: center;
    margin-top: -5rem;
}

.services_container .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.services_container .cards .card {
    background-color: var(--primary);
    padding: 1.5rem 1rem;
    margin: 0 1.5rem;
    cursor: pointer;
    position: relative;
}

.sbox i {
    font-size: 2rem;
    width: 4rem;
    height: 4rem;
    color: var(--bg);
    border: 1px solid gray;
    border-radius: 50%;
    padding: 0.955rem;
    transition: all 1s;
}

.sbox h3 {
    font-size: 1.2rem;
    color: black;
}

.sbox p {
    margin: 1.2rem 0;
    color: var(--bg);
}

.sbox a {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 400;
    padding: 0.3rem 1rem;
    background-color: var(--bg);
    border-radius: 1rem;
}

.sbox a:hover {
    background-color: var(--normal);
    border: 2px solid var(--danger);
    color: var(--danger);
}

.services_container .cards .card:hover .sbox i {
    background-color: var(--bg);
    color: #eb3820;
}

.services_container .cards .card::after {
    content: "";
    height: 100%;
    width: 100%;
    background-color: var(--normal);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.5s;
}

.services_container .cards .card:hover::after {
    transform: rotate(10deg);
}



/* =================My Skill================== */

.skills .new {
    text-align: center;
}

.skills_container {
    display: flex;
    margin: auto;
    position: relative;
    flex-direction: column;
    padding: 1.6rem 1.8rem;
    max-width: 40rem;
    background-color: var(--black);
    border-radius: 0.7rem;
    box-shadow: 0.3rem 0.3rem 1.2rem rgba(0, 0, 0, 0.2);
}

.skills_container .bar {
    margin: 1.2rem 0;
}

.skills_container .bar:first-child {
    margin-top: 0rem;
}

.skills_container .bar .info {
    margin-bottom: 0.3rem;
}

.skills_container .bar .info span {
    font-weight: 500;
    font-size: 1rem;
    opacity: 0;
    animation: showText 0.5s 1s linear forwards;
}

@keyframes showText {
    100% {
        opacity: 1;
    }
}

.skills_container .bar .progress-line {
    height: 10px;
    width: 100%;
    background-color: var(--normal);
    position: relative;
    transform: scaleX(0);
    transform-origin: left;
    border-radius: 0.7rem;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05), 0 1px rgba(255, 255, 255, 0.8);
    animation: animate 1s cubic-bezier(1, 0, 0.5, 1) forwards;
}

@keyframes animate {
    100% {
        transform: scaleX(1);
    }
}

.bar .progress-line span {
    height: 100%;
    position: absolute;
    border-radius: 0.7rem;
    transform: scaleX(0);
    transform-origin: left;
    background-color: var(--primary);
    animation: animate 1s 3s cubic-bezier(1, 0, 0.5, 1) forwards;
}

.bar .progress-line.html span {
    width: 90%;
}

.bar .progress-line.css span {
    width: 80%;
}

.bar .progress-line.react span {
    width: 18%;
}

.bar .progress-line.javascript span {
    width: 80%;
}

.bar .progress-line.mysql span {
    width: 19%;
}

.bar .progress-line.cSharp span {
    width: 15%;
}

.bar .progress-line.aspNet span {
    width: 17%;
}

.progress-line span::before {
    position: absolute;
    content: "";
    top: -0.7rem;
    right: 0;
    height: 0;
    width: 0;
    border: 0.5rem solid transparent;
    border-bottom-width: 0rem;
    border-right-width: 0rem;
    border-top-color: var(--bg);
    opacity: 0;
    animation: showText2 0.5s 1s linear forwards;
}

.progress-line span::after {
    position: absolute;
    top: -1.8rem;
    right: 0;
    font-weight: 500;
    background: #000;
    color: #fff;
    padding: 1px 0.5rem;
    font-size: 0.7rem;
    border-radius: 0.2rem;
    opacity: 0;
    animation: showText2 0.5s 1s linear forwards;
}


@keyframes showText2 {
    100% {
        opacity: 1;
    }
}

.progress-line.html span::after {
    content: "90%";
}

.progress-line.css span::after {
    content: "60%";
}

.progress-line.react span::after {
    content: "18%";
}

.progress-line.javascript span::after {
    content: "50%";
}

.progress-line.mysql span::after {
    content: "19%";
}

.progress-line.cSharp span::after {
    content: "15%";
}

.progress-line.aspNet span::after {
    content: "17%";
}




/* ===================Portfolio===================== */


.portfolio_container {
    text-align: center;
    margin-top: 3rem;
}

.gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 auto;
    background-color: var(--black);
    border-radius: 2rem;
}

.gallery a {
    width: 20rem;
    height: 15rem;
    margin: 1.2rem;
    border-radius: 0.3rem;
    overflow: hidden;
    box-shadow: 0.3px 5px var(--primary);
}

.gallery a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery a img:hover {
    transform: scale(1.2);
}





/* =====================Courses=================== */


.courses {
    text-align: center;
    margin-top: 2rem;
}

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

.course {
    background-color: var(--black);
    text-align: center;
    border: 2px solid transparent;
}

.course:hover {
    border-color: var(--primary);
    background-color: transparent;
}

.course_info {
    padding: 2rem;
}

.course_info p {
    margin: 1.2rem 0 2rem;
    font-size: 0.9rem;
}



/* =========================FAQ============================== */
.faqs {
    text-align: center;
    margin-top: 2rem;
}

.faqs_container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background-color: var(--black);
    box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
    padding: 1rem;
    border-radius: 1rem;
}

.faq {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    background-color: var(--danger);
    border-radius: 1rem;
    text-align: justify;
    cursor: pointer;
    margin: 1rem;
}

.faq h4 {
    font-size: 1rem;
}

.faq_icon {
    align-self: flex-start;
    font-size: 1.3rem;
}

.faq p {
    margin-top: 0.7rem;
    display: none;
}

/* for a js event */
.faq_open p {
    display: block;
}





/* ======================footer========================== */


.footer_logo h4::first-letter {
    font-size: 1.8rem;

}

.footer_logo h4:hover {
    color: var(--primary);
    transform: rotateX(360deg);
    transition-duration: 1.4s;
}

.footer_logo span {
    color: var(--primary);
}

.footer {
    padding-bottom: 5rem;
    background-color: var(--black);
    font-size: 0.9rem;
}

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

.footer_container>div h4 {
    margin-bottom: 1.2rem;
}

.footer1 p {
    margin: 0 0 2rem;
}

footer ul li {
    margin-bottom: 0.7rem;
}

footer ul li:hover {
    text-decoration: underline;
    color: var(--primary);
}

.footer4 .mail {
    text-transform: lowercase;
}

.footer_social {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
    margin-top: 2rem;
}


/* =================== */

.footer_copy {
    text-align: center;
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 3px solid var(--danger);
}





/* ======================MEDIA QUERIES TABLET====================== */


@media screen and (max-width:1024px) {
    .container {
        width: var(--container-width-md);
    }

    h1,
    h2,
    h3,
    h4,
    h5 {
        line-height: 1;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    .header_right .text-1 {
        font-size: 1.2rem;
    }

    .header_right .text-2 {
        font-size: 2rem;
    }

    .header_right .text-3 {
        font-size: 1.5rem;
    }

    .header_right .text-3 span {
        font-weight: 300;
    }

    .btn {
        padding: 0.3rem 1.2rem;
    }

    /* ======NAVBAR OPEN====== */

    nav button {
        display: inline-block;
        background: transparent;
        font-size: 1.8rem;
        color: var(--normal);
        cursor: pointer;

    }

    nav button#close-menu-btn {
        display: none;
    }

    .nav_menu {
        position: fixed;
        top: 5rem;
        right: 5%;
        gap: 0;
        height: fit-content;
        width: 18rem;
        flex-direction: column;
        display: none;
    }

    .nav_menu li {
        width: 100%;
        height: 3rem;
        animation: animateNavItems 0.2s linear forwards;
        transform-origin: top right;
        opacity: 0;
    }

    .nav_menu li a {
        background-color: var(--primary);
        box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
        width: 100%;
        height: 100%;
        display: grid;
        color: var(--bg);
        place-items: center;
    }

    .nav_menu li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav_menu li:nth-child(3) {
        animation-delay: 0.4s;
    }

    .nav_menu li:nth-child(4) {
        animation-delay: 0.6s;
    }

    .nav_menu li:nth-child(5) {
        animation-delay: 0.8s;
    }

    .nav_menu li:nth-child(6) {
        animation-delay: 1s;
    }

    .nav_menu li:nth-child(8) {
        animation-delay: 1.2s;
    }

    @keyframes animateNavItems {
        0% {
            transform: rotateZ('-90deg');
        }

        100% {
            transform: rotateZ('0');
            opacity: 1;
        }
    }

    .services_container .cards {

        grid-template-columns: repeat(2, 1fr);
        row-gap: 1.5rem;
    }

    .services_container .cards .card {
        padding: 2rem 0.3rem;
        margin: 0 0.5rem;
    }

    .services_container .cards .card:hover::after {
        transform: rotate(5deg);
    }

    .gallery a {
        width: 18rem;
        height: 14rem;
        margin: 1.2rem;
        border-radius: 0.3rem;
        overflow: hidden;
        box-shadow: 0.3px 5px var(--primary);
    }

    .course_container {
        grid-template-columns: repeat(2, 1fr);

    }

    .faqs_container {
        grid-template-columns: 1fr;

    }

    .faq {
        padding: 1.5rem;
    }

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

}



/* ========MEDIA QUERIES (MOBILE)======== */
@media screen and (max-width:600px) {
    .container {
        width: var(--container-width-sm);
    }

    .nav_menu {
        right: 3%;
    }

    .header_right .text-1 {
        font-size: 1rem;
    }

    .header_right .text-2 {
        font-size: 1.2rem;
    }

    .header_right .text-3 {
        font-size: 1.2rem;
    }

    .header_right a {
        margin-bottom: 0.3rem;
    }

    .btn {
        padding: 0.3rem 1rem;
    }

    .about_container {
        flex-direction: column;
    }

    .services_container .cards {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 3rem;
    }

    .services_container .cards .card {
        padding: 3rem 1rem;
        margin: 1rem 1rem;
    }

    .services_container .cards .card:hover::after {
        transform: rotate(5deg);
    }

    .gallery a {
        width: 25rem;
    }

    .courses_container {
        grid-template-columns: 1fr;
        width: 80%;
    }

    .courses_container .course {
        margin-bottom: 1rem;
    }

    .footer_container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer_social {
        justify-content: center;
    }
}



/* ================small Device============================== */

@media screen and (max-width:400px) {
    .header_container {
        flex-direction: column;
    }

    .header_left_img img {
        width: 50%;
        height: auto;
        margin: 0 auto;
    }

    .course_container {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 2rem;
    }
    .faq h4 {
        font-size: 0.7rem;
    }
    
    .faq_icon {
        align-self: flex-start;
        font-size: 1rem;
    }
    
    .faq p {
        font-size: 0.8rem;
    }
}