/* 
* DNP Systems - Main Stylesheet
* Responsive, clean design for freelancer website
*/

/* Base styles and variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --text-color: #333;
    --light-text-color: #666;
    --bg-color: #fff;
    --light-bg-color: #f8f9fa;
    --dark-bg-color: #2c3e50;
    --border-color: #e1e1e1;
    --success-color: #27ae60;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0,220,220, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    height: 80px; /* Feste Header-Höhe */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%; /* Nutzt die volle Header-Höhe */
    padding: 0 30px; /* Symmetrische Abstände links und rechts */
}

.logo {
    display: flex;
    align-items: left;
    flex-shrink: 0; /* Verhindert Verkleinerung */
}

.logo img {
    width: 180px; /* Deutlich größeres Logo */
    height: auto;
    object-fit: contain; /* Behält Proportionen bei */
    {{/* max-height: 60px; /* Etwas höher für das größere Logo */ */}}
}

.header-name {
    text-align: center;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center; /* Name exakt in der Mitte */
}

.header-name h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--dark-bg-color);
    font-weight: 600;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    justify-self: end; /* Navigation am rechten Rand */
}

nav ul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    list-style: none;
    margin: 0;
    padding: 80px 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow-y: auto;
    gap: 0.5rem;
    display: flex;
}

nav ul li {
    margin: 0.3rem 0;
    flex-shrink: 0;
}

nav ul li a {
    color: var(--dark-bg-color);
    font-weight: 500;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
    display: block;
    text-align: center;
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
}

/* Sprachauswahl im Menü */
.language-toggle-item {
    margin: 0.3rem 0;
}

.language-toggle-btn {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 50px;
}

.language-toggle-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--dark-bg-color);
    height: 3px;
    width: 25px;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before {
    top: -8px;
}

.nav-toggle-label span::after {
    bottom: -8px;
}

/* Mobile Menu Animation */
.nav-toggle:checked ~ .nav-toggle-label span {
    background: transparent;
}

.nav-toggle:checked ~ .nav-toggle-label span::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle:checked ~ .nav-toggle-label span::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Menu öffnen/schließen */
.nav-toggle:checked ~ ul {
    transform: translateX(0);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,100, 100, 0.6), rgba(0, 220,220, .3));
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Hintergrundbilder für die Animation - alle 6 Bilder */
.hero .background-cloud {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-image: url('../img/background-cloud.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    animation: backgroundFade 60s infinite;
    animation-delay: 0s;
}

.hero .background-cloud-2 {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-image: url('../img/background-cloud-2.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    animation: backgroundFade 60s infinite;
    animation-delay: 10s;
}

.hero .background-ai {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-image: url('../img/background-ai.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    animation: backgroundFade 60s infinite;
    animation-delay: 20s;
}

.hero .background-cicd {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-image: url('../img/background-cicd.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    animation: backgroundFade 60s infinite;
    animation-delay: 30s;
}

.hero .background-k8s {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-image: url('../img/background-k8s.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    animation: backgroundFade 60s infinite;
    animation-delay: 40s;
}

.hero .background-arch {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-image: url('../img/background-arch.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    animation: backgroundFade 60s infinite;
    animation-delay: 50s;
}

/* Entfernte die alten ::before und ::after Pseudo-Elemente */

@keyframes backgroundFade {
    0% {
        opacity: 0;
    }
    8.33% {
        opacity: 0.3; /* Fade in */
    }
    16.66% {
        opacity: 0.3; /* Stay visible */
    }
    25% {
        opacity: 0; /* Fade out */
    }
    100% {
        opacity: 0; /* Stay hidden until next cycle */
    }
}

.hero-content {
    max-width: 800px;
    font: 400 1.2rem 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    color: black;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Services Section */
.services {
    background-color: var(--light-bg-color);
}

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

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.skill-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9rem;
}

/* Experience Section */
.experience {
    background-color: var(--light-bg-color);
    overflow: hidden; /* Verhindert Überlappungen durch floats */
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flow-root; /* Moderne clearfix-Alternative */
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

/* Clearfix für Timeline, um Überlappungen zu vermeiden */
.timeline::before {
    content: "";
    display: table;
    clear: both;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    clear: both;
    margin-bottom: 20px;
}

.timeline-item:nth-child(even) {
    float: right;
}

.timeline-item:nth-child(odd) {
    float: left;
    text-align: right;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
    margin-top: 15px;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
    margin-top: 15px;
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

/* Education Section */
.education {
    padding: 80px 0;
    clear: both; /* Stellt sicher, dass Education nach Experience startet */
    position: relative;
}

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

.education-item {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.education-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.education-item ul {
    list-style-type: none;
    padding: 0;
}

.education-item li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.education-item li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Portfolio Section */
.portfolio {
    background-color: var(--light-bg-color);
}

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

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

/* Portfolio touch interactions */
.portfolio-item.overlay-active .portfolio-overlay {
    opacity: 1 !important;
}

.portfolio-item {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    user-select: none; /* Prevent text selection */
}

/* Smooth transition for overlays */
.portfolio-overlay {
    transition: opacity 0.3s ease;
}

/* Touch device specific styles */
@media (hover: none) and (pointer: coarse) {
    .portfolio-item:hover .portfolio-overlay {
        opacity: 0; /* Disable hover on touch devices */
    }
    
    .portfolio-item:hover img {
        transform: none; /* Disable hover transform on touch devices */
    }
}

.placeholder-image {
    background-color: #ddd;
    min-height: 100%;
}

/* Contact Section */
.contact-content {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 800px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 200px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-item p {
    margin: 0;
    font-weight: 500;
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
}

.social-links p {
    margin-top: 10px;
    margin-bottom: 0;
    font-weight: 500;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    margin-right: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Contact form disabled state */
.contact-form {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.contact-form::before {
    content: "Kontaktformular derzeit nicht verfügbar / Contact form currently unavailable";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    color: var(--light-text-color);
    text-align: center;
    z-index: 1;
    border: 1px solid var(--border-color);
}

.contact-form input,
.contact-form textarea,
.contact-form button {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.contact-form button {
    background-color: #ccc !important;
}

/* Footer */
footer {
    background-color: var(--dark-bg-color);
    color: white;
    padding: 15px 0;
    text-align: center;
    font-size: 0.5rem; /* 50% kleinere Schrift */
}

.footer-links {
    margin-top: 5px;
    font-size: 0.45rem; /* 50% kleiner als vorher (0.9rem) */
}

.impressum-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font: 500 0.45rem 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 50% kleiner */
    transition: var(--transition);
}

.impressum-link:hover {
    color: white;
    text-decoration: underline;
}

/* Impressum Page Styles */
.impressum-main {
    padding-top: 100px; /* Account for fixed header */
    min-height: calc(100vh - 160px); /* Full height minus header and footer */
}

.impressum-content {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.impressum-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.impressum-nav li {
    margin: 0;
}

.impressum-nav li a {
    color: var(--dark-bg-color);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.impressum-nav li a:hover {
    color: var(--primary-color);
}

.impressum-content h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
}

.impressum-content h1::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.impressum-section {
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.impressum-section h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    margin-top: 30px;
}

.impressum-section p {
    line-height: 1.8;
    color: var(--text-color);
}

.impressum-content .back-to-top {
    text-align: center;
    margin-top: 50px;
}

.impressum-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Smart Floating Back to Top Button */
.smart-back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.smart-back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.smart-back-to-top-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.4);
}

.smart-back-to-top-btn:active {
    transform: translateY(-1px) scale(0.95);
}

.smart-back-to-top-btn i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

/* Mobile adjustments for smart button */
@media (max-width: 768px) {
    .smart-back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .smart-back-to-top-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .smart-back-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .smart-back-to-top-btn i {
        font-size: 0.9rem;
    }
}

/* Technologies Section */
.technologies {
    background-color: var(--light-bg-color);
}

.tech-category {
    margin-bottom: 40px;
}

.tech-category:last-child {
    margin-bottom: 0;
}

.tech-category h3 {
    text-align: center;
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 100px;
    justify-content: center;
    width: 100%;
    max-width: 120px;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: var(--primary-color);
}

.tech-item i {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    header {
        padding: 0;
        height: 80px; /* Feste Header-Höhe auch auf Mobile */
    }
    
    header .container {
        padding: 0 15px; /* Reduzierte Abstände für mehr Platz */
        max-width: calc(100vw - 30px); /* Verhindert Überlauf */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    
    nav {
        display: flex;
        align-items: center;
    }
    
    .nav-toggle-label {
        margin: 0; /* Reset margin für symmetrische Positionierung */
    }
    
    nav ul li a {
        font-size: 1.1rem; /* Slightly smaller font on mobile */
        padding: 0.6rem 2rem;
    }
    
    /* Hero section adjustments */
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* Section spacing */
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    /* Technology grid */
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .tech-item {
        padding: 15px;
        min-height: 80px;
        max-width: 100px;
    }
    
    .tech-item i {
        font-size: 2rem;
    }
    
    .tech-item span {
        font-size: 0.8rem;
    }
    
    .tech-category h3 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px; /* Seitliche Abstände für Services */
    }
    
    .service-card {
        margin: 0 10px; /* Zusätzliche Seitenabstände */
        width: calc(100% - 20px);
        box-sizing: border-box;
    }
    
    /* About section */
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
    
    /* Portfolio grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-item {
        margin: 0 3px; /* Reduzierte Seitenabstände für breitere Bilder */
        width: calc(100% - 10px);
        box-sizing: border-box;
    }
    
    /* Portfolio overlay - kleinere Text-Overlays */
    .portfolio-overlay {
        padding: 15px 12px; /* Reduziertes Padding */
    }
    
    .portfolio-overlay h3 {
        font-size: 1.1rem; /* Kleinere Überschrift */
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .portfolio-overlay p {
        font-size: 0.85rem; /* Kleinerer Text */
        line-height: 1.4;
        margin-bottom: 0;
    }
    
    /* Timeline - Mobile Layout: All items stacked vertically */
    .timeline::after {
        left: 20px; /* Move timeline line to the left */
    }
    
    .timeline-item {
        width: calc(100% - 20px) !important; /* Verhindert Überlauf */
        max-width: calc(100vw - 60px); /* Maximale Breite */
        float: none !important;
        text-align: left !important;
        padding: 20px 0 20px 60px; /* More space for content */
        margin: 0 10px 30px 10px; /* Seitliche Abstände */
        box-sizing: border-box;
    }
    
    .timeline-item:nth-child(even),
    .timeline-item:nth-child(odd) {
        width: calc(100% - 20px) !important;
        max-width: calc(100vw - 60px) !important;
        float: none !important;
        text-align: left !important;
        margin: 0 10px 30px 10px;
    }
    
    .timeline-content {
        margin: 0;
        word-wrap: break-word; /* Ensure text wraps properly */
        overflow-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .timeline-dot {
        left: 10px !important; /* Align all dots to the left */
        right: auto !important;
        margin-top: 5px !important;
    }
    
    .timeline-content {
        margin: 0;
        word-wrap: break-word; /* Ensure text wraps properly */
        overflow-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .timeline-date {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Education grid - mobile spacing */
    .education-grid {
        padding: 0 10px; /* Seitliche Abstände */
        gap: 20px;
    }
    
    .education-item {
        margin: 0 10px; /* Zusätzliche Seitenabstände */
        width: calc(100% - 20px);
        box-sizing: border-box;
    }
    
    /* Contact section */
    .contact-content {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    
    .contact-info {
        margin-bottom: 0;
        min-width: auto;
    }
    
    /* Impressum page mobile */
    .impressum-main {
        padding-top: 80px;
    }
    
    .impressum-content {
        padding: 30px 0;
    }
    
    .impressum-content h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .impressum-section {
        margin-bottom: 25px;
    }
    
    .impressum-section h2 {
        font-size: 1.2rem;
        margin-top: 25px;
    }
    
    .impressum-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 10px; /* Reduzierte Abstände für kleinste Bildschirme */
    }
    
    header {
        height: 70px; /* Feste Header-Höhe auch für kleine Bildschirme */
    }
    
    header .container {
        padding: 0 10px; /* Noch kleinere Abstände */
    }

    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    nav ul li a {
        font-size: 1.0rem; /* Even smaller font for very small screens */
        padding: 0.5rem 1.5rem; /* More compact padding */
    }
    
    nav ul li {
        margin: 0.1rem 0; /* Ultra-compact spacing */
    }
    
    .language-toggle-item {
        margin: 0.1rem 0; /* Minimal margin for language button */
    }
    
    .language-toggle-btn {
        margin-top: 0.6rem; /* Adjust for smaller screens */
        padding: 6px 14px; /* Slightly smaller button */
        font-size: 0.85rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .tech-item {
        padding: 12px;
        min-height: 70px;
        max-width: 90px;
    }
    
    .tech-item i {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    
    .tech-item span {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .service-card,
    .portfolio-item {
        padding: 20px;
    }
    
    /* Timeline adjustments for very small screens */
    .timeline-item {
        padding: 15px 0 15px 50px; /* Reduced left padding */
        margin: 0 5px 20px 5px; /* Noch kleinere Seitenabstände */
        width: calc(100% - 10px) !important;
        max-width: calc(100vw - 40px) !important;
    }
    
    .timeline-content {
        padding: 12px; /* Reduziertes Padding für kleine Bildschirme */
    }
    
    /* Portfolio overlay - noch kleinere Text-Overlays für sehr kleine Bildschirme */
    .portfolio-overlay {
        padding: 10px 8px;
    }
    
    .portfolio-overlay h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .portfolio-overlay p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .timeline-content h3 {
        font-size: 1rem; /* Smaller heading */
        line-height: 1.2;
    }
    
    .timeline-content p {
        font-size: 0.85rem; /* Smaller text */
        line-height: 1.4;
    }
    
    .timeline-date {
        font-size: 0.8rem;
    }
}