/* ------------------------------ */
/* ----- Basic Setup ----- */
/* ------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;   /* 10 px */
    scroll-behavior: smooth;
}

@media(max-width: 800px) {
    html {
        font-size: 55%;
    }
}

:root {
    --blue-space-canyon: #0072ff;
    --white: #ffffff;
    --off-white: #ffffffc6;
    --black: #010101;

    --nav-height: 12rem;

    --fs-h1: 7.5rem;
    --fs-h2: 6rem;
    --fs-h3: 4rem;
    --fs-h4: 3rem;
    --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);
    font-size: var(--fs-body);
    line-height: 1.7;
    font-weight: 300;
    background-color: var(--black);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    object-fit: contain;
}

a {
    color: var(--white);
    text-decoration: none;
}

.btn {
    display: inline-block;
    padding: 1.2rem 4rem;
    border: 1px solid var(--blue-space-canyon);
    font-size: 2.2rem;
}

.btn-text {
    display: inline-block;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid var(--blue-space-canyon);
}

.btn,
.btn-text {
    position: relative;
    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: var(--white);
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
    z-index: -1;
}

.btn:hover::after,
.btn-text:hover::after {
    right: 0;
    background: var(--blue-space-canyon);
}

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-large);
    }
}

@media(max-width: 850px) {
    .row {
        padding: 0 var(--gutter-medium);
    }
}

@media(max-width: 560px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

@media(max-width: 560px) {
    .row {
        padding: 0 var(--gutter-xx-small);
    }
}

h1,
h2,
h3 {
    color: var(--white);
    font-weight: 400;
    line-height: 1.3;
}

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-color: var(--blue-space-canyon);
}

h3 {
    font-size: var(--fs-h3);
}

@media(max-width: 590px) {
    h1 {
        font-size: var(--fs-h2);
    }

    h2 {
        font-size: var(--fs-h3);
    }

    h3 {
        font-size: var(--fs-h4);
    }
}

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.4)), url('images/milky-way-desert.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media(max-width: 540px) {
    header {
        text-align: center;
    }

    .header-text-container {
        display: flex;
        justify-content: center;
    }
}

header .row {
    width: 100%;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--gutter-medium);
    height: var(--nav-height);
}

@media(max-width: 540px) {
    nav {
        justify-content: center;
    }
}

@media(max-width: 420px) {
    nav {
        gap: var(--gutter-small);
    }
}

@media(max-width: 340px) {
    nav {
        gap: var(--gutter-x-small);
    }
}

nav a {
    font-size: 2.2rem;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 0.5rem;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 100%;
    width: 100%;
    height: 1rem;
    display: block;
    background: var(--white);
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

nav a:hover {
    color: var(--blue-space-canyon);
}

nav a:hover::after {
    right: 0;
    height: 2px;
    background: var(--blue-space-canyon);
}

.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 Section ----- */
/* ------------------------------ */

.work-box {
    display: flex;
    align-items: center;
    gap: var(--gutter-large);
    margin-top: var(--gutter-x-small);
}

@media(max-width: 1145px) {
    .work-box {
        gap: var(--gutter-small);
        flex-direction: column;
        align-items: initial;
    }
}

.work-box:first-of-type {
    margin-top: var(--gutter-medium);
}

.work-box:not(:last-child) {
    margin-bottom: var(--gutter-xx-large);
}

@media(max-width: 750px) {
    .work-box:not(:last-child) {
        margin-bottom: var(--gutter-x-large);
    }
}

.work-box-text > *:not(h3) {
    margin-top: var(--gutter-xx-small);
}

.work-box-image {
    max-width: 726px;
}

.work-box-image img {
    max-width: 100%;
}

@media(max-width: 1350px) {
    .work-box-image {
        max-width: 600px;
    }
}

@media(max-width: 1145px) {
    .work-box-image {
        max-width: initial;
    }
}

.work-box-links {
    display: flex;
    align-items: center;
    gap: var(--gutter-x-small);
}

.gh-link {
    transition: all 0.3s;
}

.gh-link:hover,
.gh-link:focus {
    transform: scale(1.3);
}

.gh-link img{
    height: 3rem;
    transform: translateY(3px);
}



/* ------------------------------ */
/* ----- Astrophotography Section ----- */
/* ------------------------------ */

.astro-box {
    display: flex;
    align-items: center;
    gap: var(--gutter-large);
    margin-top: var(--gutter-x-small);
}

@media(max-width: 1145px) {
    .astro-box {
        gap: var(--gutter-small);
        flex-direction: column;
        align-items: initial;
    }
}

.astro-box:first-of-type {
    margin-top: var(--gutter-medium);
}

.astro-box:not(:last-child) {
    margin-bottom: var(--gutter-xx-large);
}

@media(max-width: 750px) {
    .astro-box:not(:last-child) {
        margin-bottom: var(--gutter-x-large);
    }
}

.astro-box-text > *:not(h3) {
    margin-top: var(--gutter-xx-small);
}

.astro-box-image {
    max-width: 726px;
}

.astro-box-image img {
    max-width: 100%;
}

@media(max-width: 1350px) {
    .work-box-image {
        max-width: 600px;
    }
}

@media(max-width: 1145px) {
    .work-box-image {
        max-width: initial;
    }
}

.astro-box-links {
    display: flex;
    align-items: center;
    gap: var(--gutter-x-small);
}

.astro-link {
    transition: all 0.3s;
}

.astro-link:hover,
.astro-link:focus {
    transform: scale(1.3);
}

.astro-link img{
    height: 3rem;
    transform: translateY(3px);
}



/* ------------------------------ */
/* ----- About Me Section ----- */
/* ------------------------------ */

.about {
    display: flex;
    align-items: center;
    gap: var(--gutter-huge);
    margin-top: var(--gutter-medium);
}

@media(max-width: 1145px) {
    .about {
        flex-direction: column;
        gap: var(--gutter-small);
    }
}

.about-text p {
    margin-bottom: var(--gutter-x-small);
}

.about-image {
    flex: 0 0 650px;
}

@media(max-width: 1350px) {
    .about-image {
        flex: 0 0 500px;
    }
}

@media(max-width: 1145px) {
    .about-image {
        flex: initial;
    }
}



/* ------------------------------ */
/* ----- Get In Touch Section ----- */
/* ------------------------------ */

.contact {
    max-width: 670px;
}

.contact p {
    margin: var(--gutter-medium) 0 var(--gutter-x-small);
}



/* ------------------------------ */
/* ----- Footer Section ----- */
/* ------------------------------ */

footer {
    margin: var(--gutter-large) 0 var(--gutter-small);
    text-align: center;
}

.footer-social {
    margin-bottom: var(--gutter-small);
}

.footer-social a:not(:last-child) {
    margin-right: var(--gutter-xx-small);
}

.footer-social img {
    height: 40px;
}



/* ------------------------------ */
/* ----- Back To Top Button Section ----- */
/* ------------------------------ */

.back-to-top {
    position: fixed;
    bottom: var(--gutter-small);
    right: var(--gutter-small);
    background: var(--blue-space-canyon);
    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 {
    height: 40px;
}