/* cv_style.css */

body {
    overflow-y: scroll;
}

main {
    width: auto;
    height: fit-content;
    background-color: var(--c_bg);
    overflow-x: hidden;
    padding: 1em;
    box-shadow: 0px 3px 12px var(--c_body_text);
    z-index: 100;
}

a.presentation {
    color: var(--c_body_text);
    font-style: normal;
}

#cvname {
    grid-area: cvname;
    text-align: right;
}
#cvsubtitle {
    grid-area: cvsubtitle;
    font-size: 0.5em;
    font-weight: normal;
    text-align: right;
    border-bottom: 2px solid var(--c_body_text);
}
#cvtitle {
    grid-area: cvtitle;
    font-size: inherit;
    font-weight: normal;
    text-align: left;
    align-content: center;
}
#cvphoto {
    grid-area: cvphoto;
}
tre-cv-head {
    font-size: 2.0em;
    font-weight: bold;
    display: grid;
    grid-template-columns: 80% 20%;
    grid-auto-rows: max-content;
    grid-template-areas: 
        "cvname cvname"
        "cvsubtitle cvsubtitle"
        "cvtitle cvphoto"
    ;
}

tre-cv-main {
    display: block;
    height: auto;
}
tre-cv-main ul {
    margin-bottom: 0;
}

#cvfootcity {
    text-align: left;
    padding-left: 1em;
}
#cvfootname {
    text-align: center;
}
#cvfootdate {
    text-align: right;
    padding-right: 1em;
}
tre-cv-foot {
    visibility: hidden;
    position: fixed;
    justify-self: center;
    align-content: center;
    height: 1.5lh;
    bottom: 0%;
    width: 97%;
    background-color: var(--c_bg);
    border-top: 2px solid var(--c_body_text);
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: repeat(3, 1fr);
}
tre-cv-section {
    width: 100%;
    display: grid;
    column-gap: 1%;
}
tre-cv-section.subsection {
    display: grid;
    margin-top: 0.3em;
    grid-template-columns: 1fr 2.5fr 1.5fr;
}
tre-cv-row {
    display: contents;
}
tre-cv-section > h1 {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--c_body_text);
    margin-bottom: 0.5em;
}

:where(
    #personal-details,
    #studies-and-education,
    #work-experience,
    #research,
    #conferences
) > tre-cv-row > tre-cv-cell:nth-child(2),
:where(
    #grants-awards,
    #presentations,
    ) > tre-cv-row > tre-cv-cell:nth-child(1),
:where(
    #athletics,
    #grants-awards
    ) > tre-cv-row > tre-cv-cell:nth-child(3),
:where(
    #additional-competences
) > tre-cv-section tre-cv-row > tre-cv-cell:nth-child(2),
:where(
    #presentations
) > tre-cv-row > tre-cv-cell > a:nth-child(1)
{
    font-weight: bold;
}

#studies-and-education > * > * > ul {
    font-weight: normal;
}

tre-cv-row.voluntary tre-cv-cell,
tre-cv-row.casual tre-cv-cell {
    font-weight: normal;
}

/* bibliography setup */
#publications {
    /* init counter */
    counter-reset: bibindex;
}
#sec-media {
    /* reset counter */
    counter-reset: bibindex;
}

tre-gls:hover tre-gls-hover,
tre-cite:hover tre-bib-hover {
    position: fixed;
    bottom: 5%;
    left: 50vw;
    transform: translateX(-47vw);
    width: 90%;
}

@media print {
    @page {
        size: A4;
        margin: 20mm;
    }
    
    body {
        /* A4 */
        width: 210mm;
        height: 297mm;
        overflow: visible;
    }
    main {
        /* absolute to only render main */
        position: absolute;
        padding-left: 2%;
        padding-right: 2%;
        top: 0;
        left: 0;
        width: 96%;
        box-shadow: none;
    }
    tre-cv-foot {
        visibility: visible;
    }
}
