:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --transition: all 0.3s ease;
}

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

html {
    overflow-x: hidden;
    max-width: 100vw;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    max-width: 100vw;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    max-width: calc(100vw - 40px);
}

.lang-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: #999;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.3);
}

.lang-link:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    opacity: 1;
}

.lang-link:hover .flag-icon {
    filter: none;
    opacity: 1;
}

.lang-link.active {
    background: var(--primary-color);
    color: white;
    opacity: 1;
}

.lang-link.active .flag-icon {
    filter: none;
    opacity: 1;
}

.flag-icon {
    width: 18px;
    height: auto;
    border-radius: 2px;
    transition: var(--transition);
    filter: grayscale(80%);
    opacity: 0.7;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 1.2rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* Profile Image */
.profile-image-container {
    position: relative;
    z-index: 1;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Section Styling */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Services Section */
.services-section {
    background: white;
}

.service-block {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.service-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-block.bg-light {
    background: var(--bg-light);
}

.service-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
    word-break: keep-all;
    hyphens: none;
}

.service-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.service-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 0.5rem 0;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(39, 174, 96, 0.05);
    transition: var(--transition);
}

.service-list li:hover {
    background: rgba(39, 174, 96, 0.1);
    transform: translateX(5px);
}

.service-visual {
    padding: 2rem;
}

/* Philosophy Section */
.philosophy-section {
    margin-top: 4rem;
}

.philosophy-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.philosophy-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 20v-8h-4v8h-8v4h8v8h4v-8h8v-4h-8z'/%3E%3C/g%3E%3C/svg%3E");
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.philosophy-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.philosophy-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.philosophy-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.philosophy-highlight {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* Experience Timeline */
.experience-section {
    background: var(--bg-light);
}

.timeline {
    position: relative;
    padding: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--secondary-color);
}

.timeline-item {
    position: relative;
    margin: 50px 0;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    width: 45%;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.experience-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.experience-company {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.experience-duration {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

.experience-details {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

.experience-details ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.experience-details li {
    margin-bottom: 0.5rem;
}

/* Skills Section */
.skills-section {
    background: var(--bg-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.skill-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.skill-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-card p {
    color: #666;
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    background: var(--primary-color);
    color: white;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background: white;
}

.contact-info {
    font-size: 1.2rem;
    text-align: center;
}

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

.contact-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 12px 30px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.contact-button:hover {
    background: #2ecc71;
    transform: scale(1.05);
    color: white;
    text-decoration: none;
}

/* Responsive */
/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .hero {
        padding: 60px 0;
        min-height: auto;
        height: auto;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 100px);
        margin-left: 80px !important;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-block {
        padding: 2rem;
    }
    
    .service-title {
        font-size: 1.5rem;
    }
    
    .philosophy-box {
        padding: 2rem;
    }
    
    .philosophy-title {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Section Mobile Fix */
    .contact-section {
        padding: 60px 0;
        min-height: auto;
    }
    
    .contact-info {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .contact-info p {
        margin-bottom: 1rem;
        line-height: 1.6;
    }
    
    .contact-button {
        padding: 15px 25px;
        font-size: 1rem;
        margin-top: 1.5rem;
        display: block;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .language-switcher {
        top: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .lang-link {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .flag-icon {
        width: 16px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-block {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .service-title {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }
    
    .philosophy-box {
        padding: 1.5rem;
    }
    
    .contact-info {
        font-size: 1rem;
    }
    
    .contact-button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}



/* Impressum Styles */
.impressum-section {
    background: var(--bg-light);
}

.impressum-content {
    text-align: left;
}

.impressum-block {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.impressum-block h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.impressum-block h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.impressum-block p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.impressum-block p:first-of-type {
    margin-top: 0;
}

@media (max-width: 768px) {
    .impressum-block {
        padding: 2rem;
    }
    
    .impressum-block h3 {
        font-size: 1.3rem;
    }
    
    .impressum-block h4 {
        font-size: 1.1rem;
    }
}

/* CV Download Styles */
.cv-download-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.cv-download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 25px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.cv-download-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.cv-download-contact {
    margin: 1.5rem 0;
    text-align: center;
}

.cv-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.cv-link:hover {
    opacity: 1;
    color: var(--accent-color);
    text-decoration: none;
}