:root {
    --primary: #00cfff;
    --accent: #6be5ff;
    --bg-dark: #0a0a0f;
    --bg-card: #16161d;
    --text-light: #e6f7ff;
    --primary-shadow: rgba(0, 207, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

canvas#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header img {
    height: 50px;
}

nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.3s;
}

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

.lang-switch {
    margin-left: 2rem;
}

.lang-switch button {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
}

.lang-switch button .flag {
    height: 16px;
}

.lang-switch button:hover {
    color: var(--primary);
}

main {
    position: relative;
    z-index: 1;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 207, 255, 0.8);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.btn {
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    border: 1px solid var(--primary);
    background: transparent;
    background: var(--primary-shadow);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--primary);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--accent);
    position: relative;
}

section h2::after {
    content: "";
    width: 100px;
    height: 3px;
    background: var(--primary);
    display: block;
    margin: 0.5rem auto 0;
}

.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-container p {
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--primary);
}

.card p {
    margin-bottom: 1rem;
}

.card a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 20px var(--primary);
}

.skills-grid {
    display: grid;
    gap: 2rem;
    text-align: center;
}

.skills-grid h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
}

.badges span {
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 207, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.3s;
}

.badges span:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--primary);
}

.contact-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 0.9rem 1.6rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--primary);
    background: transparent;
    background: var(--primary-shadow);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--primary);
}

footer {
    background: #08080d;
    color: #aaa;
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer a {
    color: var(--primary);
    margin: 0 1rem;
    text-decoration: none;
}

footer a:hover {
    color: var(--accent);
}

.fade-text {
    opacity: 0 !important;
    transition: opacity 0.4s ease;
}

/* Scroll Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Fixes */
@media (max-width: 768px) {

    header {
        padding: 0.5rem 1rem;
    }

    header img {
        height: 32px;
    }

    .hero h1 {
        font-size: 1.9rem;
        line-height: 1.2;
        padding: 0 1rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1.2rem;
    }

    .btn {
        width: 80%;
        max-width: 250px;
        font-size: 0.95rem;
    }

    section {
        padding: 6rem 1.2rem;
    }

    .card img {
        height: 120px;
    }

    nav a {
        margin-left: 0.8rem;
        font-size: 0.9rem;
    }

    .lang-switch {
        margin-left: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .btn {
        width: 90%;
        padding: 0.8rem 1.2rem;
    }
}

/* Desktop Nav sichtbar, Mobile Nav versteckt */
nav {
    display: flex;
}

.lang-switch {
    display: block;
}

.menu {
    display: none;
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    .lang-switch {
        display: none;
    }

    /* Desktop Nav aus */
    .menu {
        display: block;
        position: relative;
    }

    .burger {
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--primary);
    }

    .menu-items {
        position: absolute;
        top: 60px;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        display: none;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        min-width: 180px;
        animation: fadeIn 0.3s ease;
        z-index: 100;
    }

    .menu-items a {
        color: var(--text-light);
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
    }

    .menu-items a:hover {
        color: var(--primary);
    }

    .menu .lang-switch {
        display: block;
        margin: 0;
        text-align: center;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.project-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    background: rgba(0, 207, 255, 0.1);
    border-radius: 12px;
    padding: 0.3rem 0.8rem;
    /* margin-right: 0.3rem; */
    border: 1px solid rgba(0, 207, 255, 0.2);
    color: var(--accent);
    font-size: 0.85rem;
}

/* === Hero Split Layout === */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 90%;
    max-width: 1100px;
}

.hero-left {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-left img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px rgba(0, 207, 255, 0.6);
    animation: pulseGlow 4s ease-in-out infinite;
    object-fit: cover;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(0, 207, 255, 0.6);
    }

    50% {
        box-shadow: 0 0 45px rgba(0, 207, 255, 0.9);
    }
}

.hero-right {
    flex: 1;
}

.hero-right h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 207, 255, 0.8);
    margin-bottom: 1rem;
}

.hero-right p {
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* === Responsive Hero === */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-left img {
        width: 180px;
        height: 180px;
    }

    .hero-right h1 {
        font-size: 2rem;
    }

    .hero-right p {
        font-size: 1rem;
        max-width: 90%;
        margin: 0 auto 1.5rem;
    }
}