/* Reset and Base Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --bg-color: #ffffff;
    --surface-color: #f8fafc;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

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

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 8px 16px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    z-index: 1000;
    border-radius: 4px;
    font-weight: bold;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000FF;
        --text-color: #000000;
        --border-color: #000000;
        --bg-color: #FFFFFF;
    }
}

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

/* Focus indicators */
*:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

a:focus,
button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--bg-color) 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.company-logo {
    max-width: 200px;
    max-height: 120px;
    width: auto;
    height: auto;
    margin-bottom: 24px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    background-color: white;
    padding: 12px;
    border: 2px solid var(--border-color);
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

/* Section Styles */
section {
    padding: 80px 0;
    background-color: var(--bg-color);
    margin: 0;
}

section:nth-child(even) {
    background-color: var(--surface-color);
}

/* Typography */
h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.7;
}

header p {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Content Components */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Skills subtitle */
.skills-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    list-style: none;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.skill-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.skill-tag:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.skill-tag:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.skill-tag:active {
    transform: translateY(0);
}

.kontakt-info {
    text-align: center;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    font-style: normal;
}

.kontakt-info p {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    text-decoration: underline;
    border-radius: 4px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-content {
    position: relative;
    padding: 0;
    overflow-y: auto;
    max-height: 80vh;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.modal-close:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.modal-body {
    padding: 40px 32px 32px;
}

.modal-body h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-body ul {
    margin: 16px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body .highlight {
    background-color: rgba(37, 99, 235, 0.1);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
}

/* Footer styles */
footer {
    background-color: var(--surface-color);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

footer small {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    header {
        padding: 40px 0;
    }

    section {
        padding: 60px 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }

    .company-logo {
        max-width: 160px;
        max-height: 100px;
    }

    .skills,
    .skills-list {
        gap: 12px;
    }

    .skill-tag {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .kontakt-info p {
        flex-direction: column;
        gap: 8px;
    }

    /* Modal Responsive Styles */
    .modal-container {
        width: 95%;
        margin: 20px;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 32px 24px 24px;
    }
    
    .modal-body h3 {
        font-size: 1.5rem;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 32px 0;
    }

    section {
        padding: 48px 0;
    }

    h1 {
        font-size: 1.9rem;
    }

    h2 {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    .company-logo {
        max-width: 140px;
        max-height: 80px;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    p {
        font-size: 1rem;
    }

    .kontakt-info {
        font-size: 1rem;
    }

    .modal-container {
        width: 98%;
        margin: 10px;
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 28px 20px 20px;
    }
    
    .modal-body h3 {
        font-size: 1.3rem;
    }
}

/* Animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-container {
        transition: none !important;
    }
    
    .modal-overlay.active .modal-container {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    header, footer {
        border: none;
    }
    
    .sr-only {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
    }
    
    .modal-overlay {
        display: none !important;
    }
}