@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    font-weight: 200;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #080808;
    color: #fff;
}

#header {
    width: 100%;
    height: 100vh;
    background-image: url(images/background.webp);
    background-size: cover;
    background-position: center;
}

.container {
    padding: 0.6rem 5%;  
}

.logo {
    width: 16rem;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 0.6rem 1.2rem;
}


nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    font-weight: 300;
}

nav ul li a::after{
    content: '';
    width: 0;
    height: 0.2rem;
    background: #8161C2;
    position: absolute;
    left: 0;
    bottom: -0.4rem;
    transition: 0.5s;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-text h1{
    font-size: 1rem;
}

.header-text p{
    font-size: 3.75rem;
    margin-top: 1.25rem;
    font-weight: 700;
}

.header-text {
    margin-top: 20%;
}

.header-text span {
    color: #8161C2;
    font-weight: 700;
}

/* ------------------About----------------- */

#about{
    padding: 5rem 0;
    color: #fff;
}

.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.about-col-1 {
    flex-basis: 35%;
}

.about-col-1 img {
    width: 100%;
    border-radius: 0.9rem;
}

.about-col-2 {
    flex-basis: 60%;
}

.sub-title {
    font-size: 3.75rem;
    font-weight: 500;
    color: #fff;
}

.tab-titles {
    display: flex;
    margin: 1.25rem 0 2.50rem;
}

.tab-links{
    margin-right: 3rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.tab-links::after {
    content: '';
    width: 0;
    height: 0.19rem;
    background: #8161C2;
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    transition: 0.5s;
}

.tab-links.active-link::after {
    width: 50%;
}

.tab-contents ul li {
    list-style: none;
    margin: 0.6rem;
}

.tab-contents ul li span {
    color: #A58DD3;
    font-size: 1rem;
}

.tab-contents {
    display: none;
}

.tab-contents.active-tab {
    display: block;
}

/* ------------------Portfolio----------------- */

#portfolio {
    padding: 3rem 0;
}

.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
    gap: 2.5rem;
    margin-top: 3.125rem;
}

.work {
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.work img {
    width: 100%;
    border-radius: 0.5rem;
    display: block;
    transition: transform 0.5s;
}

.layer {
    width: 100%;
    height: 0;
    background: linear-gradient(rgba(0,0,0,0.6), #8161C2);
    border-radius: 0.5rem;
    position: absolute;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 2.5rem;
    text-align: center;
    transition: height 0.5s;
}

.layer h3 {
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.layer a {
    margin-top: 1.25rem;
    color: #8161C2;
    text-decoration: none;
    font-size: 1rem;
    line-height: 3.75rem;
    background: #fff;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    align-items: center;
}

.work:hover img {
    transform: scale(1.1);
}

.work:hover .layer {
    height: 100%;
}

.btn {
    display: block;
    margin: 3rem auto;
    cursor: pointer;
    width: fit-content;
    border: 1px solid #8161C2;
    padding: 1rem 3rem;
    border-radius: 0.5rem;
    background: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.5s;
    text-decoration: none;
}

.btn:hover {
    background: #8161C2;
}

/* ------------------Contact----------------- */

.contact-left {
    flex-basis: 35%;
}

.contact-left p {
    margin-top: 1rem;
}

.contact-left p i {
    color: #8161C2;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.contact-right {
    flex-basis: 60%;
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a{
    text-decoration: none;
    font-size: 2rem;
    color: #ababab;
    display: inline-block;
    padding-right: 0.8rem;
    transition: transform 0.5s;
}

.social-icons a:hover {
    color: #8161C2;
    transform: translateY(-0.5rem);
}

.btn-second {
    display: inline-block;
    background: #8161C2;
    cursor: pointer;
    border: none;
    padding: 1rem 3rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: 0.5s;
    text-decoration: none;
}

.btn-second:hover {
    background: #553aba;
}

.contact-right form {
    width: 100%;
}

form input, form textarea {
    width: 100%;
    border: 0;
    outline: none;
    background: #262626;
    padding: 1rem;
    margin: 1rem 0;
    color: #fff;
    font-size: 1rem;
    border-radius: 0.3rem;
}

form .btn-second {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 3rem;
    margin-top: 0.5rem;
    border-radius: 0.3rem;
}

footer p{
    width: 100%;
    text-align: center;
    padding: 1.5rem;
    background: #262626;
    font-size: 0.8rem;
}

/* ------------------Gracias por contactar----------------- */

.col-gra {
    background-color: #f2f2f2;
    padding: 2.5rem;
    margin: 1rem auto;
    border-radius: 0.5rem;
    max-width: 55rem;
}

.col-gra h1 {
    font-weight: 800;
    padding-bottom: 1rem;
    color: #23272a;
}

.col-gra p {
    color: #080808;
}

/* ------------------Media----------------- */
nav .fas {
    display: none;
}

@media only screen and (max-width: 48rem) {
    #header {
        background-image: url(images/background-phone.webp);
    }

    .header-text h1{
        font-size: 0.8rem;
    }
    .header-text p {
        font-size: 1.8rem;
    }

    .header-text {
        margin-top: 100%;
    }

    nav .fas {
        display: block;
        font-size: 1.5rem;    
    }
    nav ul {
        background: #080808;
        position: fixed;
        top: 0;
        right: -12.5rem;
        width: 8.5rem;
        height: 100vh;
        padding-top: 3.125rem;
        z-index: 2;
        transition: right 0.5s;
    } 
    nav ul li {
        display: block;
        margin: 1.56rem;
    }
    nav ul .fas {
        position: absolute;
        top: 1.56rem;
        left: 1.56rem;
        cursor: pointer;
    }
    .sub-title {
        font-size: 2rem;
    }
    .about-col-1, .about-col-2 {
        flex-basis: 100%;
    }
    .about-col-1 {
        margin-bottom: 1.875rem;
    }
    .about-col-2 {
        font-size: 0.875rem;
    }
    .tab-links {
        font-size: 1rem;
        margin-right: 1.25rem;
    }
    .logo {
        width: 12rem;
    }
    .contact-left, .contact-right {
        flex-basis: 100%;
    }
    .btn-second {
        margin-bottom: 1rem;
    }
}