/**************
 *  FONTS
 **************/
@font-face {
    font-family: Poppins;
    src: url(fonts/Poppins.ttf);
}

@font-face {
    font-family: OpenSans;
    src: url(fonts/OpenSans.ttf);
}

@font-face {
    font-family: OpenSans;
    src: url(fonts/OpenSans-Bold.ttf);
    font-weight: bold;
}

/**************
 *  BASE
 **************/
html {
    scroll-behavior: smooth;
    font-family: 'OpenSans', Helvetica, sans-serif;
    font-size: larger;
    line-height: 1.5;
}

header {
    display: flex;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', Helvetica, sans-serif;
}

h1 {
    font-size: 6rem;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
    margin: 1rem 0;
}

h5 {
    font-size: 1rem;
    margin: .75rem 0;
}

section {
    margin: 6rem 1rem;
    padding: 0 3rem;
}

section > div {
    display: grid;
    grid-template-columns: 1fr .8fr;
    column-gap: 2%;
    margin: 2em 0;
}

section > h2 {
    text-align: center;
}

li {
    margin: 12px 0;
}

input {
    display: none;
}

label {
    width: fit-content;
    cursor: pointer;
}

@keyframes fastFadeIn {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slowFadeIn {
    0% {
        opacity: 0;
    }
    75% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
    
}

/**************
 *  COMPONENTS
 **************/

[id$="-toggle"] ~ div {
    display: none;
}

[id$="-toggle"]:checked + div {
    display: flex;
    align-self: center;
    width: 50%;
}

.icon {
    width: 16px;
    height: 16px;
    margin: 0 8px;
}

.proj-card {
    height: fit-content;
    border: grey solid 1px;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem;
}

.proj-card h3,
.proj-card h4,
.proj-card div {
    text-align: center;
}

div#profile-mask {
    height: fit-content;
    width: fit-content;
    -webkit-mask-image: radial-gradient(circle, black 65%, rgba(0, 0, 0, 0) 50%);
    mask-image: radial-gradient(circle, black 65%, rgba(0, 0, 0, 0) 50%);

    align-self: center;
    justify-self: center;
}

/**************
 *  LAYOUT
 **************/

header > h1 {
    text-align: center;
    animation: fastFadeIn 550ms;
}

header > a {
    align-self: center;
}

header img {
    width: 3rem;
    height: 3rem;
    animation: slowFadeIn 3s;
    transition: opacity 250ms, transform 250ms;
    transition-timing-function: ease-out;
}

header img:hover {
    opacity: 0.5;
    transform: translateY(-.5em);
}

ul#contact li {
    display: flex;
    align-items: center;
}

ul#contact {
    padding: 0 .75em;
}


section#projects > div {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: center;
}

section#courses > div {
    grid-template-columns: unset;
}

section#courses * {
    justify-self: center;
}

section#courses label,
section#courses h4,
section#courses h5 {
    align-self: center;
}

footer {
    padding: 0em 3em;
    font-size: small;
    text-align: center;
}

/**************
 *  MOBILE
 **************/

@media only screen and (max-width: 62em) {  
    h1 {
        font-size: 8rem;
    }
    
    h2 {
        font-size: 4rem;
    }
    
    h3 {
        font-size: 3rem;
    }
    
    h4 {
        font-size: 2rem;
        margin: 1rem 0;
    }
    
    h5 {
        font-size: 1.5rem;
        margin: .75rem 0;
    }        

    section > div {
        grid-template-columns: unset;
    }

    section#projects > div {
        display: flex;
        width: 100%;
        overflow: scroll;
    }

    .proj-card {
        width: 75vw;
        flex-shrink: 0;
    }

    [id$="-toggle"]:checked + div {
        width: 80%;
    }
}
