/* ----------------------------------------------------- */
/* -------------------- Basic Setup -------------------- */
/* ----------------------------------------------------- */

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

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

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

:root {
    --burgundy: #800020;
    --white: #ffffff;
    --off-white: #d3d3d3;
    --black: #010101;

    --nav-height: 8rem;

    --fs-h1: 7.5rem;
    --fs-h2: 6rem;
    --fs-h3: 4rem;
    --fs-body: 2rem;

    --gutter-xx-small: 2rem;
    --gutter-x-small: 3rem;
    --gutter-small: 4rem;
    --gutter-medium: 6rem;
    --gutter-large: 8rem;
    --gutter-x-large: 10rem;
    --gutter-xx-large: 20rem;
}

body {
    font-family: 'Jost', sans-serif;
    color: var(--off-white);
    line-height: 2;
    font-size: var(--fs-body);
    font-weight: 300;
    background-color: var(--black);
}

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 var(--burgundy);
    font-size: 2.2rem;
    z-index: 1;
    overflow-x: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    display: block;
    height: 100%;
    width: 100%;
    background: var(--white);
    transition: all .2s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: -1;
}

.btn:hover::after {
    right: 0;
    background: var(--burgundy);
}

img {
    object-fit: contain;
}

section {
    padding: var(--gutter-x-large) 0;
    border-bottom: 1px solid #222222;
}

.row {
    max-width: 1180px;
    margin: 0 auto;
}

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

h1,
h2,
h3 {
    color: var(--white);
    font-weight: 400;
    line-height: 1.5;
}

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

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

h2::after {
    content: "";
    display: block;
    height: .3rem;
    width: 12rem;
    margin-top: 1rem;
    background-color: var(--burgundy);
}

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

ul {
    list-style-position: inside;
}

/* ------------------------------------------------ */
/* -------------------- Header -------------------- */
/* ------------------------------------------------ */

header {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)), url(images/header.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

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

header .row {
    width: 100%;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6rem;
    height: var(--nav-height);
}

@media (max-width: 500px) {
    nav {
        justify-content: center;
    }
}

nav a {
    font-size: 2.2rem;
    position: relative;
    overflow-x: hidden;
    transition: all .2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 100%;
    width: 100%;
    height: 1rem;
    display: block;
    background: var(--white);
    transition: all .2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

nav a:hover {
    color: var(--burgundy);
    font-weight: 400;
}

nav a:hover::after {
    right: 0;
    height: .2rem;
    background: var(--burgundy);
}

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

.header-text-container p {
    font-size: 2.4rem;
    margin: 1rem 0 3rem;
}

/* ------------------------------------------------- */
/* -------------------- My Work -------------------- */
/* ------------------------------------------------- */

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

@media (max-width: 1200px) {
    .work-box {
        flex-direction: column-reverse;
        align-items: center;
        gap: var(--gutter-xx-small);
    }
}

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

.work-box-txt > * {
    margin-top: var(--gutter-xx-small);
    max-width: 400px;
}

.work-box-img {
    max-width: 600px;
    filter: opacity(0.9);
}

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

.work-box-links {
    display: flex;
    align-items: center;
}

.github-link {
    transition: all .3s;
}

.github-link:hover,
.github-link:focus {
    transform: scale(1.5);
}

.github-link img {
    height: 4rem;
}

/* -------------------------------------------------- */
/* -------------------- About Me -------------------- */
/* -------------------------------------------------- */

.about {
    display: flex;
    align-items: flex-start;
    gap: var(--gutter-x-large);
    margin-top: var(--gutter-medium);
}

@media (max-width: 1200px) {
    .about {
        flex-direction: column;
        align-items: center;
    }
}

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

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

@media (max-width: 1200px) {
    .about-img {
        max-width: 300px;
    }
}

/* ------------------------------------------------ */
/* -------------------- Footer -------------------- */
/* ------------------------------------------------ */

footer {
    margin: var(--gutter-small) 0 var(--gutter-x-small);
    text-align: center;
}

.footer-social {
    margin-bottom: var(--gutter-xx-small);
}

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

.footer-social img {
    height: 40px;
    filter: opacity(0.8);
}

/* ----------------------------------------------------- */
/* -------------------- Back to Top -------------------- */
/* ----------------------------------------------------- */

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

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

.back-to-top img {
    height: 40px;
}