/* tokens */
:root, [data-theme="light"] {
    --paper: #ffffff;
    --raised: #fafbfc;
    --ink: #0f171e;
    --muted: #5d6b76;

    --rule: #e3e8eb;
    --rule-strong: #cbd3d8;
    --signal: #4335b5;
    --nominal: #12705e;

    --invert-bg: #0f171e;
    --invert-fg: #ffffff;

    --shadow: 0 1px 3px rgba(15, 23, 30, .06);

    --amber: #9c6414;
    --rose: #a83a63;

    --sheen: rgba(255, 255, 255, .85);
}
[data-theme="dark"] {
    --paper: #0c1218;
    --raised: #141c24;
    --ink: #e7edf1;
    --muted: #8b9ba6;

    --rule: #222d36;
    --rule-strong: #33414c;
    --signal: #a294ff;
    --nominal: #4fc9af;

    --invert-bg: #e7edf1;
    --invert-fg: #0c1218;

    --shadow: 0 1px 3px rgba(0, 0, 0, .3);

    --amber: #e0a94a;
    --rose: #f08ab0;

    --sheen: rgba(231, 237, 241, .07);
}
:root {
    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --body: "Source Serif 4", Georgia, serif;
    --util: "Inter", system-ui, -apple-system, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --gut: clamp(20px, 5vw, 40px);
    --max: 920px;
}


/* base */
* { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* always reserve the scrollbar gutter, so a short page and a long one
       have identical content width - otherwise every page that fits the
       viewport sits 7.5px off from every page that doesn't */
    scrollbar-gutter: stable;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    /* keep the footer on the floor when the content is shorter than the
       viewport, instead of leaving it stranded halfway up */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
footer { flex: none; }
.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gut);
}
a { color: inherit; }

section {
    padding: clamp(46px, 7vw, 74px) 0;
}
.rule-top { border-top: 1px solid var(--rule); }
.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(24px, 3.5vw, 34px);
}
h2 {
    font-family: var(--display);
    font-size: clamp(21px, 3.2vw, 27px);
    font-weight: 600;
    letter-spacing: -.022em; margin: 0;
}
.sec-note {
    font-family: var(--util);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .04em;
    text-align: right;
}


/* topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: var(--paper);
    border-bottom: 1px solid var(--rule);
}
.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 56px;
    position: relative;
}
.brandmark {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -.01em;
    text-decoration: none;
}
.brandmark span { color: var(--signal); }

.navlinks {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--util);
    font-size: 12.5px;
    font-weight: 500;
}
@media (max-width: 680px) {
    .navlinks { gap: 10px; }
}
.navlinks a {
    text-decoration: none; color: var(--muted);
}
.navlinks a:hover { color: var(--ink); }

.theme-toggle {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: var(--paper);
}
.theme-toggle button {
    appearance: none;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: var(--muted);
    font-family: var(--util);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 999px;
    transition: background-color .2s, color, .2s;
}
.theme-toggle button[aria-pressed="true"] {
    background: var(--invert-bg);
    color: var(--invert-fg);
}


/* home
   Scoped to .home so the flex centring never reaches the resume page, which
   shares this stylesheet and puts a normal section inside <main>. */
.home { display: flex; }
.home .hero {
    flex: 1;
    display: flex;
    align-items: center;
    padding: clamp(26px, 5vh, 52px) 0;
}
.home .hero > .wrap { width: 100%; }

/* Both tracks size to their content and sit together at the left, so the
   board follows the text rather than being pushed to the far edge. gap is 0
   so the padding on each side puts the tear exactly between the columns. */
.split {
    display: grid;
    grid-template-columns: minmax(0, 430px) max-content;
    justify-content: start;
    gap: 0;
    align-items: start;
}
.split > :first-child { padding-right: 36px; }
.split > :last-child {
    padding-left: 36px;
    position: relative;
    min-width: 250px;
}
/* the tear hangs off the board column, so it only runs as far as it does */
.split > :last-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -3.5px;
    width: 7px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='12'%3E%3Cpath d='M1 0 L6 6 L1 12' fill='none' stroke='%23cbd3d8' stroke-width='1'/%3E%3C/svg%3E") repeat-y left top;
    pointer-events: none;
}
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; justify-content: stretch; }
    .split > :first-child {
        padding-right: 0;
        padding-bottom: 30px;
        border-bottom: 1px solid var(--rule);
    }
    .split > :last-child { padding-left: 0; padding-top: 30px; min-width: 0; }
    .split > :last-child::before { display: none; }
}


/* home: the left column - label above content */
.blocks { display: grid; gap: 19px; }
/* two short fields sharing a line, each keeping its own label */
.blk-row { display: flex; flex-wrap: wrap; gap: 19px 44px; }
.bk {
    display: block;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}
.bv {
    margin: 0;
    font-family: var(--util);
    font-size: 13px;
    line-height: 1.45;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 10px;
}
.bv .v { font-weight: 600; }
.bv .alt { color: var(--muted); }
.home .hero h1.rd-me {
    font-family: var(--display);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.028em;
    margin: 0;
    line-height: 1.25;
    max-width: none;
}
.desc {
    margin: 0;
    font-family: var(--util);
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink);
    max-width: 56ch;
}
.desc .sub { display: block; color: var(--muted); margin-top: 3px; }

/* LinkedIn reads as a link with a mark, not a button */
.li-link {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: var(--signal);
    text-decoration: none;
    border-bottom: 1px dashed color-mix(in srgb, var(--signal) 55%, transparent);
}
.li-link:hover { border-bottom-style: solid; border-bottom-color: var(--signal); }
.li-link svg { width: 11px; height: 11px; fill: currentColor; position: relative; top: 1px; flex: none; }

/* unfilled content: .todo for short inline values, where the dash hugs the
   text; .todo-b for anything block-level, colour only - a dash there spans
   the full width of the element whether there is text under it or not */
.todo { color: var(--amber); border-bottom: 1px dashed var(--amber); }
.todo-b { color: var(--amber); }


/* home: the board column */
.minis { display: grid; gap: 19px; }
/* the default has to come first: an unrecognised category from Trello falls
   back to muted rather than to an invalid custom property */
.mini { padding: 0; --cat: var(--muted); }
[data-cat="reading"]  { --cat: var(--nominal); }
[data-cat="playing"]  { --cat: var(--rose); }
[data-cat="writing"]  { --cat: var(--amber); }
[data-cat="learning"] { --cat: var(--signal); }
.mini .item + .item { margin-top: 10px; }
/* the category label is the header here, so it carries the colour */
.mini .k {
    display: block;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--cat);
    margin-bottom: 5px;
}
.mini .t {
    margin: 0;
    font-family: var(--util);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}
.mini .by { font-weight: 400; color: var(--muted); }
.mini .m {
    display: block;
    margin-top: 3px;
    font-family: var(--mono);
    font-size: 8.5px;
    color: var(--muted);
}
.mini .m.stale { color: var(--rose); font-weight: 600; }
.board-foot {
    margin: 16px 0 0;
    padding-top: 11px;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .02em;
    color: var(--muted);
    line-height: 1.6;
}
.board-foot a { color: var(--signal); }

/* board states: loading / ready / empty / error.
   .board-note is deliberately not .board-msg - that one belongs to the old
   three-column board and is a much heavier boxed treatment. */
.board-note {
    margin: 0;
    font-family: var(--util);
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}
.board-note .retry {
    appearance: none;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
    margin-left: 6px;
    font: inherit;
    color: var(--signal);
    border-bottom: 1px dashed color-mix(in srgb, var(--signal) 55%, transparent);
}
.board-note .retry:hover { border-bottom-style: solid; }

/* loading skeleton: one entry's shape - label, name, days - plus the synced
   line. Self-contained (its own sheen keyframe) so it does not depend on the
   older board block. */
.board-skel { display: none; }
.board-skel .skel {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: var(--rule);
}
.board-skel .skel::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--sheen), transparent);
    animation: board-sheen 1.4s ease-in-out infinite;
}
@keyframes board-sheen { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .board-skel .skel::after { display: none; } }

.board-skel .s-label { width: 52px; height: 7px; }
.board-skel .s-name  { width: 158px; height: 10px; margin-top: 6px; }
.board-skel .s-days  { width: 76px; height: 7px; margin-top: 6px; }
/* mirrors .board-foot so the rule does not jump when the real one arrives */
.board-skel .s-foot {
    display: block;
    margin-top: 16px;
    padding-top: 11px;
    border-top: 1px solid var(--rule);
}
.board-skel .s-time { width: 148px; height: 7px; }

#board-col[data-state="loading"] .board-skel { display: block; }
#board-col[data-state="loading"] .board-note { display: none; }

#board-col[data-state="ready"] .board-note { display: none; }
#board-col:not([data-state="ready"]) .minis { display: none; }
#board-col[data-state="loading"] .board-foot,
#board-col[data-state="error"] .board-foot { display: none; }
#board-col:not([data-state="ready"]) .board-foot { margin-top: 0; }


/* board */
.board-lead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin: clamp(28px, 4vw, 38px) 0 12px;
    padding-top: clamp(24px, 3.5vw, 32px);
    border-top: 1px solid var(--rule);
}
.board-title {
    font-family: var(--util);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink);
}
.board-when {
    font-family: var(--util);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .04em;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}
.col {
    background: var(--raised);
    display: flex;
    flex-direction: column;
}
.col-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rule);
}
.col-name {
    font-family: var(--util);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
}
.col-count {
    font-family: var(--util);
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}
.col-count.wip {
    color: var(--signal);
    font-weight: 600;
}
.col-count .wip-k {
    opacity: .65;
    font-weight: 500;
    letter-spacing: .08em
}
.col-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}
.col-empty {
    margin: 0;
    padding: 5px 2px;
    font-family: var(--util);
    font-size: 12px;
    color: var(--muted);
}

.kcard {
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 5px;
    padding: 11px 12px;
    box-shadow: var(--shadow);
}
.kcard .cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--util);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}
.kcard .cat::before{
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.kcard .cat.learn { color: var(--signal); }
.kcard .cat.read { color: var(--nominal); }
.kcard .cat.write { color: var(--amber); }

.kt {
    margin: 7px 0 0;
    font-size: 15px;
    line-height: 1.42;
}
.kcard .age {
    display: block;
    margin-top: 8px;
    font-family: var(--util);
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}
.kcard .age.stale {
    color: var(--rose);
    font-weight: 600;
}
.kcard.done { opacity: .72; }


/* board peek / expand */
.peek {
    position: relative;
    max-height: 208px;
    overflow: hidden;
    transition: max-height .45s cubic-bezier(.3, .8, .4, 1);
}
.peek[data-open="true"] { max-height: 1600px; }
.peek::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--paper) 88%);
    transition: opacity .3s ease;
}
.peek[data-open="true"]::after { opacity: 0; }

.expand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px auto 0;
    appearance: none;
    cursor: pointer;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    padding: 8px 18px;
    font-family: var(--util);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    transition: border-color .2s ease, color .2s ease;
}
.expand:hover {
    border-color: var(--signal);
    color: var(--signal);
}
.expand .arw {
    display: flex;
    transition: transform .35s cubic-bezier(.3, .8, .4, 1);
}
.expand[aria-expanded="true"] .arw {
    transform: rotate(180deg);
}


/* board states: loading / ready / error */
.board-stack > .board-skeleton,
.board-stack > .board-msg { display: none; }

.board-shell[data-state="loading"] .board-live,
.board-shell[data-state="error"] .board-live { display: none; }
.board-shell[data-state="loading"] .board-skeleton { display: grid; }
.board-shell[data-state="error"] .board-msg { display: flex; }

.board-shell:not([data-state="loading"]) .skel-when { display: none; }
.board-shell[data-state="loading"] .board-when { display: none; }
.board-shell[data-state="loading"] .expand {
    opacity: .45;
    pointer-events: none;
}

.board-shell[data-state="error"] .peek { max-height: none; }
.board-shell[data-state="error"] .peek::after { opacity: 0; }
.board-shell[data-state="error"] .expand { display: none; }

.board-msg {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--raised);
    border: 1px solid var(--rule);
    padding: 18px 16px;
    font-family: var(--util);
    font-size: 12.5px;
    color: var(--muted);
}
.board-msg .retry {
    appearance: none;
    cursor: pointer;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--util);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    transition: border-color .2s ease, color .2s ease;
}
.board-msg .retry:hover {
    border-color: var(--signal);
    color: var(--signal);
}


/* skeleton */
.skel {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: var(--rule);
}
.skel::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--sheen), transparent);
    animation: sheen 1.4s ease-in-out infinite;
}
@keyframes sheen { to { transform: translateX(100%); } }

.board-skeleton .col:nth-child(2) .skel::after { animation-delay: .1s; }
.board-skeleton .col:nth-child(3) .skel::after { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
    .skel::after { display: none; }
}

.skel-when { width: 118px; height: 8px; }
.skel-name { width: 62px; height: 8px; }
.skel-count { width: 20px; height: 8px; }

.skel-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.skel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: none;
}
.skel-cat { width: 58px; height: 8px; }

.skel-lines {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.skel-line { height: 10px; }
.skel-line.w70 { width: 70%; }
.skel-line.w45 { width: 45%; }

.skel-age {
    width: 78px;
    height: 8px;
    margin-top: 11px;
}


/* resume */
.q-group + .q-group {
    margin-top: clamp(26px, 3.6vw, 38px);
}
.sk-k {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin: 0 0 9px;
}


/* resume: work + school entries */
.tl {
    list-style: none;
    margin: 0;
    padding: 0;
}
/* no rules between entries - the company headers separate them on their own */
.ti { padding: 0 0 clamp(24px, 3.2vw, 34px); }
.ti:last-child { padding-bottom: 0; }
.ti-when {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .04em;
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
}
/* company header: name left, years right - same edge as the dates below */
.ti-org {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.022em;
    margin: 0 0 2px;
    line-height: 1.2;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 12px;
}
.ti-arc {
    font-family: var(--util);
    font-size: 12.5px;
    color: var(--muted);
    margin: 0;
}
.ti-note {
    margin: 9px 0 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    max-width: 68ch;
}


/* resume: the roles held at one employer */
.roles {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}
.roles > li {
    padding: 8px 0;
    border-top: 1px solid var(--rule);
}
.r-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 14px;
}
.r-title {
    font-family: var(--util);
    font-size: 13.5px;
    font-weight: 600;
}
/* optional - a role can have one or none */
.r-sub {
    margin: 3px 0 0;
    font-family: var(--util);
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
    max-width: 68ch;
}


/* resume: one date column
   Company, role and certification dates share a face, size, colour and a
   right edge. "Now!" is longer than a year range, so it overhangs left. */
.ti-years,
.r-when,
.c-when {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    margin-left: auto;
    text-align: right;
    flex: none;
}
@media (max-width: 500px) {
    .ti-years, .r-when, .c-when { margin-left: 0; }
}


/* resume: organisation links
   :link, :visited, :hover and :active are declared together so the styling
   never changes once followed. .org:hover must out-specify the a:hover rule
   if one is ever added above. */
.org,
.org:link,
.org:visited,
.org:hover,
.org:active {
    color: var(--amber);
    border-bottom: 1px dashed var(--amber);
    text-decoration: none;
    position: relative;
}
/* hover tooltip showing the domain. Sits to the RIGHT of the name, in the
   empty run before the date column - above it would cover the sublabel. */
.org::after {
    content: attr(data-url);
    position: absolute;
    left: calc(100% + 13px);
    top: 50%;
    background: var(--invert-bg);
    color: var(--invert-fg);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .04em;
    padding: 4px 9px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity .16s ease, transform .16s ease;
}
.org::before {
    content: "";
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    border: 5px solid transparent;
    border-right-color: var(--invert-bg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity .16s ease, transform .16s ease;
}
.org:hover::after,
.org:focus-visible::after,
.org:hover::before,
.org:focus-visible::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
/* no hover on touch, and no room for it on narrow screens */
@media (hover: none), (max-width: 560px) {
    .org::after, .org::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .org::after, .org::before { transition: none; }
}


/* resume: certifications - same list shape as the roles above */
.certs {
    list-style: none;
    margin: 0;
    padding: 0;
}
.certs > li {
    padding: 8px 0;
    border-top: 1px solid var(--rule);
}
.c-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
}
.c-name {
    font-family: var(--util);
    font-size: 13.5px;
    font-weight: 600;
}
/* inline secondary - a short qualifier riding on the main line, greyed.
   Not the same as .c-sub / .r-sub, which sit on their own line below.
   Reusable in any .c-head or .r-head row. */
.alt {
    font-family: var(--util);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -.005em;
    color: var(--muted);
}
.c-sub {
    margin: 3px 0 0;
    font-family: var(--util);
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
    max-width: 68ch;
}


/* resume: status chips - serve the commented-out cert statuses in index.html.
   Rectangular and semantic; an oval would mean an action. */
.chip {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    border-radius: 3px;
    padding: 2px 7px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex: none;
    line-height: 1;
}
.chip::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.chip[data-st="active"] { color: var(--nominal); border-color: color-mix(in srgb, var(--nominal) 38%, transparent); }
.chip[data-st="expiring"] { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.chip[data-st="inactive"] { color: var(--muted); border-color: var(--rule-strong); }
/* a cert chip travels with the date, not the name: it takes the auto margin
   and the date gives it up, so the two sit together at the right edge */
.c-head .chip {
    margin-left: auto;
}
.c-head .chip + .c-when {
    margin-left: 0;
}


/* resume: skills, grouped against a label column */
.skgrid {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    margin: 0;
}
.skgrid dt {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 9px 20px 9px 0;
    border-top: 1px solid var(--rule);
    white-space: nowrap;
}
.skgrid dd {
    margin: 0;
    padding: 8px 0 9px;
    border-top: 1px solid var(--rule);
    font-family: var(--util);
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink);
}
.skgrid .sep {
    color: var(--rule-strong);
    margin: 0 7px;
}
.skgrid b {
    font-weight: 600;
    color: var(--signal);
}
@media (max-width: 560px) {
    .skgrid { grid-template-columns: 1fr; }
    .skgrid dt { padding: 10px 0 0; border-top: 0; }
    .skgrid dd { border-top: 0; padding-top: 3px; }
}


/* contact */
.contact {
    background: var(--raised);
    border: 1px solid var(--rule-strong);
    padding: clamp(26px, 4vw, 38px);
}
.contact h2 {
    margin-bottom: 12px;
}
.contact p {
    margin: 0 0 24px;
    color: var(--muted);
    max-width: 50ch;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.links a {
    font-family: var(--util);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 9px 16px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    transition: border-color .2s, color .2s, background-color .2s;
}
.links a:hover {
    border-color: var(--signal);
    color: var(--signal);
}
.links a.primary {
    background: var(--invert-bg);
    color: var(--invert-fg);
    border-color: var(--invert-bg);
}
.links a.primary:hover {
    opacity: .86;
    color: var(--invert-fg);
}


/* footer */
footer {
    border-top: 1px solid var(--rule);
    padding: 0;
    font-family: var(--util);
    font-size: 12px;
    color: var(--muted);
}
footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 22px;
    /* same 56px as .topbar .wrap, so the page is bookended evenly */
    min-height: 56px;
}
