:root,
html[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --fg: #012559;
    --muted: #3a5278;
    --line: #d5dce6;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #050914;
    --fg: #f4f6fa;
    --muted: #b7c3d6;
    --line: #1c2942;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
}

body {
    font-family: system-ui, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

#app,
.loading-progress {
    color: var(--fg);
}

.page,
main {
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.site-header {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.mark {
    display: block;
    line-height: 0;
}

.mark img {
    height: 2.15rem;
    width: auto;
}

html[data-theme="dark"] .mark img {
    filter: brightness(0) invert(1);
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-left: auto;
}

.rule {
    width: 1px;
    height: 0.85rem;
    background: var(--line);
}

.text-btn {
    appearance: none;
    background: none;
    border: 0;
    padding: 0.1rem 0;
    font: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    cursor: pointer;
}

.text-btn.is-on {
    color: var(--fg);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
}

.icon-btn .material-symbols-outlined {
    font-size: 1.25rem;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    transition: font-variation-settings 180ms ease;
    user-select: none;
}

html[data-theme="dark"] .icon-btn .material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" -25, "opsz" 24;
}

.icon-btn:hover .material-symbols-outlined,
.icon-btn:focus-visible .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

html[data-theme="dark"] .icon-btn:hover .material-symbols-outlined,
html[data-theme="dark"] .icon-btn:focus-visible .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" -25, "opsz" 24;
}

.text-btn:focus-visible,
a:focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 3px;
}

h1 {
    outline: none;
    margin: 2.75rem 0 0;
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    margin: 2.75rem 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}

p {
    margin: 0.35rem 0 0;
}

.role,
.skills,
.title,
.years,
footer {
    color: var(--muted);
}

.profile {
    margin-top: 1.5rem;
}

.skills {
    margin-top: 0.85rem;
}

.work-fold {
    margin-top: 2.75rem;
}

.work-fold summary {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    list-style: none;
}

.work-fold summary::-webkit-details-marker {
    display: none;
}

.work-fold summary::before {
    content: "+";
    display: inline-block;
    width: 1rem;
    color: var(--muted);
}

.work-fold[open] summary::before {
    content: "–";
}

.work-fold summary:focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 3px;
}

.work {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}

.work li {
    padding: 0.95rem 0;
    border-top: 1px solid var(--line);
}

.work li:last-child {
    border-bottom: 1px solid var(--line);
}

.work-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}

.client {
    font-weight: 600;
}

.years {
    white-space: nowrap;
    font-size: 0.92rem;
}

.title,
.detail {
    margin-top: 0.15rem;
}

.title {
    font-size: 0.95rem;
}

.contact {
    margin-top: 2.25rem;
}

.contact-btn {
    color: var(--fg);
    font-size: 1rem;
    letter-spacing: 0;
    text-decoration: underline;
    text-underline-offset: 0.22em;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

a {
    color: inherit;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    inset: 18vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--line);
    stroke-width: 0.35rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--fg);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

#blazor-error-ui {
    background: var(--bg);
    color: var(--fg);
    border-top: 1px solid var(--line);
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.45rem;
}

html[lang="da"] #blazor-error-ui .error-text::before {
    content: "Der opstod en fejl.";
}

html[lang="en"] #blazor-error-ui .error-text::before {
    content: "An error has occurred.";
}

html[lang="da"] #blazor-error-ui .reload::before {
    content: "Indlæs igen";
}

html[lang="en"] #blazor-error-ui .reload::before {
    content: "Reload";
}

@media (max-width: 36rem) {
    h1 {
        font-size: 1.55rem;
    }

    .mark img {
        height: 1.65rem;
    }

    .controls {
        gap: 0.65rem;
    }

    .work-line {
        flex-direction: column;
        gap: 0;
    }
}
