/* Recruiter quick view — the printed record of the desktop portfolio.
   Screen-cyan on the OS; process cyan on paper here. */

:root {
    color-scheme: light;

    --paper:      oklch(0.986 0.004 210);
    --paper-sunk: oklch(0.958 0.007 210);
    --ink:        oklch(0.19 0.018 250);
    --ink-soft:   oklch(0.42 0.020 245);

    --cyan:       oklch(0.79 0.132 205);   /* plates, fills, drench */
    --cyan-deep:  oklch(0.46 0.130 227);   /* cyan as text ink */
    --cyan-wash:  oklch(0.79 0.132 205 / 0.16);

    --line:       oklch(0.19 0.018 250 / 0.15);
    --line-firm:  oklch(0.19 0.018 250 / 0.85);

    --plate-x: 7px;
    --plate-y: 7px;

    --shell: min(1180px, calc(100% - 48px));
    --ease:  cubic-bezier(0.16, 1, 0.3, 1);

    --z-sticky: 10;
    --z-skip:   40;
}

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 84px; }

body {
    margin: 0;
    overflow-x: clip;
    background: var(--paper);
    color: var(--ink);
    font-family: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 {
    margin: 0;
    font-weight: 800;
    font-stretch: 125%;
    line-height: 0.98;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.shell { width: var(--shell); margin-inline: auto; }

/* Mono is reserved for data: dates, figures, field labels, revision stamps. */
.mono {
    font-family: "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px var(--cyan-wash);
    border-radius: 2px;
}

.skip-link {
    position: fixed;
    top: 12px; left: 12px;
    z-index: var(--z-skip);
    padding: 10px 14px;
    background: var(--ink);
    color: var(--paper);
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px max(24px, calc((100vw - 1180px) / 2));
    background: var(--paper);
    border-bottom: 1.5px solid var(--line-firm);
}

.site-header a { text-decoration: none; }

.brand {
    position: relative;
    isolation: isolate;
    font-weight: 800;
    font-stretch: 125%;
    letter-spacing: -0.02em;
}
.brand::after {
    content: "";
    position: absolute;
    inset: auto 0 -2px 0;
    height: 6px;
    background: var(--cyan);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
}
.brand:hover::after, .brand:focus-visible::after { transform: scaleX(1); }

.site-header nav { display: flex; gap: 4px; }
.site-header nav a {
    padding: 6px 10px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
}
.site-header nav a:hover, .site-header nav a:focus-visible {
    color: var(--ink);
    background: var(--cyan-wash);
}

/* ---------- Title block ---------- */

.titleblock {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.72fr);
    gap: clamp(36px, 6vw, 76px);
    align-items: stretch;
    padding-block: clamp(44px, 6vw, 72px) clamp(40px, 5vw, 62px);
}

.titleblock > div { display: flex; flex-direction: column; align-items: flex-start; }

.stamp {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding: 5px 10px 5px 9px;
    color: var(--ink);
    border: 1.5px solid var(--line-firm);
    border-radius: 3px;
}
.stamp b {
    position: relative;
    width: 11px; height: 11px;
    border: 1.5px solid var(--cyan);
    border-radius: 50%;
}
.stamp b::before, .stamp b::after {
    content: "";
    position: absolute;
    inset: -3px 50% -3px 50%;
    width: 1.5px;
    margin-left: -0.75px;
    background: var(--line-firm);
}
.stamp b::after { inset: 50% -3px 50% -3px; width: auto; height: 1.5px; margin: -0.75px 0 0; }

.name {
    position: relative;
    isolation: isolate;
    font-size: clamp(2.5rem, 7.2vw, 5.1rem);
    line-height: 0.92;
}
.name::before {
    content: attr(data-name);
    position: absolute;
    inset: 0;
    z-index: -1;
    color: var(--cyan);
    transform: translate(var(--plate-x), var(--plate-y));
    animation: register 1s var(--ease) both;
}

@keyframes register {
    from { transform: translate(30px, -18px); opacity: 0; }
    to   { transform: translate(var(--plate-x), var(--plate-y)); opacity: 1; }
}

.lede {
    max-width: 60ch;
    margin-top: 26px;
    font-size: clamp(1.1rem, 1.9vw, 1.35rem);
    line-height: 1.42;
    font-weight: 500;
}

.summary {
    max-width: 66ch;
    margin-top: 14px;
    color: var(--ink-soft);
}

.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.titleblock .actions { margin-top: auto; padding-top: 34px; }

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 11px 17px;
    border: 1.5px solid var(--line-firm);
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.button:hover, .button:focus-visible { background: var(--cyan); transform: translate(-2px, -2px); }
button.button { font-family: inherit; cursor: pointer; }
.copy-email::before {
    content: "";
    flex: 0 0 auto;
    width: 13px; height: 13px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    box-shadow: 3px -3px 0 -1.5px currentColor, 3px -3px 0 0 currentColor;
    clip-path: polygon(-40% -40%, 140% -40%, 140% 140%, -40% 140%);
}
.copy-email.is-copied { background: var(--cyan); color: var(--ink); }
.copy-email.is-copied::before {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    width: 7px; height: 12px;
    margin-top: -3px;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(42deg);
}

.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:hover, .button.primary:focus-visible { background: var(--cyan-deep); color: var(--paper); }

/* The drawing title block: photo plate + labelled fields. */
.fields {
    padding: 20px;
    border: 1.5px solid var(--line-firm);
    border-radius: 4px;
    background: var(--paper);
}

.portrait {
    position: relative;
    display: block;
    margin-bottom: 20px;
}
.portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center 18%;
    border: 1.5px solid var(--line-firm);
    border-radius: 3px;
    position: relative;
    z-index: 1;
    background: var(--paper-sunk);
}
.portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--cyan);
    border-radius: 3px;
    transform: translate(var(--plate-x), var(--plate-y));
    animation: register 1s var(--ease) 0.08s both;
}

.fields dl { margin: 0; }
.fields dl > div { padding: 11px 0; border-top: 1px solid var(--line); }
.fields dl > div:first-child { border-top: 0; padding-top: 0; }
.fields dt { color: var(--ink-soft); }
.fields dd { margin: 4px 0 0; font-weight: 600; font-size: 0.98rem; line-height: 1.35; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(44px, 5.2vw, 70px); }

.section-head {
    position: relative;
    padding-top: 20px;
    margin-bottom: clamp(28px, 4vw, 44px);
    border-top: 1.5px solid var(--line-firm);
}
.section-head::before {
    content: "";
    position: absolute;
    top: 5px;
    left: var(--plate-x);
    right: calc(var(--plate-x) * -1);
    height: 1.5px;
    background: var(--cyan);
}
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.85rem); }
.section-head p {
    max-width: 62ch;
    margin-top: 12px;
    color: var(--ink-soft);
}
.section-head .row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 30px;
}

.text-link {
    color: var(--cyan-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}
.text-link:hover, .text-link:focus-visible { color: var(--ink); }

/* ---------- Evidence table ---------- */

.evidence { width: 100%; border-collapse: collapse; text-align: left; }
.evidence caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.evidence th, .evidence td { padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.evidence thead th { padding-bottom: 10px; color: var(--ink-soft); border-bottom: 1.5px solid var(--line-firm); font-weight: 500; }
.evidence tbody tr:last-child td, .evidence tbody tr:last-child th { border-bottom: 1.5px solid var(--line-firm); }

.evidence tbody th {
    width: 17%;
    font-size: clamp(1.35rem, 3vw, 2.1rem);
    font-weight: 800;
    font-stretch: 125%;
    letter-spacing: -0.03em;
    white-space: nowrap;
}
.evidence tbody th span {
    display: inline;
    background: linear-gradient(var(--cyan), var(--cyan)) 0 82% / 100% 0.28em no-repeat;
    box-decoration-break: clone;
}
.evidence td:last-child { width: 25%; color: var(--ink-soft); }

/* ---------- Experience ledger ---------- */

.ledger > article {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 8px 34px;
    padding-block: 28px;
    border-top: 1px solid var(--line);
}
.ledger > article:first-child { border-top: 1.5px solid var(--line-firm); }
.ledger > article:last-child { border-bottom: 1.5px solid var(--line-firm); }

.ledger .when { color: var(--ink-soft); padding-top: 7px; }
.ledger h3 { font-size: clamp(1.25rem, 2.3vw, 1.6rem); }
.ledger .org { margin-top: 6px; font-weight: 600; color: var(--cyan-deep); }
.ledger ul { margin: 16px 0 0; padding: 0; list-style: none; }
.ledger li { position: relative; padding-left: 22px; color: var(--ink-soft); }
.ledger li + li { margin-top: 11px; }
.ledger li::before {
    content: "";
    position: absolute;
    top: 0.62em; left: 0;
    width: 9px; height: 9px;
    background: var(--cyan);
    border: 1px solid var(--line-firm);
}
.ledger p.body { margin-top: 14px; color: var(--ink-soft); }
.ledger .after { margin-top: 14px; }

/* ---------- Endorsement ---------- */

.endorsement {
    margin: 34px 0 0;
    padding: clamp(30px, 4vw, 46px);
    background: var(--paper-sunk);
    border: 1.5px solid var(--line-firm);
    border-radius: 4px;
}

.endorsement-stack { display: grid; }
.endorsement-item {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.7fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: end;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}
.endorsement-item[data-active] { opacity: 1; visibility: visible; transform: none; }

.endorsement-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
}
.endorsement-progress {
    position: relative;
    flex: 1 1 auto;
    height: 2px;
    background: var(--line);
    overflow: hidden;
}
.endorsement-progress i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    background: var(--cyan);
    transform-origin: left;
    animation: tick 10s linear forwards;
}
.endorsement.is-held .endorsement-progress i { animation-play-state: paused; }
@keyframes tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.endorsement-dots { display: flex; gap: 8px; }
.endorsement-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    background: transparent;
    border: 1.5px solid var(--line-firm);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.25s var(--ease);
}
.endorsement-dots button:hover { background: var(--cyan); }
.endorsement-dots button[aria-current="true"] { background: var(--ink); }

.endorsement blockquote {
    margin: 0;
    font-size: clamp(1.3rem, 2.7vw, 2rem);
    font-weight: 700;
    font-stretch: 110%;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.endorsement figcaption { line-height: 1.45; }
.endorsement figcaption strong { display: block; font-size: 1.05rem; }
.endorsement figcaption span { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Work ---------- */

.work { display: grid; gap: 20px; }

.entry {
    display: grid;
    gap: 22px 34px;
    padding: 22px;
    border: 1.5px solid var(--line-firm);
    border-radius: 4px;
    background: var(--paper);
    transition: background 0.25s var(--ease);
}
.entry:hover { background: var(--paper-sunk); }

.entry.lead { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch; }
.entry.lead > div { display: flex; flex-direction: column; justify-content: center; }
.entry.lead .shot img { height: 100%; min-height: 300px; aspect-ratio: auto; }
.work .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.shot { position: relative; align-self: stretch; }
.shot img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border: 1.5px solid var(--line-firm);
    border-radius: 3px;
    background: var(--paper-sunk);
}
.shot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--cyan);
    border-radius: 3px;
    transform: translate(0, 0);
    transition: transform 0.4s var(--ease);
}
.entry:hover .shot::after { transform: translate(var(--plate-x), var(--plate-y)); }

.entry .role { color: var(--ink-soft); }
.entry h3 { margin-top: 8px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.entry .what { margin-top: 12px; color: var(--ink-soft); }

.entry .built {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 16px 0 0;
    padding: 12px 0 0;
    list-style: none;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}

.entry .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.entry .links a {
    padding: 7px 12px;
    border: 1.5px solid var(--line-firm);
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s var(--ease);
}
.entry .links a:hover, .entry .links a:focus-visible { background: var(--cyan); }

/* ---------- Stack ---------- */

.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; }
.stack > div { padding: 20px 22px 22px 0; border-top: 1.5px solid var(--line-firm); }
.stack h3 { font-size: 1rem; font-stretch: 110%; letter-spacing: 0; }
.stack ul { margin: 12px 0 0; padding: 0; list-style: none; color: var(--ink-soft); }
.stack li { padding: 4px 0; }
.stack li + li { border-top: 1px solid var(--line); }

/* ---------- Contact drench ---------- */

.contact {
    background: var(--cyan);
    border-block: 1.5px solid var(--line-firm);
}
.contact .shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.85fr);
    gap: clamp(30px, 5vw, 68px);
    align-items: start;
    padding-block: clamp(56px, 8vw, 96px);
}
.contact h2 { font-size: clamp(1.75rem, 3.9vw, 2.9rem); }
.contact-copy p { max-width: 46ch; margin-top: 14px; font-weight: 500; }
.contact .button { background: var(--paper); }
.contact .button:hover, .contact .button:focus-visible { background: var(--ink); color: var(--paper); }
.contact .button.primary { background: var(--ink); color: var(--paper); }
.contact .button.primary:hover, .contact .button.primary:focus-visible { background: var(--paper); color: var(--ink); }

.contact-direct { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }

/* A form printed on the coloured sheet: paper fields, ink rules. */
.contact-form { display: grid; gap: 15px; }
.contact-form .field { margin: 0; }
.contact-form label { display: block; margin-bottom: 6px; color: var(--ink); }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 11px 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--line-firm);
    border-radius: 4px;
    font: inherit;
    font-size: 0.98rem;
}
.contact-form textarea { min-height: 108px; resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible, .contact .button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px oklch(0.986 0.004 210 / 0.7);
}
.contact-form button[type="submit"] { justify-self: start; margin-top: 3px; }
.contact-form button[disabled] { opacity: 0.62; cursor: progress; }

.contact-honeypot {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.contact-status:empty { display: none; }
.contact-status {
    margin-top: 2px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
}
.contact-status.is-pending { color: var(--ink-soft); }
.contact-status.is-success { color: var(--ink); }
.contact-status.is-error { color: oklch(0.36 0.16 27); }

/* ---------- Footer ---------- */

.site-footer { padding-block: 34px 40px; }
.site-footer .shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    color: var(--ink-soft);
}
.site-footer a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
    .titleblock, .endorsement, .entry.lead, .contact .shell { grid-template-columns: 1fr; }
    .titleblock { align-items: stretch; }
    .fields { display: grid; grid-template-columns: minmax(140px, 0.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
    .portrait { margin-bottom: 0; }
    .entry.lead .shot { order: -1; }
    .endorsement-item { grid-template-columns: 1fr; align-items: start; }
    .contact-direct { margin-bottom: 4px; }
}

@media (max-width: 700px) {
    :root { --shell: min(1180px, calc(100% - 32px)); }
    .site-header { padding-inline: 16px; }
    .site-header nav a:not(:last-child) { display: none; }
    .ledger > article { grid-template-columns: 1fr; gap: 4px; }
    .ledger .when { padding-top: 0; }
    .fields { grid-template-columns: 1fr; }
    .evidence thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .evidence tbody tr { display: grid; gap: 4px; padding-block: 18px; border-bottom: 1px solid var(--line); }
    .evidence tbody th, .evidence tbody td { width: auto; padding: 0; border: 0; white-space: normal; }
    .evidence tbody th { font-size: 2rem; }
    .evidence tbody td:last-child {
        margin-top: 10px;
        padding-top: 9px;
        border-top: 1px solid var(--line);
        font-size: 0.88rem;
    }
    .portrait img { aspect-ratio: 16 / 10; }
    .contact-direct .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .endorsement-progress { visibility: hidden; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Print: this page is the record. ---------- */

@media print {
    :root { --paper: #fff; --ink: #000; --ink-soft: #333; --line-firm: #000; --line: #bbb; --plate-x: 0px; --plate-y: 0px; }
    body { font-size: 10.5pt; line-height: 1.42; }
    .site-header, .site-footer, .skip-link, .stamp, .entry .links { display: none; }
    .contact-form { display: none; }
    .name::before, .portrait::after, .shot::after, .brand::after { display: none; }
    .contact { background: none; }
    .endorsement-stack { display: block; }
    .endorsement-item {
        opacity: 1;
        visibility: visible;
        transform: none;
        display: grid;
        break-inside: avoid;
    }
    .endorsement-item + .endorsement-item { margin-top: 14pt; padding-top: 14pt; border-top: 1px solid var(--line); }
    .endorsement-nav { display: none; }
    .section, .titleblock, .contact .shell { padding-block: 16pt; }
    .titleblock { grid-template-columns: 1fr 210px; gap: 22pt; align-items: start; }
    .titleblock .actions { margin-top: 18pt; padding-top: 0; }
    .fields { display: block; padding: 10pt; }
    .portrait { margin-bottom: 10pt; }
    .shot img { max-height: 62mm; object-fit: cover; }
    .contact .shell { grid-template-columns: 1fr; gap: 10pt; }
    .contact-direct { gap: 4pt 18pt; margin-top: 8pt; }
    .contact-direct .button { background: none; color: var(--ink); min-height: 0; padding: 0; border: 0; font-weight: 600; }
    .copy-email::before { display: none; }
    .entry, .fields, .endorsement, .section-head, .ledger > article { break-inside: avoid; }
    .evidence tbody th span { background: none; }
    a[href^="http"]::after, a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #444; }
}
