/*
TABLE OF CONTENT
=======================
======= 1. imports
======= 2. resets
======= 3. general
======= 4. header
======= 5. cards - general
======= 6. cards - specific
======= 7. cards - footer
======= 8. media queries
*/


/* =======================
======= 1. imports =======
======================= */

@import url('https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Baloo+Tamma+2:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600&display=swap');


/* =======================
======= 2. resets ========
======================= */

*, 
*::before, 
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

/* =======================
======= 3. general ========
======================= */


*:hover, 
*:focus {
    transition: 250ms ease-out;
}

:root {
    --clr-main: rgb(0, 0, 0);
    --clr-txt-main: rgb(159, 175, 17);
    --clr-sec: rgb(212, 208, 199);
    --clr-sec-contr: rgb(46, 46, 46);
    --clr-warn: rgb(95, 13, 13);

    --clr-trans: rgba(0, 0, 0, .6);
    --clr-trans-dark: rgba(0, 0, 0, .80);
    --clr-trans-orn: rgba(159, 175, 17, .75);

    --clr-html: #e04923;
    --clr-css: #006eb8;
    --clr-js: #254203;
    
    --fnt-head: 'Averia Serif Libre', cursive;    
    --fnt-main: 'Baloo Tamma 2', cursive;
    --fnt-sec: 'Orbitron', sans-serif;

    --ftn-wgh-lgh: 100;
    --ftn-wgh-nrl: 400;
    --ftn-wgh-bold: 600;
    --ftn-wgh-big: 700;

    --ln-hgh-cap: 1;
    --ln-hgh-nor: 1.6;
}

html {
    scroll-behavior: smooth;
  }

  body {
    background-image: url('pics/back_coding.png');
    background-attachment: fixed;
    background-color: var(--clr-trans-orn);
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    font-family: var(--fnt-sec);
  }

  /* =======================
======= 4. main grid ========
======================= */


.main__grid {
    /* display: grid;
    grid-template-columns: 1fr 18fr 1fr;
    grid-template-rows: 1fr 5fr 1fr;
    grid-template-areas: '. . .'
    '. articles .'
    '. . .'; */
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

  /* =======================
======= 5. nav ========
======================= */

nav {
    background-color: var(--clr-trans-dark);
    /* opacity: 0.95; */
    padding: .5rem 0;
    font-size:  calc(.4rem + .7vh);
    color: var(--clr-trans-orn);
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    grid-template-rows: auto;
    grid-template-areas: 'logo menu home';
    position: sticky;
    z-index: 9;
    top: 0;
}

.logo {
    width: calc(.7em + 3vw);
    height: calc(.7em + 3vw);
    grid-area: logo;
    margin: auto;
}

.logo:hover,
.logo:focus {
    opacity: 0.5;
}

.menu {
    grid-area: menu;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.menu a {
    color: var(--clr-txt-main);
}

.menu a:hover,
.menu a:focus {
    opacity: .6;
}

#home {
    grid-area: home;
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-icons {
    color: var(--clr-txt-main);
    font-size: calc(.8rem + 1.2vw);
    padding: .2rem;
}

#home a:hover,
#home a:focus {
    opacity: .6;
}

  /* =======================
======= 6. main ========
======================= */

.article__container {
    grid-area: articles;
    display: grid;
    grid-template-columns: 1fr 9fr;
    grid-template-rows: 1fr;
    grid-template-areas: 'icon card';
    margin-top: 3rem;
}

.article__container:last-of-type {
    margin-bottom: 3rem;
}

.info_icon {
    grid-area: icon;
    display: flex;
    justify-content: center;
    position: relative;
}

.fab {
    opacity: .7;
    position: absolute;
    top: -2px;
}

.fa-3x {
    opacity: 0;
}

.fa-html5 {
    color: var(--clr-html);
}

.fa-css3-alt {
    color: var(--clr-css);
}

.fa-js {
    color: var(--clr-js);
}

.card__text {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0% 50%);
    opacity: .7;
    grid-area: card;
    margin: 0 2rem 0 1rem;
    min-width: 15rem;
}

.black {
    background-color: var(--clr-main);
}

.text__wrap {
    min-height: 23rem;
    margin: .5rem 0 0 .9rem;
}

.par__title {
    background-color: var(--clr-trans-orn);
    width: 80%;
    padding: .3rem;
    color: var(--clr-main);
    margin-top: 1rem;
    font-size: 1rem;
}

.text__wrap img {
    width: 70%;
}

.article__text {
    font-family: var(--fnt-main);
    margin: .9rem 1.5rem .5rem 0;
    color: var(--clr-sec);
    font-size: .8em;
}

.code_container {
    background-color: white;
    width: 85%;
}

.code p {
    padding: .4rem .3rem;
    margin-bottom: 1rem;
}

.code__span {
    color: var(--clr-trans-orn);
}

.const {
    margin: auto 0;
}



  /* =======================
======= 7. footer ========
======================= */

footer {
    position: fixed;
    bottom: 0;
    display: flex;
    justify-content: center;
}

.footer__text {
    background-color: var(--clr-trans-dark);
    color: var(--clr-txt-main);
    opacity: .95;
    font-size: calc(.4rem + .8vh);
    width: 100vw;
}

.author {
    padding: .7rem 0;
    text-align: center;
}


/* =======================
======= 8. media ========
======================= */

@media (min-width:410px) {
    .main__grid {
        width: 90%;
    }

    .par__title {
        font-size: calc(1.1rem + .8vw);
    }

    .article__text {
        font-size: calc(.5rem + .5vw);
    }
}

@media (min-width:1200px) {
    .main__grid {
        width: 65rem;
    }

    .article__container:last-of-type {
        margin-bottom: 5rem;
    }

    .text__wrap {
        padding: .5rem 2rem;
    }

    .fa-2x {
        opacity: 0;
    }

    .fa-3x {
        opacity: .7;
    }
}
