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

/* Globaler Link-Reset: nie blau/unterstrichen, Farbe & Styling kommen
   von den jeweiligen Klassen (Header, Footer, Fließtext, ...) */
a {
    color: inherit;
    text-decoration: none;
}

html, body {
    width: 100%;
    height: 100vh;
    overflow: hidden; /* Steuert das Scrollen rein über den Container */
    font-family: sans-serif;
}

/* Header-Styles */
.header-menu {
    display: flex;
    justify-content: space-between;
    padding: 30px 15px 50px 15px;
    height: 60px;
}

.menu {
    width: auto;
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    font-size: 14px;
}

#title {
    color: white;
    font-size: 14px;
}

.header-menu a:hover {
    opacity: 50%;
}

.header-menu a:link {
    color: white;
    text-decoration: none;
}

.menu div a:hover {
    color: white;
}

.menu div a:link, a:visited {
    color: white;
    text-decoration: none;
}

/* Hauptbereich unter dem Header */
main {
    height: calc(100vh - 140px);
    padding: 0 12px 12px 12px;
    /* lange Texte (z. B. Datenschutzerklärung) scrollen innerhalb */
    overflow-y: auto;
}

.imprint-text {
    padding: 5vh 10vw 0 10vw;
}

h1 {
    font-size: 14px;
    color: white;
    opacity: 80%;
}

.text {
    color: white;
    font-size: 14px;
        opacity: 80%;
}

#imprint-text {
    padding-top: 10px;
}

footer {
    height: 80px;
    width: 100%;
    padding: 15px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.footer-content {
    margin: 0 0 20px 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.footer-content a {
    opacity: 50%;
}

.footer-content a:hover {
    opacity: 100%;
}

.footer-content a:link, a:visited {
        color: white;
    text-decoration: none;
}

/* Background-1 */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1; /* Liegt hinter allen Portfolio-Inhalten */
  overflow: hidden;
  pointer-events: none; /* Verhindert, dass der Hintergrund Klicks blockiert */
}

/* Basis für alle Ebenen */
.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 1. Ebene (Unterste Ebene: Farbverlauf A) */
.layer-1 {
  background: linear-gradient(0deg, #c2c5ce 10%, #ab6656 35%, #a97d7c 42%, #997273 90%, #d9bbb9 100%);
}

.layer-2 {  
  background: linear-gradient(90deg, #000 0%,#28245e 50%, #000 100%);
  /* filter: blur(50px); */
  mix-blend-mode: overlay;
    
  top: -150px;
  left: -150px;
  right: -150px;
  bottom: -150px;
  width: calc(100% + 300px);
  height: calc(100% + 300px);

  transform: translate(var(--circle-x, 0px), var(--circle-y, 0px));
  will-change: transform;
}

.layer-3 {
  background: linear-gradient(90deg, #d783a2 0%,#f0a6bd 20%, #28245e 50%, #646ac4 66%, #ab94bf 100%);
  filter: blur(50px);
  mix-blend-mode: overlay;
}

.layer-4 {
  background: linear-gradient(0deg, #c2c5ce 10%, #ab6656 35%, #a97d7c 42%, #997273 90%, #d9bbb9 100%);
  filter: blur(70px);
  mix-blend-mode: hue;
  opacity: 50%;
}

/* ==========================================================================
   MOBILE / RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {

    /* Mobil: ganze Seite scrollt normal, Footer kommt erst nach dem
       Inhalt (nicht am unteren Rand fixiert). Bei kurzem Inhalt steht er
       trotzdem unten (min-height + flex). */
    html {
        height: auto;
        overflow-y: visible;
        overflow-x: clip;
    }

    body {
        height: auto;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow-y: visible;
        overflow-x: clip;
    }

    header {
        flex: 0 0 auto;
    }

    .header-menu {
        padding: 20px 12px 30px 12px;
    }

    .menu {
        width: auto;
        gap: 16px;
    }

    /* main nimmt den verbleibenden Platz ein, statt fester calc()-Höhe,
       damit es nicht von einer abweichenden Header-Höhe abhängt */
    main {
        flex: 1 0 auto;
        min-height: 0;
        height: auto;
        padding: 0 12px 12px 12px;
        overflow: visible;
    }

    .imprint-text {
        padding: 4vh 6vw 4vh 6vw;
    }

    h1 {
        font-size: 15px;
    }

    .text {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Footer wächst automatisch mit statt bei mehr Zeilen abgeschnitten zu werden */
    footer {
        flex: 0 0 auto;
        height: auto;
        padding: 20px 15px;
    }

    .footer-content {
        flex-wrap: wrap;
        row-gap: 12px;
        column-gap: 24px;
        justify-content: flex-start;
        margin-bottom: 0;
        font-size: 13px;
    }

    .footer-content > div {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (max-width: 420px) {

    .imprint-text {
        padding: 4vh 5vw 4vh 5vw;
    }

    footer {
        padding: 16px 15px;
    }

    /* Zweispaltigkeit bleibt erhalten, nur enger gefasst */
    .footer-content {
        row-gap: 10px;
        column-gap: 16px;
        font-size: 12px;
    }

    .footer-content > div {
        flex: 0 0 calc(50% - 8px);
    }
}