/**
 * POZAR.SE - MAIN STYLESHEET
 * Built on 1ba11y (Eyebally) Design System
 * Version: 1.0.0
 */

/* ========================================
   DESIGN TOKENS & THEME VARIABLES
======================================== */

:root {
    /* Base Colors - 1-bit aesthetic (pure black and white) */
    --color-black: #000000;
    --color-white: #ffffff;

    /* Theme Variables (will be swapped for light mode) */
    --bg-primary: var(--color-black);
    --bg-secondary: var(--color-white);
    --text-primary: var(--color-white);
    --text-secondary: var(--color-black);

    /* Optional Accent Colors (for CTAs and highlights) */
    --accent-primary: #ffffff;
    --accent-hover: var(--pattern-dither-75);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 64px;

    /* Border Widths (Hierarchical) */
    --border-thin: 1px;
    --border-standard: 2px;
    --border-thick: 3px;
    --border-heavy: 4px;

    /* Typography Scale */
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-xxl: 32px;
    --font-size-xxxl: 48px;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-base: 1.5;
    --line-height-loose: 1.8;

    /* Font Families */
    --font-body: 'JetBrains Mono', 'Courier New', monospace;
    --font-heading: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 900;
    --z-modal: 1000;

    /* Dithered Patterns - Dark Mode (black base, white dots for 25/50; white base, black dots for 75) */
    --pattern-dither-25: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23000000"/><rect width="1" height="1" fill="%23ffffff" x="0" y="0"/><rect width="1" height="1" fill="%23ffffff" x="2" y="2"/></svg>');
    --pattern-dither-50: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><rect width="2" height="2" fill="%23000000"/><rect width="1" height="1" fill="%23ffffff" x="0" y="0"/><rect width="1" height="1" fill="%23ffffff" x="1" y="1"/></svg>');
    --pattern-dither-75: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23ffffff"/><rect width="1" height="1" fill="%23000000" x="1" y="1"/><rect width="1" height="1" fill="%23000000" x="3" y="3"/></svg>');

    /* Dot Pattern - Dark Mode */
    --pattern-dots: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect width="8" height="8" fill="%23000000"/><circle cx="4" cy="4" r="1" fill="%23ffffff"/></svg>');

    /* Layout */
    --max-width-content: 1200px;
    --max-width-text: 720px;
    --header-height: 60px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Light Mode Theme */
[data-theme="light"] {
    --bg-primary: var(--color-white);
    --bg-secondary: var(--color-black);
    --text-primary: var(--color-black);
    --text-secondary: var(--color-white);
    --accent-primary: #000000;

    /* Dithered Patterns - Light Mode (white base, black dots for 25/50; black base, white dots for 75) */
    --pattern-dither-25: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23ffffff"/><rect width="1" height="1" fill="%23000000" x="0" y="0"/><rect width="1" height="1" fill="%23000000" x="2" y="2"/></svg>');
    --pattern-dither-50: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><rect width="2" height="2" fill="%23ffffff"/><rect width="1" height="1" fill="%23000000" x="0" y="0"/><rect width="1" height="1" fill="%23000000" x="1" y="1"/></svg>');
    --pattern-dither-75: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23000000"/><rect width="1" height="1" fill="%23ffffff" x="1" y="1"/><rect width="1" height="1" fill="%23ffffff" x="3" y="3"/></svg>');

    /* Dot Pattern - Light Mode */
    --pattern-dots: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect width="8" height="8" fill="%23ffffff"/><circle cx="4" cy="4" r="1" fill="%23000000"/></svg>');
}

/* ========================================
   RESET & BASE STYLES
======================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Graceful degradation when fonts don't load */
body.fonts-failed {
    font-family: 'Courier New', monospace;
}

body.fonts-failed h1,
body.fonts-failed h2,
body.fonts-failed h3,
body.fonts-failed h4,
body.fonts-failed h5,
body.fonts-failed h6 {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   TYPOGRAPHY
======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
}

h1 {
    font-size: var(--font-size-xxxl);
    border-bottom: var(--border-heavy) solid var(--text-primary);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: var(--font-size-xxl);
    border-bottom: var(--border-thick) solid var(--text-primary);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--space-md);
    max-width: var(--max-width-text);
}

/* Lists */
ul, ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
    max-width: var(--max-width-text);
}

li {
    margin-bottom: var(--space-xs);
}

li:last-child {
    margin-bottom: 0;
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: background-color var(--transition-fast);
}

a:hover {
    background: var(--pattern-dither-25);
    /* Text needs shadow when on dithered background */
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

a:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

/* ========================================
   LAYOUT
======================================== */

.container {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.content {
    max-width: var(--max-width-text);
}

.section {
    padding: var(--space-xxl) 0;
    background: var(--bg-primary);
}

/* ========================================
   HEADER & NAVIGATION
======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background-color: var(--bg-primary);
    border-bottom: var(--border-thick) solid var(--text-primary);
    padding: var(--space-md) 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.site-logo {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.site-logo:hover {
    background: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-md);
    margin: 0;
}

/* Active page state (current page indicator) */
.nav-link.active {
    background: var(--pattern-dither-50);
    border: var(--border-standard) solid var(--text-primary); /* Same border as normal state */
    font-weight: 700;
    box-shadow: 2px 2px 0 var(--text-primary); /* Smaller shadow - depressed */
    transform: translate(2px, 2px); /* Depressed - moved toward shadow */
    /* Text needs shadow on dithered background */
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

/* Prevent hover effect on active nav link */
.nav-link.active:hover {
    box-shadow: 2px 2px 0 var(--text-primary);
    transform: translate(2px, 2px);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: var(--border-standard) solid var(--text-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
}

.menu-toggle:hover {
    background: var(--pattern-dither-25);
}

.menu-toggle:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 0px;
}

/* Theme & Language Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-toggle,
.lang-toggle,
.nav-link {
    background-color: transparent;
    border: var(--border-standard) solid var(--text-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    padding: var(--space-sm);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    box-shadow: 4px 4px 0 var(--text-primary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover,
.lang-toggle:hover,
.nav-link:hover {
    background: var(--pattern-dither-25);
    box-shadow: 6px 6px 0 var(--text-primary);
    transform: translate(-1px, -1px);
    /* Text needs shadow on dithered background for readability */
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

/* Click/press state for all nav buttons */
.theme-toggle:active,
.lang-toggle:active,
.nav-link:active {
    background: var(--pattern-dither-50);
    box-shadow: 2px 2px 0 var(--text-primary);
    transform: translate(2px, 2px);
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

/* Nav-link specific overrides (anchor tag properties) */
.nav-link {
    text-decoration: none; /* Remove default anchor underline */
    padding: var(--space-xs) var(--space-md); /* Slightly different padding than buttons */
}

/* SVG icons in theme toggle also need to be visible on dithered background */
.theme-toggle:hover svg {
    filter: drop-shadow(-1px -1px 0 var(--bg-primary)) drop-shadow(1px -1px 0 var(--bg-primary)) drop-shadow(-1px 1px 0 var(--bg-primary)) drop-shadow(1px 1px 0 var(--bg-primary));
}

.theme-toggle:active svg {
    filter: drop-shadow(-1px -1px 0 var(--bg-primary)) drop-shadow(1px -1px 0 var(--bg-primary)) drop-shadow(-1px 1px 0 var(--bg-primary)) drop-shadow(1px 1px 0 var(--bg-primary));
}

.theme-toggle:focus,
.lang-toggle:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Theme toggle - circular button with SVG icon */
.theme-toggle {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text-primary) !important;
}

.theme-toggle svg * {
    fill: var(--text-primary) !important;
}

/* ========================================
   BUTTONS
======================================== */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    padding: var(--space-sm) var(--space-lg);
    border: var(--border-thick) solid var(--text-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 44px;
    min-height: 44px;
    box-shadow: 4px 4px 0 var(--text-primary);
    position: relative;
}

.btn:hover {
    background: var(--pattern-dither-25);
    box-shadow: 6px 6px 0 var(--text-primary);
    transform: translate(-1px, -1px);
}

.btn:active {
    box-shadow: 2px 2px 0 var(--text-primary);
    transform: translate(2px, 2px);
}

/* Button icons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-icon-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Mail icon uses stroke */
.btn-icon-svg path[stroke-width] {
    stroke: currentColor !important;
    fill: none !important;
}

/* Phone icon uses fill */
.btn-icon-svg path[fill-rule] {
    fill: currentColor !important;
}

.btn-icon-svg path:not([stroke-width]):not([fill-rule]) {
    fill: currentColor !important;
}

.btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

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

.btn-primary:hover {
    background: var(--pattern-dither-75);
    /* Text needs shadow when on dithered background */
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

/* ========================================
   HERO SECTION
======================================== */

.hero {
    padding: var(--space-xxxl) 0;
    background: var(--bg-primary);
}

.hero h1 {
    font-size: clamp(var(--font-size-xxl), 5vw, var(--font-size-xxxl));
    margin-bottom: var(--space-md);
    border-bottom: none;
}

.hero p {
    font-size: var(--font-size-lg);
    max-width: var(--max-width-text);
}

/* ========================================
   TESTIMONIALS
======================================== */

.testimonial-quote,
blockquote p {
    font-style: italic;
    margin: 0 0 var(--space-md) 0;
}

.testimonial-source,
blockquote footer {
    font-style: normal;
    font-weight: normal;
}

blockquote {
    margin: 0;
}

blockquote strong {
    font-weight: 700;
}

/* Testimonial Carousel */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
    margin-top: var(--space-xl);
    padding-right: var(--space-md);
}

.testimonial-track {
    display: flex;
    gap: var(--space-lg);
    transition: transform 0.4s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-track {
        transition: none;
    }
}

.testimonial-item {
    flex: 0 0 calc(33.333% - (var(--space-lg) * 2 / 3));
    min-width: 280px;
}

/* Mobile: Use scroll-snap for perfect alignment */
@media (max-width: 767px) {
    .testimonial-carousel {
        overflow-x: scroll;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding-right: 0;
    }

    .testimonial-carousel::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .testimonial-track {
        transition: none; /* Disable transform transition on mobile */
    }

    .testimonial-item {
        flex: 0 0 100%;
        scroll-snap-align: start;
    }

    /* Keep carousel controls visible and centered on mobile */
    .carousel-controls {
        position: sticky;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        z-index: 10;
        flex-shrink: 0;
        width: 100%;
    }
}

.testimonial-item blockquote {
    border: var(--border-thick) solid var(--text-primary);
    padding: var(--space-lg);
    background: var(--bg-primary);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-item blockquote p {
    flex: 1;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-md);
}

.testimonial-item blockquote footer {
    font-size: var(--font-size-sm);
    border-top: var(--border-thin) solid var(--text-primary);
    padding-top: var(--space-sm);
}

/* Carousel Navigation */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
    padding-bottom: 6px;
}

.carousel-prev,
.carousel-next {
    background: var(--bg-primary);
    border: var(--border-standard) solid var(--text-primary);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--text-primary);
    transition: all 0.2s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--pattern-dither-25);
    box-shadow: 6px 6px 0 var(--text-primary);
    transform: translate(-1px, -1px);
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

.carousel-prev:active,
.carousel-next:active {
    box-shadow: 2px 2px 0 var(--text-primary);
    transform: translate(2px, 2px);
}

/* Screen reader only */
.carousel-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   PROJECT CARDS
======================================== */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.project-card {
    border: var(--border-thick) solid var(--text-primary);
    padding: 0;
    text-decoration: none;
    display: block;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.project-card-image {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: var(--border-standard) solid var(--text-primary);
}

.project-card-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background-color: var(--bg-primary);
}

.project-card h3 {
    font-size: var(--font-size-xl);
    margin: 0 0 var(--space-xs) 0;
}

.project-card h4 {
    font-size: var(--font-size-lg);
    font-weight: 400;
    text-transform: none;
    margin: 0 0 var(--space-sm) 0;
}

.project-card p {
    font-size: var(--font-size-base);
    margin: 0 0 var(--space-sm) 0;
}

.project-meta {
    font-size: var(--font-size-base);
    opacity: 0.9;
    margin-bottom: var(--space-md);
}

.project-meta strong {
    display: inline-block;
    min-width: 100px;
}

/* Featured projects - span 2 columns, same border as others */
.project-card.featured {
    grid-column: span 2;
}

/* Featured projects with horizontal layout on desktop */
@media (min-width: 769px) {
    .project-card.featured {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .project-card.featured .project-card-image {
        border-bottom: none;
        border-right: var(--border-standard) solid var(--text-primary);
        height: 100%;
        object-fit: cover;
    }

    .project-card.featured .project-card-content {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* Secondary projects section */
.secondary-projects {
    margin-top: var(--space-xxxl);
}

.secondary-projects .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ========================================
   PROJECT PAGE IMAGES
======================================== */

/* Prevent images from overflowing viewport */
main img {
    max-width: 100%;
    height: auto;
}

/* Ensure inline grid layouts are responsive */
.project-section [style*="grid-template-columns"],
.content [style*="grid-template-columns"] {
    width: 100%;
}

@media (max-width: 768px) {
    /* Stack grid columns on mobile */
    .project-section [style*="grid-template-columns: repeat(4"],
    .content [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .project-section [style*="grid-template-columns: repeat(3"],
    .content [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========================================
   FOOTER
======================================== */

.site-footer {
    border-top: var(--border-thick) solid var(--text-primary);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xxxl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.social-links,
.contact-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.contact-links {
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-contact,
.footer-social,
.footer-info {
    flex: 1 1 200px;
}

/* ========================================
   UTILITY CLASSES
======================================== */

/* Testimonials section background */
.testimonials-section {
    background: var(--bg-primary);
}

.no-text-shadow {
    text-shadow: none !important;
}

/* Project list styles */
.project-list {
    list-style: none;
    padding: 0;
}

.project-list-item {
    margin-bottom: var(--space-md);
    padding-left: var(--space-md);
    border-left: var(--border-thick) solid var(--text-primary);
}

/* CTA Section */
.cta-section {
    margin-top: var(--space-xxl);
    padding-top: var(--space-xxl);
    border-top: var(--border-standard) solid var(--text-primary);
}

.cta-subtitle {
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.subtitle-lg {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xl);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    :root {
        --font-size-xxxl: 32px;
        --font-size-xxl: 24px;
        --font-size-xl: 20px;
    }

    .site-header .container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: calc(var(--space-xl) * 1.5);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-list {
        flex-direction: row;
        gap: var(--space-md);
    }

    .nav-link {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-base);
        min-height: 44px;
        min-width: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-controls {
        gap: var(--space-md);
    }

    .project-card.featured {
        grid-column: span 1;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-md);
    background: var(--bg-primary);
    border: var(--border-thick) solid var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
}

.skip-link:focus {
    top: var(--space-sm);
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-standard: 3px;
        --border-thick: 4px;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .theme-toggle,
    .lang-toggle,
    .menu-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}

/* ========================================
   TEXT ON PATTERNS - CRITICAL FOR READABILITY
======================================== */

/* Text on dithered backgrounds MUST have contrasting text-shadow */
.text-on-pattern,
.project-card:has([style*="background: var(--pattern-dither"]) {
    text-shadow: -1px -1px 0 var(--bg-primary), 1px -1px 0 var(--bg-primary), -1px 1px 0 var(--bg-primary), 1px 1px 0 var(--bg-primary);
}

