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

/* Seitenübergangseffekt - nur für den Hauptinhalt */
.page-content {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Sanfte Übergänge für Inhaltsbereiche */
.hero, .about-content, .projects-content, .contact-content {
    transition: all 0.3s ease;
}

body, html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f8f8;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

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

/* ---------- Topbar ---------- */
.topbar {
    background-color: #0d1430;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: 42px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.contact-info {
    display: flex;
    gap: 15px;
    font-size: 14px;
    white-space: nowrap;
}

.contact-info span {
    line-height: 42px;
}

.social-box {
    width: auto;
    min-width: 80px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0d1430;
    border: none;
    position: relative;
    flex-shrink: 0;
    padding: 0 15px;
    box-sizing: border-box;
}

.social-box a {
    display: inline-block;
    position: relative;
    z-index: 10;
    margin-right: 15px;
}

.social-box a:last-child {
    margin-right: 0;
}

.social-box::after {
    display: none;
}

.social-box::before {
    display: none;
}

.linkedin-icon {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    display: block;
}

.social-box a:hover .linkedin-icon {
    filter: brightness(0) saturate(100%) invert(35%) sepia(95%) saturate(566%) hue-rotate(182deg) brightness(97%) contrast(95%);
}

.github-icon {
    width: 25px;
    height: 25px;
    max-width: 25px;
    max-height: 25px;
    display: block;
    filter: brightness(0) saturate(100%) invert(100%);
    position: relative;
    z-index: 11;
}

.social-box a:hover .github-icon {
    filter: brightness(0) saturate(100%) invert(35%) sepia(95%) saturate(566%) hue-rotate(182deg) brightness(97%) contrast(95%);
}

/* ---------- Header ---------- */
header {
    background: white;
    padding: 1rem 0;
    z-index: 998;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 42px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

header h1 {
    color: #0d1430;
    font-size: clamp(20px, 4vw, 24px);
    margin: 0;
    flex-shrink: 0;
}

header h1 a {
    text-decoration: none;
    color: #0d1430;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    position: relative;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #0d1430;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: clamp(15px, 3vw, 20px);
    margin: 0;
    padding: 0;
}

.nav-menu ul li a {
    color: #333;
    text-decoration: none;
    font-size: clamp(14px, 2.5vw, 16px);
    transition: color 0.3s ease;
}

.nav-menu ul li a:hover {
    color: #0d1430;
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: calc(100vh - 84px);
    background: url('background.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: clamp(20px, 5vw, 40px);
}

.hero .container {
    background: rgba(0, 0, 0, 0.6);
    padding: clamp(25px, 5vw, 60px);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h2 {
    font-size: clamp(24px, 5vw, 36px);
    margin-bottom: clamp(15px, 3vw, 20px);
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero p {
    font-size: clamp(16px, 3vw, 18px);
    margin-bottom: clamp(25px, 4vw, 35px);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: clamp(12px, 2.5vw, 15px) clamp(25px, 4vw, 30px);
    background-color: #0d1430;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: clamp(14px, 2.5vw, 16px);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background-color: #1a254b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13, 20, 48, 0.4);
}

.btn-primary {
    background: #0d1430;
    border-color: #0d1430;
}

.btn-primary:hover {
    background: #1a254b;
    border-color: #1a254b;
}

.btn-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Footer ---------- */
footer {
    background-color: #0d1430;
    color: white;
    text-align: center;
    padding: clamp(15px, 3vw, 20px) 0;
    margin-top: auto;
}

/* ---------- Responsive Styles ---------- */
@media (max-width: 768px) {
    .contact-info {
        gap: 10px;
        font-size: 12px;
    }
    
    .topbar {
        padding: 0 10px;
    }

    header {
        position: sticky;
        top: 42px;
    }

    .hamburger {
        display: block;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: 84px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 997;
        height: auto;
        max-height: calc(100vh - 84px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    header .container {
        flex-direction: row;
        text-align: left;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .nav-menu ul li a {
        font-size: 18px;
        padding: 10px;
        display: block;
        width: 100%;
        text-align: center;
    }

    .hero {
        background-attachment: scroll;
    }
}

@media (max-width: 600px) {
    .contact-info span:not(:first-child) {
        display: none;
    }
    
    .contact-info span:first-child {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .container {
        padding: 0 10px;
    }

    .hero {
        padding: 15px;
    }
    
    .hero .container {
        padding: 20px;
    }
}

/* --- Improved Responsive Styles --- */
@media (max-width: 500px) {
    html, body {
        font-size: 15px;
    }
    .container {
        width: 98%;
        padding: 0 4px;
    }
    .hero .container {
        padding: 10px;
    }
    header h1 {
        font-size: 18px;
    }
    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    .nav-menu ul li a {
        font-size: 16px;
        padding: 8px;
    }
    .topbar, .footer {
        font-size: 13px;
    }
}

/* Make images responsive */
img, .profile-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Touch-friendly buttons */
button, .btn, .nav-menu ul li a {
    min-height: 44px;
    min-width: 44px;
}

/* --- Sidebar Navigation Styles (Right Side) --- */
.sidebar-nav {
    position: fixed;
    top: 0;
    left: auto;
    right: 0;
    width: 75vw;
    max-width: 320px;
    height: 100vh;
    background: #0d1430;
    color: white;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.77,0,.18,1);
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    padding: 32px 20px 20px 20px;
}
.sidebar-nav.active {
    transform: translateX(0);
}
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}
.sidebar-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    transition: color 0.2s;
}
.sidebar-nav ul li a:hover {
    color: #ffd700;
}
.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    position: absolute;
    top: 18px;
    right: 18px;
    cursor: pointer;
    z-index: 10;
}
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    z-index: 2100;
}
.sidebar-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: #0d1430;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s;
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.35);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
/* Clean Footer */
.clean-footer {
    background: #0d1430;
    color: #ffffff;
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.clean-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.footer-name {
    color: #ffffff;
    font-weight: 600;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.footer-year {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    .nav-menu {
        display: none !important;
    }
    .sidebar-nav {
        display: flex;
    }
}
@media (min-width: 769px) {
    .sidebar-nav, .sidebar-overlay {
        display: none !important;
    }
    .sidebar-toggle {
        display: none !important;
    }
}
