@import url('https://fonts.googleapis.com/css2?family=Rokkitt:ital,wght@0,100..900;1,100..900&display=swap');
:root {
    --theme-cyan: hsl(190,80%,40%);
    --theme-blue: hsl(220,80%,50%);
    --theme-purple: hsl(250,80%,60%);
    --theme-grey: hsl(0,0%,60%);

    --main: hsl(0,0%,5%);
    --accent: hsl(0,0%,13%);
    --double-accent: hsl(0,0%,20%);
    
    --accent-frost: hsla(0,0%,13%,0.8);
    --frost-radius: 5px;
    --transition-speed: 200ms;

    --counter: hsl(0,0%,95%);
    --counter-accent: hsl(0,0%,85%);
    
    font-family: 'Rokkitt', sans-serif;
    color: var(--counter);
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background-color: var(--main);
}
a {
    color: inherit;
}


/* ~~ NAV BAR and SECTION ~~ */

nav {
    position: fixed;
    border-radius: 100px;
    background-color: var(--accent-frost);
    backdrop-filter: blur(var(--frost-radius));
    height: 36px;
    box-sizing: border-box;
    padding: 3px;
    padding-left: 7px;
    width: 70%;
    left: 15%;
    top: 10px;
    display: grid;
    column-gap: 8px;
    grid-template-columns: 40px repeat(5,1fr);
    text-transform: uppercase;
    box-shadow: 0 0 5px grey;
    z-index: 1000;
}
nav > img {
    margin-top: 5px;
    width: 100%;
}
nav > a {
    transition: var(--transition-speed);
    text-align: center;
    line-height: 30px;
    height: 30px;
    box-sizing: border-box;
    font-size: 1.2em;
    border: 1.5px solid transparent;
    border-radius: 40px;
    cursor: default;
    text-decoration: none;
}
nav > a.sel {
    color: var(--theme-blue);
    border-color: currentColor;
    font-weight: bold;
}
nav > a:not(.sel):hover {
    color: var(--theme-purple);
    border-color: currentColor;
    font-weight: bold;
    cursor: pointer;
}
section {
    margin: 30px 15%;
    width: 70%;
    background-color: var(--accent);
    box-shadow: 0 0 5px grey;
    border-radius: 10px;
    display: grid;
    padding: 10px;
    padding-top: 0;
    box-sizing: border-box;
    gap: 10px;
    position: relative;
    top: 20px;
    opacity: 0;
}
section.fade-in {
    animation: fade-in calc(var(--transition-speed) * 2) forwards;
}
section.force-in {
    top: 0;
    opacity: 1;
}
@keyframes fade-in {
    from {
        opacity: 0;
        top: 20px;
    }
    to {
        opacity: 1;
        top: 0;
    }
}
section:first-of-type {
    margin-top: 0;
}
section h2 {
    text-align: center;
    font-size: 3em;
    color: var(--theme-cyan);
    margin: 0;
    padding: 0;
    grid-column: 1 / -1;
}
section h3 {
    font-size: 2em;
    margin: 0;
    padding: 0;
}
section h4, section h5, section blockquote {
    margin: 0;
    padding: 0;
    color: var(--counter-accent);
}
section blockquote {
    font-weight: bold;
}
section h4, section blockquote {
    font-size: 1.25em;
}
section h5 {
    font-size: 1em;
}
a:hover {
    color: var(--theme-cyan);
}
.target {
    grid-column: 1 / -1;
    position: relative;
    top: -58px;
}

/* ~~ HOME ~~ */

#home-grid {
    width: 70%;
    height: 420px;
    margin-top: 48px;
    box-sizing: border-box;
    display: grid;
    margin-left: 15%;
    column-gap: 80px;
    grid-template-columns: 300px 1fr;
}
.home-left {
    display: block;
    margin: auto 0;
    border-radius: 50%;
    width: 100%;
    height: 300px;
}
.home-right {
    display: flex;
    align-items: center;
}
.home-name {
    font-size: 5em;
    font-weight: bold;
    background-image: linear-gradient(60deg,var(--theme-cyan),var(--theme-blue) 30%,var(--theme-purple));
    color: transparent;
    background-clip: text;
}
.home-text {
    font-size: 1.5em;
    color: var(--counter-accent);
}

/* ~~ PROJECT DESC ~~ */

#project-grid {
    grid-template-columns: 1fr 1fr;
}
.project-side {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.project-tech {
    width: 100%;
    display: flex;
    margin: 5px 0;
}
.project-tech > svg, .project-tech > img {
    height: 20px;
    margin-right: 5px;
    fill: var(--counter-accent);
}
#project-grid p {
    text-align: justify;
    color: var(--counter-accent);
    margin: 0 5px;
}
#project-grid ol, #project-grid ul {
    padding-left: 1.25em;
}
#project-grid li {
    text-align: justify;
    color: var(--counter-accent);
}
.project-button {
    color: var(--counter-accent);
    transition: var(--transition-speed);
    border: 1.5px solid currentColor;
    margin: 5px 0;
    display: inline-block;
    padding: 3px 10px;
    font-size: 1.25em;
    border-radius: 100px;
    text-decoration: none;
}
.project-button > img {
    height: 1em;
    position: relative;
    top: 2px;
    margin-right: 5px;
}

/* ~~ SKILLS ~~ */

#skills-grid {
    grid-template-columns: repeat(12,1fr);
}
#skills-grid img {
    width: 100%;
}
#skills-grid > span, #contact-grid > span {
    text-align: center;
    color: var(--counter-accent);
}
#skills-grid > div {
    text-align: center;
}
.skill-spacer.b {
    display: none;
}

/* ~~ CONTACT ~~ */

#contact-grid {
    grid-template-columns: 2fr repeat(3,1fr 2fr);
}

/* ~~ RESPONSIVE ~~ */

@media only screen and (max-width: 1200px) {
    nav {
        width: 840px;
        left: calc(50% - 420px);
    }
    #home-grid, section {
        width: 840px;
        margin-left: calc(50% - 420px);
        margin-right: calc(50% - 420px);
    }
}
@media only screen and (max-width: 900px) {
    nav {
        width: calc(100% - 30px);
        left: 15px;
    }
    #home-grid, section {
        width: calc(100% - 30px);
        margin-left: 15px;
        margin-right: 15px;
    }
    section {
        margin-top: 15px;
        margin-bottom: 15px;
    }
    #skills-grid {
        grid-template-columns: repeat(10,1fr);
    }
    .skill-spacer.a {
        display: none;
    }
}
@media only screen and (max-width: 800px) {
    #skills-grid {
        grid-template-columns: repeat(6,1fr);
    }
    .skill-spacer {
        display: none;
    }
    .skill-spacer.b {
        display: block;
    }

    #home-grid {
        row-gap: 5px;
        grid-template-rows: 200px auto;
        grid-template-columns: 100%;
        height: auto;
        margin-top: 56px;
    }
    .home-left {
        display: block;
        margin: 0 auto;
        border-radius: 50%;
        height: 100%;
        width: auto;
    }
    .home-right {
        text-align: center;
    }

    #project-grid {
        grid-template-columns: repeat(3,1fr);
    }
    #project-grid > div:not(:first-child):not(.project-side) {
        grid-column: span 2;
    }
}
@media only screen and (max-width: 600px) {
    nav {
        grid-template-rows: 30px 30px;
        grid-template-columns: repeat(3,1fr);
        height: auto;
        border-radius: 20px;
        row-gap: 8px;
    }
    nav > img {
        margin: 0 auto;
        height: 100%;
        width: auto;
    }
    .target {
        top: -94px;
    }
    #home-grid {
        margin-top: 94px;
    }
    .home-name {
        font-size: 4em;
    }

    #project-grid {
        grid-template-columns: 1fr;
    }
    .project-side {
        display: none;
    }

    #skills-grid {
        grid-template-columns: repeat(4,1fr);
    }
    .skill-spacer.b {
        display: none;
    }
    
    #contact-grid {
        grid-template-columns: repeat(7,1fr);
    }
}
@media only screen and (max-width: 450px) {
    #contact-grid {
        grid-template-columns: 0.5fr repeat(3,1fr 0.5fr);
    }
}
