@import './vars.css';

body {
    background-color: var(--lighter);
    color: var(--darker);
    font-family: Arial, sans-serif;
    margin: 0;
}

main {
    padding-inline: 1rem;
}

/* navigation */

.site-header {
    --nav-height: 3.5rem;

    position: sticky;
    top: 0;
    z-index: 10;
    background-color: oklch(from var(--darkest) l c h / 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid oklch(from var(--lightest) l c h / 0.15);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--nav-height);
    padding-inline: 1rem;

    a {
        color: var(--lightest);
        text-decoration: none;
    }

    a:focus-visible,
    button:focus-visible {
        outline: 2px solid var(--lightest);
        outline-offset: 2px;
    }
}

.site-brand {
    font-weight: bold;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;

    a {
        display: block;
        padding: 0.4rem 0.8rem;
        border-radius: 999px;
        transition: background-color 150ms ease;
    }

    a:hover {
        background-color: oklch(from var(--lightest) l c h / 0.12);
    }

    a[aria-current="page"] {
        background-color: var(--lightest);
        color: var(--darkest);
    }
}

/* hamburger: three bars drawn from one element */
.nav-toggle {
    display: none;
    width: 2.5rem;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    cursor: pointer;

    &:hover {
        background-color: oklch(from var(--lightest) l c h / 0.12);
    }
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin-inline: auto;
    border-radius: 2px;
    background-color: var(--lightest);
}

.nav-toggle-bar {
    position: relative;

    &::before,
    &::after {
        content: "";
        position: absolute;
        left: 0;
    }

    &::before { top: -6px; }
    &::after { top: 6px; }
}

/* Wide screens: the popover list is always shown inline. */
@media (min-width: 40rem) {
    .nav-links[popover] {
        position: static;
        inset: auto;
        display: flex;
        width: auto;
        height: auto;
        overflow: visible;
        border: 0;
        background: none;
        color: inherit;
    }
}

/* Small screens: menu button + dropdown panel below the bar. */
@media (max-width: 39.999rem) {
    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .nav-links[popover] {
        position: fixed;
        inset: var(--nav-height) 0.75rem auto auto;
        min-width: 12rem;
        margin: 0;
        padding: 0.5rem;
        flex-direction: column;
        border: 1px solid oklch(from var(--lightest) l c h / 0.15);
        border-radius: 0.75rem;
        background-color: var(--darkest);
        box-shadow: 0 0.75rem 2rem oklch(0% 0 0 / 0.3);

        a {
            border-radius: 0.5rem;
        }
    }

    .nav-links:not(:popover-open) {
        display: none;
    }
}

/* breadcrumbs: Pentesting › Tools › Nmap */
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;

    li + li::before {
        content: "›";
        margin-inline-end: 0.25rem;
        opacity: 0.6;
    }

    a {
        color: var(--darker);
        text-decoration: none;
        border-bottom: 1px solid oklch(from var(--darker) l c h / 0.3);
    }

    a:hover {
        color: var(--darkest);
        border-bottom-color: currentColor;
    }

    [aria-current="page"] {
        font-weight: bold;
    }
}
h1 {
    color: var(--darkest);
}
h2 {
    color: var(--darker);
}

.box {
    border: 2px solid var(--border);
    margin: 10px 0;
    border-radius: 15px;
    width: 15vw;
    height: 10vh;
    position: relative;
}

.box .label {
    text-align: center;
    line-height: 4vh;
    font-weight: bold;
    background-color: white;
    height: 4vh;
    position: absolute;
    top:auto;
    bottom: 0;
    left: 0;
    width: 100%;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;

}

.lighter {
    background-color: var(--lighter);
}

.lightest {
    background-color: var(--lightest);
}

.darker {
    background-color: var(--darker);
}

.darkest {
    background-color: var(--darkest);
}

.basecomplement {
    background-color: var(--basecomplement);
}

.darkcomplement {
    background-color: var(--darkcomplement);
}

/* footer */ 

footer {
    background-color: var(--darkest);
    color: var(--lightest);
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
}
