/* MAKE THE TOP MENU STICKY */
/* Default sticky header */

/* ===== REMOVE OLD HAMBURGER STYLES - ENHANCED ===== */
.tab-Hamburger,
.hamburger-icon {
    display: none !important;
    visibility: hidden !important;
}

/* Force hide old nav-links everywhere */
.nav-links {
    display: none !important;
    visibility: hidden !important;
}

/* Override any conflicting styles */
.tab-default img.hamburger-icon {
    display: none !important;
}

/* Animation for smooth transition */

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* The native cursor is hidden only where scripts.js enabled the custom one
   (mouse/trackpad devices); touch screens keep their normal behaviour. */
.has-custom-cursor,
.has-custom-cursor * {
    cursor: none;
}

/* Custom cursor */

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    /* Slightly smaller for a more subtle effect */
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: transform 0.12s ease-out, background-color 0.3s ease, opacity 0.2s ease;
}

/* Shown after the first mouse move, hidden while the pointer is outside the page */
.custom-cursor.visible {
    opacity: 1;
}

/* Click effect */

@keyframes clickEffect {
    0% {
        transform: translate(-50%, -50%) scale(1);
        background-color: rgba(0, 0, 0, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        background-color: rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        background-color: rgba(0, 0, 0, 0.4);
    }
}

.custom-cursor.click {
    animation: clickEffect 0.3s ease;
}

/* Smooth wake effect */

.cursor-wake {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0.12;
    animation: wakeFadeOut 0.7s ease-out forwards;
}

/* Wake shrinking and fading */

@keyframes wakeFadeOut {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.2);
    }
    25% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    75% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2);
    }
}

/* Keep the custom cursor on interactive elements too */

.has-custom-cursor button,
.has-custom-cursor a,
.has-custom-cursor input,
.has-custom-cursor textarea,
.has-custom-cursor select {
    cursor: none !important;
}

/* Full-screen overlay */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Fog effect */
    backdrop-filter: blur(5px);
    /* Blur effect */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    /* Fallback only: static/js/scripts.js hides it as soon as the page has loaded */
    animation: fadeOut 0.6s forwards 6s;
}

.overlay.done {
    animation: none;
    opacity: 0;
    visibility: hidden;
}

/* Loader animation: liquid filling a circle. One SVG holds two periods of
   the wave, so sliding it by exactly one period loops without a seam (the
   old three-gradient version left thin lines where the pieces met). */

.loader {
    --size: 80px;
    position: relative;
    width: var(--size);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    isolation: isolate;
    animation: loaderPulse 1.5s infinite ease-in-out;
}

.loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120' preserveAspectRatio='none'%3E%3Cpath fill='%23354c6b' d='M0 12 Q30 0 60 12 T120 12 T180 12 T240 12 V120 H0 Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
    animation:
        loaderWave 1.1s linear infinite,
        loaderLevel 2s ease-in-out infinite alternate;
}

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

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes loaderLevel {
    from {
        translate: 0 calc(var(--size) * 0.78);
    }
    to {
        translate: 0 calc(var(--size) * 0.12);
    }
}

/* Fade out animation */

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.madelyn-torff {
    position: relative;
    line-height: 180%;
}

.madelyn-torff-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--padding-7xs) 0 0;
}

.sobre {
    text-decoration: none;
    position: relative;
    line-height: 28px;
    font-weight: 500;
    color: inherit;
}

.sobre-presentation {
    text-decoration: none;
    position: relative;
    line-height: 28px;
    font-weight: bold;
    font-size: 25px;
    color: inherit;
}

.tab-default {
    flex-direction: column;
    justify-content: flex-start;
}

.nav,
.nav-wrapper,
.tab-default {
    display: flex;
    align-items: flex-start;
}

.tab-default a {
    position: relative;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.tab-default a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: currentColor;
    transition: width 0.3s ease, left 0.3s ease;
}

.tab-default a:hover::after {
    width: 100%;
    left: 0;
}

/* Click animation */

@keyframes clickAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.tab-default a:active {
    animation: clickAnimation 0.2s ease;
}

.nav {
    align-self: stretch;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--gap-xl);
}

.nav-wrapper {
    /* fits the six links (Home ... About) on one line */
    width: 620px;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px var(--padding-mini) 0 0;
    box-sizing: border-box;
    max-width: 100%;
    font-family: var(--body-18);
}

.phinstagram-logo-fill-icon {
    height: 48px;
    width: 48px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.icons {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--gap-5xl);
}

.madelyn-torff-2021 {
    position: relative;
    display: none;
}

.footer-icons {
    /* fits every header icon (GitHub, LinkedIn, email, phone) */
    width: max-content;
    min-width: 178px;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-13xl);
    font-size: var(--font-size-base);
    color: var(--font-medium-emphasis);
    font-family: var(--font-nunito);
}

.frame-parent {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-gainsboro-200);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gap-xl);
    max-width: 100%;
    text-align: left;
    font-size: var(--body-18-size);
    color: var(--bg-line);
    font-family: var(--font-comfortaa);
    padding: 10px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 1;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
}

@keyframes slideDownFloat {
    0% {
        transform: translateX(-50%) translateY(-100%) scale(0.95);
        opacity: 0;
        backdrop-filter: blur(0px);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px) scale(0.98);
        opacity: 0.8;
        backdrop-filter: blur(8px);
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
        backdrop-filter: blur(15px);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

body.loaded .frame-parent.floating:hover {
    transform: translateX(-50%) translateY(-2px) scale(1.01);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating header when scrolling. body.loaded is repeated so these rules
   outrank "body.loaded .frame-parent" (entrance transform/animation). */
.frame-parent.floating,
body.loaded .frame-parent.floating {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0) scale(1);
    width: 60%;
    /* never narrower than its links and icons */
    min-width: max-content;
    background-color: rgba(217, 221, 230, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideDownFloat 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ai-engineer {
    align-self: stretch;
    text-transform: uppercase;
}

.ai-engineer,
.text,
.title {
    position: relative;
}

/* Rotating title: the box is exactly one line tall and clips the slide;
   static/js/scripts.js drives the rotation and shrinks the font if the
   longest title would not fit on one line. */
.ai-engineer {
    display: block;
    position: relative;
    overflow: hidden;
    font-size: 30px;
    line-height: 1.2;
    height: 1.2em;
}

.ai-engineer span {
    display: inline-block;
    white-space: nowrap;
    will-change: transform, opacity;
}

.title {
    margin: 0;
    font-size: inherit;
    line-height: 120%;
    font-weight: 700;
    font-family: inherit;
    white-space: pre-wrap;
}

.text {
    line-height: 150%;
    text-align: justify;
}

.subheadline {
    width: 486px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: 100%;
    font-size: var(--font-size-5xl);
    color: var(--color-dimgray);
    font-family: var(--font-nunito);
}

.text1 {
    position: relative;
    font-size: var(--body-18-size);
    line-height: 150%;
    font-weight: 500;
    font-family: var(--font-roboto);
    color: #d9dde6;
    text-align: left;
}

/* Video / CV are links styled as buttons */
.button-primary,
.button-secondary {
    text-decoration: none;
}

.button-primary {
    cursor: pointer;
    border: 0;
    padding: var(--padding-5xs) var(--padding-5xl);
    background-color: var(--color-darkslategray);
    border-radius: var(--br-5xs);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Hover animation */

.button-primary:hover {
    background-color: var(--color-darkslategray);
    /* Adjust the hover color as needed */
    transform: scale(1.05);
    /* Slightly enlarge the button */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button-primary:active {
    animation: clickAnimation 0.2s ease;
}

.text2 {
    position: relative;
    font-size: var(--body-18-size);
    line-height: 150%;
    font-weight: 500;
    font-family: var(--font-roboto);
    color: var(--bg-line);
    text-align: left;
}

.button-secondary,
.buttons {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: visible;
}

/* Hover and click animations for .github */

.github {
    width: 34px;
    padding-top: 9px;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.github:hover {
    transform: scale(1.1);
    /* Slightly enlarge the icon */
    opacity: 1;
    /* Increase opacity on hover */
}

.github:active {
    animation: clickAnimation 0.2s ease;
}

/* Hover and click animations for .phinstagram-logo-fill-icon */

.phinstagram-logo-fill-icon {
    width: 40px;
    padding-top: 5px;
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}

.phinstagram-logo-fill-icon:hover {
    transform: scale(1.1);
    /* Slightly enlarge the icon */
    opacity: 1;
    /* Increase opacity on hover */
    color: white;
    /* Change color to white on hover */
}

.phinstagram-logo-fill-icon:active {
    animation: clickAnimation 0.2s ease;
}

/* Hover and click animations for button-secondary */

.button-secondary {
    cursor: pointer;
    border: 2px solid var(--bg-line);
    padding: var(--padding-5xs) var(--padding-5xl);
    background-color: transparent;
    border-radius: var(--br-5xs);
    color: var(--bg-line);
    /* Initial text color */
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.button-secondary:hover {
    background-color: white;
    /* Adjust the hover background color as needed */
    border-color: var(--color-darkslategray);
    /* Adjust the hover border color as needed */
    color: white;
    /* Change text color to white on hover */
    transform: scale(1.05);
    /* Slightly enlarge the button */
}

.button-secondary:active {
    animation: clickAnimation 0.2s ease;
}

.buttons {
    gap: var(--gap-xs);
}

.content {
    align-self: stretch;
    padding: 0 var(--padding-5xs) 20px 0;
    box-sizing: border-box;
    gap: var(--gap-13xl);
    font-size: var(--title-h1-size);
    color: var(--color-gray-100);
    font-family: var(--title-h1);
}

.content,
.intro,
.intro-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: 100%;
}

.intro {
    align-self: stretch;
    overflow: hidden;
    gap: 0px;
}

.intro-content {
    width: 545px;
    padding: 68px 0 0;
    box-sizing: border-box;
}

.profile-picture {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    background-color: var(--color-gainsboro-100);
    min-width: 600px;
    min-height: 600px;
    max-width: 600px;
    max-height: 600px;
}

.whatsapp-image-2024-12-03-at-1-icon {
    position: absolute;
    width: calc(100% - 17px);
    top: 1px;
    right: 10px;
    left: 7px;
    border-radius: 300px;
    max-width: 100%;
    overflow: hidden;
    height: 600px;
    object-fit: cover;
    z-index: 1;
    transform: rotate(0deg);
}

.image-content {
    height: 601px;
    flex: 1;
    position: relative;
    max-width: 100%;
}

.image-content-wrapper {
    flex: 1;
    flex-direction: row;
    min-width: 600px;
    min-height: 600px;
    max-width: 600px;
    max-height: 600px;
    padding-left: -100px;
    margin: 100px 0px 0px 0px;
}

.image-content-wrapper,
.intro-content-parent,
.profile,
.profile-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-content-parent {
    flex: 1;
    flex-direction: row;
    gap: 15%;
    max-width: 100%;
}

.profile,
.profile-inner {
    box-sizing: border-box;
}

.profile-inner {
    width: 100%;
    flex-direction: row;
    max-width: 100%;
    text-align: left;
    font-size: var(--font-size-xl);
    color: var(--color-darkslategray);
    font-family: var(--font-nunito);
}

.profile {
    width: 100%;
    position: relative;
    background-color: var(--color-gainsboro-200);
    overflow: clip;
    flex-direction: column;
    padding: var(--padding-7xs) var(--padding-22xl) 120px 120px;
    line-height: normal;
    letter-spacing: normal;
}

/* ===== RESPONSIVE BREAKPOINTS - FIXED VERSION ===== */
/* ===== PROFESSIONAL LOADING ANIMATIONS ===== */

/* Base animation states - hidden by default */
.frame-parent,
.footer-icons,
.icons img {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header specific animation */
.frame-parent {
    transform: translateY(-60px);
}

/* Text elements */
.madelyn-torff {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icons animation */
.icons img {
    transform: translateY(20px) rotate(10deg);
}

/* ===== LOADED STATES ===== */

/* When page is loaded, add .loaded class to body */
body.loaded .frame-parent {
    opacity: 1;
    transform: translateY(0);
    animation: headerSlideDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.loaded .madelyn-torff {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

body.loaded .footer-icons {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

body.loaded .icons a:nth-child(1) img {
    opacity: 1;
    transform: translateY(0) rotate(0);
    transition-delay: 0.4s;
}

body.loaded .icons a:nth-child(2) img {
    opacity: 1;
    transform: translateY(0) rotate(0);
    transition-delay: 0.5s;
}

body.loaded .icons a:nth-child(3) img {
    opacity: 1;
    transform: translateY(0) rotate(0);
    transition-delay: 0.6s;
}

body.loaded .icons a:nth-child(4) img {
    opacity: 1;
    transform: translateY(0) rotate(0);
    transition-delay: 0.7s;
}

/* ===== KEYFRAME ANIMATIONS ===== */

@keyframes headerSlideDown {
    0% {
        transform: translateY(-60px);
        opacity: 0;
    }
    50% {
        transform: translateY(5px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(20px) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

/* ===== ENHANCED HOVER ANIMATIONS ===== */

.button-primary {
    position: relative;
    overflow: hidden;
}

.button-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.button-primary:hover::before {
    left: 100%;
}

.button-primary:hover {
    background-color: var(--color-darkslategray);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(47, 72, 88, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-secondary {
    position: relative;
    overflow: hidden;
}

.button-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.button-secondary:hover::before {
    left: 100%;
}

.button-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-darkslategray);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(47, 72, 88, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ENHANCED IMAGE HOVER EFFECTS ===== */

.whatsapp-image-2024-12-03-at-1-icon:hover {
    transform: scale(1.05) rotate(-3deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.1) saturate(1.1);
}

.image-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 60%, rgba(217, 221, 230, 0.3) 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.image-content:hover::before {
    opacity: 1;
}

/* ===== ENHANCED ICON ANIMATIONS ===== */

.github,
.phinstagram-logo-fill-icon {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.github::after,
.phinstagram-logo-fill-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.github:hover::after,
.phinstagram-logo-fill-icon:hover::after {
    width: 120%;
    height: 120%;
}

.github:hover,
.phinstagram-logo-fill-icon:hover {
    transform: translateY(-5px) scale(1.15) rotate(5deg);
    filter: brightness(1.2) saturate(1.3);
}

/* ===== LOADING OVERLAY ENHANCEMENT ===== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(217, 221, 230, 0.95) 0%, rgba(241, 245, 249, 0.98) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

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

    .frame-parent,
    .icons img {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== MICRO-INTERACTIONS ===== */

.tab-default a {
    position: relative;
    overflow: hidden;
}

.tab-default a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.tab-default a:hover::before {
    left: 100%;
}

.tab-default a:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}


@media screen and (max-width: 1400px) {
    .intro-content {
        flex: 1;
    }
    .intro-content-parent {
        gap: 0px;
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 1250px) {
    .intro-content {
        flex: 1;
    }
    .intro-content-parent {
        margin-top: 100px;
        flex-wrap: wrap;
        flex-direction: column-reverse;
    }
    .image-content {
        height: 400px;
    }
    .image-content-wrapper {
        padding: 0 0 30px 0;
        margin: 1px 1px 30px 1px;
    }
    .frame-parent.floating,
    body.loaded .frame-parent.floating {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%); /* Center horizontally */
        width: 80%; /* Keep 50% width when floating */
        background-color: rgba(217, 221, 230, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        animation: slideDownFloat 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

/* Narrow desktops: the six links only fit with a tighter gap and a smaller
   "Presentation"; otherwise the last link slides under the GitHub icon. */
@media screen and (min-width: 1051px) and (max-width: 1250px) {
    .frame-parent {
        gap: 14px;
        padding: 10px;
    }

    .nav-wrapper {
        width: auto;
        padding-right: 0;
        font-size: 16px;
    }

    .nav {
        gap: 10px;
    }

    .sobre-presentation {
        font-size: 20px;
    }

    /* the icon block must not shrink, or its row spills over the links */
    .footer-icons {
        flex-shrink: 0;
    }

    .icons {
        gap: 10px;
    }
}

/* Show hamburger and hide desktop nav on mobile */
@media screen and (max-width: 1050px) {
    .hamburger-container {
        display: block !important;
    }

    .nav {
        display: none !important;
    }

    .nav-wrapper {
        width: 25px;
    }
    .title {
        font-size: var(--font-size-32xl);
        line-height: 61px;
    }
    .intro-content {
        min-width: 100%;
    }
    .image-content-wrapper {
        flex: 1;
    }
    .profile {
        width: 100%;
        position: relative;
        background-color: var(--color-gainsboro-200);
        overflow: clip;
        flex-direction: column;
        padding: 30px 30px 30px 30px;
        gap: 0px;
        line-height: normal;
        letter-spacing: normal;
    }
    .intro-content-parent {
        gap: 0px;
        flex-wrap: wrap;
        padding: 0 0 0 0;
        margin: 50px 0 0 0;
    }
    .frame-parent.floating,
    body.loaded .frame-parent.floating {
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        min-width: 0;
        background-color: var(--color-gainsboro-200);
        backdrop-filter: none;
        border-radius: 0;
        box-shadow: none;
        border: none;
        animation: none;
        transition: all 0.3s ease;
    }

    /* The desktop pill's hover lift is centred with translateX(-50%); on this
       full-width bar that shoved the header (and the hamburger) half off the
       screen as soon as it was touched or hovered. */
    body.loaded .frame-parent.floating:hover {
        transform: none;
        box-shadow: none;
    }

    /* Force hide old hamburger styles */
    .tab-Hamburger {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Additional safety measures for responsive behavior */
@media screen and (min-width: 1051px) {
    .hamburger-container {
        display: none !important;
    }

    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }
}

/* CRITICAL FIX: Ensure mobile nav stays hidden at 750px unless activated */
@media screen and (max-width: 750px) {
    .content {
        gap: 16px;
    }
    .intro-content {
        padding-top: 44px;
        box-sizing: border-box;
    }
    .intro-content-parent {
        gap: var(--gap-2xl);
    }
    .profile {
        box-sizing: border-box;
    }
    .image-content-wrapper {
        flex: 1;
        flex-direction: row;
        min-width: 400px;
        min-height: 400px;
        max-width: 400px;
        max-height: 400px;
        margin-top: 30px;
        padding-bottom: 30px;
    }
    .whatsapp-image-2024-12-03-at-1-icon {
        position: relative;
        width: 400px;
        top: 1px;
        overflow: hidden;
        height: 400px;
        z-index: 1;
    }
    .profile-picture {
        position: absolute;
        top: 0;
        left: 0;
        border-radius: 50%;
        background-color: var(--color-gainsboro-100);
        min-width: 400px;
        min-height: 400px;
        max-width: 400px;
        max-height: 400px;
        margin: 0 20px 0 20px;
    }
}

@media screen and (max-width: 550px) {
    .ai-engineer {
        font-size: 23px;
    }
    .title {
        font-size: var(--font-size-19xl);
        line-height: 46px;
    }
    .text {
        font-size: var(--font-size-lgi);
        line-height: 29px;
    }
    .profile {
        gap: 44px;
        padding-left: var(--padding-xl);
        box-sizing: border-box;
    }
    .github,
    .phinstagram-logo-fill-icon {
        width: 40px;
    }
    .github {
        width: 36px;
        padding: 0 0 0 0;
        margin: 7px 0 0 0;
    }
    .icons {
        gap: 15px;
        margin-left: 70px;
    }
    .image-content-wrapper {
        width: 90%;
    }
    .intro-content-parent {
        gap: 0px;
        flex-wrap: wrap;
        padding: 0 0 0 0;
        margin: 0px 0 0 0;
    }
    .intro-content {
        gap: 0px;
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 450px) {
    .ai-engineer {
        font-size: 23px;
    }
    .title {
        font-size: var(--font-size-19xl);
        line-height: 46px;
    }
    .text {
        font-size: var(--font-size-lgi);
        line-height: 29px;
    }
    .profile {
        gap: 44px;
        padding-left: var(--padding-xl);
        box-sizing: border-box;
    }
    .github,
    .phinstagram-logo-fill-icon {
        width: 40px;
    }
    .github {
        width: 36px;
        padding: 0 0 0 0;
        margin: 7px 0 0 0;
    }
    .icons {
        gap: 15px;
        margin-left: 70px;
    }
    .image-content-wrapper {
        width: 90%;
    }
    .intro-content-parent {
        gap: 0px;
        flex-wrap: wrap;
        padding: 0 0 0 0;
        margin: 0px 0 0 0;
    }
    .intro-content {
        gap: 0px;
        flex-wrap: wrap;
    }
    .whatsapp-image-2024-12-03-at-1-icon,
    .profile-picture,
    .image-content-wrapper,
    .image-content {
        object-fit: stretch;
        width: 360px;
        height: 360px;
        min-width: 0;
        min-height: 0;
    }
}

@media screen and (max-width: 415px) {
    .ai-engineer {
        font-size: 23px;
    }
    .title {
        font-size: var(--font-size-19xl);
        line-height: 46px;
    }
    .text {
        font-size: var(--font-size-lgi);
        line-height: 29px;
    }
    .profile {
        gap: 44px;
        padding-left: var(--padding-xl);
        box-sizing: border-box;
    }
    .github,
    .phinstagram-logo-fill-icon {
        width: 40px;
    }
    .github {
        width: 36px;
        padding: 0 0 0 0;
        margin: 7px 0 0 0;
    }
    .icons {
        gap: 15px;
        margin-left: 70px;
    }
    .image-content-wrapper {
        width: 90%;
    }
    .intro-content-parent {
        gap: 0px;
        flex-wrap: wrap;
        padding: 0 0 0 0;
        margin: 0px 0 0 0;
    }
    .intro-content {
        gap: 0px;
        flex-wrap: wrap;
    }
    .whatsapp-image-2024-12-03-at-1-icon,
    .profile-picture,
    .image-content-wrapper,
    .image-content {
        object-fit: stretch;
        width: 340px;
        height: 340px;
    }
}

/* ===== CHATBOT STYLES ===== */

        /* Chatbot Bubble - Fixed Position */
        .chatbot-bubble {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #354c6b 0%, #4a6384 100%);
            border-radius: 50%;
            cursor: pointer;
            z-index: 9997; /* Below modal (9998+) but above everything else */
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 25px rgba(53, 76, 107, 0.3);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 3px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 0;
            color: inherit;
            font: inherit;
        }

        .chatbot-bubble:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 12px 35px rgba(53, 76, 107, 0.4);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .chatbot-bubble:active {
            transform: translateY(-1px) scale(0.98);
        }

        /* Robot Icon */
        .chatbot-icon {
            width: 28px;
            height: 28px;
            fill: white;
            transition: transform 0.3s ease;
        }

        .chatbot-bubble:hover .chatbot-icon {
            transform: rotate(5deg) scale(1.1);
        }

        /* Notification Badge */
        .chatbot-notification {
            position: absolute;
            top: -5px;
            right: -5px;
            width: 20px;
            height: 20px;
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            color: white;
            border: 2px solid white;
            animation: pulse 2s infinite;
            opacity: 0;
            transform: scale(0);
            transition: all 0.3s ease;
        }

        .chatbot-notification.show {
            opacity: 1;
            transform: scale(1);
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        /* Chat Container */
        .chatbot-container {
            position: fixed;
            bottom: 100px;
            right: 30px;
            width: 380px;
            height: 500px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(53, 76, 107, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            z-index: 9997;
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px) scale(0.9);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .chatbot-container.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        /* Chat Header */
        .chatbot-header {
            background: linear-gradient(135deg, #354c6b 0%, #4a6384 100%);
            padding: 20px;
            color: white;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-radius: 20px 20px 0 0;
        }

        .chatbot-header-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .chatbot-avatar {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .chatbot-avatar svg {
            width: 20px;
            height: 20px;
            fill: white;
        }

        .chatbot-header-text h3 {
            margin: 0;
            font-size: 16px;
            font-weight: 700;
            font-family: var(--font-comfortaa, 'Comfortaa', cursive);
        }

        .chatbot-header-text p {
            margin: 2px 0 0 0;
            font-size: 12px;
            opacity: 0.8;
            font-family: var(--font-nunito, 'Nunito', sans-serif);
        }

        .chatbot-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .chatbot-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .chatbot-close svg {
            width: 16px;
            height: 16px;
            stroke: white;
        }

        /* Chat Messages */
        .chatbot-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
            background: rgba(249, 250, 251, 0.5);
        }

        .chatbot-messages::-webkit-scrollbar {
            width: 6px;
        }

        .chatbot-messages::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.05);
            border-radius: 3px;
        }

        .chatbot-messages::-webkit-scrollbar-thumb {
            background: rgba(53, 76, 107, 0.3);
            border-radius: 3px;
        }

        .chatbot-messages::-webkit-scrollbar-thumb:hover {
            background: rgba(53, 76, 107, 0.5);
        }

        /* Message Bubble */
        .message {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            max-width: 85%;
            animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .message.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .message.bot {
            align-self: flex-start;
        }

        .message-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .message.bot .message-avatar {
            background: linear-gradient(135deg, #354c6b 0%, #4a6384 100%);
        }

        .message.user .message-avatar {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        }

        .message-avatar svg {
            width: 14px;
            height: 14px;
            fill: white;
        }

        .message-content {
            background: white;
            padding: 12px 16px;
            border-radius: 18px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            font-family: var(--font-nunito, 'Nunito', sans-serif);
            font-size: 14px;
            line-height: 1.4;
            color: #354c6b;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .message.user .message-content {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: white;
            border-color: rgba(255, 255, 255, 0.2);
        }

        .message.bot .message-content {
            border-top-left-radius: 6px;
        }

        .message.user .message-content {
            border-top-right-radius: 6px;
        }

        @keyframes messageSlideIn {
            0% {
                opacity: 0;
                transform: translateY(10px) scale(0.95);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Typing Indicator */
        .typing-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease;
        }

        .typing-indicator.show {
            opacity: 1;
            transform: translateY(0);
        }

        .typing-dots {
            display: flex;
            gap: 4px;
            padding: 12px 16px;
            background: white;
            border-radius: 18px 18px 18px 6px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .typing-dot {
            width: 8px;
            height: 8px;
            background: #354c6b;
            border-radius: 50%;
            animation: typingBounce 1.4s infinite ease-in-out;
        }

        .typing-dot:nth-child(1) { animation-delay: -0.32s; }
        .typing-dot:nth-child(2) { animation-delay: -0.16s; }
        .typing-dot:nth-child(3) { animation-delay: 0s; }

        @keyframes typingBounce {
            0%, 80%, 100% {
                transform: scale(0.8);
                opacity: 0.5;
            }
            40% {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* Chat Input */
        .chatbot-input-container {
            padding: 20px;
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            border-radius: 0 0 20px 20px;
        }

        .chatbot-input-wrapper {
            display: flex;
            align-items: center;
            gap: 12px;
            background: white;
            border-radius: 25px;
            padding: 8px 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .chatbot-input-wrapper:focus-within {
            border-color: #354c6b;
            box-shadow: 0 4px 12px rgba(53, 76, 107, 0.2);
        }

        .chatbot-input {
            flex: 1;
            border: none;
            outline: none;
            padding: 8px 0;
            font-family: var(--font-nunito, 'Nunito', sans-serif);
            font-size: 14px;
            color: #354c6b;
            background: transparent;
        }

        .chatbot-input::placeholder {
            color: rgba(53, 76, 107, 0.5);
        }

        .chatbot-send {
            background: linear-gradient(135deg, #354c6b 0%, #4a6384 100%);
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            opacity: 0.6;
        }

        .chatbot-send:hover {
            transform: scale(1.05);
            opacity: 1;
        }

        .chatbot-send:active {
            transform: scale(0.95);
        }

        .chatbot-send.enabled {
            opacity: 1;
        }

        .chatbot-send svg {
            width: 16px;
            height: 16px;
            fill: white;
        }

        /* Welcome Message */
        .welcome-message {
            text-align: center;
            padding: 20px;
            color: rgba(53, 76, 107, 0.7);
            font-family: var(--font-nunito, 'Nunito', sans-serif);
        }

        .welcome-message h4 {
            margin: 0 0 8px 0;
            font-size: 16px;
            font-weight: 700;
            color: #354c6b;
        }

        .welcome-message p {
            margin: 0;
            font-size: 13px;
            line-height: 1.4;
        }

        /* Quick Actions */
        .quick-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 12px;
        }

        .quick-action {
            background: rgba(255, 255, 255, 0.8);
            border: 1px solid rgba(53, 76, 107, 0.2);
            border-radius: 16px;
            padding: 6px 12px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: var(--font-nunito, 'Nunito', sans-serif);
            color: #354c6b;
        }

        .quick-action:hover {
            background: #354c6b;
            color: white;
            transform: translateY(-1px);
        }

        /* Responsive Design */
        @media screen and (max-width: 768px) {
            .chatbot-container {
                width: calc(100% - 40px);
                height: calc(100vh - 140px);
                height: calc(100dvh - 140px);
                right: 20px;
                bottom: 90px;
                border-radius: 16px;
            }

            .chatbot-bubble {
                bottom: 20px;
                right: 20px;
                width: 56px;
                height: 56px;
            }

            .chatbot-icon {
                width: 24px;
                height: 24px;
            }

            .chatbot-input {
                font-size: 16px;
            }
        }

        @media screen and (max-width: 480px) {
            .chatbot-container {
                width: calc(100% - 20px);
                height: calc(100vh - 120px);
                height: calc(100dvh - 120px);
                right: 10px;
                bottom: 80px;
                border-radius: 12px;
            }

            .chatbot-header {
                padding: 16px;
                border-radius: 12px 12px 0 0;
            }

            .chatbot-messages {
                padding: 16px;
            }

            .chatbot-input-container {
                padding: 16px;
                border-radius: 0 0 12px 12px;
            }
        }



/* ===== HERO INTRO =====
   Plays once, when the loading overlay leaves (body.loaded): the photo opens
   from a circle, the rotating title wipes in, the name rises letter by letter
   (static/js/scripts.js splits it into .char spans), then the text and the
   buttons follow. Only the first screen is animated. */

@keyframes heroPhotoIn {
    from {
        opacity: 0;
        clip-path: circle(0% at 50% 50%);
        transform: scale(1.12) rotate(0deg);
    }
    to {
        opacity: 1;
        clip-path: circle(75% at 50% 50%);
        transform: scale(1) rotate(0deg);
    }
}

@keyframes heroHalo {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heroWipe {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: none;
    }
}

@keyframes heroChar {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(0.55em) rotate(6deg);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: none;
    }
}

@keyframes heroRise {
    from {
        opacity: 0;
        filter: blur(6px);
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: none;
    }
}

@keyframes heroPop {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.92);
    }
    70% {
        opacity: 1;
        transform: translateY(-3px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: none;
    }
}

.title .word {
    display: inline-block;
    white-space: nowrap;
}

.title .char {
    display: inline-block;
}

/* Hidden until the intro starts. html.hero-intro is set by a tiny script in
   <head> (only when motion is allowed), so nothing flashes before this runs;
   the name stays hidden until scripts.js has split it into letters. */
.hero-intro .title:not([data-split]),
.hero-intro body:not(.loaded) .whatsapp-image-2024-12-03-at-1-icon,
.hero-intro body:not(.loaded) .image-content::after,
.hero-intro body:not(.loaded) .ai-engineer,
.hero-intro body:not(.loaded) .title .char,
.hero-intro body:not(.loaded) .text,
.hero-intro body:not(.loaded) .button-primary,
.hero-intro body:not(.loaded) .button-secondary {
    opacity: 0;
}

/* Soft halo that grows behind the photo */
.image-content::after {
    content: '';
    position: absolute;
    inset: -4%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 76, 107, 0.16) 0%, rgba(53, 76, 107, 0) 68%);
    z-index: 0;
    pointer-events: none;
}

.hero-intro body.loaded .image-content::after {
    animation: heroHalo 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-intro body.loaded .whatsapp-image-2024-12-03-at-1-icon {
    animation: heroPhotoIn 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero-intro body.loaded .ai-engineer {
    animation: heroWipe 0.8s cubic-bezier(0.65, 0, 0.35, 1) 0.3s both;
}

.hero-intro body.loaded .title .char {
    animation: heroChar 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.55s + var(--i, 0) * 45ms);
}

.hero-intro body.loaded .text {
    animation: heroRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.15s both;
}

.hero-intro body.loaded .button-primary {
    animation: heroPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.45s both;
}

.hero-intro body.loaded .button-secondary {
    animation: heroPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.58s both;
}

/* After the intro the elements go back to their normal hover transitions */
.hero-intro body.intro-done .whatsapp-image-2024-12-03-at-1-icon,
.hero-intro body.intro-done .ai-engineer,
.hero-intro body.intro-done .title .char,
.hero-intro body.intro-done .text,
.hero-intro body.intro-done .button-primary,
.hero-intro body.intro-done .button-secondary {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .image-content::after {
        animation: none !important;
    }
}

/* ===== MOBILE MENU: hamburger button + sidebar =====
   Same surfaces as the rest of the site: frosted light panels, slate
   (#354c6b) accents, Playfair for the name. Shown at <= 1050px. */

.hamburger-container {
    position: relative;
    display: none;
}

.hamburger,
.mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(236, 239, 245, 0.65) 100%);
    border: 1px solid rgba(53, 76, 107, 0.12);
    box-shadow:
        0 6px 18px rgba(53, 76, 107, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #354c6b;
    cursor: pointer;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
}

.hamburger {
    width: 48px;
    height: 48px;
}

.hamburger:hover,
.mobile-nav-close:hover {
    border-color: rgba(53, 76, 107, 0.22);
    box-shadow:
        0 10px 24px rgba(53, 76, 107, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hamburger:hover {
    transform: translateY(-2px);
}

.hamburger:active {
    transform: scale(0.95);
}

.hamburger:focus-visible,
.mobile-nav-close:focus-visible,
.mobile-nav-link:focus-visible,
.mobile-nav-social a:focus-visible,
.mobile-nav-mail:focus-visible {
    outline: 2px solid #354c6b;
    outline-offset: 3px;
}

/* Three right-aligned lines of different length; they even out on hover
   and turn into an X while the menu is open. */
.hamburger-lines {
    position: relative;
    display: block;
    width: 22px;
    height: 16px;
}

.hamburger-line {
    position: absolute;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: #354c6b;
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s ease;
}

.hamburger-line:nth-child(1) {
    top: 0;
    width: 100%;
}

.hamburger-line:nth-child(2) {
    top: 7px;
    width: 62%;
}

.hamburger-line:nth-child(3) {
    top: 14px;
    width: 82%;
}

.hamburger:hover .hamburger-line {
    width: 100%;
}

.hamburger.active .hamburger-line:nth-child(1) {
    width: 100%;
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(8px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    width: 100%;
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 38, 54, 0.42);
    backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    width: min(340px, 86vw);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 26px 22px 24px;
    background: linear-gradient(160deg, #f3f5f9 0%, #e2e6ee 100%);
    border-radius: 0 24px 24px 0;
    box-shadow: 18px 0 50px rgba(28, 38, 54, 0.2);
    overflow-y: auto;
    overscroll-behavior: contain;
    font-family: var(--font-nunito), sans-serif;
    transform: translateX(-105%);
    visibility: hidden;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.45s ease;
}

.mobile-nav.active {
    transform: none;
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(53, 76, 107, 0.1);
}

.mobile-nav-name {
    display: block;
    font-family: var(--title-h1), serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #354c6b;
}

.mobile-nav-role {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b7d96;
}

.mobile-nav-close {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.mobile-nav-close:hover {
    transform: rotate(90deg);
}

.mobile-nav-label {
    margin: 22px 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8a99ae;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Links slide in one after another (--d) when the menu opens; "translate"
   is used for that so hover can still use "transform". */
.mobile-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    text-decoration: none;
    color: #2d3e57;
    font-size: 17px;
    font-weight: 600;
    opacity: 0;
    translate: -18px 0;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.4s ease var(--d, 0s),
        translate 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

.mobile-nav.active .mobile-nav-link {
    opacity: 1;
    translate: 0 0;
}

.mobile-nav.active .mobile-nav-link:nth-child(1) { --d: 0.12s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { --d: 0.17s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { --d: 0.22s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { --d: 0.27s; }
.mobile-nav.active .mobile-nav-link:nth-child(5) { --d: 0.32s; }

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 0 3px 3px 0;
    background: #354c6b;
    transform: translateY(-50%);
    transition: height 0.25s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(53, 76, 107, 0.1);
    box-shadow: 0 6px 16px rgba(53, 76, 107, 0.08);
}

.mobile-nav-link:hover::before {
    height: 22px;
}

.mobile-nav-num {
    min-width: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    color: #8a99ae;
    transition: color 0.25s ease;
}

.mobile-nav-text {
    flex: 1;
}

.mobile-nav-arrow {
    width: 16px;
    height: 16px;
    color: #354c6b;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-nav-link:hover .mobile-nav-num {
    color: #354c6b;
}

.mobile-nav-link:hover .mobile-nav-arrow {
    opacity: 1;
    transform: none;
}

.mobile-nav-footer {
    margin-top: auto;
    padding-top: 8px;
}

.mobile-nav-footer .mobile-nav-label {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid rgba(53, 76, 107, 0.1);
}

.mobile-nav-social {
    display: flex;
    gap: 10px;
}

.mobile-nav-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(53, 76, 107, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mobile-nav-social a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(53, 76, 107, 0.14);
}

.mobile-nav-social img {
    width: 22px;
    height: 22px;
}

.mobile-nav-mail {
    display: inline-block;
    margin-top: 14px;
    font-size: 14px;
    color: #4a5f7d;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.mobile-nav-mail:hover {
    color: #354c6b;
    text-decoration: underline;
}

/* Very narrow phones: the photo's fixed 340px (<= 415px rules) is wider than
   the screen, which widened the hero column and pushed the text off the edge;
   the header icons' fixed 70px offset did the same to the email icon. */
@media screen and (max-width: 380px) {
    .whatsapp-image-2024-12-03-at-1-icon,
    .profile-picture,
    .image-content-wrapper,
    .image-content {
        width: calc(100vw - 50px);
        height: calc(100vw - 50px);
        min-width: 0;
        min-height: 0;
    }

    .footer-icons {
        gap: 0;
    }

    .icons {
        gap: 10px;
        margin-left: 0;
    }
}

/* ===== LANGUAGE SWITCH (EN / DE) =====
   In the header next to the contact icons, and in the mobile menu. On narrow
   phones the header has no room for it, so only the menu shows it there. */
.lang-switch {
    display: inline-flex;
    align-self: center;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(53, 76, 107, 0.15);
}

.lang-option {
    min-width: 36px;
    padding: 6px 10px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #4a5f7d;
    font: 700 13px/1 var(--font-nunito, sans-serif);
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-option:hover {
    color: #354c6b;
}

.lang-option[aria-pressed="true"] {
    background: #354c6b;
    color: #fff;
}

.lang-option:focus-visible {
    outline: 2px solid #354c6b;
    outline-offset: 2px;
}

.mobile-nav-footer .lang-switch {
    align-self: flex-start;
}

.mobile-nav-footer .lang-option {
    min-width: 48px;
    padding: 10px 14px;
}

@media screen and (max-width: 550px) {
    .icons .lang-switch {
        display: none;
    }
}
