
/* GENERAL STYES START */

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

*,
::before,
::after {
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
    text-decoration: none; 
    list-style-type: none;
    scroll-behavior: smooth; 
}


:root {
    --first-clr: #001B2E;
    --second-clr: #294C60;
    --third-clr: #39A0ED;
    --fourth-clr: #fff; 
}

body {
    font-famiLy: "Kanit", sans-serif; 
    color: var(--first-clr); 
}

section {
    padding: 1rem; 
}

/* GENERAL STYLES END */


/* START NAV MENU*/

.header {
    background-color: var(--fourth-clr);
    width: 100%; 
    padding: 1.3rem 1rem 1.3rem 1rem; 
    border: none; 
    display: flex;
    align-items: center; 
    justify-content: center; 

    position: fixed;
    top: 0; 
}


.nav__list {
    display: flex; 
    flex-direction: row;
    gap: 1.5rem; 
}


.nav__link {
    color: var(--first-clr); 
    text-transform: uppercase;
    font-size: 1.1rem; 
    font-weight: bold;
}

.nav__link:hover,
.nav__link:focus {
    display: block; 
    color: var(--third-clr);
    transition: all 0.3s ease-in-out; 
    transform: scale(1.2);
}

/* END NAV MENU*/

/* START WELCOME HOME SECTION */

.home {
    min-height: 100vh;
    display: flex;
    align-items: center; 
    justify-content: center; 
}

.home__text {
    display: flex; 
    flex-flow: column nowrap; 
    gap: 1rem; 
}


.span {
    display: block;
}

.span--hi {
    font-size: 2rem; 
    color: var(--third-clr);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.span--name {
    font-size: 2.5rem; 
    letter-spacing: 0.1rem;
}

.span--title {
    font-size: 1.3rem; 
    font-weight: 300; 
    color: var(--second-clr);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

/* END WELCOME HOME SECTION*/


/* START ABOUT SECTION */

.about {
    margin-bottom: 5rem; 
}

.about__container {
    display: flex; 
    flex-flow: row wrap; 
    justify-content: center; 
    align-items: center; 
    gap: 1rem; 
}

.about__img {
    max-width: 300px;  
}

.about__img img {
    display: block;
    max-width: 65%;  
    margin: 0 auto;
    border-radius: 20px;  
}

.about__text {
    max-width: 400px; 
    text-align: center; 
}

.about__text h2 {
    color: var(--third-clr);
}

.about__text p:first-child {
    font-weight: 300; 
}

/* END ABOUT SECTION */


/* START PROJECTS SECTION */

.projects {
    margin-bottom: 5rem; 
    text-align: center; 
}

.projects p:first-child  {
    font-weight: 300; 
}

.projects h2 {
    margin-bottom: 1.5rem; 
    color: var(--third-clr);
}

.projects__grid {
    max-width: 800px;
    margin-inline: auto;  
    display: grid; 
    gap: 1.5rem; 
}

.projects__grid:first-child {
    grid-area: one; 
}

.projects__grid:nth-child(2) {
    grid-area: two; 
}

.projects__grid:nth-child(3) {
    grid-area: three; 
}

.projects__grid:last-child {
    grid-area: four; 
}

.project-tile {
    max-width: 380px; 
    display: block; 
    padding-bottom: 0.5rem;
    margin-inline: auto; 

    background-color: var(--first-clr);
    color: var(--fourth-clr);
    
}

.project__img {
    max-width: 100%; 
}


.code {
    color: var(--first-clr);
}

.project-tile:hover .code,
.project-tile:focus .code {
    color: var(--third-clr);
    transition: all 0.3s ease-out; 
}

.btn {
    display: block; 
    max-width: 200px; 
    margin-inline: auto; 
    margin-block: 1rem; 
    padding: 0.25em 0.75em; 
    letter-spacing: 0.1rem;

    background-color: var(--first-clr);
    color: var(--fourth-clr);
}


.btn:hover,
.btn:focus {
    background-color: var(--third-clr);
    color: var(--fourth-clr);
}

/* END PROJECTS SECTION */

/* START CONTACT SECTION */

.contact {
    margin-bottom: 5rem; 
    text-align: center; 
}

.contact__text p:first-child  {
    font-weight: 300; 
}

.contact__text h2 {
    margin-bottom: 1.5rem; 
    color: var(--third-clr);
}

input, 
textarea {  
    padding: 0.3rem 0.25rem; 
    border: 1px solid var(--first-clr);
    border-radius: 5px; 
}

input:focus, 
textarea:focus {
    outline: none;
    border-color: var(--third-clr);
}


.contact__form {
    max-width: 500px; 
    margin-inline: auto; 
    display: grid;
    gap: 0.5rem;  
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
                            'name email'
                            'textarea textarea'
                            'submit submit' ;

}

input[type="text"] {
    grid-area: name;
}

input[type="email"] {
    grid-area: email;
}

textarea {
    grid-area: textarea;
    min-height: 150px;
}

.btn_submit {
    grid-area: submit;
    display: block;
    max-width: 200px; 
    margin-inline: auto; 
    margin-top: 0.5rem;
    color: var(--first-clr);
    letter-spacing: 0.1rem; 
    font-weight: 700;
    cursor: pointer; 
    padding: 0.3rem 0.25rem; 
    border: 1px solid var(--first-clr);
    border-radius: 5px; 
}




.btn_submit:hover,
.btn_submit:focus {
    background-color: var(--third-clr);
    color: var(--fourth-clr);
    outline: none;
    border-color: var(--third-clr);
}

/* END CONTACT SECTION */


/* START FOOTER */

.footer {
    padding: 2rem 1rem 2rem 1rem;
    display: flex; 
    gap: 1rem; 
    flex-flow: row wrap; 
    justify-content: space-around;
    align-items: center;
}

.footer p {
    font-size: 0.8rem; 
    font-weight: 300;
}

.social__icons {
    display: grid; 
    gap: 0.5rem; 
    grid-template-columns: repeat(4, 1fr);
    place-content: center;
}

.social__link {
    width: 30px;
    height: 30px; 
    border: 1px solid var(--first-clr);
    border-radius: 50%;
    display: grid;
    place-content: center; 
}

.social__link i {
    display: block; 
    font-size: 1.2rem; 
    color: var(--first-clr); 
}

.social__link:hover,
.social__link:focus {
    background-color: var(--third-clr);
    border-color: var(--third-clr);
    transition: all 0.3s ease-in-out; 
    transform: scale(1.2);
}

/* END FOOTER */


@media (min-width: 750px) {
    html {
        font-size: 19px;  
    }

    .about__container {
        flex-flow: row nowrap; 
    }

    .about__text {
        text-align: left; 
    }


    .social__link {
        width: 35px;
        height: 35px; 
    }


    .contact__form {
        max-width: 600px;
                                    
    }

    textarea {
        min-height: 200px;
    }

}


@media (min-width: 850px) {

    .about__img img {
        max-width: 70%;
    }


    .projects__grid {
        grid-template-areas: 
                        'one two'
                        'three four';
    }
    
}
