@import url('fontface.css');

:root {
    --bg-color: rgb(25, 25, 25);
    --text-color: rgb(245, 245, 245);
    --logo-color: rgba(245, 110, 45, 1);
}

:root.light-mode {
    --bg-color: rgb(245, 245, 245);
    --text-color: rgb(25, 25, 25);
    --logo-color: rgba(25, 25, 25, 1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

.menu {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto;
    padding: 0 40px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

body.menu-open #theme-toggle,
:host(.menu-open) #theme-toggle {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.corner-btn {
    position: absolute;
    top: 27px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    transition: color 0.4s ease, opacity 0.3s ease;
    z-index: 100;
}

.top-left {
    left: 0;
}

.top-right {
    right: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.hamburger-icon {
    width: 24px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transition-delay: 0.3s;
    margin: auto;
    transform: translateX(5px);
}

.hamburger-icon span {
    position: absolute;
    right: 0;
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.4s ease, opacity 0.3s ease;
    transform: translateX(0px);
}

.hamburger-icon span:nth-child(1) {
    top: 0;
    width: 20px;
}

.hamburger-icon span:nth-child(2) {
    top: 6px;
    width: 16px;
}

.hamburger-icon span:nth-child(3) {
    top: 12px;
    width: 24px;
}

body.menu-open .hamburger-icon,
:host(.menu-open) .hamburger-icon {
    opacity: 0;
    visibility: hidden;
    transition-delay: 0s;
}

#menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-btn:hover .hamburger-icon span:nth-child(1) {
    width: 24px;
}

#menu-btn:hover .hamburger-icon span:nth-child(2) {
    width: 24px;
}

#menu-btn:hover .hamburger-icon span:nth-child(3) {
    width: 24px;
}

#menu-btn::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    line-height: 1;
    color: var(--text-color);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transition-delay: 0s;
}

body.menu-open #menu-btn::after,
:host(.menu-open) #menu-btn::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.3s;
}

.header-logo {
    position: absolute;
    top: 27px;
    width: 40px;
    height: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--logo-color);
    -webkit-mask: url('../img/menu/logo.svg') no-repeat center / contain;
    mask: url('../img/menu/logo.svg') no-repeat center / contain;
    transition: background-color 0.4s ease, left 0.4s ease, transform 0.4s ease;
    z-index: 2000;
    cursor: pointer;
    display: block;
}

body.menu-open .header-logo,
:host(.menu-open) .header-logo {
    left: 10px;
    transform: translateX(0);
}

.header-logo img {
    display: none;
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 75px;
    height: 40px;
    background: rgba(230, 230, 230, 1);
    border: none;
    border-radius: 40px;
    padding: 0 4px;
    position: relative;
    transition: background-color 0.4s ease;
}

:root.light-mode .theme-switch,
:host-context(html.light-mode) .theme-switch {
    background: rgba(90, 90, 90, 1);
}

.theme-switch::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(25, 25, 25, 1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}

:root.light-mode .theme-switch::before,
:host-context(html.light-mode) .theme-switch::before {
    transform: translateX(35px);
    background: rgba(245, 245, 245, 1);
}

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 1;
}

.theme-icon svg {
    width: 15px;
    height: 15px;
    transition: color 0.4s ease;
}

.theme-icon.moon {
    color: rgb(245, 245, 245);
}

.theme-icon.sun {
    color: rgb(25, 25, 25);
}

.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}

.nav-container {
    width: 100%;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 100px 40px 75px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

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

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: -15px;
}

.nav-links li a {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'TT Rationalist Regular', sans-serif;
    font-size: 36px;
    letter-spacing: 0px;
    transition: color 0.3s ease, opacity 0.2s ease;
}

.nav-links li a:hover {
    color: rgba(245, 110, 45, 1);
}

.nav-social {
    display: flex;
    gap: 20px;
    padding: 0;
    margin-top: auto;
}

.nav-social a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-social a img {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(105%) contrast(101%);
    transition: filter 0.3s ease;
}

:root.light-mode .nav-social a img,
:host-context(html.light-mode) .nav-social a img {
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%);
}

.nav-social a:hover img {
    filter: invert(55%) sepia(85%) saturate(2200%) hue-rotate(345deg) brightness(100%) contrast(95%) !important;
}










@media (max-width: 1200px) {
    .menu {
        width: 100%;
        max-width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        padding: 0 20px;
    }

    .top-left {
        left: 20px;
    }

    .top-right {
        right: 20px;
    }

    .nav-container {
        padding: 120px 20px 75px 20px;
    }

    body.menu-open .header-logo,
    :host(.menu-open) .header-logo {
        left: 20px;
    }
}