/* CSS Variables voor Light/Dark Mode */
:root {
    /* Light mode colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --bg-hero: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --bg-cta: linear-gradient(90deg, #2563eb, #4f46e5);
    --bg-footer: #1f2937;

    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #666666;
    --text-light: #f8f9fa;
    --text-footer: #e2e8f0;
    --text-footer-muted: #cbd5e1;

    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-secondary: #4f46e5;

    --border-color: #e5e7eb;
    --border-dark: #2d3748;

    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);

    /* Terminal colors */
    --terminal-bg: #1a1a1a;
    --terminal-text: #00ff00;
    --terminal-prompt: #ffffff;
    --terminal-header: #2d2d2d;
    --terminal-border: #404040;
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --bg-hero: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --bg-cta: linear-gradient(90deg, #3b82f6, #6366f1);
    --bg-footer: #0a0a0a;

    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #cccccc;
    --text-light: #ffffff;
    --text-footer: #cbd5e1;
    --text-footer-muted: #94a3b8;

    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-secondary: #6366f1;

    --border-color: #404040;
    --border-dark: #525252;

    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.5);

    /* Terminal colors for dark mode */
    --terminal-bg: #0a0a0a;
    --terminal-text: #00ff41;
    --terminal-prompt: #ffffff;
    --terminal-header: #1a1a1a;
    --terminal-border: #333333;
}

/* Typography Scale & Variables */
:root {
    /* Typography scale based on perfect fourth (1.333) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */

    /* Line heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter spacing */
    --tracking-tighter: -0.025em;
    --tracking-tight: -0.01em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* Professional text rendering */
    --font-rendering: optimizeLegibility;
}

/* Reset en basis stijlen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improved heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 1.25rem;
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
    line-height: 1.1;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tighter);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

h4 {
    font-size: var(--text-xl);
    font-weight: 600;
}

h5 {
    font-size: var(--text-lg);
    font-weight: 600;
}

h6 {
    font-size: var(--text-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* Improved paragraph and text styling */
p {
    margin-bottom: 1.5rem;
    line-height: var(--leading-relaxed);
    font-weight: 400;
    text-rendering: var(--font-rendering);
}

/* Enhanced readability for longer text blocks */
.about-text p,
.timeline-content p,
.service-info p {
    max-width: 65ch; /* Optimal reading width */
    text-rendering: optimizeLegibility;
}

.text-large {
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
}

.text-small {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.tracking-wide {
    letter-spacing: var(--tracking-wide);
}

/* Improve text contrast and readability */
.hero p {
    text-rendering: optimizeLegibility;
}

/* Professional quote styling for testimonials or highlights */
blockquote {
    font-style: italic;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: 4px solid var(--accent-primary);
    color: var(--text-secondary);
}

/* Refined link styling */
a {
    text-decoration: none;
    color: var(--accent-primary);
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--accent-primary-hover);
}

/* Better inline code styling */
code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
    background-color: var(--bg-tertiary);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-weight: 500;
}

/* Links styled in the enhanced section above */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--accent-primary-hover);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary-hover);
}

/* Header stijlen */
header {
    padding: 20px 0;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 10px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    padding: 12px 0;
    box-shadow: 0 5px 15px var(--shadow-medium);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* Header actions container for buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

/* Hamburger menu voor mobiel - initially hidden on desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1002;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu overlay - ONLY FOR MOBILE! */
.mobile-menu-overlay {
    display: none; /* Hidden by default */
}

/* Only show overlay on mobile screens */
@media (max-width: 768px) {
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 9998; /* LOWER than nav */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none; /* Disable when hidden */
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto; /* Enable when visible */
    }
}

/* BULLETPROOF DESKTOP OVERLAY PROTECTION - NOTHING can override this */
@media (min-width: 769px) {
    .mobile-menu-overlay,
    .mobile-menu-overlay.active,
    .mobile-menu-overlay[style] {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
        z-index: -9999 !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        box-shadow: none !important;
    }

    /* Extra protection against any inline styles */
    body > .mobile-menu-overlay,
    #mobileMenuOverlay {
        display: none !important;
    }
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
    position: relative;
    text-transform: uppercase;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

/* Mobile dark mode container removed - we use the header button only */

/* Dark Mode Toggle - SIMPEL EN CLEAN */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.dark-mode-toggle:hover {
    background: var(--bg-tertiary);
}

.dark-mode-toggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.dark-mode-toggle .sun-icon,
.dark-mode-toggle .moon-icon {
    display: block;
    width: 20px;
    height: 20px;
    position: relative;
}

/* Moon icon - crescent shape */
.moon-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: inset -5px -2px 0 0 var(--text-primary);
}

/* Always show moon, hide sun */
.sun-icon {
    display: none !important;
}

.moon-icon {
    display: block !important;
    width: 20px;
    height: 20px;
    position: relative;
}

/* Hero sectie */
.hero {
    padding: 100px 0;
    background: var(--bg-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(79, 70, 229, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero:hover::before {
    opacity: 1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 580px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.highlight {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Terminal Styling */
.hero-terminal {
    background-color: var(--terminal-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-heavy);
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    min-height: 240px;
}

.terminal-header {
    background-color: var(--terminal-header);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--terminal-border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background-color: #ff5f57;
}

.terminal-dot.yellow {
    background-color: #ffbd2e;
}

.terminal-dot.green {
    background-color: #28ca42;
}

.terminal-title {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    color: var(--terminal-prompt);
    opacity: 0.8;
    font-weight: 500;
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    min-height: 160px;
    font-weight: 500;
}

.terminal-line {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    min-height: 24px;
}

.terminal-prompt {
    color: var(--terminal-prompt);
    margin-right: 8px;
}

.terminal-text {
    color: var(--terminal-text);
    font-weight: 500;
}

.terminal-cursor {
    color: var(--terminal-text);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Services sectie */
.services {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.services h2 {
    text-align: center;
    margin-bottom: 3.5rem;
    font-size: var(--text-4xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 32px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-medium);
    background-color: var(--bg-secondary);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    background-color: var(--accent-primary);
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: var(--accent-primary-hover);
    transform: translateY(-2px) scale(1.05);
}

.service-icon::before {
    content: '';
    position: absolute;
    background-color: white;
}

.service-icon-dev::before {
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-radius: 2px;
}

.service-icon-dev::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 1px;
}

.service-icon-consult::before {
    width: 14px;
    height: 14px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-radius: 50%;
}

.service-icon-consult::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.service-icon-solution::before {
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-radius: 50%;
}

.service-icon-solution::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.service-card h3 {
    font-size: var(--text-xl);
    margin-bottom: 1rem;
    line-height: var(--leading-snug);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

.service-card p {
    margin-bottom: 0;
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

/* About preview sectie */
.about-preview {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.about-preview .container {
    max-width: 800px;
    text-align: center;
}

.about-preview p {
    margin-bottom: 2rem;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA sectie */
.cta {
    padding: 80px 0;
    background: var(--bg-cta);
    color: white;
    text-align: center;
}

.cta h2 {
    margin-bottom: 1rem;
    color: white !important;
}

.cta p {
    margin-bottom: 2rem;
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    opacity: 0.95;
}

.cta .btn {
    background-color: white;
    color: var(--accent-primary);
}

.cta .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--accent-primary-hover);
}

/* Footer stijlen */
footer {
    background-color: var(--bg-footer);
    color: var(--text-light);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo-img {
    height: 35px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(1.2);
}

.footer-logo p {
    color: var(--text-footer);
    font-weight: 400;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav ul li {
    margin-bottom: 10px;
}

.footer-nav h3,
.footer-contact h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-nav ul li a,
.footer-contact p {
    color: var(--text-footer);
    transition: color 0.3s ease;
    font-weight: 400;
}

.footer-nav ul li a:hover {
    color: var(--text-light);
}

.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding-top: 20px;
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-footer-muted);
    letter-spacing: var(--tracking-wide);
}

/* Page Header */
.page-header {
    padding: 60px 0;
    background: var(--bg-hero);
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.25rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
}

.page-header p {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: var(--tracking-normal);
}

/* Diensten pagina */
.services-detailed {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: center;
}

.service-item.reversed {
    direction: rtl;
}

.service-item.reversed .service-info,
.service-item.reversed .service-image {
    direction: ltr;
}

.service-info h2 {
    margin-bottom: 1.2rem;
}

.service-info p {
    margin-bottom: 1.5rem;
}

.service-info ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-info ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-info ul li:before {
    content: '✓';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    top: 0;
}

.service-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-illustration {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.service-illustration:hover {
    transform: translateY(-5px);
}

.code-block {
    background-color: var(--terminal-bg);
    color: var(--text-light);
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    overflow-x: auto;
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.code-block pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 500;
}

.portfolio {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.portfolio h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-item {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-img {
    height: 160px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.portfolio-logo {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h3 {
    margin-bottom: 0.5rem;
}

/* Over mij pagina */
.about-me {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    margin-bottom: 60px;
    align-items: start;
}

.about-image {
    width: 100%;
}

.profile-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f8f9fa;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-icon {
    font-size: 6rem;
}

.profile-photo {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.skills-section {
    margin-bottom: 60px;
}

.skills-section h2 {
    margin-bottom: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--bg-primary);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.skill-category h3 {
    margin-bottom: 1.2rem;
    font-size: var(--text-lg);
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

.skills-list {
    list-style: none;
}

.skills-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.skills-list li:before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    top: 0;
}

.timeline-section h2 {
    margin-bottom: 2rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    left: 13px;
    top: 6px;
    z-index: 1;
}

.timeline-content {
    margin-left: 45px;
    padding: 25px;
    background-color: var(--bg-primary);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.timeline-content h3 {
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

.timeline-content h4 {
    font-size: var(--text-base);
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-content p {
    margin-bottom: 0.5rem;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

/* Contact pagina */
.contact-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-details {
    margin-top: 2.5rem;
}

.contact-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 32px;
    height: 32px;
    margin-right: 1rem;
    background-color: var(--accent-primary);
    border-radius: 6px;
    position: relative;
}

.contact-icon::before,
.contact-icon::after {
    content: '';
    position: absolute;
    background-color: white;
}

.contact-icon-email::before {
    width: 18px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-radius: 2px;
}

.contact-icon-email::after {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 6px solid white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.contact-icon-phone::before {
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(135deg);
    border: 2px solid white;
    border-radius: 50% 50% 0 50%;
}

.contact-text h3 {
    margin-bottom: 0.5rem;
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

.contact-social {
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-light);
    text-align: center;
}

.contact-social h2 {
    margin-bottom: 1rem;
}

.contact-social p {
    margin-bottom: 2rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.social-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 150px;
}

.social-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.social-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.social-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    background-color: var(--accent-primary);
    border-radius: 8px;
    position: relative;
}

.social-icon::before,
.social-icon::after {
    content: '';
    position: absolute;
    background-color: white;
}

.social-icon-linkedin::before {
    width: 3px;
    height: 12px;
    top: 45%;
    left: 35%;
    transform: translate(-50%, -50%);
}

.social-icon-linkedin::after {
    width: 12px;
    height: 12px;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border: 3px solid white;
    border-radius: 2px;
}

.social-icon-github::before {
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-radius: 50%;
}

.social-icon-github::after {
    width: 8px;
    height: 8px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 50%;
}

.social-button span {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    letter-spacing: var(--tracking-wide);
}

.contact-note {
    font-style: italic;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* FAQ sectie */
.faq-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.faq-item {
    background-color: var(--bg-secondary);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.faq-item h3 {
    margin-bottom: 0.8rem;
    font-size: var(--text-lg);
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

/* Responsive styles */
@media (max-width: 992px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-terminal {
        max-width: 100%;
        margin: 0 auto;
    }

    .service-item,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto 40px;
    }

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

    .portfolio-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile navigation - FIXED HEADER LAYOUT */
    header .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0;
    }

    .logo {
        flex: 0 0 auto;
        order: 1;
    }

    /* Header actions container - group buttons together */
    .header-actions {
        display: flex !important;
        align-items: center;
        gap: 12px;
        flex: 0 0 auto;
        order: 2;
        position: relative;
        z-index: 1002; /* Above overlay but below open menu */
    }

    .dark-mode-toggle {
        display: inline-flex !important;
        width: 40px !important;
        height: 40px !important;
        flex: 0 0 auto;
        margin: 0;
        position: relative;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
        width: 40px !important;
        height: 40px !important;
        flex: 0 0 auto;
        margin: 0;
        position: relative;
    }

    nav {
        order: 3; /* Move nav after buttons to avoid layout issues */
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 340px;
        height: 100vh;
        background-color: var(--bg-secondary);
        box-shadow: -10px 0 30px var(--shadow-heavy);
        transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 999999; /* Extremely high z-index for menu */
        padding-top: 80px;
        flex: none;
        display: flex;
        flex-direction: column;
        border-left: 2px solid var(--border-color);
        overflow-y: auto;  /* Allow scrolling if needed */
        overflow-x: hidden;
        isolation: isolate; /* Create stacking context */
        pointer-events: auto; /* Ensure nav itself is clickable */
    }

    /* Remove ALL pseudo elements that might block clicks */
    nav::before,
    nav::after {
        display: none !important;
        pointer-events: none !important;
    }

    #navigation.mobile-menu-open {
        right: 0 !important;
        display: flex !important;
        visibility: visible !important;
    }

    /* Extra fallback */
    .mobile-menu-open {
        right: 0 !important;
    }

    nav ul {
        flex-direction: column;
        padding: 40px 30px;
        gap: 0;
        flex: 1;
        margin: 0;
        list-style: none;
        pointer-events: auto !important;
        position: relative;
        z-index: 99999 !important;
        isolation: isolate; /* Create stacking context */
        transform: translateZ(0); /* Force hardware acceleration */
    }

    nav ul li {
        width: 100%;
        padding: 0;
        margin: 0;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        z-index: 99999 !important;
        pointer-events: auto !important;
        isolation: isolate; /* Create stacking context */
        transform: translateZ(0); /* Force hardware acceleration and proper layering */
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    /* Mobile menu links - MUST BE CLICKABLE */
    nav ul li a {
        display: block !important;
        font-size: var(--text-lg);
        padding: 24px 10px !important;  /* Added horizontal padding */
        color: var(--text-primary);
        transition: all 0.3s ease;
        position: relative !important;
        font-weight: 500;
        text-transform: none;
        letter-spacing: var(--tracking-normal);
        z-index: 999999 !important;  /* Even higher z-index */
        pointer-events: auto !important;
        cursor: pointer !important;
        text-decoration: none;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        isolation: isolate; /* Create new stacking context */
    }

    /* Remove ANY blocking pseudo elements or overlays */
    nav ul li a::before,
    nav ul li a::after,
    nav ul li::before,
    nav ul li::after,
    nav ul::before,
    nav ul::after {
        display: none !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }

    nav ul li a:hover {
        color: var(--accent-primary);
        padding-left: 12px;
        background-color: rgba(37, 99, 235, 0.05);
    }

    nav ul li a.active {
        color: var(--accent-primary);
        font-weight: 600;
        background-color: rgba(37, 99, 235, 0.1);
    }

    nav ul li a:after {
        display: none;
    }

    .hero h2 {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    /* Improve mobile typography */
    .services h2,
    .about-preview h2,
    .cta h2 {
        font-size: var(--text-3xl);
    }

    .about-preview p {
        font-size: var(--text-base);
    }
    
    
    .page-header h1 {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    .page-header p {
        font-size: var(--text-lg);
    }
}

@media (max-width: 576px) {
    /* Container adjustments */
    .container {
        width: 100%;
        padding: 0 20px;
        margin: 0 auto;
    }

    /* Header for mobile */
    header {
        padding: 12px 0;
        background-color: var(--bg-secondary);
    }

    header .container {
        padding: 0 15px;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo-img {
        height: 32px;
    }

    /* Header actions container for small screens */
    .header-actions {
        display: flex !important;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
    }

    /* Force buttons on same line */
    .dark-mode-toggle,
    .mobile-menu-toggle {
        width: 36px !important;
        height: 36px !important;
        padding: 6px;
        display: inline-flex !important;
        flex: 0 0 auto !important;
        position: relative !important;
        margin: 0 !important;
    }

    /* Hero section mobile optimization */
    .hero {
        padding: 40px 0;
        text-align: left;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-content {
        padding: 0;
    }

    .hero h2 {
        font-size: 1.75rem;
        line-height: 1.25;
        margin-bottom: 1rem;
        font-weight: 700;
    }

    .hero h2 .highlight {
        display: block;
        margin-top: 0.25rem;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        color: var(--text-secondary);
    }

    .hero-terminal {
        display: none;
    }

    /* Services section */
    .services {
        padding: 40px 0;
    }

    .services h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 20px;
        text-align: left;
    }

    .service-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 15px;
    }

    .service-card h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* About preview section */
    .about-preview {
        padding: 40px 0;
        text-align: left;
    }

    .about-preview h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .about-preview p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }

    /* CTA section */
    .cta {
        padding: 40px 0;
        text-align: center;
    }

    .cta h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .cta p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 0.875rem;
        width: 100%;
        text-align: center;
        display: block;
        letter-spacing: 0.05em;
    }

    .btn-secondary {
        margin-top: 1rem;
    }

    /* Footer responsive */
    footer {
        padding: 40px 0 20px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 15px;
    }

    .footer-logo-img {
        height: 32px;
    }

    .footer-nav h3,
    .footer-contact h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .footer-nav ul {
        padding: 0;
    }

    .footer-nav ul li {
        margin: 8px 0;
    }

    .footer-contact p {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .footer-bottom {
        padding-top: 20px;
        font-size: 0.75rem;
    }

    /* Additional pages styling */
    .services-detailed,
    .about-me,
    .contact-section,
    .faq-section {
        padding: 40px 0;
    }

    /* Global typography for mobile */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Hide terminal on all mobile devices */
    .terminal-body {
        display: none;
    }
}
