/* TechnicalArt.it Premium Design System */


:root {
    /* Dark Theme Only */
    --color-bg: #121214;
    --color-surface: #1c1c1f;
    --color-surface-hover: #27272a;
    --color-text-primary: #e4e4e7;
    --color-text-secondary: #a1a1aa;
    --color-accent: #3b82f6;
    /* Blue 500 to match reference */
    --color-accent-hover: #60a5fa;
    --color-border: #27272a;
    --color-toc-active: #3b82f6;

    /* Reference Image Styling */
    --cv-header-color: #3b82f6;
    --cv-section-border: 1px solid #3b82f6;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Animations */
    --transition-fast: 0.2s ease;
}

/* Toggle Removed */


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: 100px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.site-header {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 17, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-left: var(--spacing-md);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

nav a:hover,
nav a.active {
    color: var(--color-text-primary);
}

main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    animation: fadeIn var(--transition-smooth);
}

footer {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
}

/* Typography */
h1,
h2,
h3 {
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a1a1aa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    margin-top: var(--spacing-lg);
}

p {
    margin-bottom: var(--spacing-sm);
    max-width: 65ch;
    color: var(--color-text-secondary);
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-secondary);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--color-text-primary);
    color: var(--color-bg);
    border: none;
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Utilities */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-md);
    transition: all var(--transition-smooth);
}

.card:hover {
    border-color: var(--color-text-secondary);
    transform: translateY(-4px);
}

/* Content Layout with TOC */
.content-with-toc {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    position: relative;
}

@media (min-width: 1024px) {
    .content-with-toc {
        grid-template-columns: 1fr 240px;
    }
}

.toc-sidebar {
    position: sticky;
    top: 100px;
    /* Offset for sticky header */
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border-left: 1px solid var(--color-border);
    padding-left: var(--spacing-sm);
    display: none;
    z-index: 50;
    /* Ensure it stays above content but below main site header */
}

@media (min-width: 1024px) {
    .toc-sidebar {
        display: block;
    }
}

.toc-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.toc-sidebar ul {
    list-style: none;
}

.toc-sidebar li {
    margin-bottom: 0.5rem;
}

.toc-sidebar a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    display: block;
    padding: 2px 0;
    transition: color var(--transition-fast);
}

.toc-sidebar a:hover,
.toc-sidebar a.active {
    color: var(--color-toc-active);
}

.toc-h3 {
    margin-left: var(--spacing-sm);
}

.post-main-column {
    min-width: 0;
    /* Prevent grid blowout */
    width: 100%;
}

.blog-post>header,
.post-header {
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: var(--spacing-md);
}

.post-hero-image {
    margin: var(--spacing-md) 0;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    background: var(--color-surface);
}

.post-hero-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
}

.hero-bio {
    margin: var(--spacing-md) 0;
    width: 100%;
}

.hero-bio p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-bio strong {
    color: var(--color-text-primary);
}

.hero-actions {
    margin-top: var(--spacing-md);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Shipped Games & Portfolio Section */
.shipped-games,
.portfolio-container {
    max-width: 1200px;
    margin: var(--spacing-md) auto;
    padding: 0 var(--spacing-md);
}

.portfolio-container h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.portfolio-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.shipped-games h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
}

/* Portfolio Page */
.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.portfolio-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.portfolio-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.game-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.game-card-link:hover {
    transform: translateY(-8px);
}

.thumbnail-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2a2a2e 0%, #1a1a1e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.game-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card {
    background: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--color-border);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.game-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-bg);
}

.game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.game-year {
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.game-role {
    font-size: 0.95rem;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.game-studio {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.game-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Enhanced Typography */
.markdown-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.markdown-content h2 {
    font-size: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.markdown-content h3 {
    font-size: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.markdown-content p {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 100%;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: var(--spacing-md) 0;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

/* Job section wrapper for consistent spacing */
.job-section {
    margin-bottom: 1rem;
}

.markdown-content strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.markdown-content a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.markdown-content a:hover {
    border-bottom-color: var(--color-accent);
}

/* Code Blocks */
.markdown-content pre {
    background: #272822;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.markdown-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.markdown-content :not(pre)>code {
    background: var(--color-surface);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--color-accent);
}

/* Chroma Syntax Highlighting (Monokai theme) */
.chroma {
    color: #f8f8f2;
    background-color: #272822
}

.chroma .err {
    color: #960050;
    background-color: #1e0010
}

.chroma .lntd {
    vertical-align: top;
    padding: 0;
    margin: 0;
    border: 0;
}

.chroma .lntable {
    border-spacing: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

.chroma .hl {
    background-color: #ffffcc
}

.chroma .lnt {
    white-space: pre;
    -webkit-user-select: none;
    user-select: none;
    margin-right: 0.4em;
    padding: 0 0.4em 0 0.4em;
    color: #7f7f7f
}

.chroma .ln {
    white-space: pre;
    -webkit-user-select: none;
    user-select: none;
    margin-right: 0.4em;
    padding: 0 0.4em 0 0.4em;
    color: #7f7f7f
}

.chroma .line {
    display: flex;
}

.chroma .k {
    color: #66d9ef
}

.chroma .kc {
    color: #66d9ef
}

.chroma .kd {
    color: #66d9ef
}

.chroma .kn {
    color: #f92672
}

.chroma .kp {
    color: #66d9ef
}

.chroma .kr {
    color: #66d9ef
}

.chroma .kt {
    color: #66d9ef
}

.chroma .na {
    color: #a6e22e
}

.chroma .nb {
    color: #f8f8f2
}

.chroma .nc {
    color: #a6e22e
}

.chroma .no {
    color: #66d9ef
}

.chroma .nd {
    color: #a6e22e
}

.chroma .ni {
    color: #f8f8f2
}

.chroma .ne {
    color: #a6e22e
}

.chroma .nf {
    color: #a6e22e
}

.chroma .nl {
    color: #f8f8f2
}

.chroma .nn {
    color: #f8f8f2
}

.chroma .nx {
    color: #a6e22e
}

.chroma .py {
    color: #f8f8f2
}

.chroma .nt {
    color: #f92672
}

.chroma .nv {
    color: #f8f8f2
}

.chroma .s {
    color: #e6db74
}

.chroma .sa {
    color: #e6db74
}

.chroma .sb {
    color: #e6db74
}

.chroma .sc {
    color: #e6db74
}

.chroma .dl {
    color: #e6db74
}

.chroma .sd {
    color: #e6db74
}

.chroma .s2 {
    color: #e6db74
}

.chroma .se {
    color: #ae81ff
}

.chroma .sh {
    color: #e6db74
}

.chroma .si {
    color: #e6db74
}

.chroma .sx {
    color: #e6db74
}

.chroma .sr {
    color: #e6db74
}

.chroma .s1 {
    color: #e6db74
}

.chroma .ss {
    color: #e6db74
}

.chroma .m {
    color: #ae81ff
}

.chroma .mb {
    color: #ae81ff
}

.chroma .mf {
    color: #ae81ff
}

.chroma .mh {
    color: #ae81ff
}

.chroma .mi {
    color: #ae81ff
}

.chroma .il {
    color: #ae81ff
}

.chroma .mo {
    color: #ae81ff
}

.chroma .o {
    color: #f92672
}

.chroma .ow {
    color: #f92672
}

.chroma .c {
    color: #75715e
}

.chroma .ch {
    color: #75715e
}

.chroma .cm {
    color: #75715e
}

.chroma .c1 {
    color: #75715e
}

.chroma .cs {
    color: #75715e
}

.chroma .cp {
    color: #75715e
}

.chroma .cpf {
    color: #75715e
}

.chroma .gd {
    color: #f92672
}

.chroma .ge {
    font-style: italic
}

.chroma .gr {
    color: #f92672
}

.chroma .gh {
    color: #75715e
}

.chroma .gi {
    color: #a6e22e
}

.chroma .go {
    color: #66d9ef
}

.chroma .gp {
    color: #f92672
}

.chroma .gs {
    font-weight: bold
}

.chroma .gu {
    color: #75715e
}

.chroma .gt {
    color: #f92672
}


/* CV Specific Styling (Reference Match) */
.cv-header {
    margin-bottom: var(--spacing-md);
}

.cv-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.cv-download-btn {
    flex-shrink: 0;
    margin-left: 2rem;
}

.cv-header h1 {
    font-size: 2rem;
    color: var(--color-accent);
    /* Blue */
    margin-bottom: 0;
    font-weight: 500;
}

.cv-header h2 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 400;
    border: none;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* Definition of Sections */
.markdown-content h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 0.2rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.markdown-content h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Job Entry Grid Layout */
.job-entry {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: var(--spacing-sm);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .site-header {
        padding: var(--spacing-sm);
    }

    main {
        padding: var(--spacing-md) var(--spacing-sm);
        width: 100%;
        max-width: 100%;
        display: block;
        overflow-x: visible;
    }

    .content-with-toc {
        display: block;
        /* Remove grid blowout potential */
    }

    /* Force all text elements to wrap regardless of length */
    * {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    h1 {
        font-size: 1.75rem;
        background: none;
        /* Gradients can sometimes block wrapping */
        -webkit-text-fill-color: var(--color-text-primary);
        word-break: break-word;
        line-height: 1.3;
    }

    .markdown-content h1 {
        font-size: 1.6rem;
    }

    .markdown-content h2 {
        font-size: 1.4rem;
    }

    .markdown-content h3 {
        font-size: 1.2rem;
    }

    .markdown-content p,
    .markdown-content li {
        font-size: 1rem;
        line-height: 1.6;
    }

    .markdown-content ul,
    .markdown-content ol {
        margin-left: 1.25rem;
    }

    /* Dedicated code block handling */
    .markdown-content pre {
        padding: 1rem;
        margin: 1.5rem 0;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        word-break: normal;
        /* Don't break code internally */
        overflow-wrap: normal;
        -webkit-overflow-scrolling: touch;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .job-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.job-date {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
    padding-top: 0.2rem;
}

.job-details strong {
    display: block;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    /* As per reference */
    font-weight: 600;
}

.job-details ul {
    margin-left: 1rem;
    list-style-type: none;
    /* We can use custom dashes if needed */
}

.job-details li {
    position: relative;
    padding-left: 0.5rem;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.job-details li::before {
    content: "-";
    position: absolute;
    left: -0.8rem;
    color: var(--color-text-secondary);
}

/* Theme Toggle Button Removed Styles */


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HTMX Indicator */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1
}

.htmx-request .htmx-indicator {
    opacity: 1
}

/* Print Styles for PDF Generation and Printing */
@media print {

    /* Reset all variables to safe defaults, although we will use explicit values */
    :root {
        --color-bg: #ffffff;
        --color-surface: #ffffff;
        --color-text-primary: #000000;
        --color-text-secondary: #000000;
        --color-border: #cccccc;
    }

    header,
    footer,
    .cv-actions,
    nav,
    .btn,
    .toc-sidebar {
        display: none !important;
    }

    /* Reset root styles for PDF pagination */
    html {
        height: auto !important;
        overflow: visible !important;
    }

    body {
        background: #ffffff;
        color: #000000;
        /* Using Montserrat (local package) as reliable Avenir alternative */
        font-family: 'Montserrat', 'Avenir', 'Segoe UI', sans-serif;
        /* Smaller base size */
        font-size: 10pt;
        margin: 0;
        padding: 0;
        /* CRITICAL for wkhtmltopdf pagination: */
        display: block !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    main {
        width: 100%;
        margin: 0;
        padding: 0;
        animation: none;
        display: block !important;
        overflow: visible !important;
    }

    /* Headings */
    h1,
    h2,
    h3,
    h4 {
        margin: 0;
        padding: 0;
        color: #000000;
        -webkit-text-fill-color: initial;
        background: none;
        break-after: avoid;
        page-break-after: avoid;
    }

    /* Name */
    h1 {
        font-size: 24pt;
        font-weight: bold;
        color: #000000;
        /* Reference shows Name in black or dark grey? Let's stick to black for clarity */
        border: none;
        margin-bottom: 5px;
    }

    /* "Technical Artist" etc under name */
    .cv-header h2 {
        font-size: 14pt;
        font-weight: normal;
        color: #444444;
        border: none;
        margin-bottom: 15px;
        text-transform: none;
    }

    /* Section Headers: SKILLSET, WORK EXPERIENCE */
    /* Markdown H2 becomes these */
    /* Section Headers: SKILLSET, WORK EXPERIENCE */
    /* Markdown H2 becomes these */
    .markdown-content h2 {
        font-size: 8pt;
        /* Kept user's preference */
        font-weight: bold;
        color: #3b82f6;
        /* Blue text */
        text-transform: none !important;
        /* Force no caps */
        border-bottom: 2px solid #3b82f6;
        /* Blue thick line */
        padding-bottom: 1px;
        margin-top: 5px;
        /* Reduced from 10px */
        margin-bottom: 3px !important;
        /* Reduced to save space */
        letter-spacing: 1px;
        line-height: 1.1;
    }

    /* Sub-headers: Job Titles (H3) */
    h3 {
        font-size: 10pt;
        /* Back to 10pt as 12pt was too big */
        font-weight: bold;
        color: #000000;
        text-transform: none;
        margin-top: 2px !important;
        /* Slight gap */
        margin-bottom: 2px;
        line-height: 1.1;
        white-space: nowrap;
        /* Prevent wrapping if possible */
        /* CRITICAL: Keep header with content */
        page-break-after: avoid !important;
        break-after: avoid !important;
        orphans: 4;
        widows: 4;
    }

    /* Sub-sub-headers: Tools, Languages (H4) */
    h4 {
        font-size: 8pt;
        font-weight: normal;
        color: #000000;
        text-transform: uppercase;
        margin-top: 0 !important;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    p {
        margin-bottom: 2px;
        orphans: 3;
        widows: 3;
    }

    /* Dashed Lists */
    ul {
        list-style-type: none;
        padding-left: 0;
        margin-left: 0;
        margin-bottom: 2px;
    }

    li {
        padding-left: 15px;
        position: relative;
        color: #666666;
        line-height: 1.3;
        margin-bottom: 1px;
    }

    li::before {
        content: "-";
        position: absolute;
        left: 0;
        color: #666666;
    }

    strong {
        font-weight: 600;
        color: #000000;
    }

    /* Links */
    a {
        text-decoration: none;
        color: #000000;
    }

    /* Wrapper for each employer section (H3 + job entries) */
    .job-section {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 4px;
    }

    /* Job Entries layout */
    .job-entry {
        display: table;
        width: 100%;
        margin-bottom: 5px;
        /* Reduced margin between jobs */
        page-break-inside: avoid !important;
        /* Strictly avoid breaking inside a job entry */
    }

    .job-date {
        display: table-cell;
        width: 120px;
        vertical-align: top;
        font-size: 8pt;
        text-transform: uppercase;
        color: #666666;
        padding-right: 15px;
    }

    .job-details {
        display: table-cell;
        vertical-align: top;
        /* Explicitly force inheritance fixes for wkhtmltopdf table quirks */
        font-size: 10pt !important;
        color: #666666 !important;
    }

    /* Force list items inside jobs to look like Skillset items */
    .job-details ul {
        margin-top: 0;
        margin-bottom: 2px;
    }

    .job-details li {
        font-size: 10pt !important;
        color: #666666 !important;
        font-weight: normal;
        line-height: 1.3;
        margin-bottom: 1px;
    }

    .job-details strong {
        display: block;
        font-size: 8pt;
        /* Match H4 size */
        font-weight: normal;
        /* Match H4 weight (not thick) */
        text-transform: uppercase;
        /* Match H4 casing */
        color: #000000 !important;
        letter-spacing: 0.5px;
        margin-bottom: 1px;
    }



    .contact-info {
        font-size: 9pt;
        color: #666666;
        margin-bottom: 20px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    /* Hidden by default */
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.cookie-banner.visible {
    bottom: 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.cookie-text a {
    color: var(--color-accent);
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-btn {
    background: var(--color-text-primary);
    color: var(--color-bg);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.cookie-btn:hover {
    background: #fff;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}