:root{
    font-size: 62.5%;
    --text: #111;
    --muted: rgb(85,85,85);
    --border: rgba(0,0,0,0.14);
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
    --radius: 20px;
    --max: 1100px;
}

*,
*::before,
*::after{
    box-sizing: border-box;
}

html{ scroll-behavior: smooth; }

body{
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 1.6rem;
    color: var(--text);
    background: #fff;
}

img{
    max-width: 100%;
    display: block;
}

a{
    color: inherit;
    text-decoration: none;
}

a:hover{
    color: grey;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.skip-link{
    position: absolute;
    left: -999px;
    top: -999px;
}
.skip-link:focus{
    left: 2rem;
    top: 2rem;
    background: #fff;
    padding: 1rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 9999;
}

.header{
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav{
    max-width: var(--max);
    margin: 0 auto;
    padding: 1.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.logo{
    font-size: 2.2rem;
    font-weight: 600;
}

/* Burger Button */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.burger-line {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: transform 300ms ease, opacity 300ms ease;
}

/* Burger Animation when active */
.burger.active .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger.active .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links{
    list-style: none;
    display: flex;
    gap: 2rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.section{
    padding: 8rem 2rem;
}

.section-head{
    max-width: var(--max);
    margin: 0 auto 3rem;
    text-align: center;
}

.section-title{
    font-size: 3.2rem;
    margin: 0 0 1rem;
}

.section-subtitle{
    margin: 0;
    color: var(--muted);
}

.card{
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
    padding: 2rem;
}

.hero{
    padding-top: 6rem;
}

.hero-grid{
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-image img{
    border-radius: 999px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.kicker{
    margin: 0 0 0.6rem;
    color: var(--muted);
}

.headline{
    font-size: 4.2rem;
    margin: 0 0 1rem;
}

.subheadline{
    margin: 0 0 1.2rem;
    color: var(--muted);
    font-size: 1.7rem;
}

.lead{
    margin: 0 0 2rem;
    line-height: 1.7;
    color: #222;
}

.actions, .quick-links{
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600;
    transition: transform 160ms ease, background 160ms ease;
    min-width: 12rem;
}

.btn:focus-visible{
    outline: 3px solid rgba(0,0,0,0.25);
    outline-offset: 3px;
}

.btn:hover{
    transform: translateY(-1px);
}

.btn-primary{
    background: #111;
    color: #fff;
    border-color: #111;
}

.btn-secondary{
    background: transparent;
}

.btn-ghost{
    background: transparent;
    color: #111;
    min-width: unset;
}

.socials{
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
}

.icon{
    height: 3.2rem;
    width: 3.2rem;
}

.icon-link{
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.8rem;
    box-shadow: var(--shadow);
}

.about-grid{
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 3rem;
    align-items: start;
}

.about-image img{
    width: 100%;
    height: 520px;
    max-height: none;
    object-fit: cover;
    object-position: center 20%;
    border-radius: var(--radius);
}

.cards{
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1.6rem;
    margin-bottom: 1.6rem;
}

.card-head{
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.list{
    margin: 0;
    padding-left: 1.8rem;
    color: var(--muted);
}

.about-text h3{
    margin: 0 0 0.8rem;
}
.about-text p{
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.skills-grid{
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 2rem;
}

.skill-list{
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
    display: grid;
    gap: 1rem;
}

.skill-list li{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.skill-name{
    font-weight: 500;
}

.skill-level{
    font-size: 1.3rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
}

.level-strong{
    color: #111;
}

.level-mid{
    color: #333;
}

.projects-grid{
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 2rem;
}

.project{
    padding: 0;
    overflow: hidden;
}

.project-img{
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.project-img img{
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.project-body{
    padding: 2rem;
}

.project-title{
    margin: 0 0 1rem;
    font-size: 2.2rem;
}

.project-desc{
    margin: 0 0 1.2rem;
    color: var(--muted);
    line-height: 1.6;
}

.tags{
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0;
    margin: 0 0 1.6rem;
}

.tags li{
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 1.3rem;
    color: #333;
}

.project-actions{
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-card{
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.contact-row{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.6rem 0;
}

.muted{ color: var(--muted); }
.dot{ color: var(--muted); }

.footer{
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--muted);
}

.footer-impressum {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    padding-top: 4rem;
}

.footer-impressum-content {
    max-width: 720px;
    width: 100%;
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--muted);
}

.footer-impressum-content h3 {
    margin-top: 0;
    color: #111;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    font-size: 1.3rem;
    color: var(--muted);
}

.footer-impressum,
.footer-impressum * {
    position: relative;
    z-index: 1;
}

/* HERO actions layout */
.hero-actions{
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.hero-actions .quick-links{
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin: 0;
}

.hero-actions .socials{
    display: flex;
    gap: 1.2rem;
    margin: 0;
}

/* ---------------------------
   Animation System
----------------------------*/

.reveal {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    transition: opacity 700ms ease, transform 700ms ease, filter 700ms ease;
    will-change: transform, opacity, filter;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-up { transform: translateY(22px); }
.reveal-left { transform: translateX(-22px); }
.reveal-right { transform: translateX(22px); }

.hero .headline,
.hero .subheadline,
.hero .lead,
.hero .actions,
.hero .quick-links,
.hero .socials {
    animation: heroIn 900ms ease both;
}

.hero .subheadline { animation-delay: 80ms; }
.hero .lead { animation-delay: 140ms; }
.hero .actions { animation-delay: 220ms; }
.hero .quick-links { animation-delay: 300ms; }
.hero .socials { animation-delay: 380ms; }

@keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-image img {
    animation: floaty 5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0.25;
    transition: transform 500ms ease;
    background: rgba(255,255,255,0.35);
    pointer-events: none;
}

.btn-primary::after { opacity: 0.18; }
.btn:hover::after { transform: translateX(120%) skewX(-18deg); }

.card:hover {
    transition: transform 100ms ease, box-shadow 200ms ease;
}

.card:not(.project):hover {
    transform: translateY(-4px);
}

.project .project-img img {
    transition: none;
}

.project.card {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.project .project-img img {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.icon-link {
    transition: transform 200ms ease;
}

.icon-link:hover {
    transform: translateY(-2px) scale(1.03);
}

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0%;
    height: 2px;
    background: rgba(0,0,0,0.65);
    transition: width 220ms ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.project.card.is-visible {
    transition: opacity 700ms ease, filter 700ms ease, transform 100ms ease-out;
}

.project.card:hover {
    transition: transform 0.05s linear;
    z-index: 10;
}

.reveal {
    backface-visibility: hidden;
    perspective: 1000px;
    -webkit-font-smoothing: subpixel-antialiased;
}

.project.card.is-visible {
    transition: opacity 700ms ease, filter 700ms ease;
}

.project.card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .reveal,
    .reveal.is-visible {
        transition: none;
        transform: none;
        opacity: 1;
        filter: none;
    }

    .hero-image img,
    .hero * {
        animation: none !important;
    }

    .btn::after {
        display: none;
    }
}

/* ---------------------------
   Responsive Styles
----------------------------*/

@media (max-width: 980px){
    .hero-grid{
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image{
        display: flex;
        justify-content: center;
    }
    .hero-image img{
        width: 320px;
    }

    .about-grid{
        grid-template-columns: 1fr;
    }

    .cards{
        grid-template-columns: 1fr;
    }

    .skills-grid{
        grid-template-columns: 1fr;
    }

    .projects-grid{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px){
    .about-image img{
        height: 420px;
        object-position: center 15%;
    }
}

@media (max-width: 768px) {
    /* Mobile: GitHub unter die Buttons */
    .hero-actions{
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .quick-links{
        justify-content: center;
    }

    .hero-actions .socials{
        margin-top: .6rem;
    }
}

/* Burger Menu für kleine Bildschirme */
@media (max-width: 650px) {
    .burger {
        display: flex;
    }

    .nav {
        flex-wrap: nowrap;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 8rem 3rem 3rem;
        gap: 2.5rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 400ms cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1.2rem;
        font-size: 1.8rem;
        font-weight: 500;
    }

    .nav-links a::after {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Overlay beim geöffneten Menü */
    body.menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 998;
        animation: fadeIn 300ms ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

@media (max-width: 480px){
    .about-image img{
        height: 340px;
        object-position: center 10%;
    }

    .logo {
        font-size: 1.8rem;
    }

    .headline {
        font-size: 3.2rem;
    }

    .section-title {
        font-size: 2.6rem;
    }
}
