
/* ==========================================================================
   CV page: semantic markup, flexbox layout, responsive, WCAG 2.2 AA.
   Paste into this page's Head insert. Everything is scoped to .cv except the
   two page-level rules marked PAGE, which only exist on this page anyway.

   Responsive without breakpoints: every row is a wrapping flex container whose
   items have rem flex-bases, so they stack on their own when the space runs
   out (desktop, tablet, 320px phone, or 400% zoom alike).
   Source order is never changed visually (no `order`, no `*-reverse`), so the
   reading order, tab order and visual order always match (WCAG 1.3.2, 2.4.3).
   ========================================================================== */

/* PAGE: keep a focused element clear of the 50px sticky site header (2.4.11). */
html { scroll-padding-top: calc(50px + 1.5rem); }

/* PAGE: top region. The aside sits beside the template's "CV" heading AND the
   intro below it. Those two live in different wrappers (template vs content),
   so a one-off grid places them; the two wrapper divs become display:contents
   (plain divs, no semantics lost). Everything else on the page is flexbox. */
.cms-page:has(> .article-blog-meta > .cv) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    max-width: calc(64rem + 30px);
}
.cms-page:has(> .article-blog-meta > .cv) > .cms-page__header { grid-column: 1; grid-row: 1; }
.cms-page:has(> .article-blog-meta > .cv) > .article-blog-meta,
.cv { display: contents; }
.cv-intro { grid-column: 1; grid-row: 2; }
.cv-aside { grid-column: 2; grid-row: 1 / span 2; }
.cv > .cv-section { grid-column: 1 / -1; }
.cv-intro,
.cv > .cv-section { padding-inline: 15px; }   /* the gutter the content wrapper used to give */

/* The reserved aside: a flex column, zero width while empty. Put a photo, QR
   code or links in it later; keep the markup exactly <div class="cv-aside"></div>
   when empty (no whitespace) so :empty matches. */
.cv-aside {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}
.cv-aside:not(:empty) { padding-inline: 15px; }

.cv {
    /* Contrast against the black page background, measured:          */
    --cv-text: #b5af9a;    /*  9.6 : 1  body text                    */
    --cv-heading: #88765c; /*  4.8 : 1  headings, dates (AA at any size) */
    --cv-accent: #f6dbaa;  /* 15.6 : 1  links and focus ring          */
    --cv-rule: #3d372d;    /*  decorative dividers only (no contrast requirement) */

    color: var(--cv-text);
    line-height: 1.6;            /* 1.4.12-friendly: no fixed heights anywhere */
    overflow-wrap: break-word;   /* long URLs never force sideways scrolling (1.4.10) */
}

/* Comfortable measure for running text (~70 characters a line). */
.cv p,
.cv li { max-width: 72ch; }

/* Lists styled as layout keep their semantics: role="list" in the markup
   stops Safari/VoiceOver dropping list semantics when bullets are removed. */
.cv ul[role="list"] { list-style: none; margin: 0; padding: 0; }

/* ---------- Headings: h1 (page) > h2 sections > h3 entries > h4 roles ---------- */
.cv h2 {
    margin: 0 0 1rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--cv-rule);
    color: var(--cv-heading);
}
.cv h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;            /* the theme's hairline 100 is hard to read at this size */
    color: var(--cv-heading);
}
.cv h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #977a3d;
}

.cv-section { margin-top: 2.75rem; }

/* ---------- Links: never colour alone (1.4.1), visible focus (2.4.7 / 2.4.13) ---------- */
.cv a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}
.cv a:hover { text-decoration-thickness: 2px; }
.cv a:focus-visible {

    outline-offset: 3px;
    border-radius: 2px;
    text-decoration: none;
}

/* ---------- Intro: tagline + contact, each a wrapping row ---------- */
.cv-intro { display: flex; flex-direction: column; gap: 0.5rem; }

/* Visual separators drawn with CSS: no "middle dot" characters for screen
   readers to announce (empty content is never read out). Each item carries a
   separator on its left; the row is shifted left and clipped, so the one that
   would start each line, including wrapped lines on a phone, is hidden. */
.cv ul.cv-tagline,             /* must out-rank the list reset above */
.cv .cv-contact ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.25rem;
    overflow: hidden;
    margin-inline-start: -0.75rem;
    padding-block: 6px;          /* room for the 2px + 3px focus ring, never clipped */
}
.cv-tagline li,
.cv-contact li {
    position: relative;
    margin-inline-start: -1px;
    padding-inline: 0.75rem;
}
.cv-tagline li::before,
.cv-contact li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 1px;
    height: 0.9em;
    transform: translateY(-50%);
    background: var(--cv-heading);
}
.cv-tagline { font-size: 1.125rem; color: var(--cv-text); }

.cv-contact { font-style: normal; }   /* <address> is italic by default */

/* 24 x 24 CSS px minimum target for standalone links (2.5.8). Links inside
   sentences are covered by the inline exception. */
.cv-contact a,
.cv-card h3 a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

/* ---------- Label / text rows: skills, education, interests ---------- */
.cv .cv-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    max-width: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cv-rule);
}
.cv .cv-row:last-child { border-bottom: 0; }
.cv-row__label { flex: 0 0 10rem; }            /* fixed label column ...           */
.cv .cv-row__text { flex: 1 1 18rem; min-width: 0; margin: 0; }  /* ... text wraps under it when narrow */
.cv h3.cv-row__label { font-size: 1rem; line-height: inherit; }

/* ---------- Experience ---------- */
.cv-employer { padding: 1.5rem 0; border-bottom: 1px solid var(--cv-rule); }
.cv-employer:first-of-type { padding-top: 0.25rem; }
.cv-employer:last-child { border-bottom: 0; }

/* Title left, dates right; dates drop underneath when there is no room. */
.cv-entry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.125rem 1rem;
}
.cv .cv-dates {
    margin: 0;
    color: var(--cv-heading);
    font-variant-numeric: tabular-nums;
}

.cv-role { margin-top: 1rem; }
.cv-role ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.cv-role li + li { margin-top: 0.25rem; }

/* ---------- Project cards: as many per row as fit, one per row on a phone ---------- */
.cv-cards { display: flex; flex-wrap: wrap; gap: 1rem; }
.cv .cv-card {
    flex: 1 1 18rem;
    min-width: 0;
    max-width: none;
    padding: 1rem 1.25rem;
    border: 1px solid var(--cv-rule);
    border-radius: 4px;
}
.cv-card h3 { margin-bottom: 0.375rem; font-size: 1.1rem; }
.cv-card p { margin: 0; }
.cv-status { font-size: 0.875rem; color: var(--cv-heading); }

/* ---------- Narrow screens: tighten spacing only, layout already stacks ---------- */
/* The aside drops below the intro, which is also where it sits in the reading order. */
@media (max-width: 36rem) {
    .cv-aside { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 30rem) {
    .cv-section { margin-top: 2rem; }
    .cv .cv-card { padding: 0.875rem 1rem; }
    .cv-tagline { font-size: 1rem; }
}

/* ---------- Windows High Contrast / forced colours ---------- */
@media (forced-colors: active) {
    .cv-tagline li::before,
    .cv-contact li::before { background: CanvasText; }
    .cv .cv-card { border-color: CanvasText; }
}

/* ---------- Print: CVs get printed ---------- */
@media print {
    /* PAGE: drop site chrome and the admin byline, keep the h1. */
    header, footer, .skip-link, .page-lock-banner, .cms-page__header p { display: none !important; }
    body, .cms-page__header h1 { background: #fff !important; color: #000 !important; }

    .cv, .cv h2, .cv h3, .cv h4, .cv .cv-dates, .cv-status, .cv a { color: #000; }
    .cv-intro, .cv > .cv-section { font-size: 11pt; }
    .cv a { text-decoration: underline; }
    .cv a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
    .cv-employer, .cv .cv-card, .cv .cv-row { break-inside: avoid; }
    .cv .cv-card { border-color: #999; }
    .cv h2, .cv h3 { break-after: avoid; }
}

p > strong{
   color: #977a3d;
}

article h1, section h2{
    font-weight:400;
}
article h1{
    font-size:4rem;
    color:#977a3d;
}
thead > tr > th{
    color: #977a3d;
    padding: 0.0rem 0.0rem 1em 0rem;
    margin-left:0;
    border:0;
}

td:first-child{
     min-width:10rem;
}

p > strong{
   color: #977a3d;
}

section p a, .cv a, article p a
{
    color:#337396 !important;
    text-decoration:underline;
}

.cv-contact li a{
    color: var(--sub-color-n);
}


a, section p a, .cv a, article p a, 
{
    color:#337396 !important;
    text-decoration:underline;
}

section.cv-section ul li h3 a{
    color: #977a3d;
}

p a:after,  ul li a:after, table tr  td a:after, a:after  { 
    font-size:2rem;
    line-height:0.2rem;
    content:"\203A";
    display:inline-block;
    position:relative;
    top:0.3rem;
    padding-right:1.0rem;
    padding-left:0.2rem;
    transition: 0.17s;
    transition-timing-function: ease-in;
    transition-timing-function: cubic-bezier(0.42, 0, 1, 1);
    

}
.cv p a:hover:after, .cv ul li a:hover:after, .cv table tr td a:hover:after, .cv a:hover:after  { 
    transform: translate(4px); 
    color: #977a3d;
    transition: 0.17s;
    transition-timing-function: ease-in;
    transition-timing-function: cubic-bezier(0.42, 0, 1, 1);
    } 
}

#main-content p a,  ul li a, #main-content table tr td a, #main-content a{
   transition: 0.17s;
}
#main-content p a:hover, #main-content ul li a:hover, #main-content table tr td a:hover, #main-content a:hover { 
{
       color: #977a3d;
}
.cv-entry-head{
    color:#977a3d;
}
