:root {
    --Background: white;
    --MenuBackground: #444;
    --MenuHighlight: #666;
    --ItemHighlight: #5fd068;
    --text: black;
    --menu-text: white;
}

@media (prefers-color-scheme: dark) {
    :root {
        --Background: #131516;
        --MenuBackground: #333;
        --MenuHighlight: #555;
        --ItemHighlight: #5fd068;
        --text: white;
        --menu-text: white;
    }
}

* {
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    margin: 0;
    color: var(--text);
}

html {
    line-height: 1.15;
}

body {
    margin: 1rem;
    background-color: var(--Background);
}

.site-footer {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.site-footer a {
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--ItemHighlight);
    padding: 0.4rem 1rem;
    border-radius: 999px;
}

.site-footer a:hover {
    background: rgba(95, 208, 104, 0.15);
}

.cv-name {
    font-size: 4rem;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
}

.cv-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.cv-summary {
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
    margin-bottom: 1rem;
}

.cv-divider {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.cv-contact {
    text-align: right;
}

.cv-grid {
    display: block;
    column-count: 2;
    column-width: 30ch;
    column-gap: 1ch;
    padding-top: 0rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

.cv-grid > * {
    margin-bottom: 1rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

a {
    color: var(--text);
}

a:hover {
    text-decoration-line: underline;
    text-decoration-style: dashed;
    transition: background-color, 100ms;
}

a:active {
    text-decoration-line: underline;
    text-decoration-style: dotted;
}

a::after {
    color: transparent;
    text-shadow: 0 0 0 var(--text);
    font-size: 0.6em;
    vertical-align: 0.22em;
    content: " 🔗";
}

.cv-card {
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.cv-role {
    font-style: italic;
}

hr {
    border: 0;
    border-top: 2px solid;
}

.cv-section-rule,
hr.medium {
    margin-top: 0.5rem;
    width: 7ch;
}

hr.small {
    margin-bottom: 0.5rem;
    width: 5ch;
}

br.small {
    display: block;
    margin-bottom: 0.5rem;
}

h5 {
    font-weight: normal;
    font-size: 1rem;
    font-style: italic;
    margin-top: 0.5rem;
}

.cv-inline-list {
    margin-left: 5ch;
}

.cv-inline-list span:not(:last-child)::after {
    content: ", ";
}

.cv-table th {
    text-align: left;
}

.cv-application-materials {
    margin: 2rem auto 0;
    max-width: 900px;
}

.cv-material-subtitle {
    margin-bottom: 0.8rem;
    color: var(--text);
}

.cv-material-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cv-material-card {
    border: 1px solid var(--ItemHighlight);
    padding: 1rem;
    border-radius: 8px;
}

.cv-material-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.6rem;
}

.cv-material-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 0.8rem;
}

.cv-material-meta div {
    display: grid;
    gap: 0.2rem;
}

.cv-material-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cv-material-meta dd {
    margin: 0;
}

.cv-material-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--ItemHighlight);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.cv-material-source:hover {
    background: rgba(95, 208, 104, 0.15);
}

.cv-material-body {
    line-height: 1.6;
}

.cv-material-body :global(p) {
    margin-bottom: 0.7rem;
}

.cv-material-body :global(p:last-child) {
    margin-bottom: 0;
}

.cv-material-body :global(ul),
.cv-material-body :global(ol) {
    margin: 0.6rem 0 0.8rem 1.2rem;
}

.cv-material-body :global(li) {
    margin-bottom: 0.35rem;
}

.cv-material-body :global(h2),
.cv-material-body :global(h3),
.cv-material-body :global(h4) {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
}

.cv-material-body :global(blockquote) {
    margin: 0.8rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--ItemHighlight);
}

@media (max-width: 640px) {
    .cv-hero {
        flex-direction: column;
    }

    .cv-contact {
        text-align: center;
    }

    .cv-name {
        text-align: center;
        line-height: 1;
    }

    .cv-summary {
        text-align: justify;
    }
}

@media print {
    @page {
        margin: 0.5in;
        margin-top: 0.25in;
    }

    a::after {
        color: var(--text);
        content: " [↗]";
        vertical-align: 0.3em;
    }

    html {
        font-size: 10.5pt;
    }
}
