* {
    box-sizing: border-box;
}

:root {
    --light-background: #a8d0e6;
    --dark-background: #24305e;
    --light-text-color: #ffffff;
    --dark-text-color: #2a2a2a;
	--profile-title-text-color: #000;
	--profile-item-text-color: #000;
	--portfolio-item-background: #badaeb;
	--contact-button-background: #24305e;
    --url-bar-height: 0;
}

@media (prefers-color-scheme: dark) {
	:root {
		--dark-background: #1d274c;
		--light-background: #21163a;
		--portfolio-item-background: #291b48;
		--dark-text-color: #fff;
		--profile-title-text-color: #fff;
		--profile-item-text-color: #fff;
	}

    a {
        color: #2894ff;
        }

        a:visited {
            color: #6060ff;
            }

            a:visited:hover {
                color: #ffffff;
    }

	#get-in-touch button:hover {
		box-shadow: 0px 0px 8px #666;
	}

	#get-in-touch span img {
		filter: invert(1);
	}
}

@media (prefers-color-scheme: light) {
	#get-in-touch button {
		box-shadow: 0px 0px 8px #888;
        }

        #get-in-touch button:hover {
            box-shadow: 0px 0px 8px #ccc;
	}
}

body {
    margin: 0px;
    background-color: var(--light-background);
    color: var(--dark-text-color);
    font-family: Inter, Arial, Helvetica, sans-serif;
}

#top {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 35px 0 45px 0;
    background-color: var(--dark-background);
    }

    #info {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 287px;
        height: 350px;
        }

        #info > picture {
            margin-left: auto;
            margin-right: auto;
            }

            #info > picture img {
                height: 200px;
                border-radius: 100%;
        }

        #links {
            display: flex;
            justify-content: space-between;
            margin-left: auto;
            margin-right: auto;
            }

            #links img,
            #links a {
                height: 75px;
                border-radius: 100%;
            }

            #links img {
                box-shadow: 0px 0px 8px #363636;
                }

                #links img:hover {
                    box-shadow: 0px 0px 8px #555;
	}

    #name-box {
        display: flex;
        flex-direction: column;
        margin-top: 25px;
        text-align: center;
        }

        #name-box > h1 {
            margin: 8px 0 20px 0;
            font-size: 28pt;
            color: var(--light-text-color);
        }

        /* Part of scrolling animation as well */
        #name-box div span,
        #position-roller li {
            vertical-align: top;
            font-size: 26px;
            height: 32px;
            line-height: 32px;
            color: var(--light-text-color);
        }

        #position-roller {
            display: inline-block;
            height: 32px;
            margin: 0;
            padding-left: 0;
            overflow: scroll;
            list-style: none;
            scroll-snap-type: y mandatory;
            -ms-overflow-style: none;  /* Edge */
            scrollbar-width: none;  /* Firefox */
            }

            #position-roller::-webkit-scrollbar {
                display: none;  /* Chrome, Edge, Safari */
            }

            #position-roller li {
                display: block;
                margin-bottom: 6px;
                text-align: start;
                scroll-snap-align: start;
        }

        @media (min-width: 1025px) {
            #name-box {
                margin-left: 150px;
            }
        }

        @media (min-width: 878px) {
            #top {
                flex-direction: row;
                }

                #name-box {
                    padding-top: 40px;
                    text-align: start;
            }
        }

        @media (min-width: 698px) {
            #name-box {
                margin-left: 40px;
                margin-right: 40px;
            }
        }

        @media (min-width: 400px) {
            #name-box > h1 br {
                display: none;
        }
}

#portfolio {
    margin: 50px 0 -12px 0;
    }

    #portfolio > h2 {
        text-align: center;
        color: var(--profile-title-text-color);
    }

    #portfolio-items {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 1500px;
        margin-top: 50px;
        margin-left: auto;
        margin-right: auto;
        }

        .portfolio-item {
            width: 325px;
            min-height: 325px;
            max-width: 100vw;
            justify-self: center;
            margin: 12px;
            padding: 20px;
			color: var(--profile-item-text-color);
            background-color: var(--portfolio-item-background);
            }

            .portfolio-item .portfolio-img-container {
                display: flex;
                height: 100px;
                justify-content: center;
                }

                .portfolio-item .portfolio-img-container a {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    }

                    .portfolio-item .portfolio-img-container a img {
                        color: var(--light-text-color);
            }

            .portfolio-item p,
            .portfolio-item li {
                font-size: .88em;
}

#get-in-touch {
    margin: 75px 0;
    }

    #get-in-touch button {
        display: block;
        margin-left: auto;
        margin-right: auto;
        border: none;
        width: 200px;
        height: 50px;
        border-radius: 30px;
        font-size: 13pt;
        font-weight: 600;
        font-family: 'Roboto Condensed', Arial, Helvetica, sans-serif;
        color: var(--light-text-color);
        background-color: var(--contact-button-background);
        cursor: pointer;
        }

    #get-in-touch > span {
        display: block;
        text-align: center;
        margin: 12px 0 -31px 0;  /* -31px cancels page shift */
        color: var(--profile-item-text-color);
        }

        /* Copy icon */
        #get-in-touch span img {
            height: 10pt;
            margin-left: 5px;
            cursor: pointer;
            user-select: none;
        }

        /* Error message if copy fails */
        #get-in-touch span::after {
            content: attr(data-err-msg);
            display: block;
            margin-top: 2px;
            color: #ef0000;
}

footer {
    padding: 100px 0 15px 0;
    }

    footer > span {
        display: block;
        text-align: center;
        font-size: .88em;
        color: var(--dark-text-color);
        }

        @media (min-width: 716px) {
            footer > span {
                display: inline;
                text-align: start;
                margin-left: 20px;
    }
}

/* 404 page */
.error-not-found,
.error-not-found body {
    background-image: url('/static/img/404.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    }

    .error-not-found .centering-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: calc(100vh - 20px - 15px - var(--url-bar-height));
        text-align: center;
        }

        .error-not-found .centering-container h1 {
            margin: 0;
            font-size: 90pt;
        }

        .error-not-found .centering-container a {
            color: var(--light-text-color);
    }

    .error-not-found footer {
        margin-top: 0;
        }

        .error-not-found footer > span {
            color: var(--light-text-color);
    }

    /* For calculating URL bar offset in JS */
    #url-bar-measure {
        height: 100vh;
        width: 0;
        position: absolute;
}
