/* Define variables */
:root {
    /* Colors */
    --background-color: #E6EAF2;
    --topbar-color: #4564B7;
    --topbar-color-dark: #3d5aa1;
    --topbar-color-selected: #344d8b;
    
    --text-color-light: #E6EAF2;
    --text-color-dark: #262626;
    --text-color-mid: #727272;
    --text-color-accent: #344d8b;
    --text-color-accent-highlighted: #4564B7;

    /* Font Sizes */
    --content-text-size: 12px;
    --topbar-header-text-size: 28px;
    --topbar-element-text-size: 20px;

    /* Alignment */
    --topbar-height: 64px;
    --hex-background-width: 128px;
    --content-div-min-size: 300px;
    --gallery-image-min-size: 240px;
    --gallery-image-max-size: 640px;

    /* Animations */
    --transition-speed: 0.25s;
}

/* Main document properties */
html {
    /* Set up scaling so that background properly tiles to bottom of page */
    min-height: 100%;
    position: relative;
}

/* Document content properties */
body {
    background-color: var(--background-color);
    background-image: url("/assets/background/bg_lines.png");

    font-family: "Rubik", sans-serif;
}

/* Paragraph line spacing */
p {
    line-height: 1.5;
}

/* List line spacing */
li {
    line-height: 1.5;
}

/* Hyperlinks */
a {
    color: var(--text-color-accent);
    text-decoration: none;
    border-bottom: dotted 3px var(--text-color-accent);

    transition: var(--transition-speed);
}

a:hover {
    color: var(--text-color-accent-highlighted);
    border-bottom: dotted 3px var(--text-color-accent-highlighted);
    font-weight: 800;

    transition: var(--transition-speed);
}

/* Right-side background */
.background-right {
    position: absolute;
    top: 0px;
    bottom: 0px;
    right: 0px;
    width: var(--hex-background-width);
    overflow: hidden;

    background-image: url("/assets/background/bg_hex_r.png");
    background-size: 100% auto;
    background-repeat: repeat;
    z-index: -1; /* force underlay */
}

/* Left-side background */
.background-left {
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    width: var(--hex-background-width);
    overflow: hidden;

    background-image: url("/assets/background/bg_hex_l.png");
    background-size: 100% auto;
    background-repeat: repeat;
    z-index: -1; /* force underlay */
}

/* Page Content container */
.page-container {
    padding-top: calc(var(--topbar-height) + 32px);
    padding-left: calc(var(--hex-background-width) + 32px);
    padding-right: calc(var(--hex-background-width) + 32px);

    min-height: calc(100vh - 128px);

    /* text color */
    color: var(--text-color-dark);
}

/* Page Content (excl footer) */
.page-content {
    padding-bottom: 96px;
}

/* Content flex container (responsive positioning) */
.content-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Content flex element (responsive positioning) */
.content-flex-element {
    flex: auto;
    flex-basis: var(--content-div-min-size);
}

/* Topbar */
.topbar {
    /* placement */
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: var(--topbar-height);
    z-index: 1;

    /* visual */
    background: linear-gradient(var(--topbar-color), var(--topbar-color-dark));
    box-shadow: 0px 0px 8px black;

    /* children */
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;

    /* Default text effects */
    text-shadow: 1px 1px 1px var(--text-color-dark);
    user-select: none;
}

/* Topbar elements */
.topbar a {
    display: block;
    padding: 100% 8px;

    text-decoration: none;
    text-align: center;
    font-size: var(--topbar-element-text-size);
    color: var(--text-color-light);

    transition: var(--transition-speed);
}

/* Right-aligned topbar container */
.topbar .right-align-container {
    /* Display children in row */
    display: flex;
    flex-direction: row;

    /* Alignment */
    margin-left: auto;
    margin-right: 8px;
}

/* Topbar elements (hover) */
.topbar a:hover {
    font-weight: 500;
}

/* Topbar elements (active) */
.topbar a.active-element {
    font-weight: 500;
    background-color: var(--topbar-color-selected);
}

/* Topbar header (logo) */
.topbar-header {
    text-align: center;
    font-weight: normal;
    font-size: var(--topbar-header-text-size);
    color: var(--text-color-light);

    margin: 16px;
}

/* Topbar Divider */
.topbar hr {
    color: var(--background-color);
    border-top: 1px solid;
    width: 100%;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;

    text-align: center;
}

/* List element */
.list-element {
    display: flex;
    gap: 8px;
}

/* List element icons */
.list-element img {
    width: 24px;
    height: 24px;
    display: block;
    margin-top: auto;
    margin-bottom: auto;
}

/* Description texts */
.description {
    color: var(--text-color-mid);
    margin: 0px 32px;
}

.description.noindent {
    margin: 0px 0px;
}

/* Photo Galleries */
.gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Gallery Elements */
.gallery-element {
    min-width: var(--gallery-image-min-size);
    max-width: var(--gallery-image-max-size);

    box-shadow: 0px 0px 12px black;
}

/* Center-aligned text */
.center {
    text-align: center;
}