/*Font*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/*  variaves  */
:root {
    --bg: #0b0f14;
    --panel: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.06);
    --text: #e6eef8;
    --muted: #9aa8bb;
    --accent1: #8a5cff;
    --accent2: #00d2ff;
    --neon: 0 6px 28px rgba(138, 92, 255, 0.14), 0 1px 0 rgba(0, 0, 0, 0.6);
    --glass-blur: 10px;
    --header-height: 72px;
    --transition-fast: 200ms;
    --transition-med: 350ms;
    --radius: 12px;
    --font-mont: 'Montserrat', sans-serif;
    --font-rale: 'Raleway', sans-serif;
}

/*Light theme*/
[data-theme="light"] {
    --bg: linear-gradient(180deg, #f7f8fb, #eef2fb);
    --panel: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(10, 12, 20, 0.06);
    --text: #09121a;
    --muted: #4b5965;
    --neon: 0 6px 28px rgba(138, 92, 255, 0.06);
}

/*Dark theme*/
[data-theme="dark"] {
    --bg: linear-gradient(180deg, #0b0f17, #121622);
    --panel: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #f5f7ff;
    --muted: #b7c0ce;
    --neon: 0 6px 28px rgba(138, 92, 255, 0.25);
}

/* Basic layout helpers */
* {
    box-sizing: border-box
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
    transition: background var(--transition-med), color var(--transition-med);
}



/* Header */
.header {
    position: sticky;
    top: 16px;
    z-index: 999;
    display: block;
    padding: 0;
    transition: transform var(--transition-med);
    pointer-events: auto;
    font-family: var(--font-rale);
}

.logo-svg text {
    color: var(--text);
}

.header-container {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 8px;
    padding: 10px 18px;
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--neon);
    transition: background var(--transition-med), box-shadow var(--transition-med), transform var(--transition-med);
}

/* When hovering over the main image, it reduces the blur and adds a stronger neon border */
.header.scrolled .header-container {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(138, 92, 255, 0.08);
    border: 1px solid rgba(138, 92, 255, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(10, 10, 20, 0.02));
}


/* Nav */
.nav {
    display: flex;
    gap: 16px;
    margin-left: 8px;
    align-items: center;
    flex: 1;
}

.nav-link {
    position: relative;
    color: var(--text);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

/* neon animation */
.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    height: 3px;
    width: 60%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    box-shadow: 0 6px 18px rgba(0, 210, 255, 0.08), 0 0 18px rgba(138, 92, 255, 0.12);
    transition: transform var(--transition-fast) cubic-bezier(.2, .9, .2, 1), opacity var(--transition-fast);
    opacity: 0.95;
}

.nav-link:hover::after,
.nav-link:focus::after {
    transform: translateX(-50%) scaleX(1);
}

/* active link */
.nav-link.active {
    color: var(--accent2);
    text-shadow: 0 2px 10px rgba(0, 210, 255, 0.06);
    transform: translateY(-2px);
}

/* Header actions (buttons) */
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* small icon buttons */
.header-actions button {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.header-actions button:focus {
    outline: 2px solid rgba(138, 92, 255, 0.18);
    outline-offset: 2px;
}

.lang-switch:hover {
    transform: translateY(-3px);
}

/* theme toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: visible;
}

/* icons inside theme toggle */
.sun-icon,
.moon-icon {
    display: inline-grid;
    place-items: center;
    transition: transform var(--transition-fast) ease, opacity var(--transition-fast);
    font-size: 16px;
    line-height: 1;
    color: var(--text);
}

/* Hide one of the icons according to the theme. */
.sun-icon,
.moon-icon {
    position: absolute;
    transition: 0.25s ease;
}

/* It begins by showing the moon (light theme). */
.sun-icon {
    opacity: 0;
    transform: scale(1);
}

.moon-icon {
    opacity: 1;
    transform: scale(0);
}

/* menu toggle (hamburger) */
.menu-toggle {
    display: none;
    width: 46px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: transparent;
    padding: 8px;
    gap: 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-line {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    border-radius: 2px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    display: none;
}

/* Media query */

/* 1024px */
@media (max-width: 1024px) {
    .nav-link {
        padding: 6px 8px;
    }

    .header-container {
        gap: 14px;
        padding: 8px 14px;
    }
}

/* 768px */
/* Menu becomes a hamburger menu, navigation becomes vertical */

@media (max-width: 768px) {

    /* Show the button */
    .menu-toggle {
        display: flex;
    }

    .menu-line {
        display: block;
    }

    /* Hide menu on mobile */
    .nav {
        position: fixed;
        flex: none; /* Ensures that it does not take up space. */
        display: none; /* It completely hides the nav from the layout when closed */
        top: 85px;
        right: -260px;
        width: 240px;
        backdrop-filter: blur(12px);
        border-left: 1px solid rgba(255, 255, 255, 0.07);
        flex-direction: column;
        gap: 25px;
        padding: 35px 22px;
        border-radius: 8px 0 0 8px;
        transition: right 0.35s ease;
        z-index: 1000;
    }

    /* When it is open */
    .nav.open {
        right: 0;
        display: flex; /* Shows the navigation only when it's open */
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 10px 0;
    }

    .header-container {
        justify-content: space-between;
    }
}

/* 480px */
@media (max-width: 480px) {
    .logo-svg {
        width: 120px;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .nav {
        width: 210px;
    }

    .nav-link {
        font-size: 1rem;
    }
}

/* 360px */
@media (max-width: 360px) {
    .header-container {
        padding: 6px 12px;
    }

    .nav {
        width: 190px;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }
}

/* Animation mobile menu */

.menu-toggle.open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}