@font-face {
    font-family: 'MODESEVEN';
    src: url('/style/font/Modeseven-L3n5.ttf');
}

@font-face {
    font-family: 'VGA';
    src: url('/style/font/Web437_IBM_VGA_9x14.woff');
}

:root {
    color-scheme: dark light;
    --primary: light-dark(#000000, #ffc928);
    --secondary: light-dark(#2222ff, #ffe084);
    --background: light-dark(#dddddd, #000000);
    --highlight: light-dark(#000000, #dddddd);
    --transparent-highlight: light-dark(#00000044, #dddddd10);
    --transparent-shadow: light-dark(#dddddd10, #00000044);
}

html {
    font-family: 'MODESEVEN';
    color: var(--primary);
}

a:any-link {
    text-decoration: none;
    color: var(--secondary);
}

*[data-path] {
    position: relative;

    &:hover::after {
        content: ">\00a0" attr(data-path) "\00a0\00a0";
        display: block;
        position: absolute;
        color: var(--primary);
        top: calc(-100% - 8px);
        left: -4px;
        padding: 4px;
        min-width: 100%;
        height: 95%;
        text-align: center;
        background: var(--background);
        overflow-x: visible;
        word-break: keep-all;
        white-space: nowrap;
        z-index: 99;
    }
}

body {
    background-color: var(--background);
}

img.big-logo {
    width: 100%;
    height: auto;
    @media (prefers-color-scheme: light) {
        filter: invert(1.0) brightness(1.75);
    }
}

.datemark {
    display: block;
    opacity: 50%;
}

.link-container {
    width: 100%;

    &> .center {
        position: relative;
        left: 2.5%;
        border: 0px solid var(--primary);
        width: 100%;
        height: 10%;
        overflow: hidden;
        margin-bottom: 24px;
    }
}

.center {
    padding-top: 15px;
    font-size: 36pt;

    &> a {
        text-decoration: none;
    }

    &> * > img {
        margin-bottom: -5px;
        max-width: 100%;
        height: 100%;
        width: auto;
        padding: 0;
    }

    &> .quote {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.5vw;
        text-shadow: -1px -1px 0 var(--background), 1px -1px 0 var(--background), -1px 1px 0 var(--background), 1px 1px 0 var(--background);
        text-align: center;
        text-decoration: none;
    }
}

.links {
    width: 95%;
    position: relative;
    left: 2.5%;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    &> a {
        text-decoration: none;
    }
}

.link, .fake-link {
    flex-grow: 4;
    height: 24px;
    padding-top: 3px;

    &:hover {
        background-color: var(--transparent-highlight);
    }
}

.small-link {
    padding-top: 0px;
}

.big-link {
    width: calc(10% - 16px);
    height: auto;
    padding: 8px;
    text-decoration: none;

    &:hover {
        background-color: var(--transparent-highlight);
    }

    &> span {
        width: 100%;
        text-align: center;
        text-decoration: none;
        font-size: 1vw;
    }
}

.small-links {
    flex-grow: 2;
    min-width: fit-content;
}

.link-container > .links > .link, .link-container > .links > .fake-link {
    border: 1px solid var(--primary);
}

.link > a, .fake-link > a {
    height: 100%;
    width: 100%;
    font-size: 18px;
    text-decoration: none;
}

.container {
    border-left: 1px solid var(--transparent-highlight);
    margin-left: calc(2.5%);
    margin-right: calc(2.5% - 26px);
    padding-left: 12px;
    padding-right: 12px;
    overflow-x: hidden;
    width: calc(95% - 40px);
    border-left: 1px var(--primary) solid;
    border-bottom: 1px var(--primary) solid;
}

.projects {
    display: flex;
    flex-direction: row;
    flex-flow: row wrap;
}

.project {
    position: relative;
    flex-grow: 1;
    width: calc(50% - 28px);
    margin: 8px;
    padding: 6px;
    background-color: #ffd1;
}

.project-links {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--transparent-shadow);
    max-width: 50%;
    overflow: hidden;
    font-size: 18pt;

    &> a {
        text-decoration: none;
    }
}

img.project-background {
    height: 75px;
    max-height: 90%;
    width: auto;
    position: absolute;
    top: 50%;
    right: 20px;
    z-index: -1;
    opacity: 35%;
    transform: translateY(-50%);
    @media (prefers-color-scheme: light) {
        filter: grayscale(1.0);
    }
}

.project-content {
    padding-left: 12px;
    padding-right: 12px;
}

table.transparency {
    background-color: var(--transparent-shadow);
    border: solid 1px var(--primary);
    text-align: center;
    width: 100%;

    td {
        border-bottom: solid 1px var(--transparent-highlight);
    }

    th {
        background-color: var(--transparent-highlight);
        font-size: 18pt;
    }

    .transparency-party, .transparency-amount {
        width: 15%;
    }

    .transparency-comment {
        width: 70%;
    }
}

.video-container {
    margin-left: auto;
    margin-right: auto;
}

.youtube-video {
    width: 33%;
    display: block;
    float: left;

    &> img {
        width: 100%;
        overflow-y: hidden;
    }

    &> p {
        text-align: center;
        font-size: 1.3em;
        width: 100%;
        position: relative;
        margin-bottom: 30px;
    }
}

.sites {
    display: flex;
    flex-wrap: wrap;
}

.site {
    position: relative;
    flex-grow: 0;
    width: calc(33% - 28px);
    margin: 8px;
    padding: 6px;
    background-color: var(--transparent-highlight);
}

.site-details {
    font-size: 0.7em;
    opacity: 60%;
    padding-left: 8px;
}

.blog {
    position: relative;
    padding: 4px;
    text-align: center;
    width: 66%;
    left: 16.666%;
    margin-bottom: 4px;
    background-color: var(--transparent-highlight);
}

.reference {
    display: block;
    float: right;
    text-align: center;
    margin: 3px;
    padding: 2px;
    border: var(--primary) solid 1px;
}

.thumbnail {
    width: 150px;
    height: auto;
}

code {
    font-family: 'VGA';
    background-color: var(--transparent-highlight);
    border: 1px solid var(--transparent-highlight);
    border-left: 3px solid var(--highlight);
    padding-right: 2px;
    padding-left: 4px;
    display: inline-block;
    max-width: 90%;
    overflow-x: auto;
    position:relative;
    top: 5px;
}

.blog-contents > * > img {
    max-width: 100%;
}

small.er { /* I can be silly sometimes. I'm allowed */
    font-size: 50%;
}

b.ig {
    font-size: 125%;
}

.indented {
    padding-left: 8px;
    border-left: 1px solid var(--highlight);
}

@media(max-width: 940px) {
    .links {
        width: 100%;
        position: relative;
        left: 0;
        text-align: center;
    
        display: flex;
    }

    .links > .link:not(.small-link) {
        width: 100%;
    }

    .big-link {
        position: relative;
        padding-left: 42.5%;
        padding-right: 42.5%;
        width: 15%;
        &> span {
            display: block;
            position: absolute;
            top: 50%;
            left: 50%;
            width: 30%;
            font-size: 5vw;
            padding: 8px;
            transform: translate(-25%, -50%);
            background-color: #0009;
        }
    }

    .blog {
        width: 90%;
        left: 5%;
    }

    .project {
        width: calc(100% - 28px);
    }

    .site {
        min-width: calc(100% - 28px);
    }

    .container {
        margin: 0;
        padding: 5px;
        border: none;
        overflow-x: hidden;
        width: calc(100% - 10px);
    }

    .link-container > .center {
        width: 100%;
        height: 80px;
        border: none;
        overflow: hidden;
        border-radius: 0px;
        position: relative;
        left: 0;
        top: 0;
    }

    .center > * > img {
        max-width: none;
        max-height: none;
        width: 100%;
        height: auto;
        position: absolute;
        left: 0;
        top: -40%;
        border-radius: 0px;
        transform: translateY(-50%);
    }
    
    .center > .quote {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 60px;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
        text-align: center;
    }

    img.big-logo {
        width: 50%;
        height: auto;
        transform: translateX(-200%);
    }

    .youtube-video {
        width: 70%;
        padding-left: 15%;
    }
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    img {
        position: absolute;
        height: 80px;
        width: 80px;

        .big-logo  {
            position: relative !important;
            height: 30px !important;
            width: 30px !important;
        }
    }
    
    .quote {
        display: none;
    }
    
    .link {
        margin-right: 14px;
    }
}