:root {
    --background: #f7f7f3;
    --ink: #202522;
    --muted: #5b645e;
    --accent: #285440;
    --rule: #d5d9d3;
    --paper: #ffffff;
    --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --shell: 60rem;
    --meta-column: 9rem;
    --portrait-width: 8.5rem;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
    background: var(--background);
}

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration-color: rgb(40 84 64 / 35%);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-color: currentColor;
}

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

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
figure {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.2;
}

h1 {
    margin-bottom: 0.25rem;
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

h3 {
    margin-bottom: 0.15rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.shell {
    width: min(calc(100% - var(--gutter) - var(--gutter)), var(--shell));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.6rem 0.85rem;
    transform: translateY(-150%);
    border-radius: 0.2rem;
    background: var(--ink);
    color: var(--paper);
}

.skip-link:focus {
    transform: translateY(0);
}

.document {
    margin-block: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border: 1px solid var(--rule);
    background: var(--paper);
}

.identity {
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.identity-lockup {
    display: grid;
    max-width: 47rem;
    align-items: center;
    grid-template-columns: var(--portrait-width) minmax(0, 1fr);
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.professional-title {
    margin-bottom: 0;
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 650;
}

.summary {
    margin-top: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--muted);
    font-size: 1.03rem;
}

.summary p {
    margin-bottom: 0.75rem;
}

.location {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 0;
    list-style: none;
    gap: 0.35rem 0;
}

.contact-list li {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
}

.contact-list li + li::before {
    margin-inline: 0.6rem;
    color: var(--rule);
    content: "·";
}

.portrait {
    margin: 0;
}

.portrait img {
    width: var(--portrait-width);
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.section {
    padding-block: clamp(2.25rem, 4vw, 3rem);
    border-bottom: 1px solid var(--rule);
}

.section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.section-intro {
    margin: -0.65rem 0 1.5rem;
    color: var(--muted);
}

.roles {
    border-top: 1px solid var(--rule);
}

.role {
    display: grid;
    padding-block: 2rem;
    border-bottom: 1px solid var(--rule);
    grid-template-columns: var(--meta-column) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3rem);
}

.role:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.role-meta {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.role-meta p {
    margin-bottom: 0.3rem;
}

.role-content {
    max-width: 43rem;
}

.role-content > p {
    margin-bottom: 1rem;
}

.role-title {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.engagement-title {
    color: var(--muted);
    font-size: 0.9rem;
}

.accomplishments {
    padding-left: 1.15rem;
    margin-bottom: 1rem;
}

.accomplishments li {
    padding-left: 0.25rem;
    margin-bottom: 0.55rem;
}

.role-compact {
    padding-block: 1.8rem;
}

.project-list {
    border-top: 1px solid var(--rule);
}

.project-entry {
    display: grid;
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--rule);
    grid-template-columns: var(--meta-column) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3rem);
}

.project-entry:last-child {
    border-bottom: 0;
}

.project-entry p {
    margin-bottom: 0;
}

.project-status {
    color: var(--muted);
    font-size: 0.78rem;
}

.role-compact .role-content > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.skills-list {
    margin-bottom: 0;
    border-top: 1px solid var(--rule);
}

.skill-row {
    display: grid;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--rule);
    grid-template-columns: var(--meta-column) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3rem);
}

.skill-row:last-child {
    border-bottom: 0;
}

.skill-row h3 {
    margin-bottom: 0;
    font-size: 0.86rem;
    font-weight: 700;
}

.skill-row p {
    margin-bottom: 0;
    color: var(--muted);
}

.education {
    display: grid;
    grid-template-columns: var(--meta-column) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3rem);
}

.education h2 {
    margin-bottom: 0;
}

.education h3 {
    margin-bottom: 0.35rem;
}

.education p {
    margin-bottom: 0;
    color: var(--muted);
}

@media (max-width: 680px) {
    :root {
        --portrait-width: 8rem;
    }

    .document {
        width: 100%;
        margin-block: 0;
        padding-block: 2.5rem;
        border: 0;
    }

    .identity {
        padding-bottom: 2.5rem;
    }

    .identity-lockup {
        gap: 1rem;
    }

    .role,
    .project-entry,
    .skill-row,
    .education {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .role-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 0.75rem;
    }

    .role-meta p {
        margin-bottom: 0;
    }

    .skill-row {
        gap: 0.2rem;
    }

    .education h2 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 440px) {
    :root {
        --portrait-width: 6.25rem;
    }

    .identity-lockup {
        align-items: start;
        gap: 1rem;
    }

    h1 {
        font-size: clamp(2.15rem, 11vw, 2.5rem);
    }

    .contact-list {
        display: grid;
        gap: 0.2rem;
    }

    .contact-list li + li::before {
        display: none;
    }
}

@media print {
    @page {
        margin: 0.6in;
    }

    :root {
        --background: #ffffff;
        --ink: #111111;
        --muted: #333333;
        --accent: #111111;
        --rule: #cccccc;
        --meta-column: 6.5rem;
        --portrait-width: 5rem;
    }

    body {
        font-size: 9pt;
        line-height: 1.4;
    }

    .document {
        width: 100%;
        padding: 0;
        margin: 0;
        border: 0;
    }

    .identity {
        padding-bottom: 1.25rem;
    }

    .identity-lockup {
        grid-template-columns: var(--portrait-width) minmax(0, 1fr);
        gap: 1.25rem;
    }

    h1 {
        font-size: 25pt;
    }

    h2 {
        margin-bottom: 0.75rem;
        font-size: 13pt;
    }

    h3 {
        font-size: 10.5pt;
    }

    .professional-title,
    .summary {
        font-size: 9.5pt;
    }

    .section {
        padding-block: 1.25rem;
    }

    .role {
        padding-block: 1rem;
        break-inside: avoid;
        grid-template-columns: var(--meta-column) minmax(0, 1fr);
        gap: 1rem;
    }

    .role-compact {
        padding-block: 0.75rem;
    }

    .accomplishments {
        margin-bottom: 0.5rem;
    }

    .accomplishments li {
        margin-bottom: 0.2rem;
    }

    .skill-row,
    .project-entry,
    .education {
        grid-template-columns: var(--meta-column) minmax(0, 1fr);
        gap: 1rem;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
