* {
    font-family: norse;
    font-weight: 400;
    font-style: normal;
    box-sizing: border-box;
}
html {
    height: -webkit-fill-available; 
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    background: #446590;
}
/* ── Menubar ── */
.menubar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}
.menubar_container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 80px;
    width: 100%;
}
.menuitem {
    list-style: none;
    display: flex;
    width: 100%;
    justify-content: flex-start;
    gap: 2rem;
    padding: 0;
    margin: 0;
}
.menuitem li {
    display: flex;
    align-items: center;
}
.menuitem li:first-child { margin-left: 20px; }
.menuitem li:last-child  { margin-right: 20px; }
.menuitem a {
    color: #ffedd2;
    text-decoration: none;
    font-size: 2rem;
    transition: color 0.1s ease;
}
.menuitem a:active {
    color: #eb3d00;
}
/* ── Hamburger (hidden on desktop) ── */
.hamburger {
    display: none;
}
/* ── Image container ── */
.image-container {
    position: fixed;  /* ← change from relative to fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.desktop-img { display: block; }
.mobile-img  { display: none; }
/* ── Overlay text ── */
.overlay-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 78px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}
.overlay-text:nth-last-child(1) {
    top: 50%;
    font-size: 48px;
}

/* ────────────────────────────────
   BACKGROUND — .content
──────────────────────────────── */
.content {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.content .image-container {
    width: 100%;
    height: 100%;
}

/* ────────────────────────────────
   FOREGROUND — .foreground
──────────────────────────────── */
.foreground {
    position: fixed;
    inset: 0;
    z-index: 5;                     /* above .content, below .menubar */

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 100px;             /* clears the 80px menubar */
    pointer-events: none;           /* let clicks pass through to bg */
}

/* Re-enable pointer events on interactive elements */
.foreground a,
.foreground button {
    pointer-events: auto;
}

/* ── Heading ── */
.foreground h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    color: #ffedd2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-bottom: 0.4rem;
}

/* ── Contact label ── */
.foreground p1 {
    display: block;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: rgba(255, 237, 210, 0.88);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    text-align: center;
    margin-bottom: 1.2rem;
    letter-spacing: 0.1em;
}
.foreground p2 {
    display: block;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: rgba(255, 237, 210, 0.88);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    text-align: center;
    margin-bottom: 1.2rem;
    letter-spacing: 0.1em;
}

.foreground p3 {
    display: block;
    font-size: clamp(1rem, 2.8vw, 1.5rem);
    color: rgba(255, 237, 210, 0.88);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    text-align: center;
    margin-bottom: 1.2rem;
}

/* ── Social icons ── */
.foreground .social-icons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.foreground .social-icons a {
    color: #ffedd2;
    font-size: 1.8rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, color 0.2s ease;
}

.foreground .social-icons a:hover {
    transform: translateY(-3px) scale(1.15);
    color: #eb3d00;
}

/* ── Bottom image ── */
.foreground .image-bottom {
    display: flex;
    justify-content: center;
    width: 100%;
}

.foreground .image-bottom .cv-img {
    display: block;
    max-height: 65vh;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 -4px 24px rgba(0, 0, 0, 0.3));
}

/* ── Mobile ── */
@media (max-width: 768px) {
    /* top bar */
    .menubar {
        position: fixed;
        height: 60px;
        z-index: 1000;
        padding: 0 20px;
    }
    .menubar_container {
        height: 60px;
        justify-content: flex-end;
    }
    /* hamburger */
    .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1001;        /* ← add this */
    position: relative;   /* ← required for z-index to take effect */
}
    .hamburger span {
        display: block;
        width: 28px;
        height: 3px;
        background-color: #ffedd2;
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    /* dropdown */
    .menuitem {
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 0;
        position: fixed;
        top: 0px;
        left: 0;
        width: 100vw;
        background-color: #162114; opacity: 0.9;
        border-bottom: #ffedd2 1px solid;
        z-index: 999;
    }
    .menuitem.active {
        display: flex;
    }
    .menuitem a {
        font-size: 1.4rem;
        padding: 16px 24px;
    }
    .menuitem li:first-child { margin-left: 0; }
    /* images */
    .desktop-img { display: none; }
    .image-container img.mobile-img {
        display: block;
        object-fit: cover;
        object-position: 45% center;
    }
    .image-container { 
    height: 100vh; 
    height: 100dvh; /* ← add this */
}
    /* overlay text */
    .overlay-text { font-size: 48px; }
    .overlay-text:nth-last-child(1) { font-size: 28px; }
    /* foreground adjustments */
    .foreground {
        padding-top: 80px;          /* clears the 60px mobile menubar */
        justify-content: space-between;
        padding-bottom: 10px;
    }
@media (max-width: 768px) {
    .foreground .image-bottom .cv-img {
        max-height: 45vh;
        max-width: 100%;
        object-fit: contain;
        margin-bottom: auto;  /* pushes image upward */
        transform: translateY(-80px); /* fine-tune this value */
        filter: drop-shadow(0 -4px 24px rgba(0, 0, 0, 0.3));
    }
}
}
@media (max-width: 480px) {
    .overlay-text { font-size: 30px; }
    .overlay-text:nth-last-child(1) { font-size: 20px; }
}