/* Basic Setup */

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

html {
    font-size: 62.5%; /* 10px */
    scroll-behavior: smooth;
}

@media(max-width: 800px) {
    html {
    font-size: 55%;
    }
}

@media(max-width: 400px) {
    html {
    font-size: 50%;
    }
}

:root {
    --pink: #eb607a;
    --green: #8ee075;
    --white: #ffffff;
    --off-white: #ffffffc5;
    --black: #070a07;
    --off-black: #0c1607;

    --green-pink: linear-gradient(90deg, var(--pink), var(--green));

    --nav-height: 8rem;

    --fs-h1: 7.5rem;
    --fs-h2: 6rem;
    --fs-h3: 4rem;
    --fs-h4: 3rem;

    --fs-header-text: 2.4rem;
    --fs-button: 2.2rem;
    --fs-body: 2rem;
    --fs-gutter: 1.7rem;

    --gutter-tiny: 2rem;
    --gutter-small: 3rem;
    --gutter-med-small: 4rem;
    --gutter-med-large: 6rem;
    --gutter-large: 8rem;
    --gutter-huge: 10rem;
    --gutter-eldritch: 20rem;

}

body {
    font-family: 'Atkinson Hyperlegible';
    font-size: var(--fs-body);
    line-height: 1.6;
    font-weight: 400;
    color: var(--off-white);
    background-color: var(--off-black);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    object-fit: contain;
}

a {
    color: var(--white);
    text-decoration: none;
}

.btn {
    position: relative;
    display: inline-block;
    padding: 1.2rem 4rem;
    border: 1px solid;
    border-image: var(--green-pink) 1;
    font-size: var(--fs-button);
    z-index: 1;
    overflow-x: hidden;
}

.btn-text {
    position: relative;
    display: inline-block;
    padding: 0.8rem 0.4rem;
    border-bottom: 1px solid;
    border-image: var(--green-pink) 1;
    z-index: 1;
    overflow-x: hidden;
}

.btn::after,
.btn-text::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    display: block;
    height: 100%;
    width: 100%;
    background-image: var(--green-pink);
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.btn:hover::after,
.btn-text:hover::after {
    right: 0;
}

section {
    padding: var(--gutter-huge) 0;
}

section:not(:last-child) {
    border-bottom: 1px solid var(--black);
}

.row {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter-huge);
}

@media(min-width: 1600px) {
    .row {
        max-width: 1800px;
        padding: 0 var(--gutter-eldritch);
    }
}

@media(max-width: 850px) {
    .row {
        padding: 0 var(--gutter-med-large);
    }
}

@media(max-width: 560px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

@media(max-width: 490px) {
    .row {
        padding: 0 var(--gutter-tiny);
    }
}

h1, h2, h3 {
    color: var(--green);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h2::after {
    content: "";
    display: block;
    height: 0.3rem;
    width: 12rem;
    margin-top: 1rem;
    background: var(--pink);
}

h3 {
    font-size: var(--fs-h3);
}

@media(max-width: 500px) {
    h1 {
        font-size: var(--fs-h2);
    }
    h2 {
        font-size: var(--fs-h3);
    }
    h3 {
        font-size: var(--fs-h4);
    }
}

ul {
    list-style-position: inside;
}

.pixelated {
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Header */

header {
    display: flex;
    flex-direction: column;
    height: 100vh;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.4)), url("Images/spaceSimulation.gif");
    @media(min-height: 1900px) {
        image-rendering: unset;
    }
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media(max-width: 560px) {
    header {
        justify-content: center;
        text-align: center;
    }
}

header .row {
    width: 100%;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--gutter-med-large);
    height: var(--nav-height);
}

@media(max-width: 560px) {
    nav {
        justify-content: center;
        gap: var(--gutter-large);
    }
}

@media(max-width: 420px) {
    nav {
        gap: var(--gutter-med-large);
    }
}

@media(max-width: 340px) {
    nav {
        gap: var(--gutter-med-small);
    }
}

nav a {
    font-size: var(--fs-button);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 0.5rem;
}

nav a:hover {
    color: var(--pink);
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 100%;
    display: block;
    height: 1rem;
    width: 100%;
    background-image: var(--green-pink);
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

nav a:hover::after {
    right: 0;
    height: 2px;
}

@media(max-width: 560px) {
    nav a {
        font-size: var(--fs-header-text);
    }
}

.header-text-container {
    height: calc(100% - var(--nav-height));
    display: flex;
    align-items: center;
}

@media(max-width: 560px) {
    .header-text-container {
        justify-content: center;
        text-align: center;
    }
}

.header-text-container p {
    font-size: var(--fs-header-text);
    margin: 1rem 0 3rem;
}

.name {
    display: flex;
    gap: 1rem;
}

.name p {
    color: var(--pink);;
    font-size: var(--fs-body);
    margin-top: calc(var(--fs-h1) - var(--fs-body) - 1rem);
}

@media(max-width: 850px) {
    .name {
        flex-direction: column;
    }

    .name p {
        margin-top: -1.5rem;
        margin-bottom: 0rem;
    }
}

/* My Work */

.work-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gutter-large);
    margin-top: var(--gutter-small);
}

@media(max-width: 1145px) {
    .work-box {
        gap: var(--gutter-med-small);
        flex-direction: column;
        align-items: initial;
    }
}

.work-box:first-of-type {
    margin-top: var(--gutter-med-large)
}

.work-box:not(:last-child) {
    margin-bottom: var(--gutter-eldritch);
}

@media(max-width: 800px) {
    .work-box:not(:last-child) {
        margin-bottom: var(--gutter-huge);
    }
}

.work-box-text > *:not(h3) {
    margin-top: var(--gutter-tiny);
}

.work-box-image {
    max-width: 600px;
    min-width: 600px;
    width: 100%;
}

@media(max-width: 1600px) {
    .work-box-image {
        max-width: 500px;
        min-width: 500px;
    }
}

@media(max-width: 1145px) {
    .work-box-image {
        max-width: initial;
        min-width: unset;
    }
}

.work-box-links {
    display: flex;
    align-items: center;
    gap: var(--gutter-small);
}

.work-box-image img {
    width: 100%;
}

.gh-link {
    transition: all 0.3s;
}

.gh-link:hover,
.gh-link:focus {
    transform: scale(1.2);
}

.gh-link img {
    height: 3rem;
}

/* About */

.about {
    display: flex;
    gap: var(--gutter-large);
    margin-top: var(--gutter-med-small);
}

@media(max-width: 850px) {
    .about {
        gap: var(--gutter-med-small);
    }
}

@media(max-width: 775px) {
    .about {
        flex-direction: column;
    }
}

.about-text p {
    margin-bottom: var(--gutter-small);
}

.about-image {
    flex: 0 0 300px;
}

@media(max-width: 850px) {
    .about-image {
        flex: 0 0 200px;
    }
}

@media(max-width: 775px) {
    .about-image {
        flex: initial;
        max-width: 450px;
    }
}

/* Contact */

.contact {
    max-width: 670px;
}

.contact p {
    margin: var(--gutter-med-small) 0 var(--gutter-small);
}

/* Footer */

footer {
    margin: var(--gutter-large) 0 var(--gutter-med-small);
    text-align: center;
    font-size: var(--fs-gutter);
}

.footer-social {
    margin-bottom: var(--gutter-med-small);
    display: unset;
}

.footer-social a:not(:last-child) {
    margin-right: var(--gutter-tiny);
}

.footer-social img {
    height: 40px;
}

.back-to-top {
    position: fixed;
    bottom: var(--gutter-med-small);
    right: var(--gutter-med-small);
    background-color: var(--green);
    height: 5.5rem;
    width: 5.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    visibility: hidden;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.back-to-top.shown {
    visibility: visible;
    transform: none;
    opacity: 1;
}

.back-to-top img {
    width: 50px;
}