/*
Theme Name: The Parallel Report theme
Author: The Parallel Report
Description: Official theme for The Parallel Report.
Version: 1
*/

/* TEMPORARY, JUST FOR TESTING. CAN BE REMOVED AT ANY TIME WITHOUT BREAKING ANYTHING AT ALL */
p {
    color: var(--title-color);
}
/* TEMPORARY, JUST FOR TESTING. CAN BE REMOVED AT ANY TIME WITHOUT BREAKING ANYTHING AT ALL */

:root{
    --main-color: #fffff0;
    --secondary-color: #ded9d9;
    --third-color: #9c9c9c;
    --title-color: #161616;

    --nav-height: 60%; /* value updated by js as soon as page loads */
    --sidebar-width: 18%;
}

@media (prefers-color-scheme: dark) {
    :root{
    --main-color: #161616;
    --secondary-color: #ded9d9;
    --third-color: #9c9c9c;
    --title-color: #fffff0;
    }
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    font-family: "IBM Plex Mono", serif; /* NEW */
    font-weight: 400; /* NEW */
    font-style: normal; /* NEW */
    /* font-family: "IBM Plex Mono", monospace; */
}

body, html{
    background-color: var(--main-color);
    width: 100%;
    height: 100vh;
}

main{
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;
    border: 1px solid var(--secondary-color);
    transition: 1s;
    opacity: 0;
}


/* PRIVACY AND COPYRIGHT */

.privacy-horizontal {
    display: inline;
}

.copyright-container {
    position: absolute;
    font-size: 75%;
    color: var(--third-color);
    right: 0;
    bottom: -16px;
}

.copyright-container a {
    color: var(--third-color);
    text-decoration: none;
}

.privacy-vertical {
    display: none;
    position: absolute;
    font-size: 75%;
    right: -16px;
    bottom: 0;

    transform: translateX(100%) rotate(-90deg);
    transform-origin: bottom left;
    /* writing-mode: sideways-lr; */
}

.privacy-vertical a {
    color: var(--third-color);
    text-decoration: none;
}


/* NAVIGATION SIDEBAR */

.nav {
    /* text-transform: lowercase; */
    position: relative;
    /* top: 0;
    left: 0; */
    width: var(--sidebar-width);
    height: auto;        /* REQUIRES JS TO WORK WITH INFO; SHOULD CHANGE TO FIT ASPECT RATIOS */
    border-right: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    padding: 8px;
    padding-bottom: 16px;
    /* EVERYTHING BELOW HERE MAY NOT BE NECESSARY? */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: left;
    align-items: center;
    overflow: visible; /* Consider hidden... not sure what looks better. */
}

.navlist {
    display: flex;
    justify-content: space-between;
}

ul {
    width: 100%;
    height: 100%;
    display: flex; /* Necessary to switch between row and column display when resizing window. */
    flex-direction: column; /* Necessary to switch between row and column display when resizing window. */
    list-style: none;
}

ul li {
    letter-spacing: 1px;
}

ul .inner {
    padding-top: 0.5em;
    width: auto;
}

.navlink {
    font-size: 60%;
    color: var(--third-color);
    text-decoration: none;
    margin-left: 1.4em;
    text-transform: uppercase;
    font-weight: 700;
    user-select: none;
    -webkit-user-select: none;
}

.navlink a {
    color: var(--third-color);
    text-decoration: none;
}

.sublink {
    font-size: 60%;
    display: none;
    user-select: none;
    -webkit-user-select: none;
    margin-left: 1.4em;
    text-transform: uppercase;
}

.sublink a{
    color: var(--third-color);
    text-decoration: none;
}

.dropdown {
    display: flex;
    flex-direction: column;
}

.nav-spacer {
    cursor: default;
}

.hover-dot {
    position: relative; /* Ensures the pseudo-element is positioned relative to the link */
}

.hover-dot:hover::after {
    content: ""; /* Creates the pseudo-element */
    position: absolute; /* Positions it relative to the parent element */
    top: 50%; /* Aligns the dot vertically with the text */
    left: min(100px, 1%); /* Adjusts the position slightly to the right of the link */
    transform: translate(-1.4em, -50%); /* Centers the dot vertically */
    width: 6px; /* Size of the dot */
    height: 6px; /* Size of the dot */
    background-color: red; /* Color of the dot */
    border-radius: 50%; /* Makes the dot circular */
}


#header a {
    font-family: "IBM Plex Sans", serif;
    font-size: 75%;
    color: var(--title-color);
    text-decoration: none;
}


.accordion {
    cursor: pointer;
}

.mode {
    cursor: pointer;
}

.info {
    position: relative;
    padding: 8px;
    flex-grow: 1; /* Makes info div fill remaining sidebar height. */
    height: calc(100% - var(--nav-height) + 1px);
    overflow-y: scroll;
    overflow-x: hidden; /* Stops scrolling in x-dimension if a word is too long. */
    width: var(--sidebar-width);
    border-right: 1px solid var(--secondary-color);

    /* Font specification here (instead of in .info p) is necessary for javascript textContent insertion to display correctly. */
    font-size: 85%;
    color: var(--title-color);
    font-family: "IBM Plex Mono", serif;
    margin-bottom: 0.5em; /* Spacing between paragraphs */
        
    white-space: pre-line; /* Allows line breaks in textContent. */
}

/* .info p IS ONLY FOR THE PREVIEW, FONT SPECIFICATION SHOULD OCCUR IN .info */
.info p {
    font-family: "IBM Plex Sans", serif;
    margin-bottom: 0.5em; /* Spacing between paragraphs */
}


/* GALLERY */

.gallery {
    position: absolute;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100%;
    /* Positioning container for arrows and counter */
    display: flex;
    justify-content: center; /* center .counter horizontally */
    align-items: flex-end;   /* align everything to bottom */
    box-sizing: border-box;
}

.ephemera-gallery {
    position: absolute;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100%;
    /* Positioning container for arrows and counter */
    display: flex;
    justify-content: center; /* center .counter horizontally */
    align-items: flex-end;   /* align everything to bottom */
    box-sizing: border-box;
}

.counter {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;

    padding: 8px;

    user-select: none;
    -webkit-user-select: none;

    height: min(5%, 2em);
    z-index: 2; /* Ensures it appears above the image */
}
  

.counter p {
    margin: 0;
    font-size: 75%;
    color: var(--third-color);
    letter-spacing: 1px;
}

.left-arrow,
.right-arrow {
    display: inline;
    position: absolute;
    font-size: 110%;
    user-select: none;
    -webkit-user-select: none;
}

.left-arrow {
    left: 8px;
}

.right-arrow {
    right: 8px;
}

.left-arrow p {
    color: var(--third-color);
}

.right-arrow p {
    color: var(--third-color);
}


.image-wrap {
    display: inline;
    position: absolute;
    top: calc(50% - min(5%, 2em) / 2); /* Centers the image vertically without overlapping .counter */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 90%;
}

.image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ephemera-wrap {
    display: inline;
    position: absolute;
    top: calc(50% - min(5%, 2em) / 2); /* Centers the image vertically without overlapping .counter */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 90%;
}

.ephemera {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.thumbnails {
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    /* justify-content: space-between; */
    align-content: flex-start; /* May not be necessary? */
    align-items: stretch; /* May not be necessary? */

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    /* background-color: red; */

    flex-grow: 1; /* Makes info div fill remaining sidebar height. */
    overflow-y: scroll;
    overflow-x: hidden; /* May not be necessary? */
}

.thumbnail-image {
    cursor: pointer;
    position: relative;
    margin: 8px;
    top: 0;
    left: 0;
    width: min(150px, 20vw);
    height: min(150px, 20vw);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.previous {
    display: inline;
    position: absolute;
    left: 0;
    top: 0;
    width: 33%;
    height: 100%;
    z-index: 3;
    cursor: none;
}

.change {
    display: inline;
    position: absolute;
    left: 33%;
    top: 0;
    width: 34%;
    height: 100%;
    z-index: 3;
    cursor: none;
}

.next {
    display: inline;
    position: absolute;
    left: calc(33% + 34%);
    top: 0;
    width: 33%;
    height: 100%;
    z-index: 3;
    cursor: none;
}

.cursor {
    display: none;
    pointer-events: none;
}

.cursor.left {
    display: block;
    position: fixed;
    width: 0;
    height: 0;
    left: 0;
    top: 0;
    border-right: 10px solid white;
    mix-blend-mode: difference;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    z-index: 10;
}

.cursor.centre {
    display: block;
    position: fixed;
    z-index: 10;
    background-color: white;
    mix-blend-mode: difference;
}
.cursor.centre::before {
    left: 0;
    top: 0;
    content: "";
    position: absolute;
    width: 6px; /* Size of each smaller square */
    height: 4px; /* Size of each smaller square */
    background-color: white;
    box-shadow: 6px 8px 0 0 white;
}
.cursor.centre::after {
    left: 0;
    top: 6px;
    content: "";
    position: absolute;
    width: 4px; /* Size of each smaller square */
    height: 6px;/* Size of each smaller square */
    background-color: white;
    box-shadow: 8px -6px 0 0 white;
}

/* Reusable cursor visual for UI display */
.cursor-icon.centre {
    position: relative; /* Not fixed — static inside the counter */
    min-width: 14px;
    min-height: 14px;
  }
  
  .cursor-icon.centre::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 4px;
    background-color: var(--third-color);
    box-shadow: 6px 8px 0 0 var(--third-color);
  }
  
  .cursor-icon.centre::after {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 6px;
    background-color: var(--third-color);
    box-shadow: 8px -6px 0 0 var(--third-color);
  }

.cursor.right {
    display: block;
    position: fixed;
    width: 0;
    height: 0;
    left: 0;
    top: 0;
    border-left: 10px solid white;
    mix-blend-mode: difference;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    z-index: 10;
}


/* STATIC PAGE */

.static-page {
    position: absolute;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 32px;
    padding-right: 32px;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100%;

    overflow-y: scroll;
    overflow-x: hidden;
    
    color: var(--title-color);
    /* background-color: red; */
}

.static-wrap {
    height: 100%;
    width: 100%; 

    /* I can use this to avoid excessively wide text on wide screens, but it has its own problems... */
    /* position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 600px; */

    /* background-color: blue; */
}

.static-wrap h2 {
    font-family: "IBM Plex Serif", serif;
    font-weight: 400;
    font-style: italic;

    text-align: right;
    border-bottom: 1px solid var(--secondary-color);
    margin-bottom: 0.5em;
}

.static-wrap h3, .static-wrap h3 a {
    font-family: "IBM Plex Sans", serif;
    font-weight: 700;
    font-style: normal;
    text-decoration: none;
    color: var(--title-color);
    /* line-height: 0.5em; /* Helps with author name wrapping. */

    text-align: left;
    margin-top: 0.6em;
}

.static-wrap h3 span {
    font-style: italic;
    font-size: 60%;
}

.static-wrap h3:hover + h4 {
    color: var(--third-color);
}

.static-wrap h4 {
    font-family: "IBM Plex Sans", serif;
    font-weight: 400;
    font-style: normal;
    text-decoration: none;
    color: var(--main-color);
    text-align: left;
    font-style: italic;
    font-size: 85%;

    transition: color 0.3s ease;
}

.static-wrap h4:hover {
    color: var(--third-color);
}

.archive-years {
    display: flex;
    justify-content: space-between;

    font-size: 85%;

    text-align: left;
    margin-top: -0.8em;
    margin-bottom: 0.2em;
}

.archive-dropdown {
    /* w3schools claims this is necessary to position the dropdown content */
    position: relative;
    display: inline-block;
}

.archive-dropdown-content {
    width: 100%;
    line-height: 1.5em;
    background-color: var(--main-color);
    text-align: right;
    display: none;
    position: absolute;
    z-index: 1;
}

.archive-dropdown-content a {
    color: var(--title-color);
    text-decoration: none;
    display: block;
}

.archive-dropdown-content a:hover {color: var(--third-color)}
.archive-dropdown:hover .archive-dropdown-content {display: block;}

.static-wrap p {
    font-family: "IBM Plex Sans", serif;
    font-weight: 400;
    font-style: normal;

    margin-bottom: 0.5em;
}

.static-wrap p a {
    font-family: "IBM Plex Sans", serif;
    font-weight: 400;
    font-style: normal;
    text-decoration: underline;
    color: inherit;

    margin-bottom: 0.5em;
}

.static-wrap blockquote {
    margin-left: 2em;
}

.static-wrap blockquote p {
    font-family: "IBM Plex Serif", serif;
    font-weight: 400;
    font-style: italic;
}


/* SPLASH SCREEN */

.splash {
    /* THIS IS A COPY OF main */
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;
    border: 1px solid var(--main-color);
}

/* Time for splash screen to fade out. */
.splash.active {
    opacity: 0;
    transition: 0.5s;
}

.splash-intermediary {
    /* THIS IS A COPY OF .nav, with border removed */
    position: relative;
    /* top: 0;
    left: 0; */
    width: var(--sidebar-width);
    height: auto;        /* REQUIRES JS TO WORK WITH INFO; SHOULD CHANGE TO FIT ASPECT RATIOS */
    padding: 8px;
    padding-bottom: 16px;
    /* EVERYTHING BELOW HERE MAY NOT BE NECESSARY? */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: left;
    align-items: center;
    overflow: visible; /* Consider hidden... not sure what looks better. */
}

/* Hides splash text before it slides up. */
.splash-title-container {
    /* THIS IS AN EXACT COPY OF .navlist */
    display: flex;
    justify-content: space-between;
    /* height and overflow are used to achieve splash animation */
    /* height: 20px; */ /* THIS WAS EQUAL TO TRANSLATE-Y IN SPLASH TITLE SPAN FOR ANIMATION BUT BROKE FLEX DISPLAY */
    overflow: hidden;
}

#splash-title a {
    /* THIS IS A COPY OF #header */
    font-family: "IBM Plex Sans", serif;
    font-size: 75%;
    color: var(--title-color);
    text-decoration: none;
}

#splash-title span{
    display: inline-block;
    transform: translateY(20px);
    transition: 0.3s;
}


@media (orientation: portrait) or (max-width: 600px){

    .privacy-horizontal {
        display: none;
    }

    .privacy-vertical {
        display: inline;
    }

    .nav {
        flex-direction: row; /* May not be necessary? */
        width: 100%;
        height: max(5%, 2em);
        border-right: none;
        border-bottom: 1px solid var(--secondary-color);
        padding: 8px;
        justify-content: left;
        align-items: center;
    }

    .splash-intermediary {
        /* THIS IS AN EXACT COPY OF .nav */
        flex-direction: row; /* May not be necessary? */
        width: 100%;
        height: max(5%, 2em);
        border-right: none;
        padding: 8px;
        justify-content: left;
        align-items: center;
    }

    ul{
        flex-direction: row;
    }

    ul .inner {
        position: relative; /* Necessary for dropdown positioning. */
        justify-content: right;
    }

    .sublink {
        margin-top: 1em;
        margin-right: 1em;
    }

    ul a {
        vertical-align: top;
        /* The line below is only necessary if I omit the &nbsp in "ABOUT" and "MODE". */
        /* padding-left: 8px; */
    }

    .hover-dot:hover::after {
        display: none;
    }

    .dropdown {
        position: absolute;
        z-index: 999;
        top: 1.5em;
        left: 0;
        width: 4.3em;
        text-align: right;
        background-color: var(--main-color);
        /* border-bottom: 1px solid var(--secondary-color); */
        border-left: 1px solid var(--secondary-color);
        border-right: 1px solid var(--secondary-color);
    }

    .gallery {
        top: max(5%, 2em);
        left: 0;
        width: 100%;
        height: 75%;
    }

    .ephemera-gallery {
    top: max(5%, 2em);
    left: 0;
    width: 100%;
    height: min(95%, calc(100% - 2em));
}
    
    .counter {
        max-width: 100%;
        padding: 4px;
    }

    /* .gallery-controls {
        display: inline;
        user-select: none;
        position: absolute;
        bottom: 0;
        right: 0;
        max-width: 5%;
        overflow: hidden;
        padding: 8px;
    } */

    .image-wrap {
        width: 90%;
        /* background-color: blue; */
    }

    .static-page {
        padding-top: 16px;
        top: max(5%, 2em);
        left: 0;
        width: 100%;
        height: calc(100% - max(5%, 2em));
    }

    .info {
        top: 75%;
        width: 100%;
        height: calc(100% - (max(5%, 2em) + 75%));
        border-top: 1px solid var(--secondary-color);
        border-right: none;

        white-space: pre-line; /* Allows line breaks in textContent. Might not be necessary, since I already specified it above.*/
    }

    .static-wrap h4 {
        color: var(--third-color);
    }
}


@media (hover: none) or (pointer: coarse) {
  .static-wrap h4 {
        color: var(--third-color);
    }
}


/* 
@media (orientation:portrait) {
    .previous {
        width: 100%;
        height: 33%;
    }
    
    .change {
        left: 0;
        top: 33%;
        width: 100%;
        height: 34%;
    }
    
    .next {
        left: 0;
        top: 67%;
        width: 100%;
        height: 33%;
    }

    .cursor.left {
        border-bottom: 10px solid white;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
    }
    
    .cursor.right {
        border-top: 10px solid white;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
    }
} */
