/* Setting repeated use variables */
:root {
    --content-bg-color: rgba(0, 0, 0, 0.4);
    --color-text: rgb(169, 235, 255);
    --main-text-color: white;
    --content-padding: 20px;
    --content-width: 30vw;
}

/* Custom font for headers */
@font-face {
    font-family: heyAugust;
    src: url(HeyAugust.ttf);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Garamond, Verdana, Geneva, Tahoma, sans-serif;
    font-size: 24px;
    color: var(--main-text-color);
    background-color: rgb(0, 0, 4);
}

/* Link behavior */
a {
    text-decoration: none;
    color: var(--main-text-color);
}

a:hover {
    color: var(--color-text);
}

/* Nav bar header */
header {
    width: 100vw;
    position: absolute;
    top: 0;
    display: flex;
    justify-content: center;
    z-index: 1;
}

nav ul {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 10px 30px;
}

nav ul a {
    list-style: none;
    color: var(--main-text-color);
    background-color: var(--content-bg-color);
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    display: block;
    padding: 20px;
}

/* Parallax scrolling main page section */
.flex-parallax {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-behavior: smooth;
    perspective: 8px;
    perspective-origin: 0%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Background content in distance */
.background {
    position: absolute;
    top: 0;
    left: 19%;
    width: 100vw;
    transform: translateZ(-3px) translateX(-3px) translateY(100px) scale(1.375);
    z-index: -1;
}

.background-image {
    width: 100vw;
    filter: brightness(65%)
}

.background-box {
    overflow: hidden;
    height: 4200px;
}

/* Midground content */
.midground {
    width: 100%;
    transform-origin: 0;
    transform: translateZ(1px) scale(.875);
    display: flex;
    justify-content: center;
}

.content {
    padding-top: 150px;
    transform: translateY(20vh);
}

.column {
    flex-direction: column;
    align-items: center;
}

.row-reverse {
    display: flex;
    flex-flow: row-reverse wrap-reverse;
    align-items: center;
    gap: 5px;
}

/* Profile image section */
#profile {
    margin-bottom: 10vh;
}

.profile-img {
    margin-top: 25vh;
    width: 400px;
}

/* Name */
h1 {
    font-family: heyAugust, "Brush Script MT", "Lucida Handwriting";
    font-size: 500%;
    letter-spacing: 3px;
    text-align: center;
}

/* Content card headers */
h2 {
    font-family: heyAugust, "Brush Script MT", "Lucida Handwriting";
    font-size: 250%;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: -30px;
    z-index: 1;
}

/* Main header subtitle */
h3 {
    text-align: center;
    margin-top: -10px;
}

/* Portfolio item card headers */
h4 {
    font-weight: bold;
    padding: 10px 0 0 5px;
}

a + h4 {
    text-decoration: none;
    color: var(--main-text-color);
}

/* Main content text */
p {
    background-color: var(--content-bg-color);
    padding: var(--content-padding);
    width: var(--content-width);
    line-height: 200%;
    text-align: justify;
}

/* Main content cards */
.projects {
    background: var(--content-bg-color);
    padding: var(--content-padding);
    width: var(--content-width);
}

/* Portfolio item cards */
summary {
    overflow:hidden;
    height: 35vh;
    flex: 1 0 40%;
}

.screenshot {
    width: 100%;
    object-fit: cover;
}

/* Expand latest item to double width */
summary:last-child {
    flex: 1 1 100%;
}

/* Resume section text */
#resume p {
    line-height: 250%;
    text-align: center;
}

/* Contact section */
#contact-box {
    display: flex;
    justify-content: center;
    margin-bottom: 400px;
}

/* Contact links cards */
.social-link {
    text-align: center;
}

.social-icon {
    height: 100px;
    width: 100px;
    filter: invert(1);
    padding: 20px 20px 0 20px;
}

/* Footer */
footer {
    text-align: center;
    font-size: 80%;
    bottom: 0;
    align-self: center;
}

/* Foreground decoration elements */
.foreground {
    width: 100%;
    transform-origin: 0;
    transform: translateZ(3px) scale(.625);
    display: flex;
}

.foreground.stars {
    position: relative;
}

.star {
    height: 25px;
    width: 25px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    position: absolute;
    filter: blur(5px)
}

#star1 {top: -100vh; left: 10vw;}
#star2 {height: 30px; width: 30px; top: -80vh; left: 70vw;}
#star3 {top: -50vh; left: 20vw;}
#star4 {height: 15px; width: 15px; top: -40vh; left: 15vw;}
#star5 {height: 40px; width: 40px; top: -25vh; left: 90vw;}
#star6 {top: -5vh; left: 10vw;} 
#star7 {height: 20px; width: 20px; top: -0vh; left: 25vw;}
#star8 {height: 15px; width: 15px; top: 10vh; left: 85vw;}
#star9 {top: 20vh; left: 70vw;}
#star10 {height: 30px; width: 30px; top: 27vh; left: 82vw;}
#star11 {top: 25vh; left: 10vw;}
#star12 {height: 30px; width: 30px; top: 45vh; left: 70vw;}
#star13 {top: 75vh; left: 20vw;}
#star14 {height: 15px; width: 15px; top: 85vh; left: 15vw;}
#star15 {height: 40px; width: 40px; top: 100vh; left: 90vw;}
#star16 {top: 120vh; left: 10vw;} 
#star17 {height: 20px; width: 20px; top: 125vh; left: 25vw;}
#star18 {height: 15px; width: 15px; top: 135vh; left: 85vw;}
#star19 {top: 145vh; left: 70vw;}
#star20 {height: 30px; width: 30px; top: 152vh; left: 82vw;}

/* Content scaling for narrower screens */
@media screen and (max-width: 1600px) {    
    :root {
        --content-width: 50vw;
    }
}

@media screen and (max-width: 755px) {    
    nav ul a {
        width: 35vw;
    }
    :root {
        --content-width: 80vw;
    }
}

@media screen and (max-width: 408px) {
    .profile-img {
        width: 200px;
    }
    
    html, body {
        font-size: 12px;
    }

    nav ul a {
        padding: 10px 5px;
        font-size: 140%;
    }

    p {
        font-size: 140%;
    }
    :root {
        --content-width: 90vw;
    }
}