:root {
    --future-bg: #050912;
    --future-surface: rgba(14, 22, 38, 0.8);
    --future-surface-strong: rgba(19, 30, 50, 0.9);
    --future-text-main: #eef4ff;
    --future-text-muted: rgba(222, 235, 255, 0.82);
    --future-accent-aqua: #93adff;
    --future-accent-violet: #a6b2ff;
    --future-hairline: rgba(166, 178, 255, 0.16);
    --future-hairline-strong: rgba(148, 176, 255, 0.4);
    --future-glow-soft: 0 34px 78px -60px rgba(148, 176, 255, 0.7);
    --future-glow-mid: 0 24px 56px -42px rgba(166, 178, 255, 0.62);
}

html,
body {
    overflow-x: hidden;
    overflow-y: auto !important;
}

body {
    color: var(--future-text-main);
    text-rendering: optimizeLegibility;
}

#matrix {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

#main-div {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: 1.2rem;
    backdrop-filter: blur(10px) saturate(125%);
}

#cv-sander {
    max-width: 1120px;
    margin: 0 auto;
}

#cv-sander header,
#cv-sander section {
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    padding: 1.85rem;
    clip-path: polygon(
        0 10px,
        10px 0,
        calc(100% - 16px) 0,
        100% 12px,
        100% calc(100% - 10px),
        calc(100% - 12px) 100%,
        12px 100%,
        0 calc(100% - 14px)
    );
    background:
        radial-gradient(circle at 95% -10%, rgba(148, 176, 255, 0.1), transparent 42%),
        radial-gradient(circle at -10% 110%, rgba(166, 178, 255, 0.08), transparent 44%),
        linear-gradient(150deg, var(--future-surface), rgba(8, 13, 23, 0.94));
    box-shadow:
        inset 0 0 0 1px var(--future-hairline),
        var(--future-glow-soft);
}

#cv-sander header::before,
#cv-sander section::before {
    content: "";
    position: absolute;
    inset: 1px;
    pointer-events: none;
    clip-path: inherit;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.04), transparent 40%),
        linear-gradient(320deg, rgba(148, 176, 255, 0.05), transparent 52%);
}

#cv-sander h1,
#cv-sander h2,
#cv-sander h3,
#cv-sander h4 {
    color: #f8fcff;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

#cv-sander p,
#cv-sander li,
#cv-sander label,
#cv-sander .project-description,
#cv-sander .project-year,
#cv-sander .project-title {
    color: var(--future-text-muted);
    line-height: 1.64;
}

.title h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.95rem, 3vw, 2.6rem);
}

.about-container {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 1.2rem;
}

.about,
.contact,
.identity-card,
.experience-card,
#projects .project-list > div,
#education .project-list > div,
#skills .skill-languages {
    position: relative;
    overflow: hidden;
    padding: 1.18rem;
    clip-path: polygon(
        0 10px,
        8px 0,
        calc(100% - 14px) 0,
        100% 10px,
        100% calc(100% - 8px),
        calc(100% - 10px) 100%,
        10px 100%,
        0 calc(100% - 12px)
    );
    background: linear-gradient(160deg, rgba(18, 30, 49, 0.9), rgba(8, 15, 26, 0.93));
    box-shadow:
        inset 0 0 0 1px rgba(166, 178, 255, 0.14),
        var(--future-glow-mid);
}

.identity-grid .identity-card:nth-child(2n),
.experience-list .experience-card:nth-child(2n) {
    clip-path: polygon(
        0 12px,
        14px 0,
        calc(100% - 8px) 0,
        100% 8px,
        100% calc(100% - 14px),
        calc(100% - 16px) 100%,
        8px 100%,
        0 calc(100% - 8px)
    );
}

.contact span {
    display: flex;
    align-items: center;
}

.contact a {
    color: #eaf6ff;
}

.contact img[alt="Sander"] {
    border-radius: 10px;
    box-shadow: 0 16px 35px -25px rgba(148, 176, 255, 0.78);
}

.linkmenu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.56rem;
    margin-top: 1rem;
}

.linkmenu img {
    filter: hue-rotate(145deg) saturate(45%) brightness(1.35);
}

.linkmenu .menu-item,
#contact-submit,
.tag-filter,
.collapsible.arrow {
    border: 0;
    color: var(--future-text-main);
    background: linear-gradient(145deg, rgba(31, 48, 79, 0.92), rgba(13, 24, 42, 0.95));
    box-shadow:
        inset 0 0 0 1px rgba(166, 178, 255, 0.24),
        0 14px 26px -22px rgba(166, 178, 255, 0.92);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.linkmenu .menu-item,
#contact-submit,
.tag-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    clip-path: polygon(0 8px, 8px 0, calc(100% - 10px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 10px 100%, 0 calc(100% - 8px));
    padding: 0.54rem 0.96rem;
}

.collapsible.arrow {
    width: 32px;
    height: 32px;
    clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
}

.linkmenu .menu-item:hover,
.linkmenu .menu-item:focus-visible,
#contact-submit:hover,
#contact-submit:focus-visible,
.tag-filter:hover,
.tag-filter:focus-visible,
.collapsible.arrow:hover,
.collapsible.arrow:focus-visible {
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px var(--future-hairline-strong),
        0 16px 30px -18px rgba(148, 176, 255, 0.85);
    filter: saturate(112%);
}

.tag-filter.active {
    background: linear-gradient(135deg, rgba(148, 176, 255, 0.32), rgba(125, 145, 255, 0.35));
    box-shadow:
        inset 0 0 0 1px rgba(148, 176, 255, 0.55),
        0 15px 28px -20px rgba(148, 176, 255, 0.88);
}

.tag-filter span {
    font-size: 0.56rem;
    opacity: 0.72;
}

#contact-form {
    background: rgba(7, 12, 20, 0.97);
}

#contact-form input,
#contact-form textarea,
#experience-search {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 12px;
    background: rgba(12, 20, 34, 0.94);
    color: var(--future-text-main);
    padding: 0.76rem 0.86rem;
    box-shadow: inset 0 0 0 1px rgba(166, 178, 255, 0.24);
}

#contact-form input:focus,
#contact-form textarea:focus,
#experience-search:focus {
    outline: none;
    box-shadow:
        inset 0 0 0 1px rgba(148, 176, 255, 0.58),
        0 0 0 3px rgba(148, 176, 255, 0.2);
}

#experience-search::placeholder {
    color: rgba(226, 236, 252, 0.5);
}

.identity-grid,
.experience-list,
#projects .project-list,
#education .project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.84rem;
}

.identity-eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: rgba(148, 176, 255, 0.93);
}

.identity-card h2 {
    margin: 0.4rem 0 0.76rem;
    font-size: clamp(1.32rem, 2.1vw, 1.78rem);
}

.experience-heading p {
    margin-bottom: 0;
}

.experience-controls {
    display: grid;
    gap: 0.9rem;
    margin: 1rem 0;
}

.tag-filters,
.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-results {
    min-height: 1.2rem;
    font-size: 0.9rem;
    color: rgba(211, 227, 250, 0.82);
}

.experience-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    font-size: 0.9rem;
}

.experience-card p {
    margin-bottom: 0.35rem;
}

.experience-tags span {
    clip-path: polygon(0 5px, 6px 0, calc(100% - 7px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 6px) 100%, 7px 100%, 0 calc(100% - 6px));
    font-size: 0.72rem;
    padding: 0.22rem 0.58rem;
    color: #e3f8ff;
    background: linear-gradient(120deg, rgba(166, 178, 255, 0.3), rgba(148, 176, 255, 0.25));
}

#AI-Talks audio {
    width: min(100%, 500px);
    border-radius: 999px;
    box-shadow: 0 14px 30px -24px rgba(148, 176, 255, 0.9);
}

.skill,
.c-skill {
    margin-bottom: 0.6rem;
}

.skill-line {
    border-radius: 999px;
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


@keyframes surface_shift {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

@keyframes sheen_drift {
    0% { opacity: 0.45; transform: translateX(0); }
    50% { opacity: 0.6; transform: translateX(4px); }
    100% { opacity: 0.45; transform: translateX(0); }
}

#cv-sander header,
#cv-sander section {
    animation: surface_shift 18s ease-in-out infinite;
}

#cv-sander header::before,
#cv-sander section::before {
    animation: sheen_drift 14s ease-in-out infinite;
}

.experience-card,
.identity-card {
    transition: transform 260ms ease, box-shadow 260ms ease;
}

.experience-card:hover,
.identity-card:hover {
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    #cv-sander header,
    #cv-sander section,
    #cv-sander header::before,
    #cv-sander section::before {
        animation: none;
    }
}

@media (max-width: 980px) {
    #cv-sander header,
    #cv-sander section {
        padding: 1.2rem;
    }

    .about-container,
    .identity-grid,
    .experience-list,
    #projects .project-list,
    #education .project-list {
        grid-template-columns: 1fr;
    }
}


.menu-icon,
img[src*="-green"] {
    filter: hue-rotate(196deg) saturate(74%) brightness(1.16);
}

.skill-line-fill {
    background: linear-gradient(90deg, #8ba5ff 0%, #aeb8ff 100%);
}

.skill-line-grey {
    background-color: rgba(90, 108, 146, 0.44);
}

#cv-sander h3 {
    border-bottom-color: rgba(148, 176, 255, 0.45);
}

.experience-card {
    min-height: 168px;
}

#cv-sander section {
    border: 1px solid rgba(142, 164, 236, 0.18);
}

@media print {
    body {
        background: #f4f6fd !important;
        color: #11182c !important;
    }

    #matrix,
    #my-footer,
    .menu-item,
    .tag-filters,
    .experience-controls,
    #AI-Talks {
        display: none !important;
    }

    #main-div,
    #cv-sander,
    #cv-sander header,
    #cv-sander section,
    .about,
    .contact,
    .experience-card,
    .identity-card,
    #projects .project-list > div,
    #education .project-list > div,
    #skills .skill-languages {
        background: #ffffff !important;
        box-shadow: none !important;
        color: #11182c !important;
        clip-path: none !important;
        border: 1px solid #dde4f5 !important;
        animation: none !important;
    }

    #cv-sander,
    #cv-sander * {
        color: #11182c !important;
        opacity: 1 !important;
        text-shadow: none !important;
    }

    #cv-sander a {
        color: #1f469d !important;
    }

    .title h1 {
        background: #eaf0ff !important;
        color: #11182c !important;
    }

    .experience-tags span,
    .tag-filter {
        background: #eef2ff !important;
        border: 1px solid #ced8f3 !important;
    }
}

.intro-copy p {
    margin: 0.35rem 0;
}

.language-switch {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.flag-label {
    font-size: 1.1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(50, 72, 112, 0.85);
    box-shadow: inset 0 0 0 1px rgba(166, 178, 255, 0.3);
    transition: 220ms ease;
}

.switch-slider::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #dce9ff);
    transition: 220ms ease;
}

.switch input:checked + .switch-slider::before {
    transform: translateX(24px);
}

.switch input:checked + .switch-slider {
    background: rgba(60, 109, 204, 0.9);
}

.language-label {
    font-size: 0.84rem;
    color: rgba(222, 235, 255, 0.9);
}

.tag-filter-dropdown {
    position: relative;
}

#tag-dropdown-button {
    width: 100%;
    justify-content: flex-start;
}

.tag-dropdown-menu {
    display: none;
    position: absolute;
    z-index: 8;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(9, 16, 28, 0.97);
    box-shadow: inset 0 0 0 1px rgba(166, 178, 255, 0.24);
}

.tag-dropdown-menu.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.7rem;
}

.tag-option {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.86rem;
}

.tag-option input {
    accent-color: #8ba5ff;
}

@media print {
    .language-switch,
    .tag-filter-dropdown {
        display: none !important;
    }
}

/* readability and overflow hardening */
:root {
    --future-text-muted: rgba(234, 243, 255, 0.95);
}

#main-div {
    width: min(1200px, calc(100% - 1.5rem));
    min-width: 0;
    margin: 1rem auto 3.5rem;
    overflow: visible;
}

#cv-sander header,
#cv-sander section,
.about,
.contact,
.identity-card,
.experience-card,
#projects .project-list > div,
#education .project-list > div,
#skills .skill-languages {
    overflow: visible;
}

#cv-sander p,
#cv-sander li,
#cv-sander label,
#cv-sander .project-description,
#cv-sander .project-year,
#cv-sander .project-title,
#cv-sander .skill,
#cv-sander .skill-title,
#cv-sander .c-skill-title,
#cv-sander .language-label,
#cv-sander a,
#cv-sander .menu-item,
#cv-sander .tag-option {
    color: #f2f7ff;
    overflow-wrap: anywhere;
    word-break: normal;
}

.linkmenu .menu-item,
#contact-submit,
.tag-filter {
    min-height: 2.4rem;
    white-space: normal;
    line-height: 1.3;
    text-align: left;
}

.experience-meta {
    flex-wrap: wrap;
}

#experience-search,
#contact-form input,
#contact-form textarea {
    color: #f6f9ff;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder,
#experience-search::placeholder {
    color: rgba(230, 240, 255, 0.72);
}

#my-footer {
    background-color: rgba(6, 11, 20, 0.92);
    color: #edf5ff;
    border-top: 1px solid rgba(148, 176, 255, 0.2);
}

@media (max-width: 980px) {
    #main-div {
        width: calc(100% - 0.75rem);
        margin: 0.35rem auto 3.5rem;
    }

    #cv-sander h1 {
        line-height: 1.25;
    }
}

/* iteration 60+ layout guardrails and custom language toggle */
#main-div {
    width: min(1100px, calc(100vw - 1rem));
    max-width: 1100px;
    min-width: 0;
    margin: 0.65rem auto 3rem;
    box-sizing: border-box;
}

#cv-sander {
    overflow-x: clip;
}

#cv-sander header {
    margin-top: 0;
}

.language-switch {
    margin-top: 0.75rem;
    align-items: center;
    gap: 0.65rem;
}

.language-switch-label {
    color: #f4f8ff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.flag-toggle {
    position: relative;
    display: inline-block;
    width: 84px;
    height: 36px;
    flex: 0 0 auto;
}

.flag-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.flag-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(29, 49, 82, 0.95), rgba(8, 20, 38, 0.95));
    box-shadow: inset 0 0 0 1px rgba(157, 179, 255, 0.34);
}

.flag-icon {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(5, 8, 14, 0.45);
    transition: transform 240ms ease;
}

.flag-layer {
    position: absolute;
    inset: 0;
    transition: opacity 240ms ease;
}

.flag-layer-uk {
    background:
        linear-gradient(0deg,
            transparent 39%,
            #ffffff 39%,
            #ffffff 61%,
            transparent 61%),
        linear-gradient(90deg,
            transparent 42%,
            #ffffff 42%,
            #ffffff 58%,
            transparent 58%),
        linear-gradient(0deg,
            transparent 44%,
            #c80b2f 44%,
            #c80b2f 56%,
            transparent 56%),
        linear-gradient(90deg,
            transparent 45%,
            #c80b2f 45%,
            #c80b2f 55%,
            transparent 55%),
        linear-gradient(145deg, #0a2b75 0%, #1d4ea0 100%);
    opacity: 1;
}

.flag-layer-nl {
    background: linear-gradient(
        180deg,
        #b40e2c 0 33.33%,
        #ffffff 33.33% 66.66%,
        #1f4da3 66.66% 100%
    );
    opacity: 0;
}

.flag-toggle input:checked + .flag-toggle-track .flag-icon {
    transform: translateX(48px);
}

.flag-toggle input:checked + .flag-toggle-track .flag-layer-uk {
    opacity: 0;
}

.flag-toggle input:checked + .flag-toggle-track .flag-layer-nl {
    opacity: 1;
}

.flag-toggle:focus-within .flag-toggle-track {
    box-shadow:
        inset 0 0 0 1px rgba(191, 205, 255, 0.8),
        0 0 0 3px rgba(128, 161, 255, 0.28);
}

.language-label {
    min-width: 6.5ch;
    font-weight: 600;
    color: #eff5ff;
}

@media (max-width: 980px) {
    #main-div {
        width: calc(100vw - 0.5rem);
        margin: 0.25rem auto 3rem;
    }

    .language-switch {
        gap: 0.5rem;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 11mm;
    }

    #main-div {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    #cv-sander header {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: avoid;
        break-after: avoid;
    }

    #cv-sander section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .language-switch {
        display: none !important;
    }
}

/* iteration 100+ corrective pass per review */
:root {
    --sander-font-stack: "Segoe UI", "Inter", "Roboto", Arial, sans-serif;
}

#cv-sander,
#cv-sander * {
    font-family: var(--sander-font-stack);
}

#main-div {
    position: relative;
    width: min(1080px, calc(100vw - 0.75rem));
    max-width: 1080px;
    margin: 0.35rem auto 3.2rem;
    padding-bottom: 1.4rem;
    bottom: auto;
    min-height: calc(100vh - 3.2rem);
    overflow: visible;
}

#cv-sander header {
    margin-top: 0;
    padding-top: 1.2rem;
}

.about-container {
    align-items: start;
    grid-template-columns: 1.25fr 0.75fr;
}

.about.intro-copy {
    background: transparent;
    box-shadow: none;
    clip-path: none;
    padding: 0.3rem 0.2rem 0.5rem;
}

.title,
.intro-copy .language-switch {
    background: transparent;
    box-shadow: none;
}

.title-stack {
    margin: 0;
    line-height: 1.05;
    display: inline-flex;
    flex-direction: column;
    gap: 0.26rem;
    color: #f8fcff;
    background: linear-gradient(90deg, #f4f8ff 0%, #c2d6ff 62%, #9db6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-subline {
    font-size: clamp(1.08rem, 1.65vw, 1.28rem);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.language-switch {
    margin-top: 0.66rem;
}

.flag-toggle {
    width: 92px;
    height: 32px;
}

.flag-toggle-track {
    border-radius: 4px;
    background: linear-gradient(145deg, rgba(31, 45, 75, 0.95), rgba(9, 17, 30, 0.95));
    box-shadow: inset 0 0 0 1px rgba(168, 188, 248, 0.36);
}

.flag-icon {
    top: 4px;
    left: 4px;
    width: 36px;
    height: 24px;
    border-radius: 0;
}

.flag-layer {
    transition: opacity 250ms ease, transform 250ms ease;
}

.flag-layer-uk {
    opacity: 1;
    transform: scale(1);
}

.flag-layer-nl {
    opacity: 0.24;
    transform: scale(0.96);
}

.flag-toggle input:checked + .flag-toggle-track .flag-icon {
    transform: translateX(48px);
}

.flag-toggle input:checked + .flag-toggle-track .flag-layer-uk {
    opacity: 0.24;
    transform: scale(0.96);
}

.flag-toggle input:checked + .flag-toggle-track .flag-layer-nl {
    opacity: 1;
    transform: scale(1);
}

#my-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34px;
    z-index: 40;
}

@media (max-width: 980px) {
    #main-div {
        width: calc(100vw - 0.35rem);
        margin: 0.18rem auto 3.2rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }
}

@media print {
    #main-div {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        padding-bottom: 0 !important;
    }

    #cv-sander header {
        margin-top: 0 !important;
        page-break-before: avoid;
        break-before: avoid;
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .about-container {
        grid-template-columns: 1.2fr 0.8fr !important;
    }

    .about.intro-copy {
        padding: 0 !important;
    }

    #my-footer {
        position: static !important;
    }
}

/* fix legacy contact offset from base stylesheet */
.contact {
    margin-top: 0 !important;
    margin-left: 0 !important;
}

/* iteration 120+ requested corrections */
.title-stack {
    color: #f2f7ff;
    background: none;
    -webkit-text-fill-color: initial;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .title-stack {
        background: linear-gradient(90deg, #f5f9ff 0%, #c7dbff 62%, #9eb9ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.flag-toggle {
    width: 108px;
    height: 34px;
}

.flag-toggle-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 2px;
    gap: 2px;
    border-radius: 2px;
    overflow: hidden;
}

.flag-option {
    position: relative;
    height: 100%;
    opacity: 0.3;
    transition: opacity 220ms ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.flag-option-uk {
    background:
        linear-gradient(26.6deg, transparent 43%, #fff 43%, #fff 57%, transparent 57%),
        linear-gradient(-26.6deg, transparent 43%, #fff 43%, #fff 57%, transparent 57%),
        linear-gradient(26.6deg, transparent 47%, #cf142b 47%, #cf142b 53%, transparent 53%),
        linear-gradient(-26.6deg, transparent 47%, #cf142b 47%, #cf142b 53%, transparent 53%),
        linear-gradient(0deg, transparent 38%, #fff 38%, #fff 62%, transparent 62%),
        linear-gradient(90deg, transparent 41%, #fff 41%, #fff 59%, transparent 59%),
        linear-gradient(0deg, transparent 44%, #cf142b 44%, #cf142b 56%, transparent 56%),
        linear-gradient(90deg, transparent 46%, #cf142b 46%, #cf142b 54%, transparent 54%),
        #012169;
}

.flag-option-nl {
    background: linear-gradient(
        180deg,
        #ae1c28 0 33.33%,
        #ffffff 33.33% 66.66%,
        #21468b 66.66% 100%
    );
}

.flag-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 3px);
    bottom: 2px;
    border: 2px solid rgba(230, 240, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(16, 27, 46, 0.85) inset;
    transition: transform 220ms ease;
    pointer-events: none;
}

.flag-toggle input:checked + .flag-toggle-track .flag-slider {
    transform: translateX(calc(100% + 2px));
}

.flag-toggle input:not(:checked) + .flag-toggle-track .flag-option-uk,
.flag-toggle input:checked + .flag-toggle-track .flag-option-nl {
    opacity: 1;
}

.flag-toggle input:not(:checked) + .flag-toggle-track .flag-option-nl,
.flag-toggle input:checked + .flag-toggle-track .flag-option-uk {
    opacity: 0.28;
}

.flag-icon,
.flag-layer {
    display: none !important;
}

.contact,
.contact span,
.contact span a,
.contact .contact-btn {
    display: flex;
    align-items: center;
}

.contact {
    gap: 0.58rem;
    align-self: start;
    padding: 0.45rem 0.35rem;
}

.contact span {
    margin: 0;
}

.contact span a,
.contact .contact-btn {
    gap: 0.45rem;
    line-height: 1.2;
}

.contact img[alt="Sander"] {
    width: 148px;
    height: 148px;
}

.experience-heading p {
    color: #f0f6ff;
}

.experience-controls {
    grid-template-columns: minmax(220px, 560px) minmax(220px, 360px);
    align-items: start;
}

.experience-controls > * {
    max-width: 100%;
}

.experience-meta,
.experience-meta span,
.experience-meta a {
    color: #f2f8ff;
    font-weight: 600;
}

@media (max-width: 980px) {
    .experience-controls {
        grid-template-columns: 1fr;
    }
}

/* iteration 140+ final correction pass */
#cv-sander {
    font-size: 15px;
}

#cv-sander p,
#cv-sander li,
#cv-sander a,
#cv-sander label,
#cv-sander input,
#cv-sander textarea,
#cv-sander .menu-item,
#cv-sander .tag-option,
#cv-sander .experience-meta {
    font-size: 0.95rem;
}

#cv-sander h3 {
    font-size: 1.28rem;
}

#cv-sander h4 {
    font-size: 1.06rem;
}

.title-stack {
    color: #f2f7ff !important;
    background: none !important;
    -webkit-text-fill-color: currentcolor !important;
    text-shadow: 0 1px 0 rgba(6, 10, 18, 0.45);
}

.title-subline {
    font-size: 1.02rem;
}

.contact {
    width: fit-content;
    min-width: 0;
    justify-self: start;
    align-items: flex-start;
    gap: 0.42rem;
    padding: 0.2rem 0.15rem;
}

.contact span {
    width: auto;
    justify-content: flex-start;
}

.contact span a,
.contact .contact-btn {
    width: auto;
    justify-content: flex-start;
    text-align: left;
}

.contact img[alt="Sander"] {
    width: 128px;
    height: 128px;
}

body {
    padding-bottom: 38px;
}

#my-footer {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tag-dropdown-button {
    border: 1px dashed rgba(196, 214, 255, 0.5);
    min-height: 2.55rem;
}

#tag-dropdown-button span[aria-hidden="true"] {
    font-size: 0.9rem;
    opacity: 0.92;
}

.tag-dropdown-menu {
    border: 1px solid rgba(165, 184, 241, 0.35);
}

@media print {
    body {
        padding-bottom: 0 !important;
    }
}


/* iteration 160+ targeted fixes */
.title-banner {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    background: linear-gradient(130deg, rgba(72, 95, 148, 0.55), rgba(44, 64, 108, 0.52));
    box-shadow: inset 0 0 0 1px rgba(202, 216, 255, 0.2);
}

.title-stack {
    color: #f4f8ff !important;
    background: linear-gradient(90deg, #f6fbff 0%, #d9e6ff 58%, #bacfff 100%) !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none;
}

.contact {
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(15, 24, 39, 0.64), rgba(12, 20, 34, 0.58));
}

.contact > span:first-child {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.2rem;
}

.contact > span:not(:first-child) {
    width: 100%;
    justify-content: flex-start;
}

.contact span a,
.contact .contact-btn {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0.2rem;
}

.flag-option-uk {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2060%2030%22%3E%3CclipPath%20id%3D%22s%22%3E%3Cpath%20d%3D%22M0%2C0%20v30%20h60%20v-30%20z%22%2F%3E%3C%2FclipPath%3E%3CclipPath%20id%3D%22t%22%3E%3Cpath%20d%3D%22M30%2C15%20h30%20v15%20z%20v15%20h-30%20z%20h-30%20v-15%20z%20v-15%20h30%20z%22%2F%3E%3C%2FclipPath%3E%3Cg%20clip-path%3D%22url%28%23s%29%22%3E%3Cpath%20d%3D%22M0%2C0%20v30%20h60%20v-30%20z%22%20fill%3D%22%23012169%22%2F%3E%3Cpath%20d%3D%22M0%2C0%20L60%2C30%20M60%2C0%20L0%2C30%22%20stroke%3D%22%23fff%22%20stroke-width%3D%226%22%2F%3E%3Cpath%20d%3D%22M0%2C0%20L60%2C30%20M60%2C0%20L0%2C30%22%20clip-path%3D%22url%28%23t%29%22%20stroke%3D%22%23C8102E%22%20stroke-width%3D%224%22%2F%3E%3Cpath%20d%3D%22M30%2C0%20v30%20M0%2C15%20h60%22%20stroke%3D%22%23fff%22%20stroke-width%3D%2210%22%2F%3E%3Cpath%20d%3D%22M30%2C0%20v30%20M0%2C15%20h60%22%20stroke%3D%22%23C8102E%22%20stroke-width%3D%226%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#tag-dropdown-button::after {
    content: "⮟";
    margin-left: auto;
    font-size: 0.88rem;
    opacity: 0.9;
}

#tag-dropdown-button[aria-expanded="true"]::after {
    content: "⮝";
}

/* iteration 180+ follow-up fixes */
#main-div {
    margin-top: 0.8rem;
    padding-top: 0.9rem;
}

#my-footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    z-index: 60 !important;
}

.about-container {
    align-items: start;
}

.contact {
    justify-self: end;
    align-self: start;
}

.contact > span:first-child {
    justify-content: center;
}

.contact > span:not(:first-child),
.contact > span:not(:first-child) a,
.contact > span:not(:first-child) .contact-btn {
    justify-content: flex-start;
    text-align: left;
}

.flag-option-uk {
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http://www.w3.org/2000/svg%27%20viewBox%3D%270%200%2060%2030%27%3E%3CclipPath%20id%3D%27s%27%3E%3Cpath%20d%3D%27M0%2C0%20v30%20h60%20v-30%20z%27/%3E%3C/clipPath%3E%3CclipPath%20id%3D%27t%27%3E%3Cpath%20d%3D%27M30%2C15%20h30%20v15%20z%20v15%20h-30%20z%20h-30%20v-15%20z%20v-15%20h30%20z%27/%3E%3C/clipPath%3E%3Cg%20clip-path%3D%27url(%23s)%27%3E%3Cpath%20d%3D%27M0%2C0%20v30%20h60%20v-30%20z%27%20fill%3D%27%23012169%27/%3E%3Cpath%20d%3D%27M0%2C0%20L60%2C30%20M60%2C0%20L0%2C30%27%20stroke%3D%27%23fff%27%20stroke-width%3D%276%27/%3E%3Cpath%20d%3D%27M0%2C0%20L60%2C30%20M60%2C0%20L0%2C30%27%20clip-path%3D%27url(%23t)%27%20stroke%3D%27%23C8102E%27%20stroke-width%3D%274%27/%3E%3Cpath%20d%3D%27M30%2C0%20v30%20M0%2C15%20h60%27%20stroke%3D%27%23fff%27%20stroke-width%3D%2710%27/%3E%3Cpath%20d%3D%27M30%2C0%20v30%20M0%2C15%20h60%27%20stroke%3D%27%23C8102E%27%20stroke-width%3D%276%27/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat !important;
}

.title-banner {
    background: linear-gradient(135deg, rgba(88, 108, 166, 0.62), rgba(56, 76, 124, 0.58));
}

.title-stack {
    color: #eef5ff !important;
    background: none !important;
    -webkit-text-fill-color: currentcolor !important;
    text-shadow: 0 1px 0 rgba(9, 14, 25, 0.55);
}

/* final pass: robust UK flag rendering + pinned viewport footer */
.flag-option-uk {
    background-color: #012169 !important;
    background-image: url("../resources/flag-uk.svg") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

body #my-footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
}

/* final pass: strict 4-level typography + alignment/cropping cleanup */
:root {
    --font-title-family: "Segoe UI", "Inter", "Arial", sans-serif;
    --font-title-size: 3rem;
    --font-title-weight: 700;
    --font-subtitle-family: "Segoe UI", "Inter", "Arial", sans-serif;
    --font-subtitle-size: 2rem;
    --font-subtitle-weight: 600;
    --font-header-family: "Segoe UI", "Inter", "Arial", sans-serif;
    --font-header-size: 1.4rem;
    --font-header-weight: 600;
    --font-text-family: "Segoe UI", "Inter", "Arial", sans-serif;
    --font-text-size: 1rem;
    --font-text-weight: 400;
    --line-height-default: 1.45;
}

body,
input,
textarea,
button,
select {
    font-family: var(--font-text-family) !important;
}

#cv-sander .title-stack > span:first-child,
#cv-sander h1 {
    font-family: var(--font-title-family) !important;
    font-size: var(--font-title-size) !important;
    font-weight: var(--font-title-weight) !important;
    line-height: 1.08 !important;
}

#cv-sander .title-subline,
#cv-sander h2 {
    font-family: var(--font-subtitle-family) !important;
    font-size: var(--font-subtitle-size) !important;
    font-weight: var(--font-subtitle-weight) !important;
    line-height: 1.16 !important;
}

#cv-sander h3,
#cv-sander h4,
#cv-sander .project-title,
#cv-sander .project-year,
#cv-sander .experience-title,
#cv-sander .experience-period,
#cv-sander .section-title,
#cv-sander .card-title {
    font-family: var(--font-header-family) !important;
    font-size: var(--font-header-size) !important;
    font-weight: var(--font-header-weight) !important;
    line-height: 1.26 !important;
}

#cv-sander p,
#cv-sander li,
#cv-sander a,
#cv-sander span,
#cv-sander label,
#cv-sander input,
#cv-sander textarea,
#cv-sander button,
#cv-sander .menu-item,
#cv-sander .tag-option,
#cv-sander .experience-meta,
#cv-sander .language-switch-label,
#cv-sander .language-label {
    font-family: var(--font-text-family) !important;
    font-size: var(--font-text-size) !important;
    font-weight: var(--font-text-weight) !important;
    line-height: var(--line-height-default) !important;
}

.contact {
    width: 100%;
    max-width: 260px;
}

.contact > span:not(:first-child) a,
.contact > span:not(:first-child) .contact-btn {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center !important;
    column-gap: 0.6rem;
    width: 100%;
}

.contact > span:not(:first-child) img {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    object-fit: contain;
}

.contact > span:not(:first-child) a > span,
.contact > span:not(:first-child) .contact-btn > span {
    display: block;
    text-align: left;
}

#main-div {
    overflow-x: clip;
}

#cv-sander {
    padding-bottom: 3.4rem;
}

/* final requested pass: compact header controls + strict four text levels */
#cv-sander * {
    font-family: var(--font-text-family) !important;
    font-size: var(--font-text-size) !important;
    font-weight: var(--font-text-weight) !important;
    line-height: var(--line-height-default) !important;
}

#cv-sander .title-stack > span:first-child,
#cv-sander h1 {
    font-family: var(--font-title-family) !important;
    font-size: var(--font-title-size) !important;
    font-weight: var(--font-title-weight) !important;
    line-height: 1.08 !important;
}

#cv-sander .title-subline,
#cv-sander h2 {
    font-family: var(--font-subtitle-family) !important;
    font-size: var(--font-subtitle-size) !important;
    font-weight: var(--font-subtitle-weight) !important;
    line-height: 1.16 !important;
}

#cv-sander h3,
#cv-sander h4,
#cv-sander .project-title,
#cv-sander .project-year,
#cv-sander .experience-title,
#cv-sander .experience-period,
#cv-sander .section-title,
#cv-sander .card-title,
#cv-sander .identity-eyebrow {
    font-family: var(--font-header-family) !important;
    font-size: var(--font-header-size) !important;
    font-weight: var(--font-header-weight) !important;
    line-height: 1.26 !important;
}

.language-switch {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.55rem;
    row-gap: 0.4rem;
}

.language-switch-label {
    grid-column: 1;
    grid-row: 1;
}

.flag-toggle {
    grid-column: 2;
    grid-row: 1;
}

#language-label {
    display: none !important;
}

.quick-print-button {
    grid-column: 1;
    grid-row: 2;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.quick-print-button img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.linkmenu {
    display: none !important;
}

.contact {
    max-width: 182px;
    width: fit-content;
    justify-self: end;
}

.contact > span:first-child {
    width: 100%;
}

.contact > span:not(:first-child) a,
.contact > span:not(:first-child) .contact-btn {
    width: auto;
    min-width: 0;
}

.contact .menu-icon[alt="Contact"] {
    width: 20px !important;
    height: 20px !important;
}

.contact .menu-icon[alt="Contact"] { filter: none !important; }

/* ===== mobile layout (≤680px) ===== */
@media (max-width: 680px) {
    /* stack header to 1 column — use same high-specificity selector to beat the base rule */
    #cv-sander header .about-container {
        grid-template-columns: 1fr;
    }

    /* contact card: full width, left-aligned when stacked below the title */
    .contact {
        max-width: 100% !important;
        width: 100% !important;
        justify-self: start !important;
        align-self: auto !important;
    }

    /* smaller profile photo on phones */
    .contact img[alt="Sander"] {
        width: 72px !important;
        height: 72px !important;
    }

    /* tighter section padding */
    #cv-sander header,
    #cv-sander section {
        padding: 1rem !important;
    }

    /* title: tighter clamp on narrow viewports */
    #cv-sander .title-stack > span:first-child,
    #cv-sander h1 {
        font-size: clamp(1.4rem, 7vw, 2rem) !important;
        line-height: 1.1 !important;
    }

    #cv-sander .title-subline,
    #cv-sander h2 {
        font-size: clamp(0.95rem, 4.5vw, 1.4rem) !important;
    }

    /* title banner: don't let it run edge-to-edge */
    .title-banner {
        max-width: 100%;
        width: 100%;
    }

    /* contact rows: allow text to wrap rather than truncate */
    .contact > span:not(:first-child) a,
    .contact > span:not(:first-child) .contact-btn {
        white-space: normal;
        word-break: break-word;
    }
}

/* ===== targeted bug fixes ===== */

/* fix 1: flag toggle
   .flag-option uses height:100% inside a grid row, but the grid has no definite
   height → percentage resolves to ~0 → flags collapse to a 1px border line.
   Fix: give the track an explicit height (28px) and stretch alignment so the
   options fill it properly.
   The .flag-slider was accidentally appearing before because it was absolutely
   positioned relative to a distant ancestor (.about), not the track — unreliable.
   Hide it and highlight the active flag directly with box-shadow instead. */
.flag-toggle-track {
    position: static;
    height: 28px;
    align-items: stretch;
}

.flag-option {
    height: 100%;
    transition: opacity 220ms ease, box-shadow 220ms ease;
    border-radius: 2px;
}

.flag-slider {
    display: none !important;
}

.flag-toggle input:not(:checked) + .flag-toggle-track .flag-option-uk,
.flag-toggle input:checked + .flag-toggle-track .flag-option-nl {
    opacity: 1 !important;
    outline: 1px solid rgba(230, 240, 255, 0.6);
    outline-offset: -1px;
}

.flag-toggle input:not(:checked) + .flag-toggle-track .flag-option-nl,
.flag-toggle input:checked + .flag-toggle-track .flag-option-uk {
    opacity: 0.28 !important;
    box-shadow: none;
}

/* fix 2: header layout
   Use higher specificity (#cv-sander header) to override the max-width:980px
   media query that collapses .about-container to 1fr too aggressively. */
#cv-sander header .about-container {
    grid-template-columns: 1.25fr 0.75fr;
}

/* fix 2b: title-banner must not overflow its column — use fluid font size */
.title-banner {
    display: flex;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
}

#cv-sander .title-stack > span:first-child,
#cv-sander h1 {
    font-size: clamp(1.6rem, 4.2vw, 3rem) !important;
    line-height: 1.1 !important;
}

#cv-sander .title-subline,
#cv-sander h2 {
    font-size: clamp(1rem, 2.6vw, 2rem) !important;
}

/* fix 3: language skill bars — wide enough for "Nederlands" on one line */
#skills .skill-languages .skill-title {
    width: 95px;
    min-width: 95px;
    max-width: 95px;
}

/* fix 4a: expertise collapsible arrow — center icon, simple rounded shape */
.collapsible.arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    clip-path: none !important;
    border-radius: 6px !important;
    width: 26px !important;
    height: 26px !important;
    font-size: 0.72rem !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* fix 4b: fixed label width so all expertise arrow buttons align vertically */
#skills .skill-languages .skill > span[data-i18n] {
    min-width: 140px;
    display: inline-block;
}
