/* Root variables */
:root {
    /* Default (dark) theme */
    /* --background-colour: #FFF; */
    --background-filter: none;
    --container-background-colour: #000;

    --text-colour: #FFF;
    --hyperlink-default: #F4A900;
    --hyperlink-hover: #F57C00;
    --hyperlink-visited: #D52C1F;

    --project-transition-time: 0.5s;
}

/* Colour styles for the page */

/* Light */
.light {
    --container-background-colour: rgb(240, 255, 255);

    --text-colour: black;
}

/* Winter */
.winter {
    --background-filter: hue-rotate(160deg);
    --container-background-colour: rgb(240, 255, 255);

    --text-colour: rgb(0, 50, 70);
    --hyperlink-default: #389cff;
    --hyperlink-hover: #296cf2;
    --hyperlink-visited: #3111bf;
}

/* Easter */
.easter {
    --background-filter: invert(100%) hue-rotate(250deg) saturate(200%);
    --container-background-colour: rgb(0, 30, 0);

    --text-colour: rgb(220, 255, 180);
    --hyperlink-default: #1fc952;
    --hyperlink-hover: #0fb40f;
    --hyperlink-visited: #058d42;
}

/* Halloween */
.spooky {
    --background-filter: invert(100%) hue-rotate(140deg);
    --container-background-colour: rgb(0, 0, 0);

    --text-colour: rgb(255, 100, 120);
    --hyperlink-default: #ffffff;
    --hyperlink-hover: #ffcfdb;
    --hyperlink-visited: #dd86ff;
}

/* Birthday animations */
.birthday {
    --background-filter: hue-rotate(300deg);
    --container-background-colour: rgb(0, 0, 0);

    --text-colour: rgb(255, 255, 255);
}

.birthday .return img {
    content: url(/main-assets/images/party_favicon.ico);
}

.birthday #bg {
    animation: birthday-bg 20s linear infinite;
}

.birthday a {
    animation: birthday-bg 20s linear infinite;
}

@keyframes birthday-bg {
    from {
        filter: hue-rotate(300deg);
    }
    to {
        filter: hue-rotate(660deg);
    }
}

/* Main */
html, body {
    /* background-color: var(--background-colour); */
    
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    margin: 0;
    padding: 0;
    color: var(--text-colour);
    text-align: left;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    position: relative;
}

div#bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-image: url(/main-assets/images/google-background.jpg);
    background-repeat: repeat;
    /* background-size: cover; */
    /* background-position: center; */

    filter: var(--background-filter);
    border: none;
}

/* DEFINITELY REPLACE THESE WITH CLASSES INSTEAD AT SOME POINT */
/* Text */
h1 {
    font-weight: normal;
    font-size: 2em;
    margin: 16px 0 0 0;
    padding: 0.8em 16px;
    border-top: 2px solid color-mix(in srgb, var(--text-colour), transparent 90%);
    border-bottom: 1px solid color-mix(in srgb, var(--text-colour), transparent 90%);
}

h1 strong {
    font-size: 1.4em;
}

h2 {
    font-weight: normal;
    font-size: 2em;
    margin: 0;
    padding: 16px;
    border-top: 2px solid color-mix(in srgb, var(--text-colour), transparent 90%);
    border-bottom: 1px solid color-mix(in srgb, var(--text-colour), transparent 90%);
}

p {
    padding: 0 32px;
}

/* Hyperlinks */
a:visited {
    color: var(--hyperlink-visited);
}

a {
    color: var(--hyperlink-default);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

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

/* Return to main page */
.return {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: var(--text-colour) !important;
    font-size: 20px;
    text-decoration: none;
    text-align: center;

    width: fit-content;
    margin: 0 auto;

    transition: transform 0.3s ease;
    -o-transition: transform var(--project-transition-time) ease;
    -webkit-transition: transform var(--project-transition-time) ease;
    -moz-transition: transform var(--project-transition-time) ease;
}

.return:hover {
    transform: scale(1.1);
    -o-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -webkit-transform: scale(1.1);
}

/* Return text */
.return p {
    margin: 0;
    padding: 0;
}

/* Return image */
.return img {
    aspect-ratio: 1;
    width: 48px;
}

/* Page style selector */
.style-select {
    width: 100%;
    height: fit-content;
    margin: 16px 0;

    display: flex;
    justify-content: center;
    align-items: center;
}

.style-select label {
    margin-right: 0.25em;
}

.style-select select {
    color: var(--text-colour);
    font-size: 16px;
    text-align: center;

    width: min-content;
    background-color: var(--container-background-colour);

    border: 1px solid var(--text-colour);
    border-radius: 5px;
}

/* Content containers */
.container-bg {
    max-width: 1012px;
    height: max-content;
    min-height: 100%;
    margin: 0 auto;

    background-color: color-mix(in srgb, var(--container-background-colour) 95%, transparent);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.container {
    max-width: 1012px;
    margin: 0 auto;
    padding: 16px 16px 51px 16px;

    min-height: calc(100vh - 67px);

    position: relative;
}

/* Copyright text */
p.copyright {
    border-top: 1px solid color-mix(in srgb, var(--text-colour), transparent 90%);
    width: calc(100% - 32px);

    margin: 0;
    padding: 16px 0;
    
    color: color-mix(in srgb, var(--text-colour), transparent 65%);;

    position: absolute;
    bottom: 0;

    text-align: center;
}

/* Grid (not in use right now) */
/* Project container */
.project-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-columns: 3;
    gap: 10px;

    padding: 32px 24px 64px 24px;
    width: fit-content;
    max-width: 100%;
}

/* Individual projects */
.project-container a {
    z-index: 1;

    background-color: black;

    width: 100%;
    height: 300px;

    overflow: hidden;
    border-radius: 20px;

    text-decoration: none;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: top;
    flex-flow: column;

    box-shadow: 0px 2px 3px 1px color-mix(in srgb, var(--text-colour) 20%, transparent);
    transition: box-shadow var(--project-transition-time) ease;
    -o-transition: box-shadow var(--project-transition-time) ease;
    -webkit-transition: box-shadow var(--project-transition-time) ease;
    -moz-transition: box-shadow var(--project-transition-time) ease;
}

.project-container a:hover {
    box-shadow: 0px 2px 10px 3px color-mix(in srgb, var(--text-colour) 20%, transparent);
}

/* Project name */
.project-container a h3 {
    z-index: 0;

    color: white;
    max-width: 100%;
    padding: 1em 1.25em 0 1.25em;
    margin: 0;
    max-height: min-content;

    flex: 1;

    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0px 0px 1em 1em rgba(0, 0, 0, 0.8);

    text-align: center;
    font-size: 24px;

    transform-origin: center center;
    transition: var(--project-transition-time) ease;
    -o-transition: var(--project-transition-time) ease;
    -webkit-transition: var(--project-transition-time) ease;
    -moz-transition: var(--project-transition-time) ease;
    text-shadow: 0px 0px 1em white;
}

.project-container a:hover h3 {
    transform: scale(1.25);
    -o-transform: scale(1.25);
    -ms-transform: scale(1.25);
    -moz-transform: scale(1.25);
    -webkit-transform: scale(1.25);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0px 0px 1em 1em rgba(0, 0, 0, 0.5);
}

/* Project features */
.project-container a ul {
    z-index: 1;

    margin: 12px 48px;
    padding: 0;
    list-style: disc;
    color: transparent;
    text-align: left;

    transition: var(--project-transition-time) ease;
    -o-transition: var(--project-transition-time) ease;
    -webkit-transition: var(--project-transition-time) ease;
    -moz-transition: var(--project-transition-time) ease;
}

.project-container a:hover ul {
    margin-top: 20px;

    color: white;
}

.project-container a ul li {
    transition: text-shadow var(--project-transition-time) ease;
    -o-transition: text-shadow var(--project-transition-time) ease;
    -webkit-transition: text-shadow var(--project-transition-time) ease;
    -moz-transition: text-shadow var(--project-transition-time) ease;
}

.project-container a:hover ul li {
    text-shadow: 0px 0px 1em black;
}

/* Coloured overlay */
.project-container a .overlay {
    background-color: black;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;

    opacity: 0.2;

    transition: opacity var(--project-transition-time) ease;
    -o-transition: opacity var(--project-transition-time) ease;
    -webkit-transition: opacity var(--project-transition-time) ease;
    -moz-transition: opacity var(--project-transition-time) ease;
}

.project-container a:hover .overlay {
    opacity: 0.5;
}

/* Background image */
.project-container a .bg-image {
    z-index: -1;
    
    filter: blur(2px);
    background-color: #000;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: center;

    transition: var(--project-transition-time) ease;
    -o-transition: var(--project-transition-time) ease;
    -webkit-transition: var(--project-transition-time) ease;
    -moz-transition: var(--project-transition-time) ease;
}

.project-container a:hover .bg-image {
    filter: blur(10px);
    -webkit-filter: blur(10px);
    background-size: auto 120% ;
}

/* Project list */
.project-list {
    display: flex;
    flex-direction: column;

    padding: 20px 0;
    gap: 30px;

    border-top: 2px solid color-mix(in srgb, var(--text-colour), transparent 90%);
}

/* Individual projects */
.project-list .project {
    margin: 0 30px;
    padding: 10px;

    color: var(--text-colour);
    text-decoration: none;
    text-align: left;

    background-color: color-mix(in srgb, var(--text-colour) 5%, transparent);
    box-shadow: 0px 0px 6px 6px color-mix(in srgb, var(--text-colour) 5%, transparent);

    border: none;
    border-radius: 10px;

    transition: transform .3s ease,
                background-color .3s ease,
                box-shadow .3s ease;
}

.project-list .project:hover {
    transform: scale(1.02);

    background-color: color-mix(in srgb, var(--text-colour) 10%, transparent);
    box-shadow: none;

    cursor: pointer;
}

/* Project name */
.project-list .project h3 {
    margin: 0 0 0px 0;

    text-align: center;
    font-size: 30px;
}

/* Click hint - shows when hovering project */
.project-list .project .click-hint {

    color: transparent;
    text-align: center;
    font-size: 20px;
    font-weight: normal;

    transition: color .3s ease;
}

.project-list .project:hover .click-hint {
    color: color-mix(in srgb, var(--text-colour) 30%, transparent);
}

/* Project description */
.project-list .project p {
    margin: 0 20px;
    padding: 0;

    font-size: 18px;
}

/* Project GitHub link */
.project-list .project .github {
    display: block;
    width: fit-content;

    margin: -16px auto 10px auto;
    padding: 0 0;
    box-sizing: border-box;

    font-size: 22px;

    transition: margin .3s ease,
                color 0.2s ease;
}

/* Move GitHub link when hovering to make room for the click hint */
.project-list .project:hover .github {
    margin: 5px auto 10px auto;
}

/* Project notes */
.project-list .project h4 {
    margin: 20px 20px 5px 20px;
    /* text-decoration: underline; */
    font-size: 20px;
}

.project-list .project ul {
    margin: 0 20px;

    font-size: 18px;
}

/* Nested lists */
.project-list .project ul ul {
    padding: 0;
}
