* {
    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;
    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: black;
    font-size: 14px;
}

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

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

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

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

/* Hauptbereich unter dem Header */
main {
    height: calc(100vh - 140px);
    padding: 0 12px 12px 12px;
}

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: black;
    text-decoration: none;
}

/* Background-Layers */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.layer-1 {
  background: radial-gradient(circle, #d4e6fa 0%, #67a2e6 20%, #4c769e 40%, #031c3b 60%, #1f3f56 80%, #cce4fc 100%);
  opacity: 50%;
  filter: blur(100px);
}

.layer-2 {
  background: radial-gradient(circle 45vh at center, #8a9143 0%, #f4f09a 80%, #c6ff63 90%, rgba(217, 187, 185, 0) 100%);
  filter: blur(100px);
  mix-blend-mode: lighten;
  opacity: 50%;

  top: -150px;
  left: -150px;
  right: -150px;
  bottom: -150px;
  width: calc(100% + 300px);
  height: calc(100% + 300px);

  background-size: 100% 90%;
  background-position: center;
  background-repeat: no-repeat;

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

/* CV-Seite */
.cv-wrapper {
    height: 100%;
    overflow-y: auto;
    padding: 5vh 10vw 5vh 10vw;
    color: black;
}

.cv-intro {
    display: flex;
    gap: 32px;
    align-items: flex-end;
    margin-bottom: 48px;
}

.cv-photo {
    flex: 0 0 160px;
    width: 160px;
    background-color: #d8d8d8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cv-intro-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

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

.cv-section-title {
    font-size: 14px;
    opacity: 80%;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.cv-grid {
    display: flex;
    flex-direction: column;
}

.cv-row {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) 3fr;
    gap: 16px;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cv-category {
    opacity: 70%;
    white-space: nowrap;
}

.cv-details {
    opacity: 90%;
    line-height: 1.4;
}

/* ==========================================================================
   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;
    }

    .cv-wrapper {
        height: auto;
        overflow: visible;
        padding: 4vh 6vw 4vh 6vw;
    }

    .cv-intro {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 32px;
    }

    .cv-photo {
        flex: 0 0 auto;
        width: 120px;
    }

    .cv-section {
        margin-bottom: 30px;
    }

    .cv-section-title {
        font-size: 13px;
    }

    .cv-row {
        font-size: 13px;
        gap: 12px;
    }

    /* 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);
    }
}

/* Mobile: Spalten untereinander */
@media (max-width: 600px) {
    .cv-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .cv-category {
        opacity: 50%;
        font-size: 12px;
    }
}

@media (max-width: 420px) {

    .cv-wrapper {
        padding: 4vh 5vw 4vh 5vw;
    }

    .menu {
        font-size: 13px;
        gap: 12px;
    }

    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);
    }
}