@import "animations.css";
@import "misc.css";

/* Main */
body { margin: 0; }
body.flexify {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body::before {
    content: "You are viewing the legacy version of this website which will not receive any updates.";
    padding: 1em;
    display: block;
    background: black;
    color: white;
    text-align: center;
    font-weight: 400;
    line-height: 1.4;
}

* {
    font-family: 'Rubik', Calibri;
    box-sizing: border-box;
}

:root {
    --pageWidth: 1100px;
    --dimmed: rgba(0, 0, 0, 0.05);
    --textDesign: #375306; /* #375306 */
    --design: #87cc0f; /* #87cc0f */
}

/* Header */
header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: white;
    padding: 12px 24px;
    position: sticky; top: 0;
    z-index: 100;

    /* Alpha */
    box-shadow: 0 0 1rem var(--dimmed);
}

header > div.wrapper {
    display: grid;
    grid-template-columns: auto max-content;
    max-width: var(--pageWidth);
    margin: auto;
    overflow: hidden;
}

header > div.wrapper > div.icon-container {
    display: flex; justify-self: start;
    position: relative;
    border-radius: 50px;
    cursor: pointer;
}

header > div.wrapper img.icon {
    max-width: 50px;
    align-self: center;
    animation-name: eyeMovement;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-timing-function: ease-in-out;
    animation-play-state: paused;
}

header > div.wrapper > div.icon-container:hover img.icon {
    animation-play-state: running;
}

/* Navigation */
header > div.wrapper nav {
    margin: auto 0 auto auto;
} 

header > div.wrapper nav a {
    display: inline-block;
    padding: 8px;
    margin: 4px 0.5px;
    text-decoration: none;
    color: black;
    position: relative;
}

header > div.wrapper nav a::after {
    content: " ";
    display: block;
    opacity: 0;
    position: absolute;
    bottom: 0; left: 0;
    height: 3.5px; width: 100%;
    transform: scaleX(0);
    transform-origin: center;
    background-color: var(--design);
    transition: all 0.15s ease-in-out;
}

header > div.wrapper nav a:hover::after {
    opacity: 1; transform: scaleX(0.825);
}

header > div.wrapper nav a.active::after {
    opacity: 1; transform: scaleX(0.825);
}

/* Mobile Menu Button */
header > div.wrapper div.mobile {
    display: none;
    align-items: center;
    justify-content: end;
    padding: 8px;
    cursor: pointer;
}

@media (max-width: 600px) {
    header > div.wrapper div.mobile { display: flex; }
    header > div.wrapper nav { display: none;}
}

/* Footer */
footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125); 
    margin-top: auto;
    padding: 1em 24px;
}

footer.green {
    margin-top: 0px;
}

footer > div.content { 
    max-width: var(--pageWidth);
    margin: auto;
}

footer > div.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin: 1em auto;
}

footer > div.footer-content div.link-list {
    display: flex;
    flex-direction: column;
    line-height: 1.8;
    font-size: smaller;
    margin-bottom: 1em;
}

footer > div.footer-content div.link-list > a {
    width: max-content;
}

footer > div.footer-content div.link-list img.prefix {
    margin-right: 0.4em;
    width: 18px; height: 18px;
}

footer > div.footer-content div.foot-head {
    margin-bottom: 0.5em;
}

@media (max-width: 400px) {
    footer > div.footer-content {
        grid-template-columns: auto;
    }
}

/* Mobile Menu */
div.mobile-menu {
    position: fixed;
    top: 0; right: 0;
    width: 100%; height: 100%;
    max-width: 400px;
    transform: translate(100%);
    z-index: 999;
    overflow-y: auto;
    transition: transform 0.4s ease-in-out;
    background-color: white;
}

div.mobile-menu::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: calc(100vh - 400px);
    min-height: 300px;
    transform: rotate(180deg);
    filter: grayscale(1);
    z-index: -1;
    background-image: url(../img/backgrounds/ttten.png);
    background-size: cover;
    opacity: 0.425;
}

div.mobile-menu.open {
    transform: translate(0%);
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.125);
}

div.mobile-menu > div.mm-controls {
    padding: 1.5em;
    display: flex;
    justify-content: end;
}

div.mobile-menu #close-mobile-menu {
    cursor: pointer;
}

div.mobile-menu > nav {
    padding: 0em 1em;
}

div.mobile-menu > nav a {
    text-transform: uppercase;
    display: block;
    padding: 1em;
    text-decoration: none;
    color: black;
    border-radius: 6px;
}

div.mobile-menu > nav a.active {
    background-color: var(--design);;
}

@media (min-width: 600px) {
    div.mobile-menu { display: none; }
}

/* Banner */
div.weblog-banner {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: black;
    min-height: 500px;
    border-bottom: var(--design) solid 3px;
    color: white;
}

div.weblog-banner.short {
    min-height: 300px;
}

div.weblog-banner > div {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: inherit;
    text-align: center;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.5);
}

div.weblog-banner > div img.icon {
    vertical-align: middle;
    max-width: 48px;
    margin-right: 8px;
}

div.weblog-banner > div span {
    vertical-align: middle;
}

@media (max-width: 450px) {
    div.weblog-banner > div { font-size: small; }
    div.weblog-banner > div img.icon { max-width: 36px; height: auto }
}

/* Page */
div.page { padding: 12px 24px; }

div.page.dark {
    background-color: #353535;
    color: white;
}

div.page.sticky {
    position: sticky;
    top: 75px;
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    z-index: 99;
}

div.page.dimmed { background-color: var(--dimmed); }
div.page.accent { background-color: var(--dimmed); }

div.page > div.content {
    max-width: var(--pageWidth);
    margin: auto;
}

div.page.bluey {
    background: linear-gradient(rgba(158, 192, 255, 0.15), transparent);
}

div.page.design { 
    overflow: hidden;
    position: relative;
}

div.page.design > div.content {
    position: relative;
    z-index: 10;
}

div.page > img.design-image {
    position: absolute;
    right: 15%; top: 0%;
    transform: scale(1.6);
}

/* Special Divs */
div.valign * {
    vertical-align: middle;
}

/* Filter Area */
div.filter-area {
    display: flex;
    justify-content: end;
}

div.filter-area > div.filter label {
    font-size: 90%;
    margin-right: 0.5em;
    font-weight: lighter;
}

div.filter-area > div.filter select {
    padding: 0.5em;
    background-color: white;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.25);
}

@media (max-width: 425px) {
    div.filter-area > div.filter label { display: none; }
    div.filter-area > div.filter select { width: 100%; }
}

/* Grids */
div.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin: 12px 0px;
    align-items: flex-start;
}

@media (max-width: 400px) {
    div.grid-3 {
        grid-template-columns: auto;
    }
}

div.grid-3 > div {
    border: solid 1px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    transition: all 0.15s ease-in-out;
}

div.grid-3 > div :is(h1, h2, h3, h4, h5, span) {
    margin-block: 0px;
    font-weight: normal;
}

div.grid-3 > div :is(h1, h2, h3, h4, h5, span) img {
    max-width: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

div.grid-3 > div :is(h1, h2, h3, h4, h5, span) span {
    vertical-align: middle;
}


div.grid-3 > div:hover {
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
}

/* Dropdowns */
details.dropdown-extra summary {
    display: flex;
    justify-content: center;
    cursor: pointer;
    padding: 24px;
}

details.dropdown-extra summary img {
    max-width: 24px;
}

details.dropdown-extra > div {
    padding: 24px;
    background-color: var(--dimmed);
    font-weight: 300; font-size: 95%;
    line-height: 1.5;
    overflow-y: auto; max-height: 300px;
    border-bottom-right-radius: 12px; border-bottom-left-radius: 12px;
}

/* Projects */
div.project-list {
    margin: 1em 0px;
    display: flex;
    flex-direction: column;
}

div.project-list > div.project-item {
    display: grid;
    gap: 1em;
    position: relative;
    grid-template-columns: max-content auto max-content;
    cursor: pointer;
    align-items: center;
    border-bottom: rgba(0, 0, 0, 0.25) 1px solid;
    padding: 0.5em 0px;
}

div.project-list > div.project-item > div {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

div.project-list > div.project-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Project Items */
div.project-list > div.project-item > img {
    border-radius: 6px;
    width: 48px;
    aspect-ratio: 1/1;
}

div.project-list > div.project-item > div.info :is(h4, h3, h2, h1) {
    display: block;     
    overflow: hidden;
    text-overflow: ellipsis;
    margin-block: 0; margin-bottom: 0.2em;
    font-weight: normal;
}

div.project-list > div.project-item > div.info span {
    color: rgba(0, 0, 0, 0.7);
    font-size: small;
    font-weight: lighter;
}

div.project-list > div.project-item > div.info {
    overflow: hidden;
    white-space: nowrap;
}

div.project-list > div.project-item > div.stats {
    flex-direction: row;
}

div.project-list > div.project-item > div.stats > div.stat {
    padding: 0.2em 0.75em; display: flex; align-items: center;
}

div.project-list > div.project-item > div.stats > div.stat > img {
    width: 24px;
    aspect-ratio: 1/1;
}

/* Hover-to-reveal */
div.project-list > div.project-item > div.hover-to-reveal {
    position: absolute;
    background-color: white;
    pointer-events: none;
    z-index: 99;
    right: 0; top: 100%;
    padding: 0.5em;
    border: rgba(0, 0, 0, 0.25) 1px solid;
    border-top: none;
    border-bottom-left-radius: 6px; border-bottom-right-radius: 6px;
    display: none;
}

div.project-list > div.project-item:hover > div.hover-to-reveal { display: block; }

/* Page Title */
:is(h1, h2).page-title {
    display: inline-block;
    font-weight: normal;
    position: relative;
}

:is(h1, h2).page-title:target {
    scroll-margin-top: 100px;
}

:is(h1, h2).page-title.higher {
    margin-block-start: 1.2em;
}

:is(h1, h2).page-title::before {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 50%;
    transform: rotate(-1.8deg);
    z-index: -1;
    background-color: var(--design);; 
}

:is(h2).page-title { font-weight: lighter; }

/* About me */
div.aboutme-container {
    display: grid;
    grid-template-columns: auto auto;
    border: solid 1px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1em;
}

div.aboutme-container > * { 
    background-color: var(--dimmed);
}

div.aboutme-container > div { 
    padding: 1em;
    line-height: 1.5;
    font-weight: lighter;
    overflow-y: auto;
    height: 128px;
}

@media (max-width: 500px) { 
    div.aboutme-container > img { display: none; }
    div.aboutme-container > div { height: auto; overflow-y: visible; border-radius: 12px; }
}

/* Other */
.weblog-notice {
    padding: 12px;
    background-color: orange;
    text-align: center;
}

img.icon-round { border-radius: 12px; cursor: pointer; }

/* Span, i, h1, h2, h3, h4, p Stuff */
:is(span, i, h1, h2, h3, h4, p, ul, ol, li).light {
    font-weight: lighter;
}

:is(span, i, h1, h2, h3, h4, p, ul, ol, li).small {
    font-size: smaller;
}

/* Unordered list style */
ul.tv { list-style-image: url("https://img.icons8.com/material/14/null/retro-tv.png"); }
ul.tv > li.watching { color: var(--textDesign); list-style-image: url("https://img.icons8.com/material/14/375306/retro-tv.png"); }

ul.movie { list-style-image: url("https://img.icons8.com/material/14/null/movie-projector.png"); }
ul.movie > li.watching { color: var(--textDesign); list-style-image: url("https://img.icons8.com/material/14/375306/movie-projector.png"); }

/* Quick Button */
:is(a, button).quick-button {
    display: inline-block;
    margin-right: 0.5em; margin-top: 0.5em;
    padding: 1em 2em;
    background-color: var(--design);;
    color: black;
    text-decoration: none;
    border-radius: 8px;

    transition: all 0.125s ease-in-out;
}

:is(a, button).quick-button.no-right-margin {
    margin-right: 0em;
}

:is(a, button).quick-button:hover {
    background-color: rgba(135, 204, 15, 0.7);
}

:is(a, button).quick-button:focus {
    background-color: rgba(135, 204, 15, 0.7);
}

/* Tags */
span.tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--dimmed);
    vertical-align: middle;
    border-radius: 6px;
    border: dashed 1px rgba(0, 0, 0, 0.25);
    font-size: small;
    margin-right: 0.5em;
    font-weight: lighter;
}

span.tag.end { margin-right: 0; }
span.tag.non { background-color: transparent; border: none; }
span.tag.point { position: relative; }
span.tag.point::after {
    content: " ";
    position: absolute;
    right: -3.5px; top: 0;
    height: 100%; width: 1px; 
    transform: scaleY(0.6) rotate(15deg);
    background-color: rgba(0, 0, 0, 0.4);
}

/* Copyright */
div.copyright {
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    position: fixed; z-index: 999;
    border-radius: 6px;
    color: white;
    margin: 10px; bottom: 0;
    backdrop-filter: blur(10px);
    background-color: var(--textDesign);
    transition: all 0.4s ease-in-out;
}

div.copyright.opaque { opacity: 0.25; }
div.copyright.opaque:hover { opacity: 1; }

div.copyright span {
    font-size: larger;
    vertical-align: middle;
    top: -1px; position: relative;
}

@media (max-width: 650px) {
    div.copyright {
        transform: translateX(calc(-100% + -10px));
        opacity: 0;
    }
}

div.copyright div.info {
    margin-top: 5px;
    font-weight: lighter;
}

div.copyright div.info.hidden {
    display: none;
}

div.hitbox-copy {
    position: fixed;
    transform: scale(10);
    padding: 1em;
}

/* Post Dialog Success Prompt */
dialog#post-popup-element {
    position: fixed;
    top: 2em;
    border: none;
    box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.2);
    padding: 1em;
    border-radius: 6px;
    opacity: 0;
    display: block;
    z-index: 9999;
    width: 400px;
    max-width: calc(100vw - 50px);
    transform: translateY(-1em);

    transition: all 0.25s ease-in-out;
}

dialog#post-popup-element.open {
    opacity: 1;
    transform: translateY(0em);
}

dialog#post-popup-element > div.header {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

dialog#post-popup-element > div.header > .last { margin-left: auto; }
dialog#post-popup-element > div.header #post-dialog-close { 
    cursor: pointer; 
    border: none; background: transparent; display: flex; padding: 0; 
}

/* Comment Box */
div.commentbox {
    background: white;
    border-radius: 8px;
    margin-top: 1em;
    border: solid 1px rgba(0,0,0, 0.2);
}