:root{
    /* THEMES */
    --colorText: #1a1919;
    --colorAcnt: #383d3d;
    --colorHead: #9e9c93;
    --colorMenu: #d1d0cc;
    --colorBody: #f5f5f5;
    --colorLink: #1798cf;
    --colorHovr: #f7470d;

    /* POSITIONS */
    --vBar-gap:                 2rem;
    --panel-width:              20rem;
    --content-left:             16rem;
    --content-right-max:        64rem;
    --content-right:            min(var(--content-right-max), calc(100vw - var(--content-left) - var(--panel-width)));
    --content-right-checked:    min(var(--content-right-max), calc(100vw - var(--content-left)));
    --content-pad-left:         calc((100vw - var(--content-left) - var(--content-right) - var(--panel-width))/8);
    --content-pad-left-checked: calc((100vw - var(--content-left) - var(--content-right-checked))/5);
    --cardA-pad-top:            0.6rem;
    --cardA-pad-left:           1rem;
    --cardA-pad-right:          1rem;
    --cardB-pad-top:            1rem;
    --cardB-pad-left:           1rem;
    --cardB-pad-right:          1rem;
    --sec-bar-width:            0.6rem;
}

/* This is essential to avoid a world of width-based pain */
* {box-sizing: border-box;}


@font-face {
    src: url('fonts/SofiaSans-Variable.ttf');
    font-family: 'font-regular';
    font-weight: 1 1000;
}

@font-face {
    src: url('fonts/SofiaSansSemiCondensed-Variable.ttf');
    font-family: 'font-semicond';
    font-weight: 1 1000;
}

@font-face {
    src: url('fonts/SofiaSansCondensed-Variable.ttf');
    font-family: 'font-cond';
    font-weight: 1 1000;
}

fnw { white-space: nowrap; }
fpw { white-space: pre-wrap; }

fhead0 { font-family: 'font-semicond'; font-size: 2.8rem; font-weight: 800;}
fhead1 { font-family: 'font-semicond'; font-size: 2.8rem; font-weight: 300;}
fhead2 { font-family: 'font-semicond'; font-size: 1.2rem; font-weight: 200; letter-spacing: 0.3rem;}


f0 { font-family: 'font-semicond'; font-size: 2.0rem; font-weight: 700;}
f1 { font-family: 'font-semicond'; font-size: 1.4rem; font-weight: 350;}
f2 { font-family: 'font-semicond'; font-size: 1.0rem; font-weight: 300;}
f3 { font-family: 'font-semicond'; font-size: 1.0rem; font-weight: 400;}

fr0b { font-family: 'font-regular'; font-size: 1.15rem; font-weight: 400;}

fc0b {
    font-family: 'font-semicond';
    font-size: 1.3rem;
    font-weight: 400;
    /* text-transform: uppercase; */
}

.sec-a {border-left-color: #00aeff;}
.sec-b {border-left-color: #1363a8;}
.sec-c {border-left-color: #3369e7;}
.sec-d {border-left-color: #8e43e7;}
.sec-e {border-left-color: #b84592;}
.sec-f {border-left-color: #ff4f81;}
.sec-g {border-left-color: #ff6c5f;}
.sec-h {border-left-color: #ffc168;}
.sec-i {border-left-color: #2dde98;}
.sec-j {border-left-color: #1cc7d0;}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 12px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
  background: #f1f1f1; /* Color of the track */
  border-radius: 6px; /* Rounded corners for the track */
}

::-webkit-scrollbar-thumb {
  background: #888; /* Color of the scrollbar thumb */
  border-radius: 6px; /* Rounded corners for the thumb */
  border: 3px solid #f1f1f1; /* Padding around the thumb */
}

::-webkit-scrollbar-thumb:hover {
  background: #555; /* Color of the thumb on hover */
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin; /* "auto" or "thin" */
  scrollbar-color: #888 #f1f1f1; /* thumb and track color */
}

a, a:visited {
    text-decoration: none;
    color: var(--colorLink);
}

/* br {content: ""; display:block; margin-top: 0.0rem; } */

html {
    font-family: 'font-semicond';
    font-weight: 320;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 0;
    scroll-behavior: smooth;
    height: 100%;
    background-color: var(--colorBody);
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
    text-rendering: optimizespeed;
    font-size: 1.1rem;
    overflow: hidden;
}

cTab {
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 1rem;
    padding-left: 1.6rem;
}

details > summary{
    list-style-type: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details > summary::before{
    background-image: url('data/angle-right.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 1rem;
    padding-right: 1.7rem;
    height: 1rem;
    content:"";
}

details[open] > summary::before{
    background-image: url('data/angle-down.svg');
}

.s-container {
    width: 100%;
    overflow-x: auto; /* Enable horizontal scrolling */
    white-space: nowrap; /* Prevent items from wrapping to the next line */
}

.s-content {
    width: fit-content;
    height: 12rem;
    display: flex;
    flex-flow: row;
    justify-content: flex-start;
    align-items: center;
}


.s-content img {
    width: calc(var(--content-right-max)/3 - 1.5rem);
    border-radius: 4px;
    margin-right: 0.4rem;
    margin-left: 0.4rem;
    padding: 0.5rem;
    background-color: rgb(255, 255, 255);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.s-container:last-child{
    padding-right: 0;
    margin-right: 0;
}

.s-content img:hover {
    transform: scale(1.1);
}

.bullet-line {
  display: list-item;
  list-style: square;
  margin: 2rem 0 0.5rem var(--cardB-pad-left);
}

#Content {
    height: 100%;
    width: calc(100vw - var(--panel-width));
    padding-left: var(--content-pad-left);
    display: grid;
    grid-template-columns: var(--content-left) var(--content-right);
    transition: .3s ease-out;
    line-height: 1.5;
    overflow-x: hidden;
    overflow-y: auto;
    /*float: left;*/
    /*align-content: flex-start;*/
    /* grid-gap: var(--gGapR) var(--gGapC); */
    /* letter-spacing: 0.02rem; */
}

.CardA {
    text-align: right;
    border-bottom: 1px solid;
    border-image: linear-gradient(to left, var(--colorHead), var(--colorBody)) 1;
    margin-left: -4rem;
    padding-top: var(--cardA-pad-top);
    padding-left: calc( var(--cardA-pad-left) + 4rem );
    padding-right: var(--cardA-pad-right);
    padding-bottom: 0rem;
    font-family: 'font-semicond';
    font-weight: 700;
    font-size: 1.6rem;
    border-left-width: 0.5rem;
    border-left-style: solid;
}

.CardB {
    text-align: justify;
    border-bottom: 1px var(--colorHead) solid;
    border-left-width: 0.2rem;
    border-left-style:  solid;
    border-right: 1px var(--colorMenu) solid;
    padding-left: var(--cardB-pad-left);
    padding-right: var(--cardB-pad-right);
    padding-bottom: 2rem;
    padding-top: var(--cardB-pad-top);
    /* border-image:  linear-gradient(to right, var(--colorHead), var(--colorBody)) 1; */
}


.left-right{
    display: flex;
    align-items: center;
}

.subA {
    width: 40%;
    padding: 0 0.8rem 0 0;
    text-align: center;
}

.subB {
    width: 60%;
    padding: 0 0 0 0.8rem;
}

.pLink {
    float: right;
    font-weight: 400;
    font-size: 0.8rem;
    padding-top: 0.3rem;
    color: var(--colorLink)
}

.pLink:hover {
    color: var(--colorHovr); 
}

.subA img {
    width: 100%;
    border-radius: 4px;
    margin: 0;
    padding: 8px;
    background-color: rgb(255, 255, 255);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

#Head {
    display: flex;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px var(--colorAcnt) solid;
    background: var(--colorMenu);
}

#Trigger:checked ~ #Content {
    width: 100vw;
    padding-left: var(--content-pad-left-checked);
    grid-template-columns: var(--content-left) var(--content-right-checked);
    /*padding-left: calc((100vw - var(--content-left) - var(--content-right))/2);*/
    transition: .3s ease-out;
}

#BioPic img {
    height: 7.2rem;
    border-radius: 4rem;
    margin-top: 1rem;
    border: 0.15rem var(--colorAcnt) solid;
}

.vL {
  border-right: 1rem solid var(--colorAcnt);
  height: 100%;
  margin-right: calc(0rem - var(--cardA-pad-right));
}

.hLine {
    border-bottom: 1px solid;

}

#Tree {
    margin-left: -1rem;
    line-height: 2rem;
}

#Tree li {
    list-style: none;
    display: list-item;
    cursor: pointer;
}

#Tree lx {
    list-style: none;
    display: list-item;
    cursor: pointer;
    padding-left: 1.6rem;
}

#PanelBar{
    display: flex;
    align-items:center;
    background-color: var(--colorHead);
    height: 3.5rem;
    padding-left: 2rem;
    align-items: center;
}

#Menu{
    padding-top: 0.5rem;
    font-family: 'font-semicond';
    font-size: 1.2rem;
    font-weight: 400;
}

.myList{
    /* border: 1px var(--colorHead) solid; */
    border-radius: .1rem;
    margin-left: calc(0rem - var(--cardB-pad-left));
    margin-right: calc(0rem - var(--cardB-pad-right));
}

.myList summary {
    padding: .2rem;
    padding-left: 0.5rem;
    background-color: var(--colorMenu);
    border-radius: .1rem;
    cursor: pointer;
}

.myList[open] > summary{
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.myList ol {
    padding-left: 2rem;
    padding-right: 2rem;
    line-height: 1.2;
}

#scholar img {
    height: 2rem;
    padding-right: 1.2rem;
}

#label_Trigger {
    position: fixed;
    z-index: 2;
    background: url('data/icon-menu-06.svg');
    background-size: 2.8rem;
    background-repeat: no-repeat;
    background-position: center;
    right: 1.5rem;
    top: 0.3rem;
    width: 2rem;
    height: 3rem;
    border-radius: 0.3rem;
    cursor: pointer;
    transform: translateX(0%);
    transition: .3s ease-out;
    float:left;
}

#label_Page {
    position: fixed;
    top: 0;
    left: 0;
    height: 0;
    width:  0;
    opacity: 0;
}


#Panel {
    position: fixed;
    width: calc(3rem + var(--panel-width));
    height: 100%;
    right: -3rem;
    background: var(--colorMenu);
    overflow-x: hidden;
    overflow-y: auto;
    z-index:    1;
    transition: 0.5s cubic-bezier(0.68, -0.1, 0.265, 1.55);
    box-shadow: 0.1em 0 2em var(--colorHead);
}


#vBar{
    position: fixed;
    bottom: 1rem;
    right: calc(var(--panel-width) - var(--vBar-gap));
    z-index: 3;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-shadow: var(--colorText) 0 0 1.5rem;
    transition: 0.5s cubic-bezier(0.68, -0.1, 0.265, 1.55);
}

#backHome{
    position: fixed;
    z-index: 3;
    background: url('data/arrow-up-to-line.svg');
    background-repeat: no-repeat;
    border: none;
    background-size: 2rem;
    background-position: center;
    right: 1rem;
    bottom: 1rem;
    width: 2rem;
    height: 2.4rem;
    cursor: pointer;
    filter: drop-shadow(4px 4px 4px var(--colorText))
}

#Menu a, a:visited {
    text-decoration: none;
    color: var(--colorLink);
}

#Trigger{
    display: none;
    z-index: 2;
}

#Trigger:checked ~ #Panel {
    right: calc(-3rem - var(--panel-width));
    transition: .3s ease-out;
}

#Trigger:checked ~ #vBar {
    right: calc(0rem - var(--vBar-gap));
    transition: .3s ease-out;
}

#Trigger:checked ~ #label_Trigger {
    right: 1rem;
}

@media (max-width:980px) {
    fhead0 { font-size: 2.6rem; }
    fhead1 { font-size: 2.6rem; }
    .CardA {
        text-align: left;
        border-bottom: none;
        padding-top: 1.5rem;
        padding-left: var(--cardA-pad-left);
        border-image: none;
        border-left-width: calc(var(--sec-bar-width) + 4rem);
    }
    .CardB {
        padding-top: 0.5rem;
        border-left-width: var(--sec-bar-width);
    }
    #Panel {
        box-shadow: 0.1em 0 2em var(--colorHead);
    }
    #Trigger:checked ~ #Panel {
        box-shadow: none;
    }
    #Content {
        grid-template-columns: calc(100vw - var(--panel-width));
    }
    #Trigger:checked ~ #Content {
        padding-left: 0;
        grid-template-columns: 100vw;
    }
    #BioPic img {
        height: 7rem;
    }
}

@media (orientation: portrait) and (max-width: 760px) {
    fhead0 { font-size: 2.4rem; }
    fhead1 { font-size: 2.4rem; }
    #label_Trigger {
        right: 1rem;
    }
    .CardA {
        text-align: left;
        padding-top: 1.5rem;
        padding-left: var(--cardA-pad-left);
        border-image: none;
        border-left-width: calc(var(--sec-bar-width) + 4rem);
    }
    .CardB {
        padding-bottom: 2rem;
        border-left-width: var(--sec-bar-width);
    }
    .left-right{
        display: inline-block;
    }
    
    .subA {
        width: 100%;
        padding: 4px 0 0 0;
        margin: 0;
    }
    
    .subB {
        width: 100%;
        padding: 4px 0 0 0;
        margin: 0;
    }
    #Content {
        width: 100vw;
        grid-template-columns: 100vw;
    }
    #Panel {
        right: calc(-3rem - var(--panel-width));
        transition: .3s ease-out;
        box-shadow: none;
    }
    #vBar{
        right: calc(0rem - var(--vBar-gap));
        transition: .3s ease-out;
    }
    #BioPic img {
        height: 6.6rem;
    }
    #Trigger:checked ~ #Panel {
        right: -3rem;
        transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: 0.1em 0 2em var(--colorHead);
    }
    #Trigger:checked ~ #Content {
        opacity: 0.3;
    }
    #Trigger:checked ~ #label_Trigger {
        right: 1.5rem;
    }
    #Trigger:checked ~ #vBar {
        right: calc(var(--panel-width) - var(--vBar-gap));
        transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    #Trigger:checked ~ #label_Page {
        height: 100%;
        width:  calc(100vw - var(--panel-width));
        z-index: 3;
    }
}
