/* ==== SETUP ==== */
* {
    box-sizing: border-box;
}
@font-face {
    font-family: "Director";
    src: url(/resources/fonts/Director-Variable.woff2);
}
@font-face {
    font-family: "Equateur";
    src: url(/resources/fonts/Equateur-Regular.woff2);
}
@font-face {
    font-family: "FT88 Serif";
    src: url(/resources/fonts/FT88-Serif.woff2);
}

@font-face {
    font-family: "Velvelyne";
    src: url(/resources/fonts/Velvelyne-Regular.otf);
}
@font-face {
    font-family: "Velvelyne";
    font-weight: bold;
    src: url(/resources/fonts/Velvelyne-Bold.otf);
}
@font-face {
    font-family: "Velvelyne";
    font-weight: light;
    src: url(/resources/fonts/Velvelyne-Book.otf);
}
@font-face {
    font-family: "Velvelyne";
    font-weight: lighter;
    src: url(/resources/fonts/Velvelyne-Light.otf);
}

/* animation, mainly for sidebar button but could be other things too */
.curve-a {
    transition: transform 150ms cubic-bezier( 0.21, 0.61, 0.35, 1.00 ) ;
}
.curve-b {
    transition: transform 150ms cubic-bezier( 0.65, 0.04, 0.35, 1.00 ) ;
}
.curve-c {
    transition: transform 150ms cubic-bezier( 0.55, 0.06, 0.68, 0.19 ) ;
}

/* ==== SIDEBAR ==== */

#sidebar {
    z-index: 2;

    position: fixed;
    right:0;

    width: max(16rem, 30%);
    height: 100vh;
    padding: 1rem;
    background-color: #f8f8f8;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    visibility: hidden;
    transform: translate(100%, 0px);

    transition: transform 150ms cubic-bezier( 0.21, 0.61, 0.35, 1.00 ), /* same as curve-a */
                visibility 0s 150ms ;
}

#sidebar.visible {
    visibility: visible;
    transform: translate(0px, 0px);
    
    transition: transform 150ms cubic-bezier( 0.21, 0.61, 0.35, 1.00 ), /* same as curve-a */
                visibility 0s 0ms ;
}

#sidebar .noise-overlay {
    position:absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-image: url("resources/noise.svg");
    opacity: 3%;
}

#sidebar-button {
    z-index: 3;
    position: fixed;
    right: 1.5em;
    top: 1.5em;
    width: 200px;
    height: 150px;
    overflow: hidden;

    display: flex;

    background-color: white;

    /* outline: 1px solid red; */
    border: none;
    box-shadow: 5px 5px 5px #00000023;
}

#sidebar-button > input, #sidebar-button > span {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
#sidebar-button:hover {
    cursor: pointer;
}

#sidebar-button-graphic {
    width: 60%;
    height: 60%;
    display: flex;
    margin: auto;
}

/* when unchecked */
.sidebar-button-ellipse {
    background-color: black;
    border-radius: 100%;
    width: 50%;
    margin: -5%;
    transform: scaleY(90%);
}

/* on hover when unchecked */
#sidebar-button:hover .sidebar-button-ellipse {
    transform: scaleY(105%);
}

/* when checked */
#sidebar-button-check:checked ~ #sidebar-button-graphic .sidebar-button-ellipse {
    transform: scaleY(-90%);
}

/* on hover when checked (the UR-selector) */
#sidebar-button:hover #sidebar-button-check:checked ~ #sidebar-button-graphic .sidebar-button-ellipse {
    transform: scaleY(-105%);
}

#nav-menu ul {
    padding: 0;
}

/* for fancy radial animations */
@property --c-anim1 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 5deg;
}
@property --c-anim2 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 5deg;
}
@property --c-start {
    syntax: '<angle>';
    inherits: true;
    initial-value: 0deg;
}
@property --c-p1 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 90deg;
}
@property --c-p2 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 90deg;
}
/*
both points begin on c-start. 
on hover, gradient "from" attr. (--c-anim1) moves to p1; --c-anim2 moves to p2
*/

#nav-menu li {
    display: block;
    font-family: "FT88 Serif", monospace;
    position: relative;
    padding-left: 1em;
    cursor: pointer;
}
#nav-menu li::before {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    left: 1px;
    right: 1px;
    z-index: -1;

    background-color: #f8f8f8;
}
    
#nav-menu li::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -2;

    --c-anim1: var(--c-start);
    --c-anim2: 0deg;
    

    transition: --c-anim1 120ms linear, --c-anim2 120ms linear;
    background-image: conic-gradient(from var(--c-anim1), black 0deg, black var(--c-anim2), transparent var(--c-anim2), transparent 360deg);
}
#nav-menu li:hover::after, #nav-menu li:focus::after {
    --c-anim1: var(--c-p1);
    --c-anim2: var(--c-p2);
}


#nav-menu li > a {
    display: inline-block;
    width: 100%;
    
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 0.5em;

    text-decoration: none;
    color: black;
}
#nav-menu li:hover > a {
    padding-left: 0;
}
#nav-menu li:hover > a::before {
    content: ">";
}

footer, footer a {
    color: #a1a1a1;
    font-family: "Director", monospace;
    font-size: small;
}

/* ==== BACKGROUND ==== */

#background-video-player, #background-video-player > * {
    position:fixed;
    min-width: 100vw;
    min-height: 100vh;
    overflow: hidden;

    z-index: -1;
}
#background-video-player video {
    pointer-events: none;
}
#background-video-player::after {
    content: "";
    background-color: #00000088;
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    right:0;
}

/* ==== MAIN CONTENT ==== */

body {
    margin: 0;
}

main {
    position:absolute;
    min-height: 100vh;
    max-width: 100%;

    margin-left: 5rem;
}

#title {
    font-size: 80pt;
    font-family: "Velvelyne", monospace;
    text-wrap: nowrap;
    
    color: white;
    margin-left: -2rem;
    margin-bottom: 0;
}
#title span {
    position: relative;
    z-index: 1;
}
#title span::before {
    z-index: -1;

    content: "";
    width: 100%;
    height: 100%;
    position: absolute;

    display: inline-block;
    background-color: black;
    transform: scaleY(0.6) translate(2rem, 2.5rem);
}

#subtitle {
    font-family: "Director", monospace;
    color:white;
    background-color: black;
}

/* ===== TEXT ===== */
p {
    font-family: "Equateur", serif;
}
h4 {
    color:white;
    background-color: black;
    display:inline-block;
    margin-bottom: 0;
}
ul {
    list-style-type: ">> ";
}

/* ===== DIALOG ===== */

#page-dialog {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.windowbox {
    border: none;
    font-family: "Director", monospace;
    margin-left: 0;
    background-color: #fffffff8;
    backdrop-filter: blur(5px);

    min-width: 300px;
    max-width: 80vw;
    min-height: 200px;
}

.windowbox-titlebar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.windowbox-title {
    border: 1px solid black;
    color: white;
    background-color: black;
    padding: 0 1em 0 1em;
    height: 30px;
    line-height: 29px;
    font-family: "FT88 Serif", monospace;
    /* font-weight: bold; */

    white-space: nowrap;
}
.linez {
    width: 100%;
    height: 1.5em;
    margin-top: auto;
    margin-bottom: auto;
    background-image: repeating-linear-gradient(-45deg,
         gainsboro, gainsboro 1px, transparent 2px, transparent 15px
        );
}
.styled-button {
    min-width: 30px;
    height: 30px;
    background-color: #000000f8;
    border: 1px solid black;
    color: white;

    font-family: "Director";
}
.styled-button.top-level {
    background-color: #fffffff8;
    border: none;
    color:black;

    padding: 0 1em 0 1em;
}
.styled-button:hover {
    background-color: #050505f8;
    box-shadow: 1px 1px black;
    transform: translate(-1px,-1px);
}
.styled-button.top-level:hover {
    background-color: #ffffff;
    box-shadow: 1px 1px #a1a1a1;
}


/* ===== VIDEO PLAYER POPUP ===== */
#video-dialog {
    position: fixed;
    width: 80vw;
    height: auto;
    margin-left: auto;
    top: 50%;
    transform:translateY(-50%);
    left:0;
    /* transform: translate(-50%,-50%); */
    z-index: 3;

    /* box-shadow: 0 0 0 10000px #ffffff44 ; */
    box-shadow: 5px 5px 10px #050505f8,
                0px 0px 0px 6000px #00000088
}
#video-dialog video {
    max-width: 100%;
    max-height: 95vh;
    padding-top: 10px;
}