@font-face
{
    font-family: 'Cuprum';
    src: url("../fonts/Cuprum-Regular-yUk2A0f.ttf")  format('truetype');
}
:root
{
    --pico-font-family: 'Cuprum';
    --offcanvas-width: 280px;
}
:root:not([data-theme=dark]), [data-theme=light]
{
    nav
    {
        [data-tooltip]:not(a,button,input)
        {
            a
            {
                color: #2d3138;
            }
        }
    }
}
:root:not([data-theme=light]), [data-theme=dark]
{
    nav
    {
        [data-tooltip]:not(a,button,input)
        {
            a
            {
                color: #f0f1f3;
            }
        }
    }
}
header
{
    nav
    {
        [data-tooltip]:not(a,button,input)
        {
            border: none;
            text-decoration: none;
            a
            {
                &:hover, &:active, &:focus
                {
                    text-decoration: none;
                }
            }
        }
        li[data-tooltip]
        {
            border-bottom: none;
        }
        #theme-switcher,
        #theme-switcher-mobile
        {
            cursor: pointer;
            text-decoration: none;
        }
        .theme-icon
        {
            display: none;
            &.active
            {
                display: block;
            }
            svg
            {
                width: 24px;
            }
        }
    }
}
footer
{
    nav
    {
        svg
        {
            width: 24px;
        }
    }
}
html[data-theme=dark]
{
    .profile
    {
        img
        {
            width: 150px;
            max-width: 100%;
            border-radius: 50%;
            filter: invert(1);
        }
    }
}
html[data-theme=light]
{
    .profile
    {
        img
        {
            width: 150px;
            max-width: 100%;
            border-radius: 50%;
            filter: invert(0);
        }
    }
}
.text-center
{
    text-align: center;
}
.text-right
{
    text-align: right;
}
:is(button,[type=submit],[type=button],[role=button]).outline.error
{
    --pico-color: var(--pico-del-color);
    --pico-border-color: var(--pico-del-color);
}

/* Menu burger button */
.menu-burger
{
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    margin: 0;
    width: auto;
    position: relative;
}
.menu-burger[aria-expanded="true"]
{
    position: fixed;
    top: 16px;
    right: 16px;
}
.menu-burger .burger-icon
{
    display: block;
}
.menu-burger .burger-icon .line
{
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.menu-burger[aria-expanded="true"] .line-1
{
    transform: translateY(6px) rotate(45deg);
}
.menu-burger[aria-expanded="true"] .line-2
{
    opacity: 0;
}
.menu-burger[aria-expanded="true"] .line-3
{
    transform: translateY(-6px) rotate(-45deg);
}

/* Burger icon colors */
html[data-theme=dark] .menu-burger .burger-icon .line
{
    stroke: #fff;
}
html[data-theme=light] .menu-burger .burger-icon .line
{
    stroke: #333;
}

/* Off-canvas backdrop */
.offcanvas-backdrop
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}
.offcanvas-backdrop.active
{
    opacity: 1;
    visibility: visible;
}

/* Off-canvas panel */
.offcanvas
{
    position: fixed;
    top: 0;
    right: 0;
    width: var(--offcanvas-width);
    max-width: 80vw;
    height: 100%;
    background: var(--pico-background-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}
.offcanvas.active
{
    transform: translateX(0);
}
.offcanvas nav
{
    padding: 80px 24px 24px;
}
.offcanvas nav ul
{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}
.offcanvas nav ul li
{
    padding: 0;
}
.offcanvas nav ul li a
{
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
    margin: 0;
}
.offcanvas nav ul li a:hover
{
    background: var(--pico-secondary-background);
}
.offcanvas nav ul li
{
    margin: 0;
    padding: 0;
}

/* Theme-specific off-canvas styles */
html[data-theme=dark] .offcanvas
{
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-theme=light] .offcanvas
{
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

/* Desktop: hide burger, show nav links */
.nav-links
{
    display: flex;
}
.offcanvas,
.offcanvas-backdrop
{
    display: none;
}

/* Mobile: show burger, hide nav links, enable off-canvas */
@media (max-width: 768px)
{
    .menu-burger
    {
        display: block;
    }
    .nav-links
    {
        display: none;
    }
    .offcanvas,
    .offcanvas-backdrop
    {
        display: block;
    }
}

/* Prevent body scroll when off-canvas is open */
body.offcanvas-open
{
    overflow: hidden;
}
