/* Fonts */

@font-face {
    font-display: swap;
    font-family: "PT Serif";
    font-style: normal;
    font-weight: 400;
    src: local("PT Serif"), url("../fonts/pt-serif-v18-latin-regular.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "PT Serif";
    font-style: italic;
    font-weight: 400;
    src: local("PT Serif Italic"), url("../fonts/pt-serif-v18-latin-italic.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "PT Serif";
    font-style: normal;
    font-weight: 700;
    src: local("PT Serif Bold"), url("../fonts/pt-serif-v18-latin-700.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "PT Serif";
    font-style: italic;
    font-weight: 700;
    src: local("PT Serif Bold Italic"), url("../fonts/pt-serif-v18-latin-700italic.woff2") format("woff2");
}



/* General rules */

html {
    --text-color: #000000;
    --background-color: #fafafa;
    --link-color: #000000;
    --link-hover-color: #666666;
    --language-color: #fafafa;
    --language-hover-color: #666666;
    
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: "PT Serif", serif;
    /* font-size: 16px; */
    font-size: 2vh;
    line-height: 175%;
}

body {
    margin: 1em 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    margin: 0 1em 1em 1em;
    font-size: 1.4rem;
}

h1 {
    justify-content: left;
    margin: 0;
    padding: 0;
    font-size: 1em;
}

h1 .page-title {
    color: #666;
    font-weight: normal;
}

h1 .page-title::before {
    content: "/";
    margin: 0 1ex;
}

h2 {
    justify-content: left;
    margin: 0 0 1em 0;
    padding: 0;
    font-size: 1em;
}

a.title {
    text-decoration: none !important;
}

#language-selector {
    display: none;
}

/* #language-selector {
display: flex;
}

#language-selector .language {
margin-right: 0.5ex;
}

#language-selector a.language,
#language-selector a.language:visited {
color: var(--language-color);
text-decoration-color: var(--language-color);
}

#language-selector a.language:hover,
#language-selector a.language:active {
color: var(--language-hover-color);
text-decoration-color: var(--language-hover-color);
}

#language-selector a.language.current,
#language-selector a.language.current:hover,
#language-selector a.language.current:active,
#language-selector a.language.current:visited {
color: var(--language-color);
text-decoration: none;
cursor: default;
}

#language-selector .language:not(:last-child)::after {
content: "/";
margin-left: 0.5ex;
color: var(--language-color);
pointer-events: none;
} */



/* Main page */

#picture {
    position: fixed;
    top: 1em;
    right: 1em;
    height: calc(100vh - 2em);
    width: calc(40vw - 2em);
    background-image: url("../images/portait-bw.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1000;
}

#picture {
    top: 0;
    right: 0;
    height: calc(100vh);
    width: calc(40vw);    
}

main {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 68ex;
    margin: 1em 1em;
    font-size: 1.4em;
}

a, a:hover, a:active, a:visited {
    color: var(--link-color);
    text-decoration: underline dotted;
    text-decoration-color: var(--link-hover-color);
}

a:hover, a:active {
    color: var(--link-color);
    text-decoration: underline solid;
    text-decoration: none;
    color: var(--link-hover-color);
}

ul {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: left;
    margin: 0;
    padding: 0;
    list-style: none;
}

ul li {
    flex-shrink: 0;
    margin: 0;
    padding: 0 1ex 0 0;
}

#experience {
    font-style: italic;
}

#biography {
    margin: 0;
}

#biography p {
    display: inline;
    margin: 0;
    background: var(--background-color);
    box-shadow: 0.5em 0 0 var(--background-color), -0.5em 0 0 var(--background-color);
    box-decoration-break: clone;
}

/* Select work page */

.selected-work {
    width: 78ex;
    gap: 1.6em;
}

.selected-work section p {
    margin: 0 0 1em 0;
}

.selected-work section ul {
    padding: 0 0 0 1em;
}

.selected-work section .links li {
    display: grid;
    grid-template-columns: 4ex auto;
    grid-template-rows: auto;
    grid-template-areas:
    "date title";
    gap: 2ex;
}

.selected-work section .links li .title {
    grid-area: title;
    font-style: italic;
}

.selected-work section li .title::after {
    content: none;
}

.selected-work section .links li .date {
    grid-area: date;
}

.selected-work section .description {
    padding: 0 0 0 1em;
    color: #000;
}

.selected-work section .detail {
    color: #666;
}

.selected-work section .detail::before {
    content: "/";
    margin: 0 0.5ex;
}



/* Special rules for smaller screen sizes */

@media screen and (max-width: 1279px) {
    html {
        font-size: 1.75vh;
    }
    
    main {
        width: 51.5ex;
    }
}



@media screen and (max-width: 859px) {
    html {
        --language-color: #000000;
        --language-hover-color: #666666;
    }
    
    body {
        margin: 1.5em 0 1em 0;
        display: flex;
        flex-direction: column;
    }
    
    header {
        order: 1;
    }
    
    #picture {
        order: 2;
        display: block;
        width: 100%;
        height: 600px;
        position: relative;
        top: unset;
        right: unset;
        background-position: center 20%;
    }
    
    main {
        order: 3;
        width: auto;
        text-align: left;
    }
    
    #biography br {
        display: none;
    }
    
    .selected-work {
        width: auto;
    }
    
    main:not(.selected-work) {
        margin-top: -7em;
    }
    
    #experience {
        padding-bottom: 1ex;
        color: var(--background-color);
    }
}



@media screen and (max-width: 479px) {
    html {
        min-width: 340px;
        overflow-x: auto;
        font-size: 14px;
    }
    
    h1 .page-title {
        display: block;
    }
    
    h1 .page-title::before {
        margin: 0 1ex 0 0;
    }
    
    #experience {
        font-size: 1.2rem;
    }

    .selected-work section p,
    .selected-work section .description,
    .selected-work section ul {
        padding-left: 0;
    }

    .selected-work section .links li {
        grid-template-columns: auto 4ex ;
        grid-template-areas:
        "title date";
        gap: 1ex;
    }
}
