@import url("fontawesome-all.min.css");
@import url("https://fonts.googleapis.com/css?family=Titillium+Web:400|Open+Sans:300,300italic,600,600italic,800");

:root {
    --header-footer-bg: #ffffff;
    --header-footer-text: black;
    --body-bg: #000000;
    --body-text: white;
    --header-footer-font-size: 1vw;
    --header-footer-font-mobile: 2.5vw;
    --body-font-size: 20px;
    --footer-height: 40px;
    --header-height: 100px;
    --font-face: Tahoma;
    --sidebar-bg: #ffffff;
    --sidebar-text: #000000;
    --sidebar-hover-bg: #000000;
    --sidebar-active-bg: #000000;
    --sidebar-active-text: #ffffff;
    --burger-menu-color: black;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    background-color: #000000;
    background-position: top left, top left;
    background-repeat: repeat-x, repeat;
    background-size: 100% 30em, auto;
    font-family: 'Open Sans', sans-serif;
    font-size: 13pt;
    color: #696969;
    font-weight: 300;
    line-height: 2.25em;
}

.h2active {
    color: #fff;
    font-weight: bold;
    font-size: 2.5vw;
    margin: 0 0 1.1em 0;
    line-height: 1em;
}

.h2inactive {
    color: #999;
    font-weight: bold;
    font-size: 2.5vw;
    margin: 0 0 1.1em 0;
    line-height: 1em;
}

.contenttitle {
    padding-bottom: 2px;
    vertical-align: text-top;
}

header {
    margin: 0;
    padding: 0;
}

/* Image */
.image {
    display: inline-block;
    outline: 0;
}

.image img {
    display: block;
    width: 100%;
    border-radius: 8px;
}

.image.featured {
    display: block;
    padding: 0px;
    width: 100%;
    margin: 0 0 0 0;
}

/* List */
ul {
    list-style: none;
}

/* Fixed Header */
header {
    font-family: var(--font-face);
    position: fixed;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-footer-bg);
    color: var(--header-footer-text);
    font-weight: bold;
    font-size: var(--header-footer-font-size);
    display: flex;
    text-align: right;
    align-items: center;
    justify-content: right;
    z-index: 10;
    top: 0;
    padding-bottom: 0;
}

.contact-form {
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    color: white;
    font-weight: bold;
}

.form-input,
.form-textarea {
    width: 100%;
    background-color: black;
    border: 1px solid white;
    color: white;
    font-weight: bold;
    padding: 0.5rem;
    box-sizing: border-box;
}

.form-textarea {
    height: 150px;
    resize: none;
}

.submit-button {
    background-color: white;
    color: black;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
}

.title {
    font-size: 2.5vw;
    font-weight: bold;
    padding-right: 20px;
}

.subtitle {
    padding-right: 20px;
    font-size: 1.5vw;
    font-weight: 300;
}

.smalltext {
    font-size: 1vw;
    font-weight: 300;
}

/* Sidebar Menu */
.sidebar {
    font-family: var(--font-face);
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 200px;
    background-color: var(--sidebar-bg);
    overflow-y: none;
    z-index: 10;
    transition: transform 0.3s ease;
}

.sidebar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.sidebar ul li {
    padding: 5px;
    text-align: center;
    cursor: pointer;
    border: 0;
    color: var(--sidebar-text);
    background-color: var(--sidebar-bg);
    transition:
        background-color 0.4s ease,
        color 0.4s ease,
        box-shadow 0.4s ease;
}

.sidebar ul li:hover,
.sidebar ul li:focus-visible {
    background-color: var(--sidebar-active-bg);
    outline: none;
    box-shadow:
        inset 0 0 0 100px rgba(255, 0, 0, 0.8);
    font-weight: bold;
    color: var(--sidebar-active-text) !important;
}

.sidebar ul li.active {
    background-color: var(--sidebar-active-bg);
    outline: none;
    box-shadow:
        inset 0 0 0 20px rgba(0, 0, 0, 0.8),
        inset 0 -10px 0 0 rgba(0, 0, 0, 0.8),
        inset 0 10px 0 0 rgba(0, 0, 0, 0.8);
    font-weight: bold;
    color: var(--sidebar-active-text) !important;
}

/* Inactive state */
.inactive {
    background-color: var(--sidebar-active-bg);
    outline: none;
    box-shadow:
        inset 0 0 0 40px rgba(200, 200, 200, 0.8),
        inset 0 -30px 0 0 rgba(200, 200, 200, 0.8),
        inset 0 30px 0 0 rgba(200, 200, 200, 0.8);
    font-weight: bold;
    color: rgba(230,230,230,255) !important;
}

/* Main Content */
.content-container {
    font-family: var(--font-face);
    margin-top: var(--header-height);
    margin-bottom: var(--footer-height);
    margin-left: 200px;
    padding: 18px;
    background-color: var(--body-bg);
    color: var(--body-text);
    font-size: var(--body-font-size);
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

.anchor {
    text-align: right; 
    position: absolute; 
    right: 20px; 
    font-size: 60px;
    color: white;
    bottom: 60px;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 16px rgba(255, 255, 255, 0.6);
}

#pageanchor {
    display: none;
}

/* Focused state */
.focused {
    background: url(../mainbg.png);
    background-attachment: fixed;
    background-position: center;
    background-size: contain;
}

.unfocused {
    filter: grayscale(100%);
    color: gray;
}

/* Hide all content sections initially */
.content-section {
    display: none;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    color: var(--body-text);
}

pre {
    white-space: pre-wrap; 
    word-wrap: break-word;
}

.grid-item {
    padding: 10px;
    grid-column: span 2;
}

.project-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: rgba(0, 100, 255, 0.2);
    height: 100%; /* Ensure a consistent height if in a grid */
    box-sizing: border-box;
}

.project-details {
    margin-bottom: 1em;
}

.grid-button-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: auto; /* Pushes buttons to the bottom */
}

.grid-button {
    background-color: #000000;
    color: #fff;
    padding: 8px;
    font-size: 70%;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    min-width: 100px;
}

.grid-button:hover {
    background-color: #000000;
    color: #f00;
}

/* Text Overlay */
.text-overlay {
    color: white;
    font-size: 90%;
    font-weight: bold;
    display: inline-block;
    width: 100%;
    background-color: rgba(0, 100, 255, 0.2);
    padding: 2px;
    text-align: right;
    border-radius: 2px;
}

/* Fixed Footer */
footer {
    font-family: var(--font-face);
    position: fixed;
    width: 100%;
    height: var(--footer-height);
    background-color: var(--header-footer-bg);
    color: var(--header-footer-text);
    font-size: var(--header-footer-font-size);
    z-index: 10;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 2px;
    bottom: 0;
}

.column {
    float: left;
    width: 33.33%;
    padding: 3px;
    justify-items: center;
    align-items: center;
}

.row:after {
    content: "";
    display: block;
    clear: both;
}

/* Burger Menu Icon */
.burger-menu {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 11;
    cursor: pointer;
    font-size: 30px;
    color: var(--burger-menu-color);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .grid-container {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    pre {
        white-space: pre-wrap; 
        word-wrap: break-word;
        line-height: 20px;
        font-size: 1.8vh;
    }

    .h2active {
        color: #fff;
        font-weight: bold;
        font-size: 6vw;
        margin: 0 0 1.1em 0;
        line-height: 1em;
    }

    .h2inactive {
        color: #999;
        font-weight: bold;
        font-size: 6vw;
        margin: 0 0 1.1em 0;
        line-height: 1em;
    }

    footer {
        font-family: var(--font-face);
        position: fixed;
        width: 100%;
        height: var(--footer-height);
        background-color: var(--header-footer-bg);
        color: var(--header-footer-text);
        font-size: var(--header-footer-font-mobile);
        z-index: 10;
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 2px;
        bottom: 0;
    }

    .title {
        font-size: 6vw;
        font-weight: bold;
    }

    .subtitle {
        font-size: 3vw;
        font-weight: 300;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .burger-menu {
        display: block;
    }

    .content-container {
        margin-left: 0;
    }

    .sidebar.active {
        transform: translateX(0);
    }
}

/* XLarge */
@media screen and (max-width: 1680px) {
    body {
        font-size: 12pt;
    }
}

/* Large */
@media screen and (max-width: 1280px) {
    body {
        font-size: 11pt;
    }
}

/* Medium */
@media screen and (max-width: 980px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        font-size: 11pt;
    }
}