/* style.css - Adam Bruce Portfolio V4 */

/* ---------------------------------- */
/* ----- 1. Global Variables   ------ */
/* ---------------------------------- */
:root {
    --font-heading: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Light Theme (Default) */
    --color-primary-light: #0062E6; /* Brighter, modern blue */
    --color-secondary-light: #6C757D; /* Medium Grey */
    --color-accent-light: #0DCAF0;   /* Bright Cyan/Teal */
    --color-success-light: #198754; 
    --text-dark-light: #212529;
    --text-medium-light: #495057;
    --text-light-light: #F8F9FA; /* For dark on light elements, if any */
    --bg-main-light: #FFFFFF;
    --bg-alt-light: #F8F9FA; /* Off-white for sections */
    --border-color-light: #DEE2E6;
    --shadow-color-light: rgba(0, 0, 0, 0.1);

    /* Dark Theme Variables (will be overridden by .dark-theme class) */
    --color-primary-dark: #3B82F6; /* Lighter blue for dark mode */
    --color-secondary-dark: #9CA3AF; /* Lighter Grey */
    --color-accent-dark: #2DD4BF;   /* Tealish accent for dark */
    --color-success-dark: #22C55E;
    --text-dark-dark: #F3F4F6; /* Light text for dark bg */
    --text-medium-dark: #D1D5DB;
    --text-light-dark: #1F2937; /* For light on dark elements, if any */
    --bg-main-dark: #111827; /* Very Dark Blue/Grey */
    --bg-alt-dark: #1F2937; /* Slightly lighter dark for cards/sections */
    --border-color-dark: #374151;
    --shadow-color-dark: rgba(255, 255, 255, 0.05);

    /* Resolved variables for current theme */
    --color-primary: var(--color-primary-light);
    --color-secondary: var(--color-secondary-light);
    --color-accent: var(--color-accent-light);
    --color-success: var(--color-success-light);
    --text-dark: var(--text-dark-light);
    --text-medium: var(--text-medium-light);
    --text-light: var(--text-light-light);
    --bg-main: var(--bg-main-light);
    --bg-alt: var(--bg-alt-light);
    --border-color: var(--border-color-light);
    --shadow-color: var(--shadow-color-light);

    --shadow-sm: 0 .125rem .25rem var(--shadow-color);
    --shadow-md: 0 .5rem 1rem var(--shadow-color);
    --shadow-lg: 0 1rem 3rem var(--shadow-color);

    --header-height: 70px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

body.dark-theme {
    --color-primary: var(--color-primary-dark);
    --color-secondary: var(--color-secondary-dark);
    --color-accent: var(--color-accent-dark);
    --color-success: var(--color-success-dark);
    --text-dark: var(--text-dark-dark);
    --text-medium: var(--text-medium-dark);
    --text-light: var(--text-light-dark);
    --bg-main: var(--bg-main-dark);
    --bg-alt: var(--bg-alt-dark);
    --border-color: var(--border-color-dark);
    --shadow-color: var(--shadow-color-dark);
}

/* ---------------------------------- */
/* ----- 2. Base & Reset Styles ----- */
/* ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-dark);
    margin: 0; padding: 0;
    line-height: 1.65;
    opacity: 0;
    animation: pageFadeIn 0.6s ease-out 0.1s forwards;
    transition: background-color 0.3s ease, color 0.3s ease; /* For theme toggle */
}
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
a:hover { color: var(--color-accent); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: var(--border-radius-sm); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0; margin-bottom: 0.75rem;
    font-weight: 600; line-height: 1.3;
    color: var(--text-dark);
    transition: color 0.3s ease; /* For theme toggle */
}
h1 { font-size: 2.75rem; } h2 { font-size: 2.15rem; } h3 { font-size: 1.6rem; } h4 { font-size: 1.2rem; }

.container { width: 90%; max-width: 1180px; margin: 0 auto; padding: 0 15px; }

/* Background Animated Blobs */
.blob-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: -2; /* Deepest background */
    pointer-events: none; /* Make sure they don't interfere with clicks */
}
.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08; /* Very subtle */
    background: var(--color-accent);
    animation: moveBlob 20s infinite alternate ease-in-out;
    filter: blur(50px); /* Soft edges */
}
.blob:nth-child(1) { width: 400px; height: 400px; top: -10%; left: -5%; animation-duration: 22s; background: var(--color-primary); }
.blob:nth-child(2) { width: 500px; height: 500px; bottom: -15%; right: -10%; animation-duration: 25s; }
.blob:nth-child(3) { width: 300px; height: 300px; top: 30%; right: 20%; animation-duration: 18s; animation-delay: -5s; background: var(--color-secondary) }

@keyframes moveBlob {
    0% { transform: scale(1) translate(0px, 0px) rotate(0deg); }
    100% { transform: scale(1.3) translate(50px, -30px) rotate(180deg); }
}
body.dark-theme .blob { opacity: 0.12; } /* Slightly more visible in dark mode */

/* ---------------------------------- */
/* ----- 3. Layout & Structure  ----- */
/* ---------------------------------- */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: color-mix(in srgb, var(--bg-main) 90%, transparent); /* More robust transparency */
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 1030; height: var(--header-height);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.main-content { padding-top: var(--header-height); }
.site-footer {
    text-align: center; padding: 3rem 1rem;
    background-color: color-mix(in srgb, var(--bg-alt) 80%, var(--text-dark) 20%);
    color: var(--text-medium); margin-top: 4rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.site-footer p { margin-bottom: 0.3rem; font-size: 0.9rem;}
.site-footer a { color: var(--color-primary); }
.site-footer a:hover { color: var(--color-accent); }

.section { padding: 4.5rem 0; position: relative; overflow: hidden; }
.section-bg-alt { background-color: var(--bg-alt); transition: background-color 0.3s ease; }

.section-title {
    font-size: 2.25rem; text-align: center;
    margin-bottom: 1.5rem; color: var(--text-dark); font-weight: 700;
    position: relative; padding-bottom: 0.5rem;
}
.section-title::after { /* Title underline accent */
    content: ''; position: absolute; bottom: -5px; left: 50%;
    transform: translateX(-50%); width: 60px; height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--border-radius-sm);
}
.section-subtitle {
    text-align: center; font-size: 1.15rem; color: var(--text-medium);
    max-width: 750px; margin: 0 auto 3.5rem auto; line-height: 1.75;
}
.fade-in-up { opacity: 0; transform: translateY(35px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------- */
/* ----- 4. Components         ------ */
/* ---------------------------------- */
.logo a { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--color-primary); letter-spacing: -0.5px; }
.logo a:hover { color: var(--color-accent); text-decoration: none; }

.main-navigation ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; }
.main-navigation li { margin-left: 0.5rem; } /* Reduced space for toggle */
.main-navigation a, .main-navigation label {
    font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
    color: var(--text-medium); padding: 0.6rem 0.8rem; border-radius: var(--border-radius-md);
    position: relative; cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease;
}
.main-navigation a:hover, .main-navigation label:hover,
.main-navigation a.active, .main-navigation label.active {
    color: var(--color-primary); background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
}
.main-navigation label i { margin-right: 0.4rem; }
.main-navigation .nav-button {
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 70%, var(--color-accent) 30%));
    color: var(--color-white) !important; padding: 0.7rem 1.4rem;
    border-radius: 50px; font-size: 0.9rem; font-weight: 500;
    transition: all 0.3s ease; box-shadow: var(--shadow-sm);
}
.main-navigation .nav-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 70%, var(--color-accent) 30%), var(--color-primary));
}

/* Theme Toggle Switch */
.theme-switch-wrapper { display: flex; align-items: center; margin-left:1rem; }
.theme-switch { display: inline-block; height: 20px; position: relative; width: 40px; }
.theme-switch input { display:none; }
.slider {
    background-color: var(--border-color); bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0;
    transition: .4s; border-radius: 20px;
}
.slider:before {
    background-color: var(--color-white); bottom: 2px; content: ""; height: 16px; left: 2px; position: absolute;
    transition: .4s; width: 16px; border-radius: 50%;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}
input:checked + .slider { background-color: var(--color-accent); }
input:checked + .slider:before { transform: translateX(20px); }
.theme-switch-wrapper i { margin-left: 0.5rem; color: var(--text-medium); font-size: 1.1rem; }


/* Hero Section V4 */
.hero-section {
    background: linear-gradient(135deg, color-mix(in srgb, var(--bg-main) 70%, var(--color-primary) 30%), color-mix(in srgb, var(--bg-main) 90%, var(--color-accent) 10%));
    padding: 5rem 0 6rem; position: relative;
}
.hero-section::before { /* Subtle pattern overlay */
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background-image: radial-gradient(var(--border-color) 0.5px, transparent 0.5px);
    background-size: 15px 15px; opacity: 0.3; z-index:0;
}
.hero-section .container { display: flex; align-items: center; justify-content: space-between; gap: 3rem; position:relative; z-index:1;}
.hero-image-wrapper { flex: 0 0 320px; max-width: 320px; }
.hero-profile-picture {
    width: 250px; height: 250px; border-radius: 50%; object-fit: cover;
    border: 8px solid var(--bg-main); box-shadow: var(--shadow-lg); margin: 0 auto;
    animation: zoomIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s backwards;
}
.hero-content { flex: 1; text-align: left; animation: slideInFromRight 0.8s ease-out 0.4s backwards; }
.hero-content .hero-title { font-size: 3rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.75rem; line-height: 1.2; }
.hero-content .hero-lead { font-size: 1.3rem; color: var(--text-medium); margin-bottom: 2rem; font-weight: 400; max-width: 600px; }
.hero-content .btn-primary {
    background: var(--color-primary); color: var(--color-white); padding: 0.9rem 2.2rem;
    border-radius: 50px; font-family: var(--font-heading); font-weight: 500; font-size: 1.05rem;
    display: inline-block; transition: all 0.3s ease; box-shadow: var(--shadow-md);
    letter-spacing: 0.5px;
}
.hero-content .btn-primary:hover { background: var(--color-accent); color: var(--color-dark); transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow-lg); }
.hero-content .btn-primary i { margin-left: 0.5rem; }


/* Timeline Section V4 */
.timeline-section { padding-top: 2rem; }
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding: 2rem 0; }
.timeline::after { /* The central line */
    content: ''; position: absolute; width: 3px;
    background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-accent) 100%);
    top: 0; bottom: 0; left: 50%; margin-left: -1.5px; z-index: -1;
    border-radius: 3px;
}
.timeline-item { padding: 10px 40px; position: relative; background-color: inherit; width: 50%; opacity: 0; transform: translateY(25px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.timeline-item.is-visible { opacity: 1; transform: translateY(0); }
.timeline-item::after { /* The circle on the timeline */
    content: ''; position: absolute; width: 22px; height: 22px; right: -11px;
    background-color: var(--bg-main); border: 4px solid var(--color-primary);
    top: 25px; border-radius: 50%; z-index: 1; transition: transform 0.3s ease, border-color 0.3s ease;
}
.timeline-item:hover::after { transform: scale(1.2); border-color: var(--color-accent); }
.timeline-item.left { left: 0; } .timeline-item.right { left: 50%; }
.timeline-item.right::after { left: -11px; }
.timeline-content {
    padding: 1.75rem; background-color: var(--bg-alt); position: relative;
    border-radius: var(--border-radius-lg); box-shadow: var(--shadow-md);
    border-left: 4px solid var(--color-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.timeline-item:hover .timeline-content { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-left-color:var(--color-accent); }
.timeline-content h3 { font-size: 1.3rem; color: var(--color-primary); margin-bottom: 0.25rem; }
.timeline-content h4 { font-size: 1.1rem; color: var(--text-dark); font-weight: 500; margin-bottom: 0.3rem; }
.timeline-content .dates { font-size: 0.9rem; color: var(--text-medium); margin-bottom: 1rem; display: block; }
.timeline-content ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.timeline-content ul li { font-size: 0.95rem; line-height: 1.7; margin-bottom: 0.5rem; padding-left: 1.5rem; position: relative; }
.timeline-content ul li::before { content: '✓'; position: absolute; left: 0; color: var(--color-primary); font-weight: bold; }

/* Quote Section V4 */
.quote-section { background: linear-gradient(45deg, var(--color-primary), var(--color-secondary)); padding: 4rem 1rem; text-align: center; margin: 4rem 0; color: var(--color-white); border-radius:var(--border-radius-lg); box-shadow: var(--shadow-lg); }
.quote-section blockquote { font-family: var(--font-heading); font-size: 1.75rem; font-style: italic; font-weight: 500; max-width: 800px; margin: 0 auto; line-height: 1.6; position: relative; padding: 1rem 2rem; }
.quote-section blockquote::before { content: '“'; font-size: 5rem; color: var(--color-accent); position: absolute; left: -0.5rem; top: -2rem; opacity: 0.7; line-height: 1; }
.quote-section blockquote::after { content: '”'; font-size: 5rem; color: var(--color-accent); position: absolute; right: -0.5rem; bottom: -3.5rem; opacity: 0.7; line-height: 1; }

/* Skills & Certs Section V4 */
.skills-certifications-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .skills-certifications-grid { grid-template-columns: 1fr 1fr; } }
.skills-column h3, .certifications-column h3 {
    font-size: 1.5rem; color: var(--text-dark); margin-bottom: 1.25rem;
    padding-bottom: 0.6rem; border-bottom: 3px solid var(--color-primary); display: inline-block;
}
.skills-list-v4, .certifications-list-v4 { list-style: none; padding-left: 0; margin: 0; }
.skills-list-v4 li, .certifications-list-v4 li {
    font-size: 1.05rem; color: var(--text-medium); padding: 0.5rem 0; display: flex; align-items: center;
    border-bottom: 1px dashed var(--border-color); transition: color 0.2s ease;
}
.skills-list-v4 li:last-child, .certifications-list-v4 li:last-child { border-bottom: none; }
.skills-list-v4 li:hover, .certifications-list-v4 li:hover { color: var(--color-primary); }
.skills-list-v4 li i, .certifications-list-v4 li i { color: var(--color-accent); margin-right: 0.8rem; font-size: 1.2rem; width:20px; text-align:center; }

/* CTA / Contact Section V4 */
.cta-section { background-color: var(--bg-alt); border-radius:var(--border-radius-lg); padding-bottom:5rem;}
.cta-section .section-title { margin-bottom: 1rem; }
.cta-section .section-subtitle { margin-bottom: 2.5rem; }
.contact-emphasis { text-align: center; margin-bottom: 2rem; font-size:1.1rem; color:var(--text-medium); }
.contact-emphasis strong { color: var(--color-primary); }
.contact-emphasis a {font-weight:500;}
.contact-links-wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.contact-link-item {
    color: var(--color-primary); background-color: var(--bg-main);
    font-family: var(--font-heading); font-size: 1.05rem; font-weight: 500;
    padding: 0.8rem 1.5rem; border: 2px solid var(--color-primary);
    border-radius: 50px; display: inline-flex; align-items: center; gap: 0.6rem;
    transition: all 0.3s ease; box-shadow: var(--shadow-sm);
}
.contact-link-item:hover { background-color: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow-md); }
.contact-link-item i { font-size: 1.3rem; }

/* Back to Top Button */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem;
    background-color: var(--color-primary); color: var(--color-white);
    width: 45px; height: 45px; border-radius: 50%;
    display: none; justify-content: center; align-items: center;
    font-size: 1.1rem; box-shadow: var(--shadow-md);
    transition: all 0.3s ease; border: none; z-index: 1000;
}
.back-to-top.show { display: flex; opacity: 1; }
.back-to-top:hover { background-color: var(--color-accent); color: var(--color-dark); transform: translateY(-4px) scale(1.1); }

/* ---------------------------------- */
/* ----- 5. Modal Styles (V4)  ------ */
/* ---------------------------------- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: color-mix(in srgb, var(--bg-main-dark) 85%, transparent);
    justify-content: center; align-items: center; z-index: 2000;
    opacity: 0; transition: opacity 0.3s ease-out;
}
#modal-toggle:checked ~ .modal-overlay { display: flex; opacity: 1; }
.modal-dialog {
    background: var(--bg-alt); border-radius: var(--border-radius-lg);
    padding: 0; width: 90%; max-width: 980px; height: 90vh; max-height: 800px;
    display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
}
#modal-toggle:checked ~ .modal-overlay .modal-dialog { transform: scale(1) translateY(0); }
.modal-header-v4 { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.75rem; border-bottom: 1px solid var(--border-color); }
.modal-title-v4 { font-size: 1.6rem; color: var(--text-dark); margin-bottom: 0; font-weight: 600; }
.modal-close-button, .modal-print-button {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    color: var(--text-medium); padding: 0.3rem; line-height: 1; transition: color 0.2s ease, transform 0.2s ease;
}
.modal-print-button { margin-right: 1rem; }
.modal-close-button:hover, .modal-print-button:hover { color: var(--color-primary); transform: scale(1.1); }
.modal-print-button i { margin-right: 0.5rem; }
.modal-body-v4 { padding: 1.75rem; overflow-y: auto; flex-grow: 1; }
.modal-body-v4 .modal-subtitle { font-style: italic; color: var(--text-medium); margin-bottom: 1.75rem; font-size: 1rem; }
.modal-quick-nav-v4 { margin-bottom: 1.75rem; padding: 1rem; background-color: var(--bg-main); border-radius: var(--border-radius-md); border: 1px solid var(--border-color); }
.modal-quick-nav-v4 h4 { margin-top: 0; margin-bottom: 0.75rem; color: var(--text-dark); font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-quick-nav-v4 ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.modal-quick-nav-v4 li a {
    display: block; padding: 0.4rem 0.8rem; background-color: var(--bg-alt); color: var(--color-primary);
    border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); font-size: 0.85rem;
    transition: all 0.2s ease; text-decoration: none; font-weight: 500;
}
.modal-quick-nav-v4 li a:hover { background-color: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.dossier-company { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.dossier-company:last-of-type { border-bottom: none; padding-bottom: 0; }
.dossier-company .company-name { font-size: 1.25rem; color: var(--color-primary); margin-bottom: 0.2rem; font-weight: 600; }
.dossier-company .job-title { font-size: 1.05rem; color: var(--text-dark); font-weight: 500; margin-bottom: 0.2rem; }
.dossier-company .dates { font-size: 0.875rem; color: var(--text-medium); font-style: italic; margin-bottom: 0.75rem; }
.dossier-company ul { list-style-type: none; padding-left: 1.25rem; margin-bottom: 0; }
.dossier-company ul li { margin-bottom: 0.4rem; position: relative; line-height: 1.6; font-size: 0.9rem; color: var(--text-medium); }
.dossier-company ul li::before { content: "›"; position: absolute; left: -1.25rem; color: var(--color-primary); font-size: 1.1rem; top: -1px; font-weight:bold; }
#education-dossier ul li::before, #certifications-dossier ul li::before { font-family: 'Font Awesome 5 Free'; font-weight: 900; content: "\f00c"; font-size:0.9rem; top:2px; }

/* ---------------------------------- */
/* ----- Remaining CSS (abbreviated for brevity) ----- */
/* Accessibility, Animations, Responsive, Print Styles from V3 largely applicable, adjust as needed for new classes/structure */
/* ... (Keep existing accessibility, basic animations) ... */

/* Responsive Styles (Adjusting key V4 elements) */
@media (max-width: 992px) { /* Tablet */
    .hero-section .container { flex-direction: column; text-align: center; gap: 2rem; }
    .hero-image-wrapper { margin-bottom: 1.5rem; order: -1; flex-basis: auto; }
    .hero-profile-picture { width: 200px; height: 200px; }
    .hero-content { text-align: center; }
    .timeline::after { left: 20px; margin-left: -1.5px; }
    .timeline-item { width: 100%; padding-left: 55px; padding-right: 15px; }
    .timeline-item.left::after, .timeline-item.right::after { left: 9px; }
    .timeline-item.left, .timeline-item.right { left: 0; }
}
@media (max-width: 768px) { /* Smaller Tablet / Large Phone */
    :root { --header-height: 60px; }
    h1 { font-size: 2.25rem; } h2, .section-title { font-size: 1.85rem; }
    .site-header .main-navigation { display: none; /* Implement mobile menu toggle */ }
    .theme-switch-wrapper { /* Position for mobile if nav hidden */ margin-left: auto; padding-right: 1rem; }
    .hero-profile-picture { width: 180px; height: 180px; }
    .hero-content .hero-title { font-size: 2.2rem; }
    .hero-content .hero-lead { font-size: 1.15rem; }
    .modal-dialog { max-width: 100%; height: 100%; max-height:100%; border-radius:0; border:none; }
    .modal-header-v4, .modal-body-v4 { padding: 1.25rem; }
    .modal-title-v4 { font-size: 1.3rem; }
}
@media (max-width: 480px) { /* Small Phone */
    html { font-size: 15px; }
    .hero-profile-picture { width: 150px; height: 150px; }
    .timeline-item { padding-left: 45px; }
    .timeline-item::after, .timeline-item.left::after, .timeline-item.right::after { left: 4px; width:18px; height:18px; border-width:3px; }
    .timeline-content { padding: 1.25rem; }
}

/* Print Styles (Largely same as V3, ensure new class names for modal are covered) */
@media print {
    body { background-color: var(--color-white) !important; color: var(--color-dark) !important; font-size: 10pt; line-height: 1.3; margin: 0; padding: 0; opacity: 1 !important; animation: none !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .blob-bg, .site-header, .main-content > section:not(#career-profile-for-print), /* Hide main page sections not part of profile */
    .hero-section, #journey, .quote-section, #skills.section, #contact.section,
    .site-footer, .back-to-top, .skip-link, #modal-toggle, .theme-switch-wrapper,
    .modal-header-v4 .modal-close-button, .modal-header-v4 .modal-print-button,
    .modal-quick-nav-v4 { display: none !important; visibility: hidden !important; }
    
    body > *:not(.modal-overlay), main.main-content > *:not(.modal-overlay) { display: none !important; visibility: hidden !important; }
    .modal-overlay { display: block !important; position: static !important; width: 100% !important; height: auto !important; background-color: transparent !important; box-shadow: none !important; border: none !important; padding: 0 !important; margin:0 !important; opacity: 1 !important; }
    .modal-dialog { display: block !important; position: static !important; width: 100% !important; max-width: 100% !important; height: auto !important; max-height: none !important; overflow: visible !important; box-shadow: none !important; border: none !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; transform: none !important; }
    .modal-header-v4 { border-bottom: 1px solid #666 !important; padding: 0.5cm 0 !important; margin-bottom: 0.5cm !important; }
    .modal-title-v4 { font-size: 16pt !important; text-align:center; }
    .modal-body-v4 { padding: 0 !important; overflow: visible !important; }
    .modal-body-v4 * { color: var(--color-dark) !important; background-color: transparent !important; box-shadow: none !important; border-color: #ccc !important; }
    .modal-body-v4 a { text-decoration: none !important; color: var(--color-dark) !important; }
    .dossier-company .company-name { font-size: 12pt !important; color: #000 !important;}
    .dossier-company .job-title { font-size: 11pt !important; }
    .dossier-company, .section-dossier { page-break-inside: avoid; }
    h2, h3, h4 { page-break-after: avoid; } ul, ol { page-break-before: auto; }
    @page { margin: 1.5cm; }
}

/* Skip Link */
.skip-link { position: absolute; top: -1000px; left: 0; background-color: var(--color-dark); color: var(--color-white); padding: 0.5rem 1rem; z-index: 9999; border-radius: 0 0 var(--border-radius-md) 0;}
.skip-link:focus { top: 0; text-decoration: underline; }

/* Animations */
@keyframes pageFadeIn { to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInFromRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }