/* Custom styles for the About Me site (loaded as /custom.css by the Albatros theme). */

/* ------------------------------------------------------------------ */
/* People & Tech colour scheme                                          */
/* ------------------------------------------------------------------ */
:root {
    --primary: #1F2937;            /* Dark Charcoal/Blue: structure & text */
    --accent-technical: #2563EB;   /* Accent 1: DevOps/Tech (blue)         */
    --accent-soft: #10B981;        /* Accent 2: People/Soft skills (green) */
    --accent-coaching-teaching: #F59E0B; /* Accent 3: Coaching & Teaching (amber/orange) */

    /* Harmonious derived tint/shade variants (compatible with the primary
       and the existing neutrals #ececec / #1a1a1a / #333 / #555 / #666 /
       #999 / #bbb). */
    --primary-soft: #374151;
    --accent-technical-soft: #dbeafe;
    --accent-technical-shade: #1d4ed8;
    --accent-technical-tint: #eff6ff;
    --accent-soft-soft: #d1fae5;
    --accent-soft-shade: #047857;
    --accent-soft-tint: #ecfdf5;
    /* Dark ink for text on the green accent. White on #10B981 is only
       ~2.5:1 (fails WCAG AA), so the soft badge uses this near-black ink
       instead to reach ~5.8:1. */
    --accent-soft-ink: #052e1f;

    --accent-coaching-teaching-soft: #fef3c7;
    --accent-coaching-teaching-shade: #d97706;
    --accent-coaching-teaching-tint: #fffbeb;
    --accent-coaching-teaching-ink: #78350f;
}

/* Labeled skill tags, emitted by the `skill_tags` component
   (templates/components.html). Each badge carries a .technical, .soft, or
   .coaching-teaching class that drives its accent colour. */
.skill-tags {
    display: inline;
}

.skill-tag {
    display: inline-block;
    margin: 0.15em 0.25em 0.15em 0;
    padding: 0.1em 0.55em;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.skill-tag.technical {
    background: var(--accent-technical);
    color: #ffffff; /* ~5.1:1 on #2563EB */
}

.skill-tag.technical:hover {
    background: var(--accent-technical-shade);
}

.skill-tag.soft {
    background: var(--accent-soft);
    color: var(--accent-soft-ink); /* ~5.8:1 on #10B981 */
}

.skill-tag.soft:hover {
    background: var(--accent-soft-shade);
    color: #ffffff;
}

.skill-tag.coaching-teaching {
    background: var(--accent-coaching-teaching);
    color: var(--accent-coaching-teaching-ink);
}

.skill-tag.coaching-teaching:hover {
    background: var(--accent-coaching-teaching-shade);
    color: #ffffff;
}

/* Wrapper for the top-level sidebar skills (templates/resume.html). */
.cv-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    margin: 0 0 1.6em;
}

.cv-skill-tags .skill-tag {
    margin: 0;
}

/* Visual legend for skill tags on the resume */
.cv-skill-legend {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    margin: 0.4em 0 1.1em;
    padding: 0.35em 0.75em;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85em;
}

.cv-skill-legend-title {
    font-weight: 700;
    color: #4b5563;
    margin-right: 0.2em;
}

.cv-skill-legend .skill-tag {
    margin: 0;
    font-size: 0.8em;
}

/* Flag icons in navigation */
.flag-icon {
    display: inline-block;
    width: 24px;
    height: 16px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

/* Rounded icon / avatar in navigation bar */
nav img.icon,
.w3-bar img.icon {
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Make the profile image a round, contained avatar on the landing page. */
.textimage > img {
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Slight breathing room for the "Explore" cards. */
.numbercards .numbercard a {
    display: inline-block;
    margin-top: 0.5em;
}

/* Toolbar shown on pages flagged `extra.printable` (e.g. the resume). */
.print-toolbar {
    text-align: right;
    margin-bottom: 1em;
}

/* ------------------------------------------------------------------ */
/* Two-column resume layout (screen), matching the reference CV_JZ.pdf */
/* ------------------------------------------------------------------ */
.cv-toolbar {
    max-width: 1070px;
    margin: 1em auto;
    text-align: right;
}

.cv {
    display: flex;
    max-width: 1070px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Left grey sidebar. */
.cv-sidebar {
    flex: 0 0 30%;
    background: #ececec;
    padding: 28px 22px;
    color: #1a1a1a;
    font-size: 0.82em;
    line-height: 1.45;
}

.cv-sidebar-title {
    margin-top: 0;
    margin-bottom: 0.7em;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
    border-bottom: 1px solid #bbb;
    padding-bottom: 0.3em;
}

/* Full-colour portrait, fitted into the sidebar above Personalia. */
.cv-photo {
    text-align: center;
    margin-bottom: 1.2em;
}

.cv-photo img {
    width: 100%;
    max-width: 170px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cv-personalia {
    list-style: none;
    margin: 0 0 1.6em;
    padding: 0;
}

.cv-personalia li {
    margin-bottom: 0.55em;
}

.cv-personalia-label {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78em;
    color: #555;
    letter-spacing: 0.03em;
}

.cv-personalia-value {
    display: block;
}

.cv-sidebar-list {
    list-style: none;
    margin: 0 0 1.6em;
    padding: 0;
}

.cv-sidebar-list li {
    margin-bottom: 0.55em;
    padding-left: 1em;
    position: relative;
}

.cv-sidebar-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #666;
}

/* Right content column. */
.cv-main {
    flex: 1 1 auto;
    padding: 28px 30px;
    font-size: 0.85em;
    line-height: 1.5;
    color: #1a1a1a;
}

.cv-header {
    text-align: center;
    margin-bottom: 1.2em;
    border-bottom: 2px solid #444;
    padding-bottom: 0.8em;
}

.cv-name {
    margin: 0;
    font-size: 2.2em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.cv-role {
    margin: 0.3em 0 0;
    font-size: 1.1em;
    color: #444;
}

.cv-main h1 {
    font-size: 1.3em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 1.1em;
    margin-bottom: 0.6em;
    border-bottom: 1px solid #999;
    padding-bottom: 0.25em;
}

.cv-main h2 {
    font-size: 1.05em;
    margin-top: 1em;
    margin-bottom: 0.3em;
}

.cv-main h2 + p,
.cv-main h2 + ul {
    margin-top: 0;
}

.cv-main ul {
    margin: 0.3em 0 0.8em;
    padding-left: 1.3em;
}

.cv-main p {
    margin: 0.4em 0 0.7em;
}

/* Responsive: single column on narrow screens. */
@media (max-width: 640px) {
    .cv {
        flex-direction: column;
    }
}

/* ------------------------------------------------------------------ */
/* Print styles: turn the resume into a clean, ink-friendly PDF        */
/*                                                                     */
/* At print time the flexible two-column layout becomes a fixed CSS    */
/* grid so the sidebar stays put on page one, exactly like CV_JZ.pdf.  */
/* ------------------------------------------------------------------ */
@media print {
    /* Page break helper: injected via the {{ pagebreak() }} shortcode in
       resume markdown. Forces the following content onto a new page. */
    .cv-pagebreak {
        page-break-before: always;
        break-before: page;
    }
    /* A4 with tighter margins so the PDF fills the page.
       Asymmetric: less on the right (and slightly less on the left) so the
       CV content uses more of the printable width. */
    @page {
        size: A4;
        margin: 8mm 6mm 6mm 6mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
    }

    /* Remove all site chrome so only the CV remains. */
    nav,
    footer,
    .breadcrumb,
    .cv-toolbar,
    .print-toolbar,
    .w3-dropdown-hover,
    .w3-dropdown-click,
    #footersearch {
        display: none !important;
    }

    /* Full width, no page padding: the CV grid fills the printable area. */
    main.cv,
    .cv {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* Fixed two-column grid so the grey sidebar spans the first page's
       left edge, as in the reference layout. */
    .cv {
        display: grid !important;
        grid-template-columns: 26% 74%;
        align-items: start;
    }

    .cv-sidebar {
        background: #ececec !important;
        /* Tighten the inner left padding and reduce the type size so the
           sidebar text sits closer to the block edge and uses its space. */
        padding: 14px 10px !important;
        font-size: 0.74em;
        line-height: 1.3;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Keep the portrait fitted and printable, without the drop shadow
       that would darken the page. */
    .cv-photo img {
        max-width: 120px;
        border: 2px solid #fff;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cv-header {
        margin-bottom: 0.5em !important;
        padding-bottom: 0.35em !important;
    }

    .cv-name {
        font-size: 1.85em !important;
    }

    .cv-role {
        margin: 0.15em 0 0 !important;
    }

    .cv-main {
        padding: 0 0 0 12px !important;
        font-size: 0.80em;
        line-height: 1.35;
    }
    .cv-main h1 {
        margin-top: 0.7em;
        margin-bottom: 0.35em;
        padding-bottom: 0.15em;
    }
    .cv-main h2 {
        margin-top: 0.6em;
        margin-bottom: 0.2em;
    }
    .cv-main p {
        margin: 0.2em 0 0.4em;
    }
    .cv-main ul {
        margin: 0.15em 0 0.4em;
    }

    /* Keep the color-coded skill tags printed with their accent colours,
       so the CV preserves the People & Tech coding when exported. Because
       browsers drop backgrounds/colors on greyscale printers, the coloured
       text is paired with dark inks (and `print-color-adjust: exact`) so the
       badges still read clearly in greyscale. */
    .skill-tag,
    .skill-tag.technical,
    .skill-tag.soft,
    .skill-tag.coaching-teaching {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 0.68em;
    }
    .skill-tag.technical {
        background: var(--accent-technical) !important;
        color: #ffffff !important;
    }
    .skill-tag.soft {
        background: var(--accent-soft) !important;
        color: var(--accent-soft-ink) !important;
    }
    .skill-tag.coaching-teaching {
        background: var(--accent-coaching-teaching) !important;
        color: var(--accent-coaching-teaching-ink) !important;
    }
    .skill-tag.technical:hover,
    .skill-tag.soft:hover,
    .skill-tag.coaching-teaching:hover {
        background: inherit !important;
        color: inherit !important;
    }

    .cv-skill-legend {
        display: inline-flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4em;
        margin: 0.2em 0 0.6em !important;
        padding: 0.2em 0.5em !important;
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        font-size: 0.72em !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .cv-skill-legend .cv-skill-legend-title {
        color: #334155 !important;
    }
    .cv-skill-legend .skill-tag {
        font-size: 0.9em !important;
    }

    /* Flatten colours and keep links black for clean printing. */
    a,
    a:visited {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Avoid awkward breaks across pages. */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        break-after: avoid;
    }
    ul, ol, li {
        page-break-inside: avoid;
    }

    /* Each work entry stays together. */
    .cv-main h2 + p,
    .cv-main h2 + ul {
        page-break-inside: avoid;
    }
}
