/* ===========================================================
   ramanouski.com — /cv
   The résumé as a document on the wall, and the same markup set
   for one sheet of A4. Only cv-specific classes live here; the
   tokens, .role-points, .role-org, .kv and .mono come from style.css.
   =========================================================== */

.cv {
    /* the résumé is English whatever language the chrome is in,
       so its headings keep the English width axis */
    --w-display: 108%;
    padding: var(--section) 0;
}

/* ---------- Header: name, title, contact line ---------- */
.cv-head {
    padding-bottom: clamp(20px, 3vw, 32px);
    border-bottom: var(--rule) solid var(--text);
}

.cv-name {
    font-size: var(--fs-h2);
}

.cv-title {
    margin-top: 10px;
    font-size: var(--fs-lead);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-2);
}

.cv-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
    color: var(--text-2);
}

.cv-contact li,
.cv-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.cv-contact li + li::before {
    content: "·";
    margin: 0 12px;
}

/* ---------- Sections: mono label left, content right ---------- */
.cv-section {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: 12px var(--gutter);
    padding: clamp(28px, 4vw, 44px) 0;
    border-bottom: 1px solid var(--line);
}

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

.cv-label {
    font-weight: 500;
    font-stretch: 100%;
    line-height: 1.9;
    color: var(--text-3);
}

.cv-content {
    min-width: 0;
}

.cv-points {
    max-width: 44em;
}

.cv-points li,
.cv-note {
    color: var(--text-2);
}

.cv-note {
    max-width: 44em;
    margin-bottom: 12px;
}

/* ---------- Experience ---------- */
.cv-job {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cv-job + .cv-job {
    margin-top: clamp(24px, 3vw, 32px);
    padding-top: clamp(24px, 3vw, 32px);
    border-top: 1px solid var(--line);
}

.cv-job-head {
    display: grid;
    gap: 6px;
}

.cv-job-title {
    font-size: var(--fs-h3);
    font-weight: 700;
    font-stretch: var(--w-display);
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-wrap: balance;
}

.cv-job-meta {
    color: var(--text-3);
}

.cv-stack {
    max-width: 50em;
    font-size: var(--fs-small);
    line-height: 1.55;
    color: var(--text-2);
}

.cv-key {
    margin-right: 4px;
    color: var(--text-3);
}

/* ---------- Own products: a ledger, name and platform left, one line right ---------- */
.cv-products {
    display: grid;
    border-top: 1px solid var(--line);
}

.cv-product {
    display: grid;
    /* the floor keeps the longest platform line ("iPhone · iPad · Mac", set nowrap) inside its column just above 860px */
    grid-template-columns: minmax(10.5rem, 3fr) minmax(0, 9fr);
    gap: 0 var(--gutter);
    align-items: baseline;
    padding: 6px 0 14px;
    border-bottom: 1px solid var(--line);
}

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

.cv-product-name {
    grid-area: 1 / 1;
    justify-self: start;
    font-weight: 600;
}

.cv-product-meta {
    grid-area: 2 / 1;
    white-space: nowrap;
}

.cv-product-line {
    grid-area: 1 / 2 / span 2;
    color: var(--text-2);
}

.cv-product-name,
.cv-product-line a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.cv-product-key,
.cv-product-meta {
    color: var(--text-3);
}

/* ---------- Key / value lists inside the content column ---------- */
.cv-kv .kv-row:first-child {
    padding-top: 0;
}

.cv-kv .kv-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.cv-kv dd {
    color: var(--text-2);
}

.cv-line {
    display: block;
}

/* ---------- Responsive (screen only: an A4 sheet is 794px wide and must not
   pick up the phone layout) ---------- */
@media screen and (min-width: 861px) {
    /* the label keeps its section company while a long one scrolls by */
    .cv-label {
        position: sticky;
        top: 88px;
        align-self: start;
    }
}

@media screen and (max-width: 860px) {
    .cv-section,
    .cv-product {
        grid-template-columns: minmax(0, 1fr);
    }

    .cv-contact {
        flex-direction: column;
        align-items: flex-start;
    }

    .cv-contact li + li::before {
        content: none;
    }

    .cv-product {
        padding: 6px 0 16px;
    }

    .cv-product-name,
    .cv-product-meta,
    .cv-product-line {
        grid-area: auto;
    }

    .cv-product-meta {
        margin-top: 6px;
    }
}

/* ===========================================================
   Print: one sheet of A4.
   White paper, black type; felt green only on the rule under the
   name and on the section labels. Archivo 9.5pt / 1.35.
   Nothing here is positioned: the PDF's text then runs in reading
   order, which is what a résumé parser reads.
   =========================================================== */
@page {
    size: A4;
    margin: 14mm 15mm;
}

@media print {
    html,
    body {
        background: #fff;
        color: #000;
    }

    body {
        font-size: 9.5pt;
        line-height: 1.35;
        overflow: visible;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .navbar,
    .page-head,
    .contact-band,
    .footer,
    .skip-link {
        display: none;
    }

    /* every token the résumé reads from turns to ink on paper,
       whatever colour scheme the machine that prints it is in */
    .cv {
        --text: #000;
        --text-2: #000;
        --text-3: #000;
        --line: #C4C4C4;
        --link: #000;
        padding: 0;
    }

    .cv .container {
        max-width: none;
        padding: 0;
    }

    /* links stay clickable in the PDF but read as plain text */
    .cv a {
        display: inline;
        min-height: 0;
        color: inherit;
        background: none;
        text-decoration: none;
    }

    .cv .mono {
        font-size: 7.75pt;
        line-height: 1.4;
    }

    /* header */
    .cv-head {
        padding-bottom: 2.4mm;
        border-bottom: 1.5pt solid #0C5A43;
    }

    .cv-name {
        font-size: 22pt;
        line-height: 1;
    }

    .cv-title {
        margin-top: 1.5mm;
        font-size: 11pt;
        font-weight: 600;
        line-height: 1.25;
    }

    .cv .cv-contact {
        align-items: baseline;
        margin-top: 1.4mm;
        font-size: 8.25pt;
    }

    .cv-contact li {
        min-height: 0;
    }

    .cv-contact li + li::before {
        margin: 0 2.2mm;
    }

    /* sections */
    .cv-section {
        grid-template-columns: 22mm minmax(0, 1fr);
        gap: 0 4mm;
        padding: 2.3mm 0;
        border-bottom: 0.5pt solid var(--line);
        break-inside: avoid;
    }

    /* Experience is the one section long enough to be allowed to split, between jobs */
    .cv-section-split {
        break-inside: auto;
    }

    .cv-label {
        color: #0C5A43;
        font-weight: 600;
        line-height: 1.66;
    }

    .cv-points,
    .cv-note,
    .cv-stack,
    .cv-kv dd {
        max-width: none;
    }

    .cv-points {
        gap: 0.3mm;
    }

    .cv-points li {
        position: static;
        padding-left: 3.6mm;
    }

    .cv-points li::before {
        position: static;
        display: inline-block;
        width: 1.8mm;
        height: 0.75pt;
        margin: 0 1.8mm 0 -3.6mm;
        vertical-align: 0.32em;
        background: #000;
    }

    .cv-note {
        margin-bottom: 0.6mm;
    }

    /* experience */
    .cv-job {
        gap: 0.7mm;
        break-inside: avoid;
    }

    .cv-job + .cv-job {
        margin-top: 1.8mm;
        padding-top: 1.8mm;
        border-top: 0.5pt solid var(--line);
    }

    .cv-job-head {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0 5mm;
    }

    .cv-job-title {
        font-size: 10.5pt;
        line-height: 1.3;
        letter-spacing: -0.01em;
    }

    .cv-stack {
        font-size: 8.75pt;
        line-height: 1.35;
    }

    .cv-key {
        margin-right: 0.6mm;
    }

    /* own products: name, line, platform on one row */
    .cv-products {
        border-top: 0;
    }

    .cv-product {
        grid-template-columns: 22mm minmax(0, 1fr) auto;
        gap: 0 3.5mm;
        padding: 0.2mm 0;
        border-bottom: 0;
        break-inside: avoid;
    }

    .cv-product-name,
    .cv-product-line,
    .cv-product-meta {
        grid-area: auto;
    }

    /* the in-development row runs in, like the key / value lists below */
    .cv-product-dev {
        display: block;
    }

    .cv-product-dev .cv-product-key::after {
        content: ":";
        margin-right: 0.8mm;
    }

    /* key / value lists run in, the way a printed CV sets them */
    .cv-kv .kv-row {
        display: block;
        padding: 0.2mm 0;
        border-bottom: 0;
        break-inside: avoid;
    }

    .cv-kv dt,
    .cv-kv dd,
    .cv-line {
        display: inline;
    }

    .cv-kv dt {
        font-size: 7.75pt;
        line-height: 1;
    }

    .cv-kv dt::after {
        content: ":";
        margin-right: 0.8mm;
    }
}
