:root {
    color-scheme: light;
    --page-background: #e6e9ef;
    --surface-background: #eff1f5;
    --text: #4c4f69;
    --muted-text: #6c6f85;
    --heading: #5c5f77;
    --border: #ccd0da;
    --link: #1e66f5;
    --link-hover: #7287fd;
    --focus: #df8e1d;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-background);
}

body {
    max-width: 800px;
    margin: 1rem auto 0;
    padding: 0 1rem;
    background: var(--page-background);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

site-header {
    display: block;
    min-height: 6.4rem;
}

.site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.site-header h1 {
    margin: 0;
    color: var(--heading);
    font-size: 2rem;
    line-height: 1.1;
}

.site-header p {
    margin: 0.15rem 0 0;
}

.site-header nav {
    grid-column: 1 / -1;
}

.site-header nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header nav li {
    display: flex;
    align-items: baseline;
}

.site-header nav li + li::before {
    margin-right: 0.4rem;
    color: var(--muted-text);
    content: "•";
}

.language-switcher {
    justify-self: end;
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.95rem;
}

main {
    margin-top: 1rem;
    padding: 0 1.5rem;
    background: var(--surface-background);
    border: 1px solid var(--border);
    border-radius: 0.3rem;
}

section {
    margin: 0;
}

h2,
h3 {
    color: var(--heading);
    line-height: 1.25;
}

h2 {
    margin: 1rem 0;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.5rem;
}

h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
}

p {
    margin: 0.75rem 0;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

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

a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 0.1rem;
}

ol,
ul {
    padding-left: 2rem;
}

main li {
    margin-bottom: 0.65rem;
}

.profile-list,
.work-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: 0.4rem;
    margin-left: 1rem;
}

.profile-list dt {
    font-weight: bold;
}

.work-list dt {
    font-weight: normal;
}

.profile-list dd,
.work-list dd {
    min-width: 0;
    margin: 0;
}

.profile-list dd::before,
.work-list dd::before {
    content: none;
}

.profile-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 2rem;
    align-items: center;
    margin-right: 2rem;
}

.profile-photo {
    width: 160px;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

footer {
    color: var(--muted-text);
}

footer p:empty {
    display: none;
}

@media (max-width: 600px) {
    body {
        margin-top: 0.75rem;
        padding: 0 0.5rem;
    }

    main {
        margin-top: 0.75rem;
        padding: 0 1rem;
    }

    .profile-list,
    .work-list {
        margin-left: 0;
    }

    .profile-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-right: 0;
    }

    .profile-photo {
        justify-self: center;
    }
}

@media (max-width: 360px) {
    site-header {
        min-height: 8.25rem;
    }

    .site-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .language-switcher {
        justify-self: start;
    }
}
