*,
*::before,
*::after {
    margin: 0;
    padding: 0;
}

:root {
    font-family: Newsreader;
    font-weight: 500;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;

    --bg-color: rgb(240, 255, 240);
    --bg-color-select: rgb(0, 0, 90);
    --text-color-select: rgb(255, 255, 255);
    --h1-color: rgb(0, 0, 90);
    --main-text: rgb(0, 0, 70);
    --link-hover: rgb(255, 0, 0);
    --footer-bg: rgb(0, 0, 90);
    --show-light: block;
    --show-dark: none;
}

#dark {
    --bg-color: rgb(32, 32, 77);
    --bg-color-select: rgb(255, 0, 0);
    --text-color-select: rgb(255, 255, 255);
    --h1-color: rgb(240, 255, 240);
    --main-text: rgb(240, 255, 240);
    --link-hover: rgb(255, 0, 0);
    --footer-bg: rgb(0, 0, 70);
    --show-light: none;
    --show-dark: block;
}

::selection {
    color: var(--text-color-select);
    background-color: var(--bg-color-select);
}

svg {
    fill: currentColor;
}


ul[role="list"],
ol[role="list"] {
    list-style: none;
}

body {
    box-sizing: border-box;
    min-height: 100vh;
    font-size: 16pt;
    line-height: 1.5;
    color: var(--main-text);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4 {
    line-height: 1.1;
    text-wrap: balance;
}

a {
    color: currentColor;
    text-decoration: underline;
    text-decoration-thickness: thin;
    text-decoration-skip-ink: none;
    text-decoration-color: var(--main-text);
}

a:hover {
    color: var(--link-hover);
}


header {
    display: block;
    position: sticky;
    top: 0;
    text-align: center;
    line-height: 1;
    margin-bottom: 0.5rem;
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--bg-color-select);
}

@media (min-width: 500px) {
    header {
        /* only sticky on small screens */
        position: relative;
    }

}

header>span {
    padding: 1rem 1.5rem 0.75rem 1rem;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

#my-name {
    font-size: calc(16px + 8vw);
    font-weight: bold;
    color: var(--h1-color);
    display: flex;
    justify-content: center;
    align-items: baseline;
    padding: 1rem 1.5rem 0 1rem;
    line-height: normal;
}

main {
    box-sizing: border-box;
    width: min(max(80%, 400px), 100%);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-self: center;
    padding-left: 1rem;
    padding-right: 1rem;
}

section {
    margin: 10px;
    padding: 5px;
}



section>p {
    text-wrap: pretty;
}

h3 {
    padding-bottom: 0.25rem;
}

.menu-icon {
    display: none;
}

#toggle-theme:hover {
    cursor: pointer;
}

@media (max-width: 700px) {
    .menu-text {
        display: none;
    }

    .menu-icon {
        display: block;
    }
}

#dropdown {
    display: block;
    border-top: 2px dashed var(--bg-color-select);
    padding: 0.75rem 1rem 0.5rem;
}

#dropdown>menu {
    display: flex;
    justify-content: space-around;
}

#dropdown>menu>li {
    display: inline-block;
}

.detail-container {
    display: block;
    border: 1px solid var(--main-text);
}

summary {
    line-height: normal;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: baseline;
}

details {
    border-bottom: 1px solid var(--main-text);
}

details[open] summary {
    border-bottom: 1px dashed var(--main-text);
}

details:last-child {
    border: none;
}

details p {
    padding: 1rem;
}


summary>span {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

summary::before {
    content: "+";
    color: var(--main-text);
    font-family: monospace;
    margin-right: 1ch;
}

details[open] summary::before {
    content: "-";
}

.job-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.5rem 1.25rem 0 1.25rem;
}

@media (max-width: 700px) {
    summary {
        font-size: small;
    }

    p {
        font-size: small;
    }

    .job-title,
    .location,
    .qualification,
    #skills,
    .projects>dl>dd {
        font-size: small;
    }
}

.job-title {
    display: flex;
    align-items: end;
}

.location {
    display: flex;
    justify-content: end;
    align-items: end;
}

.qualification {
    padding-left: calc(2ch + 0.8rem);
    padding-right: .8rem;
    margin-bottom: .5rem;
}

#skills,
.projects {
    border: 1px solid var(--main-text);
    padding: .8rem .8rem .6rem .8rem;
    display: flex;
}

.projects {
    flex-wrap: wrap;
}

#second-project {
    margin-top: 1rem;
}


#qualifier {
    padding-bottom: 0;
    margin-bottom: -.5rem;
}

#skills>ul {
    display: flex;
    justify-content: space-around;
    flex-grow: 1;
    flex-wrap: wrap;
}


#skills>ul>li {
    display: flex;
    padding-left: .6rem;
    padding-right: .6rem;
}

dl {
    margin: .4rem;
}

dl a:hover {
    cursor: pointer;
}

dd {
    padding-top: .25rem;
}

footer {
    display: flex;
    background-color: var(--footer-bg);
    height: 1rem;
    margin-top: 1rem;
    padding-top: 4rem;
}