:root {
    color-scheme: light dark;

    --ink: #1b1b1b;
    --muted: #67625c;
    --paper: #fdfdfc; /* the sheet */
    --desk: #e9e9e9; /* surface behind the sheet */
    --teal: #0b7285;
    --teal-dark: #085c6b; /* link hover */
    --rule: #0b7285;
    --shadow: 0 6px 12px -2px rgba(50, 50, 93, 0.25), 0 3px 7px -3px rgba(0, 0, 0, 0.3);
    --display: "VC Honey Deck", Georgia, "Times New Roman", serif;
    --body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #cad3f5;
        --muted: #9aa2c4;
        --paper: #1e2030;
        --desk: #4a4c5e;
        --teal: #99e9f2;
        --teal-dark: #c8f3f9;
        --rule: #3c7f8d;
        --shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.45), 0 3px 7px -3px rgba(0, 0, 0, 0.55);
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 2.5rem 1.5rem 3.5rem;
    background: var(--desk);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.62;
}

.wrap {
    max-width: calc(var(--measure) + 6rem);
    margin: 0 auto;
    padding: 3.5rem 3rem 4rem;
    background: var(--paper);
    border-top: 5px solid var(--teal);
    border-radius: 2px;
    box-shadow: var(--shadow);
}

@media (max-width: 48rem) {
    body {
        padding: 0;
    }

    .wrap {
        padding: 3rem 1.5rem 3.5rem;
        border-radius: 0;
        box-shadow: none;
    }
}

/* ---- Masthead ---- */
.name {
    font-family: var(--display);
    font-weight: normal;
    font-size: clamp(2.6rem, 7vw, 3.7rem);
    line-height: 1.0;
    letter-spacing: 0.01em;
    margin: 0 0 0.5rem;
}

.role {
    font-size: 1.15rem;
    color: var(--muted);
    margin: 0 0 1.1rem;
}

.contact {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0;
    margin: 0;
    font-size: 0.98rem;
}

.contact li {
    display: flex;
    align-items: center;
}

.contact li:not(:last-child)::after {
    content: "·";
    color: var(--rule);
    margin-left: 0.5rem;
}

.contact a, a.inline {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .12s ease, color .12s ease;
}

.contact a:hover, a.inline:hover,
.contact a:focus-visible, a.inline:focus-visible {
    color: var(--teal-dark);
    border-bottom-color: currentColor;
}

.place {
    color: var(--muted);
}

/* ---- Summary  ---- */
.summary {
    margin: 2.4rem 0 0;
    font-size: 1.14rem;
    line-height: 1.6;
}

/* ---- Sections ---- */
section {
    margin-top: 3rem;
}

h2 {
    font-family: var(--display);
    font-weight: normal;
    font-size: 1.6rem;
    letter-spacing: 0.01em;
    margin: 0 0 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

h2::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    background: var(--teal);
    flex: none;
    transform: translateY(0.02em);
}

/* ---- Skills ---- */
.skills {
    display: grid;
    gap: 0.55rem;
}

.skill-row {
    display: grid;
    grid-template-columns: 12.5rem 1fr;
    gap: 0.2rem 1rem;
}

.skill-label {
    font-style: italic;
    color: var(--muted);
}

.skill-vals {
}

/* ---- Experience ---- */
.job {
    margin-bottom: 2rem;
}

.job:last-child {
    margin-bottom: 0;
}

.job-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
}

.job-title {
    font-weight: 700;
    font-size: 1.06rem;
}

.job-co {
    color: var(--ink);
}

.job-dates {
    color: var(--muted);
    font-size: 0.95rem;
    white-space: nowrap;
    font-family: "Lato", sans-serif;
}

h2 .job-dates {
    margin-left: auto;
}

.job-sub {
    color: var(--muted);
    font-style: italic;
    margin: 0.35rem 0 0.7rem;
    max-width: 42rem;
}

.job ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.job li {
    position: relative;
    padding-left: 1.1rem;
    margin: 0.45rem 0;
}

.job li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.32rem;
    height: 0.32rem;
    background: var(--teal);
    border-radius: 50%;
}

.plain {
    margin: 0.2rem 0 0;
    max-width: 42rem;
}

/* ---- Education / projects ---- */
.edu {
    margin: 0;
}

.proj {
    margin: 0;
    padding: 0;
    list-style: none;
}

.proj li {
    position: relative;
    padding-left: 1.1rem;
    margin: 0.75rem 0;
    max-width: 42rem;
}

.proj li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.32rem;
    height: 0.32rem;
    background: var(--teal);
    border-radius: 50%;
}

.proj strong {
    font-weight: 700;
}

/* ---- Footer / print control ---- */
.foot {
    margin-top: 3.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.print-btn {
    font: inherit;
    color: var(--teal);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.print-btn:hover, .print-btn:focus-visible {
    border-color: var(--teal);
    color: var(--teal-dark);
}

@media (max-width: 34rem) {
    .skill-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .skill-label {
        margin-top: 0.4rem;
    }
}

@media print {
    @page {
        margin: 1.4cm;
    }

    /* Always print on light, whatever the screen scheme is. */
    :root {
        color-scheme: light;
        --ink: #1b1b1b;
        --muted: #67625c;
        --paper: #fff;
        --desk: #fff;
        --teal: #0b7285;
        --teal-dark: #085c6b;
        --rule: #0b7285;
    }

    h2::before, .job li::before, .proj li::before {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        padding: 0;
        background: none;
        font-size: 10.5pt;
        line-height: 1.4;
    }

    .wrap {
        padding: 0;
        max-width: none;
        background: none;
        border-top: none;
        border-radius: 0;
        box-shadow: none;
    }

    a, a.inline, .contact a {
        color: var(--ink);
        border-bottom: none;
    }

    .no-print {
        display: none !important;
    }

    section {
        margin-top: 1.4rem;
    }

    .proj li, li {
        break-inside: avoid;
    }

    /* A job may be taller than the space left on the page, so let it split
       rather than shunting the whole block (and its heading) to the next one.
       Its header stays glued to the lines that follow. */
    .job {
        break-inside: auto;
    }

    .job-head {
        break-inside: avoid;
        break-after: avoid;
    }

    .job-sub {
        break-after: avoid;
    }

    h2 {
        break-after: avoid;
    }

    p, li {
        orphans: 2;
        widows: 2;
    }

    .summary {
        font-size: 11pt;
    }
}