/* ============================================
   MALOSTUDIO – Stylesheet
   Im Stil der Cloud-Seite
   ============================================ */

/* ---- Tokens ---- */
:root {
    --bg: #1e1e24;
    --bg-elev: #25252c;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.5);
    --accent: #a45dfd;
    --accent-2: #ff00ff;
    --accent-soft: #8e54cc;
    --accent-deep: #723d9e;
    --border: rgba(164, 93, 253, 0.25);
    --border-soft: rgba(255, 255, 255, 0.08);

    --glass: rgba(30, 30, 36, 0.55);
    --glass-strong: rgba(30, 30, 36, 0.75);

    --radius: 24px;
    --radius-sm: 14px;

    --shadow-lg: 0 25px 80px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 60px rgba(164, 93, 253, 0.25);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    /* Subtiler Übergang: dunkel oben → leicht heller unten */
    background-image: linear-gradient(180deg,
        #1a1a20 0%,
        #1e1e24 25%,
        #25252e 60%,
        #2c2c36 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.4s var(--ease);
    padding: 18px 0;
}

#navbar.scrolled {
    background: rgba(20, 20, 26, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 0;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
}

.nav-logo:hover { color: var(--text); }

.nav-logo-accent {
    color: var(--accent);
}

.nav-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 999px;
    transition: all 0.3s var(--ease);
    position: relative;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(164, 93, 253, 0.12);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 999px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 16px rgba(164, 93, 253, 0.3);
}

.btn-login:hover {
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(164, 93, 253, 0.45);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.nav-burger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 50px;
    position: relative;
    z-index: 5;
    gap: clamp(40px, 6vh, 70px);
}

.hero-content {
    max-width: 760px;
    animation: hero-entry 1.2s var(--ease-out);
}

@keyframes hero-entry {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-logo-wrap {
    margin-bottom: 32px;
    animation: float 6s ease-in-out infinite;
}

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

.hero-logo {
    width: clamp(280px, 28vw, 380px);
    height: clamp(280px, 28vw, 380px);
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 0 60px rgba(164, 93, 253, 0.45));
}

.hero-tagline {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-sub strong {
    color: var(--accent);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: var(--text);
    box-shadow: 0 8px 24px rgba(164, 93, 253, 0.35);
}

.btn-primary:hover {
    color: var(--text);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(164, 93, 253, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    color: var(--text);
    background: rgba(164, 93, 253, 0.15);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.scroll-hint {
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fade-in 1.5s var(--ease-out) 1.2s backwards;
    margin-top: 8px;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.scroll-hint.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scroll-arrow {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: scaleY(1); transform-origin: top; }
    50% { transform: scaleY(0.6); transform-origin: top; }
}

/* ---- Hero Marquee (Bilder-Streifen) ---- */
.hero-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 5;
    /* weiche Ränder links/rechts */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
    animation: fade-in 1.5s var(--ease-out) 1s backwards;
    padding: 20px 0;
    /* vertikales Zentrieren der unterschiedlich hohen Bilder */
    display: flex;
    align-items: center;
    /* feste Höhe damit Layout nicht springt während Bilder laden */
    min-height: 320px;
}

.marquee-track {
    display: flex;
    gap: 18px;
    width: max-content;
    animation: marquee-scroll 60s linear infinite;
    will-change: transform;
    align-items: center;
    /* WICHTIG: Animation läuft IMMER weiter, auch beim Hover */
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-item {
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    position: relative;
    line-height: 0;
    /* Höhe wird per nth-child variiert, Breite passt sich automatisch dem Bild an */
}

/* Dynamische Höhen für unregelmäßiges, organisches Layout */
.marquee-item:nth-child(7n+1) { height: 240px; }
.marquee-item:nth-child(7n+2) { height: 290px; }
.marquee-item:nth-child(7n+3) { height: 220px; }
.marquee-item:nth-child(7n+4) { height: 270px; }
.marquee-item:nth-child(7n+5) { height: 250px; }
.marquee-item:nth-child(7n+6) { height: 300px; }
.marquee-item:nth-child(7n)   { height: 230px; }

.marquee-item:hover {
    border-color: var(--border);
    box-shadow: 0 12px 30px rgba(164, 93, 253, 0.3);
    transform: translateY(-3px);
}

.marquee-item img {
    height: 100%;
    width: auto;
    display: block;
    /* Falls Bild Querformat, mindestens etwas Breite, falls Hochformat freigeben */
    min-width: 160px;
    max-width: 480px;
    object-fit: cover;
}

.marquee-item .marquee-fallback {
    position: absolute;
    inset: 0;
    width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(164, 93, 253, 0.15), rgba(114, 61, 158, 0.05));
    color: var(--text-dim);
}

@media (max-width: 720px) {
    .hero-marquee {
        min-height: 240px;
    }
    .marquee-item:nth-child(7n+1) { height: 180px; }
    .marquee-item:nth-child(7n+2) { height: 220px; }
    .marquee-item:nth-child(7n+3) { height: 170px; }
    .marquee-item:nth-child(7n+4) { height: 200px; }
    .marquee-item:nth-child(7n+5) { height: 190px; }
    .marquee-item:nth-child(7n+6) { height: 230px; }
    .marquee-item:nth-child(7n)   { height: 180px; }
    .marquee-track {
        gap: 12px;
    }
    .marquee-item img {
        min-width: 130px;
    }
}

/* ============================================
   SECTIONS – Generic
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 5;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.section-eyebrow {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(164, 93, 253, 0.08);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.filter-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border-soft);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease);
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--border);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: var(--text);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(164, 93, 253, 0.3);
}

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

.portfolio-card {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    cursor: pointer;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    transition: all 0.5s var(--ease);
    opacity: 0;
    transform: translateY(20px);
}

.portfolio-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-card:hover {
    transform: translateY(-6px);
    border-color: var(--border);
    box-shadow: var(--shadow-md), 0 0 40px rgba(164, 93, 253, 0.2);
}

.portfolio-card .card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.portfolio-card:hover .card-image {
    transform: scale(1.05);
}

.portfolio-card .card-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(164, 93, 253, 0.1), rgba(114, 61, 158, 0.05));
    color: var(--text-dim);
}

.portfolio-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    transition: opacity 0.3s var(--ease);
}

.portfolio-card .card-tag {
    display: inline-block;
    align-self: flex-start;
    background: rgba(164, 93, 253, 0.85);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    backdrop-filter: blur(8px);
}

.portfolio-card .card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--text);
}

.portfolio-card .card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s var(--ease);
}

.portfolio-card:hover .card-desc {
    opacity: 1;
    max-height: 60px;
    margin-top: 4px;
}

.portfolio-card .card-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.3s var(--ease);
}

.portfolio-card:hover .card-icon {
    background: var(--accent);
    transform: scale(1.1);
}

.portfolio-skeleton {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-sm);
    background: linear-gradient(110deg, rgba(255,255,255,0.03) 30%, rgba(164, 93, 253, 0.08) 50%, rgba(255,255,255,0.03) 70%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.portfolio-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 60px 20px;
    font-style: italic;
}

/* ============================================
   ABOUT
   ============================================ */
.about-section {
    padding-top: 60px;
}

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    overflow: visible;
    background: linear-gradient(135deg, rgba(164, 93, 253, 0.15), rgba(114, 61, 158, 0.05));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

/* Bild liegt ÜBER dem Placeholder – wenn es lädt, deckt es ihn ab.
   Wenn es nicht lädt, schaltet onerror display:none → Placeholder sichtbar. */
.about-image-frame img,
.about-image-frame .about-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1; /* Bild nach hinten */
}

.about-image-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-dim);
    text-align: center;
    padding: 24px;
}

.about-image-placeholder small {
    font-family: 'Inter', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.7;
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    /* !important stellt sicher, dass keine andere Regel das Badge nach hinten schiebt */
    z-index: 999 !important; 
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 40px rgba(164, 93, 253, 0.4);
    transform: rotate(-8deg);
    transition: transform 0.4s var(--ease);
}

.about-badge:hover {
    transform: rotate(0deg) scale(1.05);
}

.badge-num {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.badge-percent {
    font-size: 1.4rem;
    margin-left: 1px;
    font-weight: 700;
}

.badge-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.about-text .section-eyebrow {
    margin-bottom: 12px;
}

.about-text .section-title {
    margin-bottom: 24px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.about-text strong {
    color: var(--text);
    font-weight: 700;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.skill {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    transition: all 0.3s var(--ease);
}

.skill:hover {
    border-color: var(--border);
    background: rgba(164, 93, 253, 0.08);
}

.skill-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(164, 93, 253, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-bottom: 2px;
    color: var(--text);
}

.skill p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 60px;
    align-items: start;
}

.contact-info .section-eyebrow { margin-bottom: 12px; }
.contact-info .section-title { margin-bottom: 20px; }
.contact-info .section-lead {
    text-align: left;
    margin: 0 0 32px 0;
}

.contact-list {
    list-style: none;
    margin-bottom: 28px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-list li:last-child { border-bottom: none; }

.contact-list a {
    color: var(--text);
}

.contact-list a:hover {
    color: var(--accent);
}

.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(164, 93, 253, 0.12);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-row {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
}

.social-btn:hover {
    color: var(--text);
    background: rgba(164, 93, 253, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ---- Form ---- */
.contact-form {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a45dfd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-group select option {
    background: var(--bg-elev);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(164, 93, 253, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check input {
    width: auto;
    margin-top: 4px;
    accent-color: var(--accent);
}

.form-check label {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.form-submit {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.form-submit svg {
    transition: transform 0.3s var(--ease);
}

.form-submit:hover svg {
    transform: translateX(4px);
}

.form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.form-status.error {
    display: block;
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-soft);
    padding: 50px 0 30px;
    position: relative;
    z-index: 5;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.95rem;
}

.footer-brand-accent {
    color: var(--accent);
}

.footer-brand img {
    width: 32px;
    height: 32px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s var(--ease);
}

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

.footer-copy {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 14, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

/* WICHTIG: hidden-Attribut muss display: flex überschreiben,
   sonst blockiert die unsichtbare Lightbox alle Klicks */
.lightbox[hidden] {
    display: none !important;
}

.lightbox[data-open="true"] {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-soft);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
}

.lightbox-close:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    transform: rotate(90deg);
}

.lightbox-content {
    max-width: 1000px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.lightbox-meta {
    text-align: center;
    color: var(--text-muted);
}

.lightbox-meta h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 6px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-image-frame {
        max-width: 420px;
        margin: 0 auto;
    }

    .about-badge {
        right: 10%;
    }
}

@media (max-width: 720px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        flex-direction: column;
        background: rgba(20, 20, 26, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 12px;
        margin-top: 8px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        text-align: center;
    }

    .nav-burger {
        display: flex;
    }

    .btn-login span {
        display: none;
    }

    .btn-login {
        padding: 10px 14px;
    }

    .section {
        padding: 70px 0;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 28px 22px;
    }

    .hero {
        padding-top: 110px;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .footer-links {
        gap: 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .filter-bar {
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        justify-content: center;
    }
}

/* ---- Reveal on scroll ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
