:root {
    --transition-fast: 0.2s;
    --transition-medium: 0.35s;
    --transition-slow: 0.6s;
}

* {
    transition-timing-function: ease;
}

/* =========================
   NAV BASE
========================= */

nav {
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1f1f1f;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 25px;

    /* ✅ THIS IS THE KEY */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    z-index: 9999;
}

/* FORCE TEXT */
nav,
nav * {
    color: #fff !important;
}

/* =========================
   LEFT (LOGO)
========================= */

.nav-left .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo {
    width: 15px;
    /* height: 20px; */
    object-fit: contain;
}

/* =========================
   CENTER LINKS (DESKTOP)
========================= */

.nav-center {
    display: flex;
    gap: 25px;
}

nav a {
    color: #fff !important;
    text-decoration: none;
    position: relative;
    transition: all var(--transition-fast);
}

nav a:hover {
    transform: translateY(-1px);
}

nav a.active {
    font-weight: 600;
    border-bottom: 1px solid white;
}

/* underline */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 1px;
    background: white;
    transition: 0.25s ease;
}

nav a:hover::after {
    width: 100%;
}

/* =========================
   RIGHT SIDE
========================= */

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

/* BUTTON RESET */
.lang-btn,
.hamburger {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    box-shadow: none;
}

.lang-btn {
    font-size: 18px;
}

/* hamburger hidden on desktop */
.hamburger {
    font-size: 28px;
    display: none;
}

/* =========================
   LANGUAGE MENU
========================= */

.lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;

    background: #111;
    border: 1px solid #333;
    padding: 10px;

    flex-direction: column;
    gap: 8px;

    z-index: 10000;
}

.lang-menu.open {
    display: flex;
}

/* =========================
   GLOBAL
========================= */

body {
    background: #0a0a0a;
    color: rgba(255,255,255,0.9);
    font-family: Arial, sans-serif;
    padding-top: 70px;
    letter-spacing: 0.2px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

/* =========================
   MOBILE (FIXED DROPDOWN)
========================= */

@media (max-width: 768px) {

    /* =========================
       NAV STRUCTURE
    ========================= */

    nav {
        background: rgba(10,10,10,0.85);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid #1f1f1f;
        animation: navDrop 0.35s ease-out;
    
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 25px;
    
        position: fixed;   /* ✅ CHANGE */
        top: 0;
        left: 0;
        right: 0;
    
        z-index: 9999;
    }

    .nav-left {
        flex: 0 0 auto;
    }

    .nav-right {
        display: flex;
        align-items: center;
        gap: 10px;

        margin-left: auto; /* locks to right side */
    }

    /* keep globe first, hamburger second */
    .lang-btn {
        order: 1;
    }

    .hamburger {
        order: 2;
        display: block;
    }

    /* =========================
       DROPDOWN MENU
    ========================= */

    .nav-center {
        display: none;
        position: absolute;
        top: 70px;
        right: 20px;

        flex-direction: column;
        gap: 12px;

        background: rgba(17,17,17,0.95);
        border: 1px solid #2a2a2a;
        border-radius: 14px;

        padding: 14px 16px;
        min-width: 210px;

        z-index: 9999;

        transform: translateY(-8px);
        opacity: 0;
        transition: all 0.2s ease;
        pointer-events: none;
    }

    body.nav-open .nav-center {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* links inside dropdown */
    .nav-center a {
        padding: 6px 8px;
        border-radius: 6px;
    }

    .nav-center a:hover {
        background: rgba(255,255,255,0.06);
        transform: none;
    }
}
/* =========================
   ANIMATIONS
========================= */

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =========================
   MOBILE MENU DROPDOWN (CLEAN)
========================= */

@media (max-width: 768px) {

    /* hide desktop center by default */
    .nav-center {
        display: none;
        position: absolute;
        top: 70px;
        right: 20px;

        flex-direction: column;
        gap: 12px;

        background: rgba(17,17,17,0.95);
        border: 1px solid #2a2a2a;
        border-radius: 12px;

        padding: 14px;
        min-width: 200px;

        z-index: 9999;

        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: 0.2s ease;
    }

    /* OPEN STATE */
    nav.menu-open .nav-center {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .hamburger {
        display: block;
    }

    .nav-right {
        display: flex;
        align-items: center;
        gap: 12px;
    }
}

/* =========================
   GLOBAL CONTENT CONSISTENCY
========================= */

main {
    width: 100%;
}

/* prevents accidental wide layouts */
section {
    max-width: 1100px;
    margin: 0 auto;

    padding: var(--space-7) var(--space-4);
}