:root {
    --color-white: #FFFFFF;
    --color-black: #1A3135;
    --color-me: #FBD651;
    --color-skills: #F2F0ED;
    --color-work: #56A5EF;
    --color-vitae: #F0B7A3;
    --color-warm-grey: #F2F0ED;
    --breakpoint-medium: 768px;
    --breakpoint-large: 1366px;
    --fontfamily-henri: Henri, serif;
    --fontfamily-courier: "Courier New", monospace;
    --fontfamily-serif: "Source Serif", Georgia, serif;
}

@font-face {
    font-family: "Source Serif";
    font-weight: 300;
    font-style: normal;
    src: url("assets/fonts/SourceSerif4-Light.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Source Serif";
    font-weight: 300;
    font-style: italic;
    src: url("assets/fonts/SourceSerif4-LightIt.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Source Serif";
    font-weight: 400;
    font-style: normal;
    src: url("assets/fonts/SourceSerif4-Regular.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Source Serif";
    font-weight: 400;
    font-style: italic;
    src: url("assets/fonts/SourceSerif4-It.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Source Serif";
    font-weight: 600 700;
    font-style: normal;
    src: url("assets/fonts/SourceSerif4-Semibold.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Source Serif";
    font-weight: 600 700;
    font-style: italic;
    src: url("assets/fonts/SourceSerif4-SemiboldIt.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: Henri;
    src: url("assets/fonts/HenriDidot.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: Pacifico;
    src: url("assets/fonts/Pacifico.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: Sacramento;
    src: url("assets/fonts/Sacramento-Regular.ttf") format("truetype");
    font-display: swap;
}

body {
    background-color: var(--color-white);
    overflow: unset;
    margin: auto;
}

.content-wrapper {
    margin: 1em 1em 2em;
}

h1 {
    font-family: var(--fontfamily-henri);
    font-size: 4em;
    line-height: 0.515em;
    font-weight: unset;
}

/* All h2: typewriter, italic, stripes below (yellow by default, page colour via modifiers) */
h2 {
    display: table;
    font-family: var(--fontfamily-courier);
    font-size: 1.15em;
    font-style: italic;
    font-weight: normal;
    color: var(--color-black);
    margin: 0 0 1em;
}

h2::after {
    content: "";
    display: block;
    height: 0.9em;
    margin-top: 0.35em;
    background: repeating-linear-gradient(135deg, var(--color-me), var(--color-me) 0.71px, #FFF 0.71px, #FFF 9px);
}

p {
    font-size: 1.05em;
    line-height: 1.5;
    color: var(--color-black);
    font-family: var(--fontfamily-serif);
    font-weight: 300;
}

/* Teasers, footer, banner and chapter intros keep the typewriter look */
.teaser p,
.footer p,
.cookie-banner p {
    font-size: 1em;
    line-height: normal;
    font-family: var(--fontfamily-courier);
}

/* Links in running text look like the teaser links: typewriter, bold, italic */
a.external {
    text-decoration: none;
    color: var(--color-black);
    padding: 0 0.5em;
    border-bottom: 1px solid var(--color-black);
    font-family: var(--fontfamily-courier);
    font-size: 0.9em;
    font-weight: bold;
    font-style: italic;
}

.headline {
    margin: 0 auto;
}

.headline h1 {
    float: right;
    text-align: right;
    line-height: 0.01em;
    padding-left: 0.5em;
}

.headline.me h1 {
    background-color: var(--color-me);
    border-bottom: 0.4em solid var(--color-me);
}

.headline.skills h1 {
    background-color: var(--color-skills);
    border-bottom: 0.4em solid var(--color-skills);
}

.headline.work h1 {
    background-color: var(--color-work);
    border-bottom: 0.4em solid var(--color-work);
}

.headline.vitae h1 {
    background-color: var(--color-vitae);
    border-bottom: 0.4em solid var(--color-vitae);
}

.flex-wrapper {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

.content {
    width: 100%;
    margin-top: 3em;
}

.content .image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.portrait-hero {
    margin: 3em auto 0;
    width: 100%;
    max-width: 22em;
}

.portrait-hero img {
    display: block;
    width: 100%;
    height: auto;
}

.intro-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2em;
    margin-top: 3em;
}

.intro-row .portrait-hero {
    margin: 0;
}

.welcome-text {
    max-width: 34em;
}

.welcome-text p:first-child {
    margin-top: 0;
}

.teaser {
    text-align: center;
    margin: 4em auto 2em;
    font-style: italic;
}

.teaser.me {
    background: repeating-linear-gradient(135deg, var(--color-me), var(--color-me) 0.71px, #FFF 0.71px, #FFF 9px);
}

.teaser.vitae {
    background: repeating-linear-gradient(135deg, var(--color-vitae), var(--color-vitae) 0.71px, #FFF 0.71px, #FFF 9px);
}

.teaser.work {
    background: repeating-linear-gradient(135deg, var(--color-work), var(--color-work) 0.71px, #FFF 0.71px, #FFF 9px);
}

.teaser.skills {
    background: repeating-linear-gradient(135deg, var(--color-skills), var(--color-skills) 0.71px, #FFF 0.71px, #FFF 9px);
}

.teaser p {
    background-color: var(--color-white);
    padding: 1em 0;
}

.teaser a {
    text-decoration: none;
    color: var(--color-black);
    padding: 0 0.5em;
    border-bottom: 1px solid var(--color-black);
    font-weight: bold;
}

.teaser a.me {
    background-color: var(--color-me);
}

.teaser a.vitae {
    background-color: var(--color-vitae);
}

.teaser a.work {
    background-color: var(--color-work);
}

.teaser a.skills {
    background-color: var(--color-skills);
}

.welcome {
    display: none;
    background-color: var(--color-warm-grey);
    margin: 1em;
    height: 12em;
    text-align: center;
    background: repeating-linear-gradient(135deg, var(--color-warm-grey), var(--color-warm-grey) 0.71px, #FFF 0.71px, #FFF 9px);
}


.footer {
    height: 3em;
    padding-top: 0.25em;
    text-align: right;
    margin-right: 1em;
    background-color: var(--color-warm-grey);
    margin: 1em;
    height: 3em;
    padding-right: 1em;
    background: repeating-linear-gradient(135deg, var(--color-warm-grey), var(--color-warm-grey) 0.71px, #FFF 0.71px, #FFF 9px);
}

.footer a {
    text-decoration: none;
    color: var(--color-black);
    padding: 0 0.5em;
    border-bottom: 1px solid var(--color-black);
    font-weight: bold;
    background-color: var(--color-white);
    font-style: italic;
}

.navigation {
    visibility: hidden;
}

.navigation .background-cover,
.navigation .pages,
.navigation .button {
    position: fixed;
    z-index: 1;
    left: 1em;
    cursor: pointer;
}

.navigation .background-cover {
    visibility: hidden;
    background-color: var(--color-me);
    background: repeating-linear-gradient(135deg, #FAF5F0, #FAF5F0 0.7px, #FBD651 0.7px, #FBD651 10px);
    opacity: 0.9;
    top: 1em;
    right: 1em;
    bottom: 1em;
}

.navigation .pages {
    visibility: hidden;
    bottom: 4em;
}

.navigation .nav-item {
    list-style: none;
    padding: 0;
}

.navigation .pages {
    width: 13em;
}

.navigation .nav-item li {
    margin-bottom: 0.9em;
    text-align: right;
}

/* Navigation links look like the links in the content */
.navigation .nav-item a {
    display: inline-block;
    font-family: var(--fontfamily-courier);
    font-size: 1.6em;
    font-weight: bold;
    font-style: italic;
    text-decoration: none;
    color: var(--color-black);
    padding: 0 0.5em;
    border-bottom: 1px solid var(--color-black);
}

.navigation .nav-item li.theme-me a {
    background-color: var(--color-me);
}

.navigation .nav-item li.theme-vitae a {
    background-color: var(--color-vitae);
}

.navigation .nav-item li.theme-work a {
    background-color: var(--color-work);
}

.navigation .nav-item li.theme-skills a {
    background-color: var(--color-skills);
}

.navigation .nav-item li.current-page a {
    background-color: var(--color-white);
    border-bottom-color: transparent;
    padding-left: 0.7em;
    padding-right: 1.15em;
    margin-right: -0.625em;
    cursor: default;
}

/* hover: underline (fast) and coloured block (a bit slower) grow to the right edge
   of the sidebar; the link itself does not change, so the text never moves */
.navigation .nav-item li:not(.current-page) a {
    position: relative;
}

.navigation .nav-item li:not(.current-page) a::before,
.navigation .nav-item li:not(.current-page) a::after {
    content: "";
    position: absolute;
    left: 100%;
    width: 0;
}

/* coloured block */
.navigation .nav-item li:not(.current-page) a::before {
    top: 0;
    bottom: 0;
    background-color: inherit;
    transition: width 0.35s ease;
}

/* black underline */
.navigation .nav-item li:not(.current-page) a::after {
    bottom: -1px;
    height: 1px;
    background-color: var(--color-black);
    transition: width 0.15s ease-out;
}

.navigation .nav-item li:not(.current-page) a:hover::before,
.navigation .nav-item li:not(.current-page) a:focus-visible::before,
.navigation .nav-item li:not(.current-page) a:hover::after,
.navigation .nav-item li:not(.current-page) a:focus-visible::after {
    width: 0.625em;
}

.navigation .nav-item li:not(.current-page) a:focus-visible {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .navigation .nav-item li:not(.current-page) a::before,
    .navigation .nav-item li:not(.current-page) a::after {
        transition: none;
    }
}


.navigation .button {
    visibility: visible;
    padding: 0;
    bottom: 1em;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3em;
    width: 3em;
    background: repeating-linear-gradient(135deg, #FAF5F0, #FAF5F0 0.7px, #FBD651 0.7px, #FBD651 10px);
    opacity: 0.9;
}

.navigation .button img {
    display: block;
    width: 1.6em;
    height: 1.6em;
}

.navigation .button .icon-close {
    display: none;
}

.navigation .menu-toggle {
    position: fixed;
    z-index: 4;
    left: 1em;
    bottom: 1em;
    width: 3em;
    height: 3em;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    font-size: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.navigation .menu-toggle:focus-visible {
    opacity: 0.15;
    outline: 2px solid var(--color-black);
}

.navigation .menu-toggle:checked ~ .background-cover,
.navigation .menu-toggle:checked ~ .pages {
    visibility: visible;
}

.navigation .menu-toggle:checked ~ .button {
    background: transparent;
}

.navigation .menu-toggle:checked ~ .button .icon-burger {
    display: none;
}

.navigation .menu-toggle:checked ~ .button .icon-close {
    display: block;
}

.flex-wrapper.work {
    margin-top: 2em;
}

.work-item {
    width: 100%;
}

.work-item .image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.work-item .title {
    font-weight: bold;
    background-color: var(--color-work);
}

.work-item .role,
.work-item .company,
.work-item .client {
    color: var(--color-work);
    border: 1px solid var(--color-work);
    border-radius: 1em;
    padding: 0 0.5em;
    margin-right: 0.5em;
    font-family: var(--fontfamily-courier);
    white-space: nowrap;
    line-height: 1.5em;
}

.work-item .role {
    background-color: var(--color-work);
    color: var(--color-white);
    border-color: var(--color-work);
}

.work-item .role:hover,
.work-item .company:hover,
.work-item .client:hover {
    background-color: var(--color-work);
    color: var(--color-white);
}

.work-item .role:hover {
    background-color: var(--color-white);
    color: var(--color-work);
}

.flex-wrapper.vitae {
    flex-direction: column;
    margin-top: 2em;
}

.flex-wrapper.chapter {
    margin-top: 3em;
    max-width: 50em;
}

/* Chapter titles in teaser style: typewriter, italic, stripes below */
.chapter-title {
    align-self: flex-start;
}

.chapter-title::after {
    background: repeating-linear-gradient(135deg, var(--color-vitae), var(--color-vitae) 0.71px, #FFF 0.71px, #FFF 9px);
}

.chapter-title .years::before {
    content: "\00B7\00A0";
}

.chapter-title.work::after {
    background: repeating-linear-gradient(135deg, var(--color-work), var(--color-work) 0.71px, #FFF 0.71px, #FFF 9px);
}

/* work page sections */
.flex-wrapper.section {
    margin-top: 4em;
}

.toolbox-group {
    margin-top: 1em;
}

.toolbox-group h3 {
    font-family: var(--fontfamily-courier);
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 0.3em;
}

/* card headlines like the project cards */
.principles h3 {
    font-family: var(--fontfamily-courier);
    font-size: 1.15em;
    font-style: italic;
    font-weight: normal;
    margin-bottom: 0.8em;
}

.principles p {
    margin-top: 0;
}

/* Project cards: thin grey edge top/left, striped band right/bottom */
.flex-wrapper.work .work-item,
.principles .content {
    position: relative;
    box-sizing: border-box;
    padding: 2.5em;
    margin: 1em 1em 3em 0;
    border-top: 1px solid var(--color-warm-grey);
    border-left: 1px solid var(--color-warm-grey);
}

.flex-wrapper.work .work-item::before,
.flex-wrapper.work .work-item::after,
.principles .content::before,
.principles .content::after {
    content: "";
    position: absolute;
    background: repeating-linear-gradient(135deg, var(--color-work), var(--color-work) 0.71px, #FFF 0.71px, #FFF 9px);
}

/* right band */
.flex-wrapper.work .work-item::after,
.principles .content::after {
    top: 0.8em;
    right: -0.9em;
    width: 0.9em;
    bottom: -0.9em;
}

/* bottom band */
.flex-wrapper.work .work-item::before,
.principles .content::before {
    left: 0.8em;
    right: 0;
    bottom: -0.9em;
    height: 0.9em;
}

.flex-wrapper.work .work-item .title {
    font-family: var(--fontfamily-courier);
    font-size: 1.15em;
    font-style: italic;
    font-weight: normal;
    background: none;
}

.principles .content > h3:first-child,
.flex-wrapper.work .work-item > p:first-child {
    margin-top: 0;
}

.principles .content > p:last-child,
.flex-wrapper.work .work-item > p:last-child {
    margin-bottom: 0;
}

.flex-wrapper.work .work-item p strong {
    font-weight: 600;
}

/* "ask me about" list */
.flex-wrapper.ask {
    flex-direction: column;
    max-width: 50em;
}

.ask-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ask-list li {
    position: relative;
    font-family: var(--fontfamily-serif);
    font-weight: 300;
    font-size: 1.2em;
    line-height: 1.4;
    color: var(--color-black);
    padding: 0.7em 0 0.7em 2em;
    border-bottom: 1px solid var(--color-warm-grey);
}

.ask-list li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    top: 0.7em;
    font-family: var(--fontfamily-courier);
    font-weight: bold;
    color: var(--color-work);
}

.tools {
    margin-top: 2em;
}

.tools-label {
    font-family: var(--fontfamily-courier);
    font-style: italic;
    margin-right: 0.8em;
}

.toolbox {
    flex-direction: column;
}

.toolbox-group p {
    margin-top: 0;
}

.tag {
    display: inline-block;
    font-family: var(--fontfamily-courier);
    font-size: 0.85em;
    color: var(--color-black);
    border: 1px solid var(--color-work);
    border-radius: 1em;
    padding: 0 0.6em;
    margin: 0 0.4em 0.4em 0;
    line-height: 1.5em;
}

.chapter-text {
    margin-top: 0;
    margin-bottom: 1.5em;
}

.cv-item {
    margin-bottom: 2em;
}

.cv-item p {
    margin-bottom: 0.5em;
}

/* role chips like the toolbox tags on work, outline in salmon */
.cv-item .role {
    display: inline-block;
    font-family: var(--fontfamily-courier);
    font-size: 0.85em;
    color: var(--color-black);
    border: 1px solid var(--color-vitae);
    border-radius: 1em;
    padding: 0 0.6em;
    margin: 0 0.4em 0.4em 0;
    line-height: 1.5em;
}

.cv-item .info {
    margin-top: 0;
}

.cv-item .info .title {
    font-weight: bold;
}

.flex-wrapper.legal {
    flex-direction: column;
}

.flex-wrapper.legal .content {
    width: 100%;
    max-width: 50em;
}

.cookie-banner {
    position: fixed;
    z-index: 10;
    left: 1em;
    right: 1em;
    bottom: 1em;
    max-width: 34em;
    margin-left: auto;
    padding: 0.6em;
    background: repeating-linear-gradient(135deg, var(--color-me), var(--color-me) 0.71px, #FFF 0.71px, #FFF 9px);
    box-shadow: 0 0.2em 1em rgba(26, 49, 53, 0.15);
}

.cookie-banner p {
    margin: 0;
    padding: 1em;
    background-color: var(--color-white);
    font-size: 0.9em;
}

.cookie-banner p a {
    color: var(--color-black);
    font-weight: bold;
}

.cookie-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.6em;
    padding: 0 1em 1em;
    background-color: var(--color-white);
}

.cookie-buttons button {
    font-family: var(--fontfamily-courier);
    font-size: 1em;
    font-weight: bold;
    font-style: italic;
    color: var(--color-black);
    background-color: var(--color-white);
    border: 1px solid var(--color-black);
    padding: 0.3em 1em;
    cursor: pointer;
}

.cookie-buttons .cookie-accept {
    background-color: var(--color-me);
}

.cookie-buttons button:focus-visible {
    outline: 2px solid var(--color-black);
    outline-offset: 2px;
}

/* Mobile menu: links left aligned, active item same size as the others, no hover extension */
@media (max-width: 767px) {
    .navigation .pages {
        left: 2em;
    }

    .navigation .nav-item li {
        text-align: left;
    }

    .navigation .nav-item li.current-page a {
        padding-left: 0.5em;
        padding-right: 0.5em;
        margin-right: 0;
    }

    .navigation .nav-item li:not(.current-page) a::before,
    .navigation .nav-item li:not(.current-page) a::after {
        display: none;
    }
}

@media (min-width: 768px) {
    .welcome,
    .footer {
        margin-left: 16em;
    }
    .welcome {
        display: block;
    }

    .content-wrapper {
        margin: 2em 3em 2em 18em;
    }

    .content {
        width: 45%;
    }

    .work-item {
        max-width: 45%;
    }

    /* Tablet & desktop: welcome text left, portrait right */
    .intro-row {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 3em;
    }

    .intro-row .welcome-text {
        order: -1;
        flex: 0 1 34em;
    }

    .intro-row .portrait-hero {
        flex: 0 0 40%;
        max-width: 22em;
    }

    .navigation {
        visibility: visible;
    }

    .navigation .background-cover {
        visibility: visible;
        width: 14em;
    }

    .navigation .pages {
        visibility: visible;
    }

    .navigation .button,
    .navigation .menu-toggle {
        display: none;
    }
}

@media (min-width: 1366px) {
    .content-wrapper {
        margin: 6em 6em 6em 22em;
    }

    /* 10em wider content columns on large screens */
    .flex-wrapper.chapter,
    .flex-wrapper.legal .content {
        max-width: 60em;
    }

    .content {
        width: 30%;
    }

    .principles .content {
        width: 45%;
    }

    .teaser {
        margin-top: 6em;
        margin-bottom: 3em;
    }

    .work-item {
        max-width: 45%;
    }
}
