@import url('https://fonts.googleapis.com/css2?family=Grandstander:ital,wght@0,100..900;1,100..900&display=swap');

:root{
    color-scheme: light dark;
    --red: #7e1914;
    --orange: #ae6b37;
    --teal: #2d7672;
    --dark-blue: #2d525c;
    --purple: #523d44;
    --blue: #1978a7;
    --accent-color: var(--blue);
    --display-font: grandstander;
    --body-font:Arial, Helvetica, sans-serif;
    --bg-color: white;
}

body{
    padding:0;margin:0;
    font-family:var(--body-font);
}

h1,h2,h3,h4,h5,h6{
    margin:0;
    font-family:var(--display-font);
}

ol,ul{margin-top:0;}
a{text-decoration:none;color:inherit;}
p{margin-top:0;}

p > a { text-decoration:underline; }
main p > a {
    display: inline-block;
    color: var(--accent-color);
}

main p > a:hover { 
    background-color: var(--accent-color);
    color: white;
}

img { max-width: 100%;}

hr.clear{
    margin:0;
    border:0;
    clear:both;
}

ol:last-child,ul:last-child{margin-bottom:0;}

blockquote {
    border-left: 3px solid var(--accent-color);
    margin: 0;
    margin-bottom: 1rem;
    padding: 1rem;
    padding-right: 0;
}

ul > li {list-style-type:"★ ";}
ul > li:nth-child(2n){list-style-type:"✮ ";}

.task-list > li {list-style-type: none!important;}
.task-list { padding-left: 0; }

.outline{
    --color:white;
    --width:2px;
    filter:drop-shadow(var(--width)0 0 var(--color))drop-shadow(calc(-1*var(--width))0 0 var(--color))drop-shadow(0 var(--width)0 var(--color))drop-shadow(0 calc(-1*var(--width)) 0 var(--color))
}

.justified-gallery {
    --space: 5px;
    --min-height: 180px;
}

.justified-gallery {
    display: flex;
    flex-wrap: wrap;
    grid-gap: var(--space);
    list-style: none;
}

.justified-gallery > * {
    width:100%;
    flex-grow: calc(var(--width) * (100000 / var(--height)));
    flex-basis: calc(var(--min-height) * (var(--width) / var(--height)));
    aspect-ratio: var(--width) / var(--height);
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.justified-gallery > * > img {
    top: 0; left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
}

.yt-embed {
    --embed-thumb: unset;
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
}

.yt-embed > iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

.tooltip {
    text-decoration:none;
    position:relative;
}
.tooltip span {
    color: #000;
    display:none;
    background: #fff;
    outline: 1px solid #000;
    padding: 0.3rem;
    z-index: 100;
}

.tooltip:hover span {
    display:block;
    position:fixed;
    overflow:hidden;
    z-index: 100;
}

.float-right{float:right;margin-left:1rem;margin-bottom:1rem;display:block;}
.float-left{float:left;margin-right:1rem;margin-bottom:1rem;display:block;}

@media only screen and (max-width: 450px) {
    .float-right,.float-left{float:none;margin:1rem auto;}
}

@media only screen and (min-width: 450px) {
    .db-list{columns:2;}
}

.checklist > li { list-style-type: "□ "; }

.x { 
    text-decoration: line-through;
    list-style-type: "■ "!important;
}

.flex {
    display: flex;
    gap: 0.5rem;
}

::selection{
    background-color: var(--blue);
    color: white;
}

#lastupdate { font-family: var(--display-font); }

body {
    background-color: #2b2c37;
    background-image: linear-gradient(0deg, #2b2c37 50%, #31323c 50%);
    background-size: 40px 40px;
}

#container > header { grid-area: header; }
#container > nav { grid-area: nav; }
#container > main { grid-area: main; }
#container > aside { grid-area: aside; }
#container > footer { grid-area: footer; }

#container {
    outline: var(--border-dark);
    border-left: 5px solid var(--red);
    border-right: 5px solid var(--red);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.6));
  
    margin: auto;
    width: 95%;
    max-width: 900px;
    box-sizing: border-box;
    display: grid;
    grid-template-areas:
        'header header header'
        'nav main aside'
        'footer footer footer';
    grid-template-columns: auto 1fr auto;
}


#container > header {
    user-select: none;
    border-left: 2px solid #c08989;
    border-right: 2px solid black;
    aspect-ratio: 7/2;
    
    background-color: black;
    background-image: url(/meta/img/bg.jpg);
    background-size: cover;
    background-position: 0 20%;
    
    > a { display: block; height: 100%;}

    &.psych { background-image: url(/meta/img/psych.jpg); background-position: 0 5%;}
    &.eighty-four { background-image: url(/meta/img/eighty-four.jpg); background-position: 0 20%; }
    &.pmd { background-image: url(/meta/img/pmd.jpg); background-position: 0 75%;}
    &.dissent { background-image: url(/meta/img/dissent.jpg); background-position: 0 81%; }
    &.misc { background-image: url(/meta/img/misc.jpg); background-position: 0 25%;}
}

header > .slashed-nav {
    background-color: black;
    padding: 0.5rem;
    text-align: right;
}

.marquee {
  position: relative;
  max-width: 100%;
  height: 2.5rem;
  overflow-x: hidden;
  background-color: black;
  color: white;
  border-bottom: 1px solid white;
}

.marquee span::after {
  content: "|";
  padding: 0 1.5rem;
}

.track {
    position: absolute;
    top:50%;
    white-space: nowrap;
    animation: marquee 150s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0%) translateY(-50%); }
  100% { transform: translateX(-50%) translateY(-50%); }
}

#navButton {
    display: none;
    border: 0;
    width: 100%;
    background-color: black;
    border: 1px solid white;
    border-left: 0;
    border-right: 0;
    text-align: right;
    color: white;
    padding: 0.5rem 1rem;
}

nav {
    user-select: none;
    background-color: #16161c;
    border-left: 2px solid black;
    border-bottom: 3px solid black;
}

nav #navContent { 
    background-color: #16161c;
    width: 180px;
}

nav #navContent > div {
    --chosen: var(--red);
    &:nth-of-type(2){--chosen: var(--orange);}
    &:nth-of-type(3){--chosen: var(--teal);}
    &:nth-of-type(4){--chosen: var(--dark-blue);}
    &:nth-of-type(5){--chosen: var(--purple);}
}

nav #navContent > div > a {
    display: block;
    color: white;
    padding: 0.5rem;
    font-family: var(--display-font);

    --border: 3px solid black;
    border-top: var(--border);
    border-bottom: var(--border);

    background-color: var(--chosen);

    &:hover {
        background-color: white;
        color: var(--chosen);
    }
}

nav ul {
  color: lightgray;
  padding-left: 0;
  margin-bottom: 0;
}

nav ul li {
    list-style: none!important;
    &:not(:last-child){border-bottom: 1px solid gray;}
}

nav ul li a {
    display: block;
    padding: 0.5rem;

    &:hover {
        background-color: white;
        color: var(--chosen);
    }
}

main {
    border: 3px solid black;
    background-color: var(--bg-color);
    min-height: 90vh;
}

main > div {
    padding: 1rem;
}

article:not(:first-of-type) {
    margin-top: 1.5rem;
    border-top: 1.5px dashed lightgray;
    padding-top: 1rem;
}

aside {
    box-sizing: border-box;
    max-width: 250px;
    padding: 1rem;
    background-color: #f0daae;
    border-top: var(--border-dark);
    border-right: var(--border-light);
}

footer {
  user-select: none;
  color: white;
  background-color: black;
  padding: 1rem;
  border-top: 1px solid white;
    transition: 0.2s;
}

footer ul {
    display: inline-flex;
    list-style-position: inside;
    flex-wrap: wrap;
    gap: 1rem;
    padding-left: 0;
    margin-bottom: 0.3rem;
}
footer > span { display: block;margin-top: 0.5rem; opacity: 0.5; }
footer a:hover { color: var(--accent-color);opacity: 1!important; }

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000;
        --blue: #22a4e4;
    }
    main { color: #fff; }
}

/* Make nav collapsable */
/* Also add a neat doll next to it :3 */
@media only screen and (max-width: 600px) {
    #container { display: block;}
    #navButton { display: block;}
    .flex { display: block;}
    .flex > * { margin-bottom: 1rem;}
    nav {
        border-right: 3px solid black;
        overflow: hidden;
        transition: 0.2s;
        max-height: 0;
    }
    #navContent {
        border-right: 3px solid black;
        border-bottom: 0;
    }
    .open {max-height: 1000px;}
    main { border-top: 0; }
}

.view-nav {
    font-family: var(--display-font);
    background-color: black;
    color: gray;
    padding: 0.5rem;
}
.view-nav a:not(:last-child)::after {
    content: "/";
    display: inline-block;
    margin: 0 0.5rem;
    color: white;
}

.view-item {clear: both; }

.card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-item {
    display: block;
    flex: 25%;
    border: 2px solid;
    background-color: white;
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.card-thumb {
    display: block;
    width: 100%; height: 100%;
    object-position: 50% 0;
    object-fit: cover;
    transition: 0.2s ease-out;
}

.card-item:hover .card-thumb {
    transform: scale(110%);
}


.card-info {
    font-family: var(--display-font);
    padding: 0.5rem; box-sizing: border-box;
    background: linear-gradient(#00000000, black);
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    color: white;
    text-shadow: 0 0 10px black;
    font-size: clamp(16px, 0.75rem + 0.8vw, 24px);
}

.char-card {
    border: 2px solid;
    overflow: hidden;
    margin-bottom: 1rem;
}

.char-thumb {
    flex: 1;
    aspect-ratio: 3/4;
    background-size: cover;
    background-repeat: no-repeat;
}

.char-info {
    flex: 2;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;

    > div {width: 100%;}
    ul { padding-left: 0; list-style-position: inside;}
    li span { font-weight: bolder; }
    li span::after{ content: " :"; }
}

.char-int {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

fieldset.char-rel {
    margin-bottom: 1rem;

    > legend a { color: inherit; }
    > legend a:hover { color: var(--accent-color); background-color: unset; }
}

.char-rel-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 1rem;
}

.char-rel-tag {
    font-family: var(--display-font);
    display: inline-block;
    background-color: lightgray;
    color: #000;
    padding: 0.1rem 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 100px;
}

.char-rel-thumb {
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
    gap: 0.5rem;
}

.char-rel-thumb > div {
    background-color: unset;
}

.char-rel-thumb img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: 50% 0;
    border: 1px solid;
    box-sizing: border-box;
}

@media only screen and (max-width: 401px) {
    .char-rel-content { grid-template-columns: 1fr; }
    .char-rel-thumb > div { display: none };

}


@media only screen and (min-width: 400px) {
    .char-card { display: flex; }
}

@media only screen and (min-width: 900px) {
    .char-info ul { columns:2; }
}

@media only screen and (min-width: 900px) {
    .card { grid-template-columns: repeat(3, 1fr); }
    .char-thumb {
        background-position: 50% 0%;
        aspect-ratio: 2/3;
    }
}

/* BLOG START */
/* Use these tags to hide certain elements in the blog list */
.no-title .item-title{display:none;}
.no-date .item-date{display:none;}
.no-desc .item-desc{display:none;}
.no-img .item-img{display:none;}

.item-img img{display: block;}
.item-img img[src='./']{display:none;}

.item-title{grid-area:title;}
.item-date{grid-area:date;}
.item-desc{grid-area:desc;}
.item-img{grid-area:img;}

.compact {
    .item-title {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .blog-item{
        display:grid;
        grid-template-areas:
        'date title img'
        'desc desc img';
        grid-template-columns:auto 1fr auto;
        grid-template-rows:auto 1fr;
        transition: 0.1s;
    }

    .item-date{ font-weight:bold; }

    .item-date:after{
        content:":";
        padding:0 0.5rem;
    }
    .item-desc{margin-left:1rem;}
    a {display: block;}
    a:hover .blog-item{
        background-color:var(--accent-color);
        padding:0.5rem;
    }
}

.window {
    flex: 1;
    
    a{
        display: block;
        transition: 0.3s;
        position: relative;
        overflow: hidden;
        margin-bottom: 1rem;
    }

    a:hover { outline: 3px solid var(--accent-color)}
    a:hover .item-title { color: var(--accent-color)}
    .blog-item{
        border: 2px solid;
        transition: 0.2s;
        break-inside: avoid;
        display:grid;
        grid-template-areas:
        'img'
        'title'
        'date'
        'desc';
    }

    .item-title{
        padding:0.5rem;
        padding-bottom: 0;
        z-index:1;
        font-weight: bold;
        font-size: 1.3rem;
        transition: 0.3s;
    }

    .item-date{
        padding:0.5rem;
        padding-top: 0;
        color:var(--main-color);
    }

    .item-desc {
        padding: 0.5rem;
        padding-top: 0;
        > span { color: lightgray; }
    }
}

@media only screen and (max-width: 500px) {
    #blog_archive .window:last-child {display: none;}
}

@media only screen and (min-width: 501px) {
    #blog_archive {
        display: flex;
        gap:0.5rem;
    }
    #blog_archive .window:first-child > :nth-of-type(even){display:none;}
    #blog_archive .window:last-child > :nth-of-type(odd){display:none;}
}

#blog-archive, #blog-recent {user-select:none;}
.item-title,.item-date{font-family: var(--display-font);}

#nextprev{
    user-select: none;
    margin-top:2rem;
    font-family: var(--display-font);
    border-top: 2px dashed lightgray;
    padding-top: 1.5rem;
}

#nextprev a {
    padding: 0.5rem;
    margin-right: 0.3rem;
    border-radius: 8px;
}
#nextprev-next {
    border: 2px solid black;
    background-color: black;
    color: white;
}
#nextprev-prev { border: 2px solid black; }
/* BLOG END */

/* LIGHTBOX START */
.justified-gallery{
  user-select: none;
  margin-bottom: var(--space);
}

.justified-gallery img{ transition:0.3s; border-radius: 3px; }
.justified-gallery a:hover img{ transform:scale(95%); }

.justified-gallery button {
  padding: 0;
  border: unset;
  background-color: unset;
  > img { display: block; }
}

#lightbox {
    --time: 0.4s;
    --default-height: 100vh;
    --default-color:rgba(0, 0, 0, 0.8);
    --default-img: calc(100vh - 4rem);
    top:0;
    position: fixed;
    width: 100vw;
    height: 0;
    overflow: hidden;
    text-align: center;
    transition: var(--time);
    z-index: 100;
    user-select: none;
}

#lightbox-content {
    min-height: 100px;
    min-width: 100px;
    margin-top: 1rem;
    position: relative;
    display: inline-block;
    padding: 0.5rem;
    background-color: white;
    top: 50%;
    transform: translateY(calc(-50% - 1.5rem));

    img {
        display: block;
        transition: 1s;
        max-height: 0;
        width: 100%;
        object-fit: cover;
    }
}

#lightbox-content > button {
    display: block;
    position: absolute;
    height: 100%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--time);
    background-color: unset;
    border: none;

    &:hover { opacity:1; }
    &#lightbox-prev {
        width: 40%;
        /* background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.5), #0000); */
        left: 0;
    }

    &#lightbox-next {
        width: 40%;
        /* background-image: linear-gradient(90deg, #0000, rgba(255, 255, 255, 0.5)); */
        right: 0;
    }
}

#lightbox-info {
    padding-left: 0.5rem;
    color: white;
    position: absolute;
    bottom: -1.5rem; left:0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    width: 95%;
    user-select: none;
    
    > a {
        white-space: nowrap;
        font-family: var(--display-font);
    }

    > a:hover { font-style: italic; }
}
/* LIGHTBOX END */