@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --fs_h1: 80px;
    --fs_h2: 40px;
    --fs_h3: 32px;
    --fs_h4: 24px;
    --fs_p: 18px;
    --fs_bread: 14px;

    --h_padding: 0 1em;
    --h_margin: 6em 0 3em;
    --h_margin--desk: 8em 0 4em;
    --section_bp: 6em;

    --bg_sec: #E6EBE5;
    --bg_pri: #BFC6BE;
    --bg_alt: #F3F3F3;
    --fc_pri: #2B292C;
    --fc_sec: #5D705A;
}

* {
    font-family: "Rajdhani", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

h1 {
    font-size: var(--fs_h1);
    font-weight: 700;
}

h2 {
    font-size: var(--fs_h2);
    font-weight: 600;
}

h4 {
    font-size: var(--fs_h4);
    font-weight: 600;
}

.header {
    padding: var(--h_padding);
    background-color: var(--bg_pri);
    margin: var(--h_margin);
    color: var(--fc_pri);   
    @media screen and (min-width: 744px) {
    	margin: var(--h_margin--desk);
    }
}

@media screen and (max-height: 690px) {
    h1 {
        font-size: 36px;
    }
}

@media screen and (max-width: 600px) {
    h1 {
        font-size: 40px;
    }
    h2 {
        font-size: 32px;
    }
}

@media screen and (max-width: 450px) {
    h1 {
        font-size: 36px;
    }
    h2 {
        font-size: 24px;
    }
}

.fs-link {
    font-size: var(--fs_p);
    font-weight: 600;
}

.logo_strong {
    font-weight: bold;
}

p {
    font-size: var(--fs_p);
    font-weight: 400;
    color: var(--fc_pri);
}

a {
    text-decoration: none;
    color: var(--fc_pri);
    font-size: var(--fs_p);
}

.hidden-navbar {
    opacity: 0;
    transform: translateY(-100%);
}

.scrolled {
    padding: 1em 2em !important;
    background: var(--bg_alt);
}

input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
    transform: rotate(45deg);
}

input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
    transform: scaleY(0);
}

input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
    transform: rotate(-45deg);
}

body {
    background-color: var(--bg_alt);

    .desktop {
        display: inline-flex;
        justify-content: space-between;
        width: 100%;
        padding: 1.5em 2em;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
	transition: all .2s ease-in-out;
        @media screen and (max-width: 743px)  {
                display: none;
        }

        .logo-container {
            display: flex;
            align-items: center;
        }

        .nav_links {
            li {
                display: inline-flex;
                list-style-type: none;
                a {
                    color: var(--fc_pri);
                    font-weight: 500;
                    padding: .4em .6em;
                }

                .contact_link {
                    background: var(--fc_pri);
                    color: var(--bg_alt);
                }
            }
        }
    }

    .mobile {
        position: fixed;
        width: 100%;
        z-index: 999;
        transition: all 0.2s ease-in-out;
        display: flex;
        flex-direction: column;
        /* background: var(--bg_sec); */
        padding: 1.5em 2em;
        
        @media screen and (min-width: 744px) {
            display: none;
        }

        .logo-container_mobile {
            display: flex;
            justify-content: space-between;
            align-items: center;
 
            .menu_button--mobile {
                cursor: pointer;
                display: flex;
                position: relative;

                .checkbox {
                    position: absolute;
                    top: 0px;
                    width: 26px;
                    height: 20px;
                    display: block;
                    z-index: 999;
                    opacity: 0;
                    cursor: pointer;
                }
                .hamburger-lines {
                    display: block;
                    height: 20px;
                    width: 26px;
                    z-index: 2;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
        
                    .line {
                        display: block;
                        height: 4px;
                        width: 100%;
                        border-radius: 10px;
                        background: #0e2431;
                    }
        
                    .line1 {
                        transform-origin: 0% 0%;
                        transition: transform 0.4s ease-in-out;
                    }
        
                    .line2 {
                        transition: transform 0.2s ease-in-out;
                    }
        
                    .line3 {
                        transform-origin: 0% 100%;
                        transition: transform 0.4s ease-in-out;
                    }
                }
            }
        }
    }
    
    .mobile_menu {
        position: fixed;
        z-index: 9;
        top: 55px;
        width: 100cqw;
        transform: translateY(-150%);
        transition: all .2s ease-in-out;
        .nav_links-mobile {
            padding: 1em 2em;

            li {
                list-style-type: none;
                a {
                    list-style-type: none;
                    text-align: right;
                    margin-bottom: .5em;
                    cursor: pointer;
                    display: flex;
                    justify-content: flex-end;
    
                    &:hover {
                        font-weight: bold;
                    }
                    .contact_link {
                        background: var(--fc_pri);
                        color: var(--bg_alt);
                    }
                }
            }
        }
    }

    .mobile_menu--show {
        transform: translateY(0);
        opacity: 1;
    }

    .hidden {
        display: none;
        overflow: hidden;
    }

    .hero-container {
        container: hero / inline-size;
        background: url('../assets/bg/beskow.webp');
        background-size: contain;
        background-repeat: no-repeat;
        background-position-y: bottom;
        background-position-x: -100px;
        
        .hero_wrapper {
            display: grid;
            grid-template-columns: 20% 80%;
            grid-template-rows: 45% 55%;
            height: 100dvh;
            opacity: 0.95;


            .name_container {
                grid-area: 1 / 1 / span 2;
                display: inline-flex;
                padding: 1em;
                background-color: var(--bg_alt);
                position: relative;
    
                .hero_header {
                    display: flex;
                    justify-content: flex-end;
                    flex-grow: 1;
    
                    h1 {
                        align-self: flex-end;
                        writing-mode:vertical-rl;
                        transform: rotate(-180deg);
                        color: var(--fc_pri);
    
                    }
                }
                @media screen and (max-width: 600px) {
                    padding: 0 0 1em 0;
                }
            }
    
            .top_container {
                background-color: var(--bg_sec);
            }
            
            .bottom_container {
                background-color: var(--bg_pri);
                display: grid;
                grid-template-columns: 40% 60%;
                position: relative;
                @media screen and (max-width:1000px) {
                    grid-template-columns: 1fr;
                }
                .bottom_picture--container {
                    container-name: beskowbg;
                    container-type: inline-size;

                    .beskow-bg {
                        position: absolute;
                        bottom: 0;
                        opacity: .1;
                        z-index: 1;
                    }
                }
                .bottom_text--container {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    grid-area: 1 / 2;
                    padding: 0 2em;
                    justify-content: center;

                    h2 {
                        color: var(--fc_sec);
                    }
                    
                    p {
                        max-width: 393px;
                        color: var(--fc_pri);

                        @media screen and (max-width: 1000px) {
                            font-size: var(--fs_bread);
                        }
                    }
                }
            }
        }


        @container beskowbg (inline-size <= 803px) {
            .beskow-bg {
                max-width: 540px;
                max-height: 100dvh;
                left: -200px;
            }
        }
        @container beskowbg (max-height < 690px) {
            .beskow-bg {
                max-width: 300px;
                display: none;
            }
        }
    }

    .about_wrapper {
        display: grid;
        grid-template-columns: 3fr;
        margin: 0 auto;
        padding-bottom: var(--section_bp);
        .about_left--container {
            display: flex;
            align-items: center;
            flex-direction: column;
            margin: 0 auto;
            
            .about_text {
                padding: 0 2rem;
                color: var(--fc_pri);
                display: grid;
                grid-template-rows: repeat(4, 1fr);
                gap: 10px;
                @media screen and (min-width: 743px) {
                    max-width: 1200px;
                    display: grid;
                    grid-template-columns: 1fr 1fr;
                    grid-template-rows: auto;
                    gap: 20px;
                   
                }
                p {
                    font-size: var(--fs_p);
                    margin-bottom: .5em;

                    @media screen and (max-width: 1000px) {
                        font-size: var(--fs_bread);
                    }
                }

               

                .about_text--container {
                    display: grid;
                    grid-template-columns: 25% 75%;

                    @media screen and (min-width: 743px) {
                        max-width: 500px;
                        padding: 2em;
                    }
                    .left_about--container {
                        padding-right: 1em;
                        
                        img {
                            width: 80%;
                            padding-top: 1em;
                        }
                    }
                }
            }
        }

        .about_right--container {
            padding: 2em;

            .about-info {
                height: 100%;
                padding: 1.5em;
                background-color: var(--fc_sec)
            }

        }
    }

    .portfolio_container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-bottom: var(--section_bp);
        background-color: var(--bg_sec);

        .portf_cards {
            display: flex;
            width: 100%;
            flex-direction: column;
            overflow: hidden;
	    padding: 2em 0;
	    
            
	    @media screen and (max-width: 743px) {
	    	background-color: var(--bg_sec);
		padding-top: 0;
 	    }
	    .card_buttons {
                margin: 10px 0;
                display: flex;
                width: 100%;
                justify-content: space-between;
                @media screen and (min-width: 744px) {
                    display: none;
                }
                .card_button {
                    font-size: 1rem;
                    margin: 0 10px;
                    padding: 0.5rem 0.8rem;
                    cursor: pointer;
                    color: #454545;
                    height: 40px;
                    width: 40px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    outline: none;
                    border: none;
                }
            }  
        }

        .portf_cards > .cards_container {
            display: grid;
            width: 100%;
            grid-template-columns: repeat(4, 100%);

            @media screen and (min-width: 744px) {
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
                grid-template-rows: auto;
                max-width: 1200px;
                margin: 0 auto;
                gap: 20px;
		
                .card {      
                    transform: scale(1) translate(-0%) !important;
		    .card_text {
                        h1 {
                            font-size: 32px;
                        }
                        h2 {
                            font-size: var(--fs_h4);
                            font-weight: 600;
                            margin-bottom: 24px;
			}
                    }
                }

                .active {
                    transform: scale(1) translateX(-0%);
                }
            }
            
            .card {
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding: 20px;
		padding-top: 0;
                width: 100%; 
                transform: translateX(0%) scale(0.9);
                transition: all 0.7s ease;                
                .card_text {
                    h2 {
			font-size: var(--fs_h4);
                        margin-bottom: 24px;
                    }
                }
                .card_links {
                    margin-top: 1em;
                    display: flex;
                    align-items: center;
                    justify-content: flex-end;
                    gap: 10px;

                    a {
                        display: flex;
                    }
                }
            }

            .active {
                transform: scale(1) translateX(-0%);
            }
        }

    }

    .skills_container {
        display: flex;
        flex-direction: column;
	background-color: white;
        align-items: center;
        padding-bottom: var(--section_bp);

        .skills_header {
            padding: 0 1em;
            background-color: var(--bg_pri);
            margin-bottom: 4em;
        }

        .skills {
            display: inline-flex;
            gap: 30px;
            flex-wrap: wrap;
            max-width: 900px;
            padding: 2em;
            .skill_item {
                display: flex;
                margin: 0 auto;
                justify-content: center;
                align-items: center;
                height: 44px;
                width: 44px;
                
                @media screen and (min-width: 744px) {
                    height: 64px;
                    width: 64px;
                }
                
                .skills_img {
                    height: 40px;
                    filter: grayscale(.4);
                    @media screen and (min-width: 744px) {
                        height: 64px;
                    }
    
                }
            }
        }
    }

    .footer {
        background-color: #2B292C;
        color: var(--bg_alt);
        
        display: flex;
        flex-direction: column;
        
        align-items: center;
        .footer_header {
            padding: 0 1em;
            background-color: var(--bg_pri);
            margin-bottom: 4em;
            color: var(--fc_pri);
        }
        .footer_container {
            padding: 2em 2em 0 2em;
            margin: 0 auto;
            max-width: 600px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            p {
                font-size: var(--fs_bread);
                font-weight: 400;
                color: var(--bg_sec);
            }
            
            .contact {
                display: grid;
                grid-template-columns: 3fr 2fr 3fr;
                place-items: center;
                text-align: center;
		    p {
			font-size: var(--fs_h4);
			font-weight: 600;
		    }
                    a {
                        color: var(--bg_sec);
                        font-weight: 500;
                        font-size: 14px;

                        &:hover {
                            text-decoration: underline;
                        }
                    }
            }

            .social {
                margin: 0 auto;
                display: flex;
                justify-content: space-between;
                max-width: 900px;
                gap: 30px;
                padding-top: 3em;


                img {
                    max-width: 24px;
                    max-height: 24px;

                    @media screen and (min-width: 744px) {
                        max-width: 44px;
                        max-height: 44px; 
                    }
                }
            }

            .bottom_text {
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 4em 0 .1em;
            	opacity: .6;
	    }
        }
    }
}
