/* ========== ROOT & BASE ========== */
:root {
    --primary: #8fb1e0;
    --primary-dark: #376ed4;
    --dark: #1a1a1a;
    --darker: #2a2a2a;
    --darkest: #111;
    --light: #e0e0e0;
    --lighter: #bcd8ff;
    --shadow: rgba(0, 0, 0, 0.5);
    --font-Montse: 'Montserrat', Arial, sans-serif;
}

@font-face {
    font-family: "Montserrat";
    src: url(../assets/font/Montserrat/static/Montserrat-Regular.ttf) format("opentype");
}

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

body {
    font-family: var(--font-Montse), Arial, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Links allgemein */
a {
    color: var(--primary);
    text-decoration: none;
}

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

/* ========== HEADER & NAV ========== */
.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-brand {
    font-weight: 600;
    color: var(--light);
}

.burger {
    display: none;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

#menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding: 0;
}

#menu li a {
    color: var(--primary);
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#menu li a:hover {
    background: var(--darker);
    color: white;
}

#menu li a.cta:hover {
    background: var(--primary);
    color: var(--dark);
}

/* ========== HERO ========== */
#lead {
    height: 100vh;
    max-width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    scroll-margin-top: 80px;
    background: linear-gradient(rgba(0, 0, 0, 1.3), rgba(0, 0, 0, 0.7)),
        url('../assets/images/hero-tech-s.jpg') center/cover no-repeat;
}

.hero-content {
    max-width: 700px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--lighter);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ========== BUTTONS ========== */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--dark);
}

.project-card a.btn-primary,
.project-card a.btn-secondary {
    margin-top: auto;
}


/* ========== SECTIONS GENERELL ========== */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2.heading {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    position: relative;
}

h2.heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 1rem auto 0;
}

/* ========== ABOUT ========== */
#about {
    background: var(--dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-grid p+p {
    margin-top: 1rem;
}

.about-image img {
    width: 100%;
    max-width: 280px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
    display: block;
    margin: 0 auto;
}

/* ========== SKILLS ========== */
#skills {
    background: var(--darker);
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    list-style: none;
}

.skills-grid li {
    background: #232323;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
}

/* ========== PROJECTS ========== */
#projects {
    background: var(--dark);
}

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

.project-card {
    background: var(--darker);
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(139, 177, 224, 0.2);
}

.project-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.project-card h3 {
    font-size: 1.2rem;
    color: #fff;
}

.project-card p {
    font-size: 0.95rem;
}

.project-tech {
    font-size: 0.9rem;
    color: var(--lighter);
}

/* ========== EXPERIENCE / TIMELINE ========== */
#experience {
    background: var(--darker);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0;
    width: 2px;
    background: var(--primary);
}

.education-block {
    background: var(--dark);
    padding: 1.8rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    position: relative;
    border: 1px solid #333;
}

.education-block::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--dark);
}

.education-block strong {
    display: block;
    margin-bottom: 0.25rem;
}

.education-block span {
    font-size: 0.9rem;
    color: #bbb;
}

.education-block ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
}

/* ========== CV ========== */
#cv {
    background: var(--dark);
    text-align: center;
}

#cv p {
    max-width: 600px;
    margin: 0 auto;
}

/* ========== CONTACT ========== */
#contact {
    background: var(--darker);
}

.contact-block {
    background: var(--dark);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid #333;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: #333;
    border: none;
    color: white;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

#contact-form button {
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

#contact-form button:hover {
    background: var(--primary-dark);
}

#contact small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #aaa;
}

/* Social Links */
.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links img {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1.2);
}

.social-links a:hover img {
    transform: scale(1.15);
    filter: brightness(1.6);
}

/* ========== PRIVACY ========== */
#privacy {
    background: var(--dark);
}

#privacy h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#privacy ul {
    padding-left: 1.2rem;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--darkest);
    color: #aaa;
    font-size: 0.85rem;
}

footer a {
    color: var(--primary);
}

/* ========== BACK TO TOP ========== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: var(--dark);
    padding: 10px;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 0 10px #000;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

#back-to-top img {
    display: block;
}

#back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
        position: relative;
    }

    .burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 32px;
        height: 32px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .burger span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--primary);
        border-radius: 3px;
        transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    }

    #menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.98);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    #menu li {
        width: 100%;
        text-align: center;
    }

    #menu li a {
        display: block;
        width: 100%;
        padding: 0.9rem 0;
        border-radius: 0;
    }

    #menu.open {
        max-height: 100vh;
    }

    .burger.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .burger.open span:nth-child(2) {
        opacity: 0;
    }

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

    section {
        padding: 3rem 1.25rem;
    }

    #lead {
        padding: 2.5rem 1.25rem 2rem;
        min-height: 90vh;
        align-items: flex-start;
    }

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

    .timeline {
        padding-left: 1.2rem;
    }

    .education-block::before {
        left: -9px;
    }

    .project-card img {
        height: auto;
        max-height: 220px;
        object-fit: contain;
    }
}