:root {
    --clr-primary: rgb(230, 128, 0);
    --clr-secondary: rgb(4, 1, 90);
    --clr-text: rgb(0, 0, 0);
    --clr-text-secondary: rgb(240, 240, 240);
    --p-size-smallest: clamp(1rem, 1.1vw, 1.3rem)
    --p-size-small: clamp(1.1rem, 1.2vw, 1.4rem);
    --p-size: clamp(1.1rem, 1.2vw, 1.6rem);
    --p-size-big: clamp(1.1rem, 1.3vw, 1.8rem);
    --h-size: clamp(1.2rem, 1.4vw, 1.8rem);
    --h-size-big: clamp(1.6rem, 1.8vw, 2.1rem)
}

body {
    font-family: monospace, Calibri, sans-serif;
    background: linear-gradient(in lch, var(--clr-secondary), var(--clr-primary));
    min-height: 100vh;
    color: var(--clr-text);
}

p {
    font-size: var(--p-size);
    text-align: center;
}
@media (min-width: 1280px) {
    p {
        font-size: var(--p-size-big);
    }
}

#star-wrap {
    transition: all 0.5s;
}

#navbar {
    display: grid;
    position: relative;
    z-index: 1;
    overflow: hidden;
    top: 2.5vh;
    font-size: var(--h-size-big);
}

.navlink {
    background: none;
    border: none;
    outline-color: transparent;
    transition: 0.5s;
    font-weight: 900;
    margin: auto;
    color: var(--clr-text);

}
.navlink:hover {
    cursor: pointer;
    color: var(--clr-primary);
}

.navlink.active {
    color: var(--clr-primary);
    text-decoration-line: overline underline;
    text-decoration-color: var(--clr-text-secondary);
}

#navbar i {
    margin-right: 5px;
    z-index: -1;
}

.svg-inline--fa {
    margin-right: 0.25rem;
}

#toggle-wrap {
    position: absolute;
    opacity: 0.75;
    margin: 1em;
}
#switch {
    position: relative;
    cursor: pointer;
    display: grid;
    width: 5em;
    height: 2em;
}
#toggle {
    opacity: 0;
    width: 0;
    height: 0;
}
#slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 100vw;
    background-color: var(--clr-primary);
    transition: all 0.5s;
}
#slider::before {
    position: absolute;
    border-radius: 50%;
    content: " ";
    width: 1.5em;
    height: 1.5em;
    left: 0.5em;
    bottom: 0.25em;
    background-color: var(--clr-secondary);
    transition: all 0.5s;
}

#toggle + #slider {
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
#toggle:focus + #slider {
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
}
#toggle:checked + #slider {
    background-color: var(--clr-secondary);
}
#toggle:checked + #slider:before {
    background-color: var(--clr-primary);
    transform: translateX(2.5em);
}

@media (max-width: 1279px) {
    #toggle-wrap {
        bottom: 4.5vh;
        margin-left: 25%;
        transform: translateX(-25%);
    }

    .navlink:nth-of-type(1) {
        grid-column: 1 / 3;
    }

}
@media (min-width: 1280px) {
    #navbar {
        grid-area: 1 / 1;
        place-content: center;
        float: left;
        position: absolute;
        padding-top: 0;
        gap: 1em;
        top: 40%;
        margin: 0;
        margin-left: 5em;
    }

    .navlink {
        margin: 0;
        width: max-content;
    }

    .navlink.active {
        text-decoration-thickness: 10%;
    }

    #toggle-wrap {
        right: -10vw;
        bottom: -1.05em;
    }

    .svg-inline--fa {
        margin-right: 0.5rem;
    }
}

.navlink:hover .fa-address-book,
.navlink.active .fa-address-book,
.navlink .fa-address-card,
.navlink:hover .fa-folder-closed,
.navlink.active .fa-folder-closed,
.navlink .fa-folder-open,
.navlink:hover .fa-door-closed,
.navlink.active .fa-door-closed,
.navlink .fa-door-open {
    display: none;
}
.navlink:hover .fa-address-card,
.navlink.active .fa-address-card,
.navlink:hover .fa-folder-open,
.navlink.active .fa-folder-open,
.navlink:hover .fa-door-open,
.navlink.active .fa-door-open {
    display: inline-block;
}


#box {
    display: grid;
    margin: 8vh auto;
    position: relative;
    max-width: 80vw;
    min-height: 60vh;
    border-radius: 18px;
    background-color: rgba(240, 240, 240, 0.1);
    box-shadow: 0px 6px 10px 0px rgba(0,0,0,0.3);
    padding: 0 0.5em;
}

#box h1, h2, h3 {
    text-align: center;
}

.page {
    display: none;
    position: relative;
    align-content: center;
    justify-items: center;
    animation: fadeIn ease 1.25s;
}

#loc {
    font-weight: 600;
}

@media (min-width: 1280px) {
    #box {
        width: 65vw;
        margin: 0;
        margin-top: 20vh;
        margin-left: 25vw;
    }

    .page {
        justify-items: center;
        font-weight: normal;
    }
}

@keyframes fadeIn {
    0% {
        transform: translateY(1.5em);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

#loc {
    font-size: var(--p-size-smallest);
}
#loc-ga{
    text-decoration: underline;
    cursor: pointer;
}

#technologies {
    display: grid;
    grid-template: 
    'a a a a'
    'b c c d'
    'e e f f';
    row-gap: 1em;
    justify-items: center;
    align-items: center;
}
.tech {
    border-radius: 6px;
    width: max-content;
    cursor: default;
    padding: 0.5rem;
    overflow: hidden;
    position: relative;
    background-color: rgba(240, 240, 240, 0.1);
    box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s;
}
.tech:hover {
    box-shadow: 0px 0px 4px 2px rgba(0,0,0,0.2);
}
.tech::after {
    background-color: var(--clr-text-secondary);
    opacity: 0.2;
    content: "";
    position: absolute;
    height: 15em;
    left: -5em;
    top: -5em;
    z-index: -1;
    width: 2em;
    transform: rotate(30deg);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.tech:hover::after {
    left: 110%;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#tech-cybsec {
    margin-top: 0.5em;
    grid-area: a;
}
#tech-html {
    grid-area: b;
}
#tech-css {
    grid-area: c;
}
#tech-php {
    grid-area: d;
}
#tech-js {
    grid-area: e;
}
#tech-py {
    margin-left: 1em;
    grid-area: f;
}

@media (min-width: 1280px) {
    #technologies {
        display: flex;
    }
    .tech {
        margin: 1em;
    }
}

.card {
    display: grid;
    align-items: center;
    justify-items: center;
}
.card p {
    max-width: 40ch;
    text-align: center;
}

.card img {
    max-width: 85%;
    margin: 0 auto;
}
#ch img {
    width: 45%;
}
#fkc img {
    box-shadow: 0px 6px 6px 0px rgba(0,0,0,0.3);
    border-radius: 3px;
    margin-bottom: 1ch;
    width: 60%;
}

.card a {
    height: auto;
    margin: 0 auto;
    width: max-content;
}

.card button {
    width: 20ch;
    padding: 0.5em 0;
    font-weight: 700;
    margin: 0.5em 0;
    color: var(--clr-text-secondary);
    cursor: pointer;
    border: none;
    outline: transparent;
    border-radius: 3px;
    transition: all 0.5s;
    box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.4);
    background-color: var(--clr-secondary);
}
.card a:hover button {
    box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.2);
    background-color: var(--clr-primary);
}
.card:nth-of-type(2) button {
    margin-bottom: 1em;
}

.card a:hover .fa-square-up-right,
.card a .fa-square-arrow-up-right {
    display: none;
}
.card a:hover .fa-square-arrow-up-right {
    display: inline-block;
}

@media(min-width: 670px) {
    #ch img {
        width: 40%;
    }

    #fkc img {
        width: 35%;
    }
}
@media (min-width: 1280px) {
    #portfolio {
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: column;
    }

    .card:nth-of-type(2) button {
        margin-bottom: 0;
    }
    .card p {
        max-width: 30ch;
    }
    #fkc img {
        width: 35%;
    }
}

#mailto {
    font-weight: 700;
    color: var(--clr-secondary);
    text-decoration: none;
    transition: all 0.5s;

}
#mailto:hover {
    color: var(--clr-primary);
    text-decoration: underline;
}

#contact-form {
    display: grid;
    width: 100%;
    max-width: 95%;
}

#tg {
    display: grid;
    gap: 1em;
    grid-template-columns: 1fr 1fr;
}

.form-input {
    width: 100%;
    border: 2px solid var(--clr-secondary);
    border-radius: 3px;
    outline: 0;
    background-color: transparent;
    margin: 0.5em 0;
    padding: 1%;
    transition: border-color 0.5s;
}

.form-input[type="text"] {
    margin-top: 0;
}

.form-input:focus,
.form-input:user-valid[type="text"],
.form-input:valid[type="email"],
.form-input:valid[placeholder="Message"] {
    border-color: var(--clr-primary);
}
.form-input::placeholder {
    color: inherit;
}

#submit {
    justify-self: center;
    cursor: pointer;
    min-width: 40%;
    max-width: 50%;
    padding: 0.5em 0;
    font-weight: 700;
    color: var(--clr-secondary);
    border-radius: 6px;
    border: 2px solid var(--clr-secondary);
    background: transparent;
    margin-bottom: 0.5em;
    transition: all 0.5s;

}
#submit:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
}

#contact textarea {
    resize: vertical;
    min-height: 9ch;
    height: 9ch;
    max-height: 50vh;
}

@media (min-width: 1280px) {
    #contact-form {
        width: 100%;
        max-width: 75%;
    }

    #contact textarea {
        max-height: 25vh;
        height: 15vh;
    }

    #submit {
        padding: 1em;
    }
}
.deformed-input {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: -1;
}

footer {
    padding: 0.25em 2em;
    font-size: var(--p-size);
    margin: 12.5vh auto 5vh auto;
    border-radius: 18px;
    position: relative;
    text-align: center;
    width: max-content;
    background-color: rgba(240, 240, 240, 0.5);
    box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

@media (min-width: 1280px) {
    footer {
        padding: 0.25em 4em;
        position: relative;
        margin: 10vh 0 2vh 0;
        left: 50%;
        transform: translateX(-50%);
    }
}